/* ==========================================================
   Ryoto Web ポートフォリオサイト
   Design concept: 水色を基調としたスマート・クリーンな業務システム系デザイン
   ========================================================== */

:root {
  --bg: #F6FAFE;
  --panel: #EAF4FC;
  --panel-strong: #DCEEFA;
  --surface: #FFFFFF;
  --line: #CFE3F5;
  --line-strong: #A9D2EE;
  --primary: #2E7FC1;
  --primary-deep: #163C5C;
  --accent: #1FB6D6;
  --text: #1C2B3A;
  --text-muted: #62798E;

  --font-display: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --wrap: 1120px;
  --radius: 6px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .hero-glow,
  .link,
  .node-accent rect,
  .blueprint-grid,
  .bg-orb {
    animation: none !important;
  }
  .parallax-layer,
  .hero-diagram {
    transform: none !important;
  }
  .h2-mask .reveal-line,
  .work-thumb::after,
  .confirm-overlay,
  .confirm-modal {
    transition: none !important;
  }
  .h2-mask .reveal-line {
    transform: none !important;
  }
  .work-thumb::after {
    transform: scaleX(0) !important;
  }
  #bg-particles {
    display: none;
  }
  .hero-copy > *,
  .node,
  .corner-marks path,
  .measure line,
  .measure-label {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .link { opacity: 1 !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  width: 100%;
}

img, svg { max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0 0 0.6em;
  letter-spacing: 0.01em;
  color: var(--primary-deep);
}

p { margin: 0 0 1em; }

a { color: inherit; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
  width: 100%;
}

/* Flowing mesh-gradient background — soft blue/cyan color blobs that
   continuously drift and blend into each other for a lively, ambient feel */
.blueprint-grid {
  position: fixed;
  inset: -80px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 28%, rgba(31, 182, 214, 0.42) 0%, transparent 46%),
    radial-gradient(circle at 82% 18%, rgba(46, 127, 193, 0.40) 0%, transparent 44%),
    radial-gradient(circle at 65% 78%, rgba(31, 182, 214, 0.36) 0%, transparent 46%),
    radial-gradient(circle at 8% 85%, rgba(46, 127, 193, 0.32) 0%, transparent 44%);
  background-repeat: no-repeat;
  background-size: 160% 160%;
  filter: blur(3px);
  animation: meshFlow 26s ease-in-out infinite;
}

@keyframes meshFlow {
  0% {
    background-position: 0% 0%, 100% 0%, 100% 100%, 0% 100%;
  }
  50% {
    background-position: 30% 40%, 60% 30%, 55% 60%, 35% 65%;
  }
  100% {
    background-position: 0% 0%, 100% 0%, 100% 100%, 0% 100%;
  }
}

/* Parallax wrapper: JS applies scroll-based translateY here,
   so it never fights with the orb's own CSS drift animation */
.parallax-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

/* Ambient floating light orbs, visible behind all content, all the time */
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.8;
  will-change: transform;
}

.bg-orb-1 {
  top: -8%;
  left: -6%;
  width: 52vw;
  height: 52vw;
  max-width: 680px;
  max-height: 680px;
  background: radial-gradient(circle, rgba(31, 182, 214, 0.45) 0%, rgba(31, 182, 214, 0) 70%);
  animation: orbA 20s ease-in-out infinite alternate;
}

.bg-orb-2 {
  top: 36%;
  right: -8%;
  width: 46vw;
  height: 46vw;
  max-width: 600px;
  max-height: 600px;
  background: radial-gradient(circle, rgba(46, 127, 193, 0.42) 0%, rgba(46, 127, 193, 0) 70%);
  animation: orbB 25s ease-in-out infinite alternate;
}

.bg-orb-3 {
  bottom: -12%;
  left: 22%;
  width: 40vw;
  height: 40vw;
  max-width: 520px;
  max-height: 520px;
  background: radial-gradient(circle, rgba(31, 182, 214, 0.36) 0%, rgba(31, 182, 214, 0) 70%);
  animation: orbC 30s ease-in-out infinite alternate;
}

/* Particle network canvas, sits above the grid/orbs, still behind content */
#bg-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@keyframes orbA {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(10vw, 12vh) scale(1.2); }
}

@keyframes orbB {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-12vw, -10vh) scale(1.18); }
}

@keyframes orbC {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(9vw, -12vh) scale(1.15); }
}

main, header, footer { position: relative; z-index: 1; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 250, 254, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  font-family: var(--font-mono);
  font-size: 13px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--primary);
  padding: 4px 7px;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--primary-deep);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  flex-wrap: nowrap;
}

.main-nav a {
  position: relative;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s;
  white-space: nowrap;
  padding-bottom: 4px;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--primary);
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.main-nav a.nav-cta::after { display: none; }

.nav-cta {
  border: 1px solid var(--primary);
  color: var(--primary) !important;
  padding: 8px 16px;
  border-radius: var(--radius);
}

.nav-cta:hover {
  background: var(--primary);
  color: var(--surface) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--primary-deep);
  display: block;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 8px 28px 20px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.mobile-nav a {
  padding: 12px 0;
  text-decoration: none;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
}

.site-header.nav-open .mobile-nav { display: flex; }

/* ---------- Focus states ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin: 0 0 18px;
  text-transform: uppercase;
}

.eyebrow-dim { color: var(--text-muted); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 88px;
  overflow: visible;
}

.hero-glow {
  position: absolute;
  top: -120px;
  left: 8%;
  width: 620px;
  height: 620px;
  max-width: 90vw;
  background: radial-gradient(circle, rgba(31, 182, 214, 0.16) 0%, rgba(46, 127, 193, 0.08) 45%, transparent 72%);
  filter: blur(4px);
  pointer-events: none;
  z-index: -1;
  animation: drift 22s ease-in-out infinite alternate;
}

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 30px) scale(1.08); }
}

.hero-copy > * {
  opacity: 0;
  transform: translateY(14px);
  animation: heroIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.hero-copy > .eyebrow      { animation-delay: 0.05s; }
.hero-copy > h1             { animation-delay: 0.15s; }
.hero-copy > .hero-lead     { animation-delay: 0.32s; }
.hero-copy > .hero-actions  { animation-delay: 0.48s; }

@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  font-size: clamp(30px, 4.4vw, 50px);
  line-height: 1.4;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 15.5px;
  max-width: 46ch;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14.5px;
  padding: 14px 26px;
  text-decoration: none;
  transition: transform 0.18s, background 0.18s, color 0.18s, box-shadow 0.18s;
  border-radius: var(--radius);
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 8px 20px -8px rgba(46, 127, 193, 0.55);
}

.btn-primary:hover { transform: translateY(-2px); background: var(--primary-deep); }

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--primary-deep);
  background: var(--surface);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.hero-diagram {
  width: 100%;
  min-width: 0;
  transition: transform 0.15s ease-out;
  will-change: transform;
}

.schema-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.corner-marks path {
  stroke: var(--line-strong);
  fill: none;
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
  animation-delay: 0.1s;
}

.node {
  opacity: 0;
  transform: translateY(10px);
  animation: nodeIn 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  transform-box: fill-box;
  transform-origin: center;
}

.node:nth-of-type(1) { animation-delay: 0.35s; }
.node:nth-of-type(2) { animation-delay: 0.6s; }
.node:nth-of-type(3) { animation-delay: 0.85s; }
.node:nth-of-type(4) { animation-delay: 1.1s; }

@keyframes nodeIn {
  to { opacity: 1; transform: translateY(0); }
}

.node rect {
  fill: var(--surface);
  stroke: var(--line-strong);
  stroke-width: 1.3;
  filter: drop-shadow(0 4px 10px rgba(46, 127, 193, 0.08));
  transition: stroke 0.2s, filter 0.2s;
}

.node:hover rect {
  stroke: var(--primary);
  filter: drop-shadow(0 6px 16px rgba(46, 127, 193, 0.18));
}

.node-accent rect {
  fill: #E4F8FC;
  stroke: var(--accent);
  animation: pulseAccent 2.6s ease-in-out 1.4s infinite;
}

.node-index {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--text-muted);
}

.node-accent .node-index { fill: var(--accent); }

.node-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  fill: var(--primary-deep);
}

.link {
  stroke: var(--line-strong);
  stroke-width: 1.3;
  fill: none;
  stroke-dasharray: 4 4;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards, marchAnts 1.4s linear 1.2s infinite;
}

.link:nth-of-type(1) { animation-delay: 0.5s, 1.3s; }

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes marchAnts {
  to { stroke-dashoffset: -16; }
}

@keyframes pulseAccent {
  0%, 100% { stroke-width: 1.3; }
  50% { stroke-width: 2.2; }
}

.measure line {
  stroke: var(--text-muted);
  stroke-width: 1;
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
  animation-delay: 1.3s;
}

.measure-label {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--text-muted);
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
  animation-delay: 1.3s;
}

/* ---------- Sections ---------- */
.section {
  padding: 80px 28px;
  border-top: 1px solid var(--line);
}

.section h2 {
  font-size: clamp(23px, 2.8vw, 30px);
  margin-bottom: 0.8em;
}

.section-note {
  color: var(--text-muted);
  max-width: 60ch;
  margin-top: -8px;
  margin-bottom: 36px;
}

.section-note--nowrap {
  max-width: none;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .section-note--nowrap {
    white-space: normal;
  }
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-grid p {
  color: var(--text-muted);
}

.about-facts {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px;
  margin: 0;
}

.about-facts div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.about-facts div:last-child { border-bottom: none; }

.about-facts dt {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.about-facts dd {
  margin: 0;
  color: var(--text);
  font-size: 14.5px;
}

/* Service */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 22px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 10px 24px -14px rgba(46, 127, 193, 0.35);
}

.service-index {
  font-family: var(--font-mono);
  color: var(--primary);
  background: var(--panel);
  font-size: 13px;
  border: 1px solid var(--line-strong);
  display: inline-block;
  padding: 3px 9px;
  margin-bottom: 18px;
  border-radius: var(--radius);
}

.service-card h3 {
  font-size: 16px;
  margin-bottom: 0.5em;
}

.service-card p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

/* Works */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.work-card {
  position: relative;
  border: 2px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, background 0.2s;
}

/* Wrapping <a> makes the whole card clickable without changing the
   grid layout — display:contents removes its own box from the grid */
.work-card-link {
  display: contents;
  color: inherit;
  text-decoration: none;
}

.work-card-link .work-card {
  cursor: pointer;
}

/* Arrow indicator + strong hover state — only for cards that are
   actually clickable (wrapped in .work-card-link) */
.work-card-link .work-card::after {
  content: "→";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #E8A93D;
  color: #fff;
  font-size: 15px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.work-card-link .work-card:hover {
  border-color: #F5B754;
  box-shadow: 0 14px 30px -12px rgba(232, 169, 61, 0.45);
  transform: translateY(-5px);
  background: #FFF3DA;
}

.work-card-link .work-card:hover::after {
  opacity: 1;
  transform: scale(1);
}

.work-thumb {
  aspect-ratio: 16/10;
  background: var(--panel);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.work-thumb--img {
  border-style: solid;
  overflow: hidden;
  padding: 0;
}

.work-thumb--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.work-card:hover .work-thumb--img img {
  transform: scale(1.04);
}

.work-thumb span {
  font-family: var(--font-mono);
  color: var(--primary);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.work-card h3 {
  font-size: 16px;
  margin-bottom: 0.4em;
}

.work-card p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

.work-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.work-link:hover {
  color: var(--primary-deep);
  border-color: var(--primary-deep);
}

.work-card--placeholder {
  border-style: dashed;
  background: var(--panel);
}

/* Flow */
.flow-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.flow-list li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
  transition: padding-left 0.25s ease;
}

.flow-list li:hover {
  padding-left: 8px;
}

.flow-num {
  font-family: var(--font-mono);
  color: var(--primary);
  font-size: 20px;
  transition: color 0.25s ease, transform 0.25s ease;
}

.flow-list li:hover .flow-num {
  color: var(--accent);
  transform: scale(1.08);
}

.flow-list h3 {
  font-size: 16px;
  margin-bottom: 0.35em;
}

.flow-list p {
  color: var(--text-muted);
  margin: 0;
  font-size: 14.5px;
}

/* Contact */
.section-contact { padding-bottom: 100px; }

.contact-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}

.form-row {
  margin-bottom: 22px;
}

.form-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--primary-deep);
  margin-bottom: 8px;
}

.form-row .req {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #C0453A;
  background: rgba(192, 69, 58, 0.1);
  border: 1px solid rgba(192, 69, 58, 0.35);
  border-radius: 4px;
  padding: 2px 8px;
  line-height: 1.6;
}

.form-row .opt {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 2px 8px;
  line-height: 1.6;
}

.form-row input,
.form-row textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-row textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.7;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 127, 193, 0.15);
}

.form-row input:invalid:not(:placeholder-shown),
.form-row textarea:invalid:not(:placeholder-shown) {
  border-color: #E0776B;
}

/* Honeypot: hidden from sighted users and screen readers,
   but still present for simple bots to fall into */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#contact-submit {
  border: none;
  cursor: pointer;
  font-size: 15px;
  padding: 14px 32px;
}

#contact-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  margin: 14px 0 0;
  font-size: 13.5px;
  min-height: 1.2em;
}

.form-status.is-success { color: #1E8E5A; }
.form-status.is-error   { color: #C0453A; }

.contact-box {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 32px 22px;
  text-align: center;
  background: linear-gradient(180deg, var(--panel), var(--surface));
}

/* Confirmation modal (shown before actually sending the form) */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 34, 54, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.confirm-overlay[hidden] {
  display: none;
}

.confirm-overlay.is-open {
  opacity: 1;
}

.confirm-modal {
  width: 100%;
  max-width: 480px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 24px 60px -20px rgba(15, 34, 54, 0.35);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s ease;
}

.confirm-overlay.is-open .confirm-modal {
  transform: translateY(0) scale(1);
}

.confirm-modal h3 {
  font-size: 17px;
  margin-bottom: 20px;
}

.confirm-list {
  margin: 0 0 26px;
  border-top: 1px solid var(--line);
}

.confirm-list > div {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.confirm-list dt {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.confirm-list dd {
  margin: 0;
  font-size: 14.5px;
  color: var(--text);
  word-break: break-word;
}

.confirm-list dd:empty::after {
  content: "（未入力）";
  color: var(--text-muted);
}

.confirm-message {
  white-space: pre-wrap;
  line-height: 1.75;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.confirm-actions .btn {
  flex: 1;
  text-align: center;
}

@media (max-width: 480px) {
  .confirm-modal { padding: 22px 18px; }
  .confirm-actions { flex-direction: column-reverse; }
}

.contact-line {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.contact-mail {
  font-family: var(--font-mono);
  font-size: clamp(17px, 3vw, 25px);
  color: var(--primary);
  text-decoration: none;
  display: inline-block;
  border-bottom: 1px solid var(--primary);
  padding-bottom: 4px;
  word-break: break-all;
}

.contact-hint {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-top: 20px;
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ---------- Scroll reveal ---------- */
/* ---------- Scroll reveal (cinematic scale + fade) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity 0.85s cubic-bezier(0.19, 1, 0.22, 1), transform 0.85s cubic-bezier(0.19, 1, 0.22, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Heading mask-reveal: text rises up from behind a hidden edge,
   like a curtain lifting to reveal it — triggered with the section */
.h2-mask {
  overflow: hidden;
}

.h2-mask .reveal-line {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1) 0.1s;
}

.section.is-visible .h2-mask .reveal-line {
  transform: translateY(0);
}

/* Work thumbnail curtain-wipe: a solid panel slides away on reveal,
   uncovering the thumbnail underneath */
.work-thumb {
  position: relative;
  overflow: hidden;
}

.work-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--primary);
  transform-origin: right center;
  transform: scaleX(1);
  transition: transform 0.75s cubic-bezier(0.65, 0, 0.35, 1) 0.15s;
}

.work-card.is-visible .work-thumb::after {
  transform: scaleX(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 40px;
  }
  .hero-diagram { max-width: 480px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .works-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .service-grid { grid-template-columns: 1fr; }
  .works-grid { grid-template-columns: 1fr; }
  .about-facts div { grid-template-columns: 68px 1fr; }
  .flow-list li { grid-template-columns: 46px 1fr; }
  .section { padding: 56px 20px; }
  .hero { padding-bottom: 56px; }
  .contact-form { padding: 22px 18px; }
}
