/* ============================================================
   Dutalab — design tokens (design-system/dutalab/MASTER.md ile senkron)
   Palette: Ink / Paper / Horizon (accent) / Mist (accent tint) / Clay (warm counterpoint) / Line
   Type: Lexend (display) + IBM Plex Sans (body/UI) + IBM Plex Mono (data)
   ============================================================ */

:root {
  --ink: #10162B;
  --ink-soft: #3C4560;
  --muted: #4A5578;
  --paper: #FAFBFF;
  --paper-alt: #F2F4FC;
  --line: #DEE3F2;

  --horizon: #3E63E0;
  --horizon-dim: #2C49B3;
  --mist: #E7ECFB;
  --mist-strong: #D6DFF7;

  --clay: #D08A3E;
  --clay-bg: #FBF0E6;

  --success: #1E8F6F;
  --success-bg: #E7F6F0;

  --font-display: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 6px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 14px -6px rgba(16, 22, 43, 0.14);
  --shadow: 0 16px 40px -16px rgba(16, 22, 43, 0.22);
  --shadow-lg: 0 24px 60px -20px rgba(16, 22, 43, 0.28);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E9ECF7;
    --ink-soft: #C2C8DE;
    --muted: #8991B0;
    --paper: #0B0E1A;
    --paper-alt: #131829;
    --line: #262E48;

    --horizon: #8AA5FF;
    --horizon-dim: #B7C6FF;
    --mist: #1C2440;
    --mist-strong: #263056;

    --clay: #E4A16C;
    --clay-bg: #2E2216;

    --success: #63C7A4;
    --success-bg: #123328;

    --shadow-sm: 0 2px 14px -6px rgba(0, 0, 0, 0.4);
    --shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}
img { max-width: 100%; display: block; }
a { color: var(--horizon); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--horizon); outline-offset: 2px;
}
::selection { background: var(--mist-strong); }

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

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); text-wrap: balance; font-weight: 600; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }

.brand {
  display: flex; align-items: baseline; gap: 2px; font-family: var(--font-display);
  font-weight: 600; font-size: 1.4rem; color: var(--ink); letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand .lab { color: var(--horizon); font-weight: 700; }

nav.main-nav { display: flex; align-items: center; gap: 30px; }
nav.main-nav a.nav-link {
  color: var(--ink-soft); font-weight: 500; font-size: 0.95rem;
  font-family: var(--font-mono); letter-spacing: 0.01em;
}
nav.main-nav a.nav-link:hover { color: var(--horizon); text-decoration: none; }
nav.main-nav a.cta {
  background: var(--ink); color: var(--paper); padding: 10px 20px; border-radius: var(--radius-pill);
  font-weight: 600; font-family: var(--font-body); font-size: 0.92rem;
}
nav.main-nav a.cta:hover { background: var(--horizon); text-decoration: none; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

@media (max-width: 860px) {
  nav.main-nav {
    position: fixed; inset: 76px 0 0 0; background: var(--paper); flex-direction: column;
    align-items: flex-start; padding: 28px 24px; gap: 22px; transform: translateX(100%);
    transition: transform 0.25s ease; overflow-y: auto; border-top: 1px solid var(--line);
  }
  nav.main-nav.open { transform: translateX(0); }
  .nav-toggle { display: block; }
}

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.78rem;
  font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--horizon-dim);
  margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 16px; height: 1px; background: currentColor; display: inline-block; }

/* ---------- Cinematic hero (home) ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 140px 0 96px; overflow: hidden; }
.hero-rain {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
  opacity: 0.85;
  -webkit-mask-image: linear-gradient(100deg, transparent 0%, transparent 7%, #000 34%, #000 100%);
  mask-image: linear-gradient(100deg, transparent 0%, transparent 7%, #000 34%, #000 100%);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; width: 100%; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; gap: 44px; } }
.hero-content { max-width: 600px; }
.hero-visual { position: relative; width: 100%; aspect-ratio: 5 / 4; }
.hero-visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-width: 940px) { .hero-visual { aspect-ratio: 6 / 5; max-width: 460px; margin: 0 auto; } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%); z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.scroll-cue svg { width: 14px; height: 20px; animation: scrollCueMove 1.8s ease-in-out infinite; }
@keyframes scrollCueMove { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(6px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .scroll-cue svg { animation: none; } }

h1.display { font-size: clamp(2.4rem, 4.2vw, 3.4rem); line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 22px; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 52ch; margin: 0 0 34px; }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: 0.96rem; border: 1px solid transparent; cursor: pointer; font-family: var(--font-body);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--horizon); text-decoration: none; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--horizon); color: var(--horizon); text-decoration: none; }
.btn:disabled, .btn.disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
section.alt { background: var(--paper-alt); }
.section-head { max-width: 620px; margin: 0 0 44px; }
h2.display { font-size: clamp(1.6rem, 2.6vw, 2.1rem); letter-spacing: -0.01em; margin: 0 0 12px; }
h3 { font-size: 1.15rem; margin: 0 0 8px; letter-spacing: -0.005em; }
.section-head p { color: var(--muted); font-size: 1.02rem; margin: 0; }

/* ---------- Statement block (centered big type) ---------- */
.statement { padding: var(--space-4xl, 128px) 0 var(--space-2xl, 64px); text-align: center; }
.statement .eyebrow { justify-content: center; }
.statement h2 {
  font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.16; max-width: 22ch; margin: 0 auto;
  letter-spacing: -0.01em;
}
.statement h2 em { font-style: normal; color: var(--horizon); }

/* ---------- Pillars (Neden Tek Çatı) ---------- */
.pillars { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; text-align: center; }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; gap: 40px; } }
.pillar .p-index {
  font-family: var(--font-mono); font-size: 0.76rem; color: var(--horizon-dim); letter-spacing: 0.05em;
  display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 auto 14px;
}
.pillar .p-index::before, .pillar .p-index::after { content: ''; width: 16px; height: 1px; background: currentColor; }
.pillar h3 { font-size: 1.2rem; margin-bottom: 10px; }
.pillar p { color: var(--muted); margin: 0 auto; max-width: 40ch; }

/* ---------- Proof band (stats, restrained glass) ---------- */
.proof-band {
  position: relative; padding: 96px 0; overflow: hidden; color: #fff;
  background: radial-gradient(circle at 15% 20%, #26327a 0%, transparent 45%),
              radial-gradient(circle at 85% 80%, #2c49b3 0%, transparent 50%),
              linear-gradient(160deg, var(--ink) 0%, #171f3d 100%);
}
.proof-band .eyebrow { color: #9FB2F5; }
.proof-band .section-head p { color: rgba(255,255,255,0.62); }
.proof-band h2 { color: #fff; }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 44px; }
@media (max-width: 860px) { .proof-grid { grid-template-columns: repeat(2, 1fr); } }
.proof-card {
  background: rgba(255,255,255,0.07); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.16); border-radius: var(--radius); padding: 28px 22px; text-align: center;
}
.proof-num { font-family: var(--font-display); font-size: clamp(2rem, 3.4vw, 2.6rem); font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.proof-label { font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255,255,255,0.65); margin-top: 6px; }

/* ---------- Brand showcase (full-bleed alternating) ---------- */
.showcase-row {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 64px;
  padding: 80px 0; border-bottom: 1px solid var(--line);
}
.showcase-row.reverse .showcase-visual { order: 2; }
@media (max-width: 860px) {
  .showcase-row { grid-template-columns: 1fr; gap: 32px; padding: 56px 0; }
  .showcase-row.reverse .showcase-visual { order: 0; }
}
.showcase-domain { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); margin-bottom: 10px; }
.showcase-title { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 14px; }
.showcase-desc { color: var(--muted); font-size: 1rem; max-width: 48ch; margin: 0 0 22px; }

.device-frame {
  position: relative; border-radius: 12px; overflow: hidden; background: var(--ink);
  box-shadow: var(--shadow-lg); aspect-ratio: 16 / 10.5;
}
.device-frame .bar { height: 32px; background: rgba(0,0,0,0.22); display: flex; align-items: center; gap: 6px; padding: 0 14px; }
.device-frame .bar .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.28); }
.device-frame .screen {
  position: absolute; inset: 32px 0 0; display: flex; align-items: center; justify-content: center;
  background: var(--frame-bg, var(--horizon));
}
.device-frame .screen .wordmark { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 2rem); color: #fff; letter-spacing: -0.01em; }
.device-frame .screen .sub { position: absolute; bottom: 20px; left: 24px; right: 24px; font-family: var(--font-mono); font-size: 0.72rem; color: rgba(255,255,255,0.7); letter-spacing: 0.03em; }

/* ---------- Referanslar page: project grid ---------- */
.project-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 940px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .project-grid { grid-template-columns: 1fr; } }
.project-tile { position: relative; display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3.1; background: var(--paper-alt); }
.project-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s cubic-bezier(.2,.8,.2,1); }
.project-tile:hover img { transform: scale(1.06); }
.project-tile .p-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px 9px;
  font-family: var(--font-mono); font-size: 0.68rem; color: #fff;
  background: linear-gradient(0deg, rgba(10,14,28,0.75), rgba(10,14,28,0));
}

/* ---------- Referanslar page: logo wall (year-grouped) ---------- */
.logo-wall-year { margin-bottom: 44px; }
.logo-wall-year:last-child { margin-bottom: 0; }
.logo-wall-year .yr {
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); letter-spacing: 0.05em;
  margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.logo-wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.logo-wall-item {
  display: flex; align-items: center; justify-content: center; min-height: 84px; padding: 18px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-alt);
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-soft); text-align: center;
}
.logo-wall-empty {
  border: 1px dashed var(--line); border-radius: var(--radius); padding: 56px 24px; text-align: center; color: var(--muted);
}
.logo-wall-empty p { margin: 0; max-width: 46ch; margin-inline: auto; }

/* ---------- Logo marquee ---------- */
.logo-marquee-wrap { position: relative; overflow: hidden; margin-top: 8px; }
.logo-marquee-wrap::before, .logo-marquee-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2; pointer-events: none;
}
.logo-marquee-wrap::before { left: 0; background: linear-gradient(90deg, var(--paper) 20%, transparent); }
.logo-marquee-wrap::after { right: 0; background: linear-gradient(270deg, var(--paper) 20%, transparent); }
section.alt .logo-marquee-wrap::before { background: linear-gradient(90deg, var(--paper-alt) 20%, transparent); }
section.alt .logo-marquee-wrap::after { background: linear-gradient(270deg, var(--paper-alt) 20%, transparent); }

.logo-marquee-track { display: flex; width: max-content; animation: logoScroll 32s linear infinite; }
.logo-marquee-track .set { display: flex; align-items: center; }
@keyframes logoScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .logo-marquee-track { animation: none; } }

.logo-pill {
  flex: 0 0 auto; margin: 0 14px; padding: 18px 30px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.04em;
  color: var(--muted); white-space: nowrap;
}

/* ---------- Blog teaser ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
@media (max-width: 860px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; opacity: 0.6; }
.blog-card .blog-thumb { aspect-ratio: 16/10; background: var(--paper-alt); position: relative; }
.blog-card .blog-thumb::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, var(--mist) 0 12px, var(--paper-alt) 12px 24px);
}
.blog-card .blog-body { padding: 18px 20px 22px; }
.blog-card .blog-cat { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--horizon-dim); }
.blog-card h3 { font-size: 1.02rem; margin: 8px 0 0; }

/* ---------- Final CTA band ---------- */
.final-cta { text-align: center; padding: 120px 0; background: var(--ink); color: #fff; }
.final-cta .eyebrow { justify-content: center; color: #9FB2F5; }
.final-cta h2 { color: #fff; font-size: clamp(2rem, 4.5vw, 3rem); max-width: 18ch; margin: 0 auto 30px; }
.final-cta .btn-row { justify-content: center; }
.final-cta .btn-primary { background: var(--horizon); }
.final-cta .btn-primary:hover { background: var(--horizon-dim); }
.final-cta .btn-outline { color: #fff; border-color: rgba(255,255,255,0.3); }
.final-cta .btn-outline:hover { border-color: #fff; color: #fff; }

/* ---------- Directory list (brands) ---------- */
.directory { border-top: 1px solid var(--line); }
.directory-row {
  display: grid; grid-template-columns: 1fr 2.2fr auto; gap: 28px; align-items: baseline;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.directory-row .d-name { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); }
.directory-row .d-domain { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); }
.directory-row .d-desc { color: var(--ink-soft); font-size: 0.98rem; }
.directory-row .d-link { font-family: var(--font-mono); font-size: 0.85rem; white-space: nowrap; }
@media (max-width: 760px) {
  .directory-row { grid-template-columns: 1fr; gap: 8px; padding: 22px 0; }
  .directory-row .d-link { justify-self: start; }
}

/* ---------- Cards (generic content blocks) ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px;
}
.card p { color: var(--muted); margin: 0; font-size: 0.96rem; }

/* ---------- Service rows (no numbering — not a sequence) ---------- */
.service-row { padding: 22px 0; border-top: 1px solid var(--line); }
.service-row:last-child { border-bottom: 1px solid var(--line); }
.service-row h3 { font-size: 1.1rem; margin-bottom: 6px; }
.service-row p { color: var(--muted); margin: 0; font-size: 0.96rem; max-width: 62ch; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: var(--paper-alt); padding: 56px 0 48px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(1.9rem, 3vw, 2.3rem); margin-bottom: 10px; }
.page-hero p { color: var(--muted); font-size: 1.02rem; max-width: 70ch; margin: 0; }

.prose { max-width: 720px; }
.prose h2 { font-size: 1.3rem; margin-top: 42px; font-weight: 600; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 14px; color: var(--ink-soft); }
.prose ul { color: var(--ink-soft); padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose .updated { color: var(--muted); font-size: 0.86rem; font-family: var(--font-mono); margin-bottom: 36px; }

/* ---------- Contact / info blocks ---------- */
.info-row { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: none; }
.info-row .label { width: 130px; flex-shrink: 0; color: var(--muted); font-size: 0.85rem; font-family: var(--font-mono); }
.info-row .value { color: var(--ink); }

.bank-card { background: var(--paper-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 16px; }
.bank-card .bank-name { font-family: var(--font-display); font-weight: 600; color: var(--ink); margin-bottom: 6px; font-size: 1rem; }
.bank-card .acct-title { font-size: 0.9rem; color: var(--muted); margin-bottom: 8px; }
.bank-card .iban { font-family: var(--font-mono); font-size: 1.02rem; letter-spacing: 0.01em; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Payment mock ---------- */
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .pay-grid { grid-template-columns: 1fr; } }
.pay-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.pay-card .pay-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.pay-card .pay-head h3 { font-family: var(--font-display); }
.status-tag {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.03em;
  padding: 4px 10px; border-radius: var(--radius-pill); text-transform: uppercase;
}
.status-tag.soon { background: var(--clay-bg); color: var(--clay); }
.status-tag.live { background: var(--success-bg); color: var(--success); }

.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 0.85rem; font-family: var(--font-mono); color: var(--ink-soft); margin-bottom: 7px; }
.form-field input, .form-field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 0.96rem; font-family: var(--font-body); background: var(--paper); color: var(--ink);
}
.form-field input:focus { outline: 2px solid var(--mist-strong); border-color: var(--horizon); }
.form-field input:disabled { background: var(--paper-alt); color: var(--muted); cursor: not-allowed; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.note-box {
  background: var(--mist); border: 1px solid var(--mist-strong); border-radius: var(--radius);
  padding: 12px 16px; font-size: 0.87rem; color: var(--horizon-dim); margin-top: 14px;
}

.result-box { text-align: center; padding: 64px 24px; max-width: 560px; margin: 0 auto; }
.result-icon {
  width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 22px; display: flex;
  align-items: center; justify-content: center; font-size: 1.6rem; background: var(--mist); color: var(--horizon-dim);
}

/* ---------- Portfolio rail (horizontal, editorial) ---------- */
.rail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 8px; }
@media (max-width: 620px) { .rail-head { flex-direction: column; align-items: flex-start; gap: 18px; } }
.rail-head .section-head { margin-bottom: 0; }
.rail-nav { display: flex; gap: 10px; flex-shrink: 0; }
.rail-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper);
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.rail-btn:hover { border-color: var(--horizon); color: var(--horizon); }
.rail-btn:active { transform: scale(0.94); }
.rail-btn svg { width: 17px; height: 17px; }

.portfolio-rail-wrap { position: relative; margin-top: 28px; }
.portfolio-rail {
  display: flex; gap: 26px; overflow-x: auto; scroll-snap-type: x proximity;
  padding: 6px 6px 14px 6px; margin: -6px -6px 0; scrollbar-width: none; cursor: grab;
}
.portfolio-rail::-webkit-scrollbar { display: none; }
.portfolio-rail:active { cursor: grabbing; }

.portfolio-card { flex: 0 0 auto; width: min(360px, 72vw); scroll-snap-align: start; }
.portfolio-card .thumb {
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3.05; background: var(--paper-alt);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.portfolio-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s cubic-bezier(.2,.8,.2,1); }
.portfolio-card:hover img { transform: scale(1.06); }
.portfolio-card .p-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-top: 14px; }
.portfolio-card .p-title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.portfolio-card .p-cat { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); white-space: nowrap; }

.rail-fade { position: absolute; top: 6px; bottom: 20px; width: 72px; pointer-events: none; z-index: 2; }
.rail-fade.l { left: 0; background: linear-gradient(90deg, var(--paper) 15%, transparent); }
.rail-fade.r { right: 0; background: linear-gradient(270deg, var(--paper) 15%, transparent); }
section.alt .rail-fade.l { background: linear-gradient(90deg, var(--paper-alt) 15%, transparent); }
section.alt .rail-fade.r { background: linear-gradient(270deg, var(--paper-alt) 15%, transparent); }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--ink); color: var(--paper); padding: 60px 0 30px; margin-top: 40px; }
footer.site-footer .grid { grid-template-columns: 2fr 1fr 1fr; margin-bottom: 44px; }
@media (max-width: 860px) { footer.site-footer .grid { grid-template-columns: 1fr; gap: 34px; } }
footer.site-footer h4 { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em; color: color-mix(in srgb, var(--paper) 60%, transparent); font-size: 0.78rem; font-weight: 500; margin: 0 0 18px; }
footer.site-footer .brand { color: var(--paper); margin-bottom: 14px; }
footer.site-footer .brand .lab { color: #8FA8FF; }
footer.site-footer p { color: color-mix(in srgb, var(--paper) 62%, transparent); font-size: 0.92rem; max-width: 44ch; }
footer.site-footer ul { list-style: none; padding: 0; margin: 0; }
footer.site-footer li { margin-bottom: 11px; }
footer.site-footer a { color: color-mix(in srgb, var(--paper) 80%, transparent); font-size: 0.92rem; }
footer.site-footer a:hover { color: var(--paper); }
.footer-social {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  color: color-mix(in srgb, var(--paper) 80%, transparent); font-size: 0.88rem;
}
.footer-social:hover { color: var(--paper); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid color-mix(in srgb, var(--paper) 14%, transparent); padding-top: 24px; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; font-size: 0.82rem; font-family: var(--font-mono); color: color-mix(in srgb, var(--paper) 46%, transparent);
}

/* ---------- WhatsApp floating widget ---------- */
.wa-widget { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }

.wa-float {
  display: flex; align-items: center; gap: 10px; border: none; cursor: pointer;
  background: #25D366; color: #fff; padding: 15px 20px; border-radius: var(--radius-pill);
  box-shadow: 0 12px 30px -8px rgba(37,211,102,0.55); font-family: var(--font-body); font-weight: 600; font-size: 0.9rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.wa-float:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -8px rgba(37,211,102,0.65); }
.wa-float svg { width: 22px; height: 22px; flex-shrink: 0; }
.wa-float .wa-label { white-space: nowrap; }
@media (max-width: 560px) {
  .wa-float { padding: 15px; }
  .wa-float .wa-label { display: none; }
}

.wa-panel {
  width: 306px; max-width: calc(100vw - 40px); background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 20px;
  opacity: 0; transform: translateY(10px) scale(0.98); pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.wa-widget.open .wa-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.wa-panel-head strong { font-family: var(--font-display); font-size: 1rem; color: var(--ink); display: block; margin-bottom: 4px; }
.wa-panel-head p { color: var(--muted); font-size: 0.84rem; margin: 0 0 14px; line-height: 1.5; }

.wa-options { display: flex; flex-direction: column; gap: 8px; }
.wa-option {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 0.87rem; color: var(--ink); background: var(--paper-alt);
}
.wa-option span { color: #25D366; font-family: var(--font-mono); }
.wa-option:hover { border-color: #25D366; background: #EAFBF1; text-decoration: none; }

@media (prefers-color-scheme: dark) { .wa-option:hover { background: rgba(37,211,102,0.12); } }
