/* ============================================================
   BAŞAK YAZILIM A.Ş. — Design System
   Theme: "Dijital Hasat" — warm obsidian + wheat gold
   Fonts: Fraunces (display) · Hanken Grotesk (body) · JetBrains Mono (label)
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --gold: #E0A845;
  --gold-bright: #F2C770;
  --gold-deep: #B5832E;
  --sage: #8a9466;

  --maxw: 1200px;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --tracking-label: 0.18em;
}

/* Dark (default) */
[data-theme="dark"] {
  --bg: #0C0B09;
  --bg-2: #0F0D0A;
  --surface: #15120C;
  --surface-2: #1C1810;
  --surface-3: #241F15;
  --text: #F4EEDF;
  --text-soft: #CFC7B3;
  --text-muted: #968D78;
  --text-faint: #5d5648;
  --border: rgba(244, 238, 223, 0.09);
  --border-gold: rgba(224, 168, 69, 0.22);
  --glow: rgba(224, 168, 69, 0.16);
  --card-grad: linear-gradient(160deg, rgba(244,238,223,.035), rgba(244,238,223,.005));
  --grain-opacity: 0.05;
  --accent-text: var(--gold-bright);
  --accent-strong: var(--gold);
  --border-strong: rgba(244, 238, 223, 0.16);
  --success: #9fc27a;
  --danger: #e06c5e;
  color-scheme: dark;
}

/* Light */
[data-theme="light"] {
  --bg: #F6F1E5;
  --bg-2: #F1EADA;
  --surface: #FCF8EF;
  --surface-2: #FBF6EA;
  --surface-3: #F4ECD9;
  --text: #1A1611;
  --text-soft: #3a342a;
  --text-muted: #6E6650;
  --text-faint: #a99f86;
  --border: rgba(26, 22, 17, 0.10);
  --border-gold: rgba(150, 105, 25, 0.28);
  --glow: rgba(224, 168, 69, 0.28);
  --card-grad: linear-gradient(160deg, rgba(255,255,255,.7), rgba(255,255,255,.25));
  --grain-opacity: 0.035;
  --accent-text: #8c6210;
  --accent-strong: #9a6a12;
  --border-strong: rgba(26, 22, 17, 0.18);
  --success: #5f7d3e;
  --danger: #c0392b;
  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background .6s var(--ease), color .6s var(--ease);
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
::selection { background: var(--gold); color: #1a1611; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }
.section { padding: clamp(72px, 11vw, 150px) 0; position: relative; }
section[id], #hero { scroll-margin-top: 120px; }

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 0.6em;
  font-weight: 500;
}
.eyebrow__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
}

.section__head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 72px); }
.section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 5.2vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 18px 0 20px;
  font-optical-sizing: auto;
}
.section__title em {
  font-style: italic;
  color: var(--accent-text);
  font-weight: 500;
}
.section__sub { color: var(--text-soft); font-size: clamp(1.02rem, 2vw, 1.2rem); max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  font-family: var(--font-body);
  font-weight: 600; font-size: 0.98rem;
  padding: 0.85em 1.5em;
  border-radius: 100px;
  transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  white-space: nowrap; line-height: 1;
}
.btn__arrow { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--lg { padding: 1.05em 1.9em; font-size: 1.02rem; }
.btn--block { width: 100%; }

.btn--primary {
  background: var(--gold);
  color: #18130a;
  box-shadow: 0 8px 30px -8px var(--glow);
}
.btn--primary:hover {
  background: var(--gold-bright);
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -10px var(--glow);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-gold);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--accent-text); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.985); }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  transition: background .4s var(--ease), backdrop-filter .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
  padding: 8px 0;
}
.header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--border);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand__mark { width: 34px; height: 34px; color: var(--gold); display: block; flex-shrink: 0; transition: transform .5s var(--ease); }
.brand__mark svg { width: 100%; height: 100%; }
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.06); }
.brand__name { font-family: var(--font-display); font-size: 1.32rem; font-weight: 600; letter-spacing: -0.01em; }
.brand__suffix { color: var(--text-muted); font-weight: 400; margin-left: 2px; }

.nav { display: flex; gap: 4px; }
.nav a {
  font-size: 0.94rem; color: var(--text-soft); padding: 8px 14px; border-radius: 100px;
  transition: color .3s var(--ease), background .3s var(--ease); position: relative;
}
.nav a:hover { color: var(--text); background: color-mix(in srgb, var(--gold) 10%, transparent); }

.header__actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border); color: var(--text-soft);
  transition: color .3s, border-color .3s, transform .5s var(--ease), background .3s;
}
.theme-toggle:hover { color: var(--gold); border-color: var(--border-gold); transform: rotate(20deg); }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border); flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.nav-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .35s var(--ease), opacity .35s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Mobile nav ---------- */
.nav-scrim {
  position: fixed; inset: 0; z-index: 998;
  background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .5s var(--ease);
}
.nav-scrim.is-open { opacity: 1; pointer-events: auto; }
.mobile-nav {
  position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px); z-index: 999;
  background: var(--surface); border-left: 1px solid var(--border);
  transform: translateX(100%); transition: transform .5s var(--ease);
  padding: 96px 28px 32px; display: flex;
}
.mobile-nav.is-open { transform: translateX(0); box-shadow: -30px 0 80px rgba(0,0,0,.4); }
.mobile-nav nav { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.mobile-nav nav a { font-family: var(--font-display); font-size: 1.5rem; padding: 12px 0; border-bottom: 1px solid var(--border); }
.mobile-nav nav a.btn { font-family: var(--font-body); font-size: 1rem; margin-top: 18px; border-bottom: none; }
body.nav-open { overflow: hidden; }

/* ---------- HERO ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding-top: 100px; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__glow {
  position: absolute; top: -10%; left: 38%; transform: translateX(-50%);
  width: 90vw; height: 75vh;
  background: radial-gradient(ellipse at center, var(--glow), transparent 62%);
  filter: blur(20px);
}
.hero__field {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--gold) 8%, transparent), transparent 32%),
    radial-gradient(circle at 85% 78%, color-mix(in srgb, var(--sage) 7%, transparent), transparent 40%);
}
[data-theme="dark"] .hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, transparent 60%, var(--bg));
}

.hero__inner { max-width: 960px; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 350;
  font-size: clamp(2.7rem, 8.5vw, 6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 26px 0 28px;
  font-optical-sizing: auto;
}
.hero__title span { display: block; }
.hero__title em { font-style: italic; font-weight: 500; color: var(--accent-text); }
.hero__lead { font-size: clamp(1.08rem, 2.3vw, 1.4rem); color: var(--text-soft); max-width: 62ch; line-height: 1.6; }
.hero__lead strong { color: var(--text); font-weight: 600; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

.hero__meta { display: flex; align-items: center; gap: 16px; margin-top: 40px; color: var(--text-muted); font-size: 0.95rem; }
.hero__meta strong { color: var(--text-soft); }
.hero__seal { width: 42px; height: 42px; border-radius: 50%; }
.hero__seal svg { width: 23px; height: 23px; }

.hero__scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.3em; color: var(--text-muted);
}
.hero__scroll-line { width: 1px; height: 44px; background: linear-gradient(var(--gold), transparent); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%; background: var(--gold); animation: scrollDown 1.8s var(--ease) infinite; }
@keyframes scrollDown { 0% { top: -50%; } 100% { top: 100%; } }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 22px 0; background: var(--bg-2);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.marquee__track { display: flex; align-items: center; gap: 36px; white-space: nowrap; width: max-content; animation: marquee 40s linear infinite; }
.marquee__track span { font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 1.9rem); font-style: italic; color: var(--text-soft); }
.marquee__dot { color: var(--accent-strong) !important; font-style: normal !important; font-size: 0.9rem !important; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Stats ---------- */
.stats { padding: clamp(48px, 7vw, 80px) 0; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; padding: 20px; border-right: 1px solid var(--border-strong); }
.stat:last-child { border-right: none; }
.stat__num { font-family: var(--font-display); font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 500; color: var(--accent-strong); display: block; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums; }
.stat__label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-muted); margin-top: 14px; display: block; min-height: 2.4em; }

/* ---------- Cards (generic) ---------- */
.card {
  background: var(--surface); background-image: var(--card-grad);
  border: 1px solid var(--border); border-radius: var(--radius);
  position: relative; overflow: hidden;
}

/* Gold icon badge — shared by hero seal, service icon, contact icon */
.hero__seal, .service__icon, .contact__ico {
  display: grid; place-items: center; flex-shrink: 0;
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  border: 1px solid var(--border-gold); color: var(--accent-strong);
}

/* ---------- Services ---------- */
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service { padding: 34px 30px; transition: transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease); }
.service::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0; transition: opacity .5s var(--ease);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 60%);
  pointer-events: none;
}
.service:hover { transform: translateY(-6px); border-color: var(--border-gold); box-shadow: 0 24px 60px -30px var(--glow); }
.service:hover::before { opacity: 1; }
.service__icon { width: 52px; height: 52px; border-radius: var(--radius-sm); margin-bottom: 22px; }
.service__icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.service h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 500; margin-bottom: 12px; letter-spacing: -0.01em; }
.service p { color: var(--text-soft); font-size: 0.98rem; }
.service__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.service__tags li { font-family: var(--font-mono); font-size: 0.68rem; padding: 5px 12px; border-radius: 100px; background: var(--surface-3); border: 1px solid var(--border); color: var(--text-muted); }

/* ---------- Work / Case ---------- */
.case {
  display: grid; grid-template-columns: 0.92fr 1.08fr; gap: clamp(30px, 5vw, 64px); align-items: center;
  border-radius: var(--radius-lg); overflow: visible;
  padding: clamp(30px, 5vw, 60px); margin-bottom: 28px;
}
.case::after { content: ""; position: absolute; top: -30%; right: -10%; width: 50%; height: 120%; background: radial-gradient(circle, var(--glow), transparent 65%); pointer-events: none; }
.case__tag { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: var(--tracking-label); color: var(--accent-text); }
.case__title { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); font-weight: 500; line-height: 1; margin: 14px 0 4px; letter-spacing: -0.02em; }
.case__subtitle { color: var(--accent-text); font-size: 1.05rem; margin-bottom: 18px; }
.case__desc { color: var(--text-soft); margin-bottom: 22px; }
.case__features { display: grid; gap: 10px; margin-bottom: 24px; }
.case__features li { display: flex; gap: 10px; align-items: baseline; color: var(--text-soft); font-size: 0.96rem; }
.case__features span { color: var(--accent-text); }
.case__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.case__link { position: relative; z-index: 2; }

.chip { font-family: var(--font-mono); font-size: 0.68rem; padding: 5px 12px; border-radius: 100px; background: var(--surface-3); border: 1px solid var(--border); color: var(--text-soft); }

/* device mockups */
.case__visual { position: relative; min-height: 340px; }
.browser {
  border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border);
  background: var(--surface-2); box-shadow: 0 40px 80px -30px rgba(0,0,0,.6);
  transition: transform .6s var(--ease); width: 100%;
}
.case:hover .browser { transform: translateY(-6px) rotate(-0.4deg); }
.browser__bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: var(--surface-3); border-bottom: 1px solid var(--border); }
.browser__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-faint); }
.browser__dot:nth-child(1){ background:#e06c5e; } .browser__dot:nth-child(2){ background:#e0b34f; } .browser__dot:nth-child(3){ background:#6fae6f; }
.browser__url { margin: 0 auto; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); background: var(--bg); border: 1px solid var(--border); padding: 4px 18px; border-radius: 100px; flex: 0 1 auto; max-width: 300px; text-align: center; }
[data-theme="light"] .browser__url { background: var(--surface); }
.browser img { width: 100%; }

.phone {
  position: absolute; bottom: -30px; right: -12px; width: 30%; max-width: 174px; aspect-ratio: 390/844;
  border-radius: 34px; padding: 6px;
  background: linear-gradient(155deg, #353029, #141009 55%);
  box-shadow: 0 44px 80px -26px rgba(0,0,0,.78), inset 0 0 0 1px rgba(255,255,255,.07);
  transition: transform .6s var(--ease);
}
.case:hover .phone { transform: translateY(-10px) rotate(2deg); }
.phone__notch {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 30%; height: 9px; background: #050505; border-radius: 100px; z-index: 3;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top center; border-radius: 28px; display: block; }

/* ---------- Process / Timeline ---------- */
.timeline { display: grid; gap: 0; counter-reset: step; max-width: 880px; }
.timeline__item { display: grid; grid-template-columns: 96px 1fr; gap: 28px; padding: 30px 0; border-top: 1px solid var(--border); position: relative; }
.timeline__item:last-child { border-bottom: 1px solid var(--border); }
.timeline__num { font-family: var(--font-display); font-size: 2.4rem; font-weight: 400; color: var(--accent-strong); line-height: 1; font-style: italic; }
.timeline__body h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; margin-bottom: 8px; }
.timeline__kw { font-style: italic; color: var(--text-muted); font-size: 1.1rem; font-weight: 400; }
.timeline__body p { color: var(--text-soft); max-width: 60ch; line-height: 1.55; }
.timeline__item { transition: padding-left .4s var(--ease); }
.timeline__item:hover { padding-left: 12px; }

/* ---------- Why ---------- */
.why__inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.why__head { position: sticky; top: 110px; }
.why__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.why__card { padding: 30px 26px; transition: transform .5s var(--ease), border-color .5s var(--ease); }
.why__card:hover { transform: translateY(-5px); border-color: var(--border-gold); }
.why__num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-text); display: block; margin-bottom: 16px; }
.why__card h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; margin-bottom: 10px; }
.why__card p { color: var(--text-soft); font-size: 0.94rem; line-height: 1.55; }

/* ---------- Contact ---------- */
.contact { background: var(--bg-2); }
.contact__inner { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(36px, 5vw, 72px); align-items: start; }
.contact__intro { position: sticky; top: 110px; }
.contact__list { margin-top: 32px; display: grid; gap: 14px; }
.contact__list li { display: flex; align-items: center; gap: 14px; font-size: 1.02rem; }
.contact__ico { width: 40px; height: 40px; border-radius: 50%; }
.contact__list a:hover { color: var(--accent-text); }
.contact__trust { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 30px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); }
.contact__trust span { display: inline-flex; align-items: center; gap: 7px; }
.contact__trust svg { width: 15px; height: 15px; color: var(--accent-strong); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* form */
.contact__form { padding: clamp(26px, 4vw, 40px); display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.86rem; font-weight: 600; color: var(--text-soft); }
.field label span { color: var(--accent-strong); }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--font-body); font-size: 0.98rem; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.85em 1em; transition: border-color .3s, box-shadow .3s, background .3s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--glow);
}
.field input:invalid:not(:placeholder-shown):not(:focus) { border-color: color-mix(in srgb, var(--danger) 60%, var(--border)); }

.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 2.6em; }
.select-arrow { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--text-muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-select {
  font-family: var(--font-body); font-size: 0.86rem; font-weight: 500;
  padding: 8px 16px; border-radius: 100px; border: 1px solid var(--border);
  background: var(--bg-2); color: var(--text-soft);
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .15s var(--ease);
}
.chip-select:hover { border-color: var(--border-gold); color: var(--text); }
.chip-select:active { transform: scale(0.97); }
.chip-select.is-active { background: var(--gold); color: #18130a; border-color: var(--gold); font-weight: 600; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.84rem; color: var(--text-muted); line-height: 1.5; }
.consent input {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 5px; background: var(--bg-2);
  display: grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s;
}
.consent input:checked { background: var(--gold); border-color: var(--gold); }
.consent input:checked::after { content: ""; width: 5px; height: 9px; border: 2px solid #18130a; border-top: 0; border-left: 0; transform: rotate(45deg) translateY(-1px); }
.consent .link { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }

.hp { position: absolute; left: -9999px; opacity: 0; }

.form-status { font-size: 0.9rem; text-align: center; min-height: 1.2em; font-weight: 500; }
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--danger); }

.btn--primary[aria-busy="true"] { opacity: .7; pointer-events: none; }

/* ---------- Footer ---------- */
.footer { padding: clamp(56px, 8vw, 90px) 0 30px; border-top: 1px solid var(--border); }
.footer__inner { display: grid; grid-template-columns: 1.4fr 2fr; gap: clamp(36px, 6vw, 80px); padding-bottom: 50px; }
.brand--footer .brand__mark { width: 30px; height: 30px; }
.footer__tagline { color: var(--text-muted); margin: 18px 0 22px; max-width: 38ch; font-size: 0.96rem; }
.footer__social { display: flex; gap: 10px; }
.footer__social a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border); color: var(--text-muted);
  transition: border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.footer__social a svg { width: 18px; height: 18px; }
.footer__social a:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-3px); }

.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.footer__col { display: grid; gap: 12px; align-content: start; }
.footer__col h4 { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.footer__col a, .footer__col span { color: var(--text-soft); font-size: 0.94rem; transition: color .3s; }
.footer__col a:hover { color: var(--accent-text); }

.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 26px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; }
.footer__legal a:hover { color: var(--accent-text); }

/* ---------- Skip link & a11y ---------- */
.skip-link { position: absolute; left: -999px; top: 10px; z-index: 10000; background: var(--gold); color: #18130a; padding: 10px 18px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { left: 16px; }
/* Outline follows each element's own border-radius in modern browsers — no per-shape overrides needed. */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .65s var(--ease-out), transform .65s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .10s; }
.reveal[data-delay="2"] { transition-delay: .20s; }
.reveal[data-delay="3"] { transition-delay: .30s; }
.reveal[data-delay="4"] { transition-delay: .40s; }
.reveal[data-delay="5"] { transition-delay: .50s; }
.reveal[data-delay="6"] { transition-delay: .60s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .nav, .header__cta { display: none; }
  .nav-toggle { display: flex; }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .case { grid-template-columns: 1fr; }
  .case__visual { min-height: auto; margin-top: 10px; }
  .why__inner, .contact__inner { grid-template-columns: 1fr; }
  .why__head, .contact__intro { position: static; }
  .footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  body { font-size: 1rem; }
  .services__grid, .why__grid, .footer__cols { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: 1fr 1fr; gap: 0; }
  .stat { border-right: none; border-bottom: 1px solid var(--border-strong); padding: 28px 12px; }
  .stat:nth-child(odd) { border-right: 1px solid var(--border-strong); }
  .stat:last-child, .stat:nth-last-child(2) { border-bottom: none; }
  .stat__label { min-height: 0; }
  .form-row { grid-template-columns: 1fr; }
  .phone { position: static; width: 46%; margin: -40px auto 0; }
  .timeline__item { grid-template-columns: 60px 1fr; gap: 16px; }
  .timeline__num { font-size: 1.8rem; }
  .footer__bottom { flex-direction: column; }
  /* hero: hide colliding scroll cue, equalize stacked CTAs */
  .hero__scroll { display: none; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
  /* soften case glow so it doesn't form a vertical seam on the narrow card */
  .case::after { top: -20%; right: -30%; width: 80%; height: 60%; opacity: .6; }
  /* larger tap targets for service chips */
  .chip-select { padding: 11px 16px; }
  .chips { gap: 10px; }
}
