/* ==========================================================================
   SaaB Technologies — site stylesheet
   Palette is derived from the logo: teal→leaf gradient sphere, ink-gray
   wordmark, and a small sun-orange accent (used sparingly).
   ========================================================================== */

:root {
  --paper: #fcfdfc;
  --ink: #33383b;
  --ink-soft: #5c6467;
  --deep: #14555f;
  --teal: #17707f;
  --teal-bright: #2c99ac;
  --leaf: #8fc06d;
  --wash-teal: #def0f2;
  --wash-leaf: #eaf4e4;
  --line: #dce4e2;
  --sun: #f2a93b;
  --radius: 10px;
  --font-display: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.9;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal); }

:focus-visible {
  outline: 3px solid var(--teal-bright);
  outline-offset: 2px;
  border-radius: 2px;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252, 253, 252, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.brand img { height: 30px; width: auto; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 8px 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
}

.site-nav a:hover { background: var(--wash-teal); color: var(--deep); }

.nav-cta {
  background: var(--teal);
  color: #fff !important;
  border-radius: 999px;
  padding: 8px 20px !important;
}

.nav-cta:hover { background: var(--deep) !important; }

.nav-toggle {
  display: none;
  white-space: nowrap;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
}

/* --- Hero: the bridge --------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  /* 白文字が読めるよう、スライドする2色レイヤーの下に深めのベースを敷く */
  background: linear-gradient(120deg, #1d7f90 0%, #61a14b 100%);
  min-height: calc(100svh - 64px);
  display: flex;
  align-items: center;
  padding: 48px 0 110px;
}

/* 旧サイトの背景アニメーションを踏襲:
   2色のハードエッジ斜めグラデーション3枚を、速度・方向違いで
   左右にスライドさせて重ね、柔らかく移ろう色面をつくる */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -50%;
  right: -50%;
  background-image: linear-gradient(-60deg, #a8e78f 50%, #6cc7d5 50%);
  opacity: 0.5;
  animation: hero-slide 4s ease-in-out infinite alternate;
}

.hero-bg i:nth-child(2) {
  animation-duration: 6s;
  animation-direction: alternate-reverse;
  opacity: 0.4;
}

.hero-bg i:nth-child(3) {
  animation-duration: 8s;
  opacity: 0.3;
}

@keyframes hero-slide {
  0% { transform: translateX(-25%); }
  100% { transform: translateX(25%); }
}

.hero .container { position: relative; z-index: 1; text-align: center; }

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(16, 60, 68, 0.25);
  margin-bottom: 24px;
}

.hero h1 {
  color: #fff;
  text-shadow: 0 1px 2px rgba(16, 60, 68, 0.2), 0 4px 28px rgba(16, 60, 68, 0.25);
  margin-bottom: 28px;
}

.hero h1 .en {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 7vw, 4.4rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.hero h1 .ja {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.15rem, 2.8vw, 1.7rem);
  letter-spacing: 0.12em;
  margin-top: 20px;
}

.hero-lead {
  max-width: 36em;
  margin: 0 auto 36px;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(16, 60, 68, 0.25);
}

.hero .btn-primary {
  background: #fff;
  color: var(--deep);
}

.hero .btn-primary:hover { background: var(--wash-teal); }

.hero .btn-ghost {
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.16); }

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 14px 36px;
  transition: background-color 0.2s, color 0.2s, transform 0.15s;
  cursor: pointer;
  border: none;
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--deep); }

.btn-ghost {
  background: transparent;
  color: var(--teal);
  box-shadow: inset 0 0 0 2px var(--teal);
}
.btn-ghost:hover { background: var(--wash-teal); }

/* スクロールキュー */

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(16, 60, 68, 0.3);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3em;
}

.scroll-cue::after {
  content: "";
  width: 2px;
  height: 46px;
  background: #fff;
  opacity: 0.75;
  transform-origin: top;
  animation: cue-line 2.2s ease-in-out infinite;
}

@keyframes cue-line {
  0% { transform: scaleY(0); opacity: 0.55; }
  55% { transform: scaleY(1); opacity: 0.55; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* --- Sections ----------------------------------------------------------- */

.section { padding: 96px 0; }
.section-wash { background: linear-gradient(180deg, var(--wash-teal) 0%, var(--wash-leaf) 100%); }

.section-head { text-align: center; margin-bottom: 56px; }

.section-eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 10px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  letter-spacing: 0.06em;
}

/* small arch under each heading — echo of the hero bridge */
.section-head h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 22px;
  margin: 12px auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 22'%3E%3Cpath d='M4 19 Q36 -10 68 19' fill='none' stroke='%232c99ac' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

.section-lead {
  max-width: 38em;
  margin: 20px auto 0;
  color: var(--ink-soft);
}

/* --- Worries (お困りごと) ------------------------------------------------ */

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

.worry {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  font-weight: 500;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.worry .q {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.worry small { color: var(--ink-soft); font-weight: 400; }

.worries-close { text-align: center; margin-top: 36px; font-weight: 500; }

/* --- Services ------------------------------------------------------------ */

.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.service {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.service-heading {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--wash-teal);
}

.service-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--teal);
  background: linear-gradient(135deg, var(--wash-teal), var(--wash-leaf));
  border: 1px solid #d4e9e5;
  border-radius: 12px;
  transition: color 0.2s, transform 0.2s;
}

.service-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) {
  .worry:hover,
  .service:hover {
    transform: translateY(-2px);
    border-color: #c8dcda;
    box-shadow: 0 10px 28px rgba(20, 85, 95, 0.08);
  }

  .service:hover .service-icon {
    color: var(--deep);
    transform: translateY(-1px);
  }
}

.service h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.55;
}

.service p { font-size: 0.93rem; color: var(--ink-soft); }

/* 3列表示で最後の1枚だけが余る場合は中央寄せする */
.services .service:last-child:nth-child(3n + 1) { grid-column: 2; }

.services-note { text-align: center; margin-top: 40px; color: var(--ink-soft); }

/* --- Cases ---------------------------------------------------------------- */

.case-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 44px;
}

.case-filter button {
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--deep);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 20px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.case-filter button:hover { border-color: var(--teal-bright); }

.case-filter button[aria-pressed="true"] {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.case {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
}

.case[hidden] { display: none; }

.case:hover,
.case:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(20, 85, 95, 0.14);
}

.case-media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.case-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.case:hover .case-media img { transform: scale(1.05); }

/* hover時の「詳しく見る」オーバーレイ */
.case-media::after {
  content: "＋ 詳しく見る";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(23, 112, 127, 0.55);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity 0.25s;
}

.case:hover .case-media::after,
.case:focus-within .case-media::after { opacity: 1; }

/* カード全面を覆う透明ボタン（モーダルを開く） */
.case-open {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  border: 0;
  cursor: pointer;
  border-radius: var(--radius);
}

.case-media-text {
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--wash-teal), var(--wash-leaf));
}

.case-media-text span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--deep);
  letter-spacing: 0.08em;
  text-align: center;
}

.case-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.case-meta { display: flex; align-items: center; gap: 10px; font-size: 0.78rem; }

.case-tag {
  background: var(--wash-teal);
  color: var(--deep);
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 12px;
}

.case-date { color: var(--ink-soft); }

.case h3 { font-size: 1.02rem; font-weight: 700; line-height: 1.6; }

.case p { font-size: 0.88rem; color: var(--ink-soft); }

.case-client { margin-top: auto; font-size: 0.8rem; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 10px; }

.case a { word-break: break-all; }

/* --- Case dialogs (実績モーダル) ------------------------------------------- */

.case-dialog {
  border: 0;
  border-radius: 14px;
  padding: 0;
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow: auto;
  box-shadow: 0 24px 80px rgba(20, 85, 95, 0.35);
  margin: auto;
}

.case-dialog::backdrop {
  background: rgba(22, 50, 59, 0.55);
  backdrop-filter: blur(3px);
}

.case-dialog[open] { animation: dialog-in 0.25s ease-out; }

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
}

body:has(dialog[open]) { overflow: hidden; }

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(252, 253, 252, 0.92);
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(20, 85, 95, 0.25);
}

.dialog-close:hover { background: var(--wash-teal); }

.case-dialog .dialog-media img { width: 100%; height: auto; }

.case-dialog .case-media-text { aspect-ratio: 3 / 1.4; }

.dialog-body { padding: 26px 30px 34px; }

.dialog-body .case-meta { margin-bottom: 10px; }

.dialog-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 14px;
}

.dialog-body p { font-size: 0.94rem; color: var(--ink-soft); margin-bottom: 12px; }

.dialog-body .case-client {
  font-size: 0.84rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin: 18px 0 0;
}

/* --- Profile -------------------------------------------------------------- */

.profile { display: grid; grid-template-columns: 340px 1fr; gap: 48px; align-items: start; }

.profile-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
}

.profile-card img {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 18px;
}

.profile-card h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 2px; }
.profile-card .en { font-size: 0.8rem; letter-spacing: 0.14em; color: var(--ink-soft); margin-bottom: 14px; }
.profile-card .role { font-size: 0.88rem; font-weight: 700; color: var(--teal); margin-bottom: 14px; }
.profile-card p { font-size: 0.9rem; color: var(--ink-soft); text-align: left; }

.profile-body h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.milestones { list-style: none; margin-bottom: 40px; }

.milestones li {
  position: relative;
  padding: 0 0 20px 28px;
  border-left: 2px solid var(--wash-teal);
  margin-left: 6px;
}

.milestones li:last-child { padding-bottom: 0; }

.milestones li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal-bright);
}

.milestones .year { font-weight: 700; font-family: var(--font-display); margin-right: 10px; color: var(--deep); }

.skill-groups { display: grid; gap: 14px; }

.skill-group { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: baseline; }

.skill-group dt { font-weight: 700; font-size: 0.9rem; }

.skill-group dd { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  font-size: 0.78rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 12px;
  color: var(--ink-soft);
}

/* --- Flow ------------------------------------------------------------------ */

.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }

.flow-step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 22px;
  position: relative;
  counter-increment: step;
}

.flow-step::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--teal-bright);
  margin-bottom: 8px;
}

.flow-step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.flow-step p { font-size: 0.86rem; color: var(--ink-soft); }

.flow-note { text-align: center; margin-top: 36px; color: var(--ink-soft); font-size: 0.95rem; }
.flow-note strong { color: var(--deep); }

/* --- Pricing ---------------------------------------------------------------- */

.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.price-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
}

.price-card h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }

.price-card .big {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 10px;
}

.price-card p { font-size: 0.88rem; color: var(--ink-soft); text-align: left; }

/* --- FAQ ----------------------------------------------------------------------- */

.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 24px;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 32px 18px 0;
  font-weight: 700;
  position: relative;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--teal-bright);
}

.faq details[open] summary::after { content: "−"; }

.faq .a { padding: 0 0 20px; color: var(--ink-soft); font-size: 0.94rem; }

/* --- Contact ---------------------------------------------------------------------- */

.contact-form { max-width: 680px; margin: 0 auto; }

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

.form-field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.req {
  font-size: 0.72rem;
  color: #fff;
  background: var(--teal);
  border-radius: 4px;
  padding: 1px 8px;
  margin-left: 8px;
  font-weight: 700;
  vertical-align: 1px;
}

.opt { background: var(--ink-soft); }

.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--teal-bright);
  outline-offset: 0;
  border-color: transparent;
}

.form-field textarea { min-height: 180px; resize: vertical; }

.form-error { display: none; color: #b3401f; font-size: 0.84rem; margin-top: 4px; }
.form-field.invalid .form-error { display: block; }
.form-field.invalid input,
.form-field.invalid textarea { border-color: #b3401f; }

.form-actions { text-align: center; }

.form-success {
  display: none;
  background: var(--wash-leaf);
  border: 1px solid var(--leaf);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  font-weight: 700;
  margin-top: 24px;
}

.form-success.shown { display: block; }

.form-failure {
  display: none;
  background: #fbeee9;
  border: 1px solid #b3401f;
  color: #b3401f;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  font-weight: 700;
  margin-top: 24px;
}

.form-failure.shown { display: block; }

/* --- Prose (policy.html などの文章ページ) ------------------------------------ */

.prose { max-width: 760px; }

.prose h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.6vw, 2.2rem);
  margin-bottom: 28px;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 40px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--teal-bright);
}

.prose p { margin-bottom: 16px; font-size: 0.95rem; }

.prose ol { padding-left: 1.6em; font-size: 0.95rem; }
.prose ol li { margin-bottom: 8px; }
.prose ol ol { margin-top: 8px; }

/* --- Footer ----------------------------------------------------------------- */

.site-footer {
  background: var(--deep);
  color: #d9ebee;
  padding: 56px 0 40px;
  text-align: center;
}

.site-footer .tagline {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.site-footer nav ul {
  display: flex;
  justify-content: center;
  gap: 24px;
  list-style: none;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.site-footer a { color: #d9ebee; text-decoration: none; font-size: 0.88rem; }
.site-footer a:hover { text-decoration: underline; }

.site-footer .copyright { font-size: 0.8rem; color: #9ec4cb; }

/* --- Responsive ----------------------------------------------------------------- */

@media (max-width: 980px) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(20, 85, 95, 0.08);
    padding: 8px 24px 16px;
  }

  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a { padding: 12px; }
  .nav-cta { text-align: center; margin-top: 8px; }
}

@media (max-width: 900px) {
  .services, .cases, .pricing, .worries { grid-template-columns: repeat(2, 1fr); }
  .services .service:last-child:nth-child(3n + 1) { grid-column: auto; }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .profile { grid-template-columns: 1fr; }
  .profile-card { max-width: 420px; margin: 0 auto; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .services, .cases, .pricing, .worries, .flow { grid-template-columns: 1fr; }
  .skill-group { grid-template-columns: 1fr; gap: 4px; }
  .brand img { width: min(230px, calc(100vw - 132px)); height: auto; }

  /* br位置での改行を保ったまま収まるよう、最長行(全角22文字)が枠内に入る
     フォントサイズへ画面幅に応じて縮める。66px = container余白48 + 枠線2 + padding16 */
  .form-success, .form-failure {
    padding: 16px 8px;
    font-size: clamp(0.68rem, calc((100vw - 66px) / 22.4), 0.9rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg i { animation: none; }
  .scroll-cue::after { animation: none; transform: scaleY(1); }
  .case-dialog[open] { animation: none; }
  .btn, .case, .case-media img, .worry, .service { transition: none; }
}
