/* =========================================================
   Dogo Corporation — UI/UX inspired by cursor.com
   Warm light theme · CursorGothic-style display + serif body
   ========================================================= */

/* ----- 1. Tokens --------------------------------------- */
:root {
  /* Brand accents — shared across both themes */
  --accent:      #f54e00;        /* Cursor orange */
  --accent-soft: #ffece2;
  --gold:        #c08532;
  --error:       #cf2d56;        /* warm crimson — also hover signal */
  --success:     #1f8a65;

  /* Timeline / category palette */
  --c-thinking:  #dfa88f;
  --c-grep:      #9fc9a2;
  --c-read:      #9fbbe0;
  --c-edit:      #c0a8dd;

  /* Radii */
  --r-2: 2px;
  --r-3: 3px;
  --r-4: 4px;
  --r-8: 8px;
  --r-10: 10px;
  --r-pill: 9999px;

  /* Fonts */
  --font-display: "Inter", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --font-serif:   "Newsreader", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-system:  system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --container:    1200px;
  --container-narrow: 760px;
  --section-y:    96px;
  --section-y-sm: 56px;
}

/* === LIGHT theme (Cursor warm cream) === */
:root,
:root[data-theme="light"] {
  --surface-100: #f7f7f4;
  --surface-200: #f2f1ed;        /* page background */
  --surface-300: #ebeae5;        /* button bg */
  --surface-400: #e6e5e0;        /* card */
  --surface-500: #e1e0db;
  --white:       #ffffff;
  --on-accent:   #ffffff;

  --text:        #26251e;        /* warm near-black */
  --text-60:     rgba(38, 37, 30, 0.60);
  --text-55:     rgba(38, 37, 30, 0.55);
  --text-40:     rgba(38, 37, 30, 0.40);
  --text-15:     rgba(38, 37, 30, 0.15);

  --border-10:   rgba(38, 37, 30, 0.10);
  --border-20:   rgba(38, 37, 30, 0.20);
  --border-55:   rgba(38, 37, 30, 0.55);
  --border-solid:#26251e;

  --shadow-ambient:  0 0 16px rgba(0,0,0,0.02), 0 0 8px rgba(0,0,0,0.008);
  --shadow-card:     0 28px 70px rgba(0,0,0,0.14), 0 14px 32px rgba(0,0,0,0.10), 0 0 0 1px var(--border-10);
  --shadow-focus:    0 4px 12px rgba(0,0,0,0.10);

  --bg-glow-1:   rgba(245, 78, 0, 0.045);
  --bg-glow-2:   rgba(192, 133, 50, 0.05);
  --media-overlay-end: rgba(38,37,30,0.18);
}

/* === DARK theme (warm near-black, inverted) === */
:root[data-theme="dark"] {
  --surface-100: #16140f;        /* deepest, used for "elevated" dark cards */
  --surface-200: #0f0e0b;        /* page background — warm near-black */
  --surface-300: #1a1916;        /* button bg / chips */
  --surface-400: #1f1d18;        /* card */
  --surface-500: #262420;
  --white:       #f2f1ed;
  --on-accent:   #ffffff;

  --text:        #ebeae5;        /* warm cream text */
  --text-60:     rgba(235, 234, 229, 0.62);
  --text-55:     rgba(235, 234, 229, 0.55);
  --text-40:     rgba(235, 234, 229, 0.40);
  --text-15:     rgba(235, 234, 229, 0.16);

  --border-10:   rgba(235, 234, 229, 0.10);
  --border-20:   rgba(235, 234, 229, 0.20);
  --border-55:   rgba(235, 234, 229, 0.55);
  --border-solid:#ebeae5;

  --shadow-ambient:  0 0 24px rgba(0,0,0,0.35), 0 0 8px rgba(0,0,0,0.25);
  --shadow-card:     0 28px 70px rgba(0,0,0,0.55), 0 14px 32px rgba(0,0,0,0.40), 0 0 0 1px var(--border-10);
  --shadow-focus:    0 0 0 4px rgba(245, 78, 0, 0.18);

  --bg-glow-1:   rgba(245, 78, 0, 0.10);
  --bg-glow-2:   rgba(192, 133, 50, 0.10);
  --media-overlay-end: rgba(0,0,0,0.45);
}

/* ----- 2. Base ----------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface-200);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01" on, "cv11" on;
  transition: background-color 220ms ease, color 220ms ease;
}

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

a {
  color: var(--text);
  text-decoration: none;
  transition: color 150ms ease;
}
a:hover { color: var(--error); }

p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent); color: #fff; }

.screen-reader-text {
  position: absolute !important;
  clip: rect(1px,1px,1px,1px);
  width: 1px; height: 1px; overflow: hidden;
}

.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 999;
  background: var(--text); color: var(--surface-200);
  padding: 10px 14px; border-radius: var(--r-8);
}
.skip-link:focus { top: 16px; color: var(--surface-200); }

.muted { color: var(--text-55); }
.text-center { text-align: center; }

/* ----- 3. Background --------------------------------- */
.site-bg {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
}
.site-bg__grain {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 0%, var(--bg-glow-1), transparent 45%),
    radial-gradient(circle at 90% 10%, var(--bg-glow-2), transparent 45%);
  transition: opacity 220ms ease;
}

/* ----- 4. Layout primitives -------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.container--narrow { max-width: var(--container-narrow); }

.section {
  padding: var(--section-y) 0;
  position: relative;
}
.section--page { padding: 64px 0 96px; }

.section__head {
  max-width: 760px;
  margin-bottom: 56px;
}
.section__head + .section__head { margin-top: 64px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-55);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--text-40);
}

.section__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
  color: var(--text);
}
.section__lede {
  font-family: var(--font-serif);
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.5;
  color: var(--text-55);
  margin: 0;
  max-width: 60ch;
}

/* ----- 5. Typography utilities ------------------------ */
.gradient-text {
  background: linear-gradient(115deg, var(--accent) 0%, var(--gold) 60%, var(--error) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.prose {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
}
.prose h1, .prose h2, .prose h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

/* ----- 6. Buttons ------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: var(--r-8);
  background: var(--surface-300);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, box-shadow 200ms ease, transform 150ms ease;
  white-space: nowrap;
}
.btn .icon svg { width: 14px; height: 14px; }
.btn:hover { color: var(--error); }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

.btn--primary {
  background: var(--text);
  color: var(--surface-200);
}
.btn--primary:hover {
  background: var(--text);
  color: var(--accent-soft);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-10);
}
.btn--ghost:hover { background: var(--surface-300); color: var(--text); }

.btn--sm { padding: 8px 12px; font-size: 13px; }

/* ----- 7. Pills / chips ------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  background: var(--surface-300);
  border: 1px solid var(--border-10);
  border-radius: var(--r-pill);
  color: var(--text-55);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}
.pill .icon svg { width: 12px; height: 12px; }
.pill__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(31, 138, 101, 0.18);
}

/* ----- 8. Site header --------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface-200) 80%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-10);
  transition: background-color 220ms ease, border-color 220ms ease;
}
/* fallback for browsers without color-mix */
@supports not (background: color-mix(in srgb, red, blue)) {
  :root[data-theme="light"] .site-header { background: rgba(242, 241, 237, 0.80); }
  :root[data-theme="dark"]  .site-header { background: rgba(15, 14, 11, 0.80); }
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px 24px;
  min-height: 64px;
}
.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.site-header__brand img {
  height: 32px;
  width: auto;
}
.site-header__brand-text { display: inline-flex; flex-direction: column; line-height: 1; }
.site-header__brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.site-nav { flex: 1; }
.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}
.site-nav__link,
.site-nav .menu-item > a {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-55);
  border-radius: var(--r-8);
  transition: color 150ms ease, background-color 150ms ease;
}
.site-nav__link:hover,
.site-nav .menu-item > a:hover { color: var(--text); background: var(--surface-300); }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.site-header__toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-10);
  border-radius: var(--r-8);
  padding: 8px;
  color: var(--text);
  cursor: pointer;
}
.site-header__toggle .icon svg { width: 18px; height: 18px; }

.lang-switcher {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  background: var(--surface-300);
  border-radius: var(--r-pill);
  border: 1px solid var(--border-10);
}
.lang-switcher__item {
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-55);
  border-radius: var(--r-pill);
  transition: color 150ms ease, background-color 150ms ease;
}
.lang-switcher__item:hover { color: var(--text); }
.lang-switcher__item.is-active {
  background: var(--text);
  color: var(--surface-200);
}

/* ----- 9. Hero ---------------------------------------- */
.hero {
  padding: 96px 0 64px;
  position: relative;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero__copy {
  max-width: 620px;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(48px, 6.4vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.038em;
  margin: 24px 0 24px;
  color: var(--text);
}
.hero__title .gradient-text { letter-spacing: inherit; }
.hero__lede {
  font-family: var(--font-serif);
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.5;
  color: var(--text-55);
  margin-bottom: 32px;
  max-width: 56ch;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-55);
}
.hero__chips li { display: inline-flex; align-items: center; gap: 6px; }
.hero__chips .icon svg { width: 14px; height: 14px; color: var(--success); }

.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__card {
  background: var(--surface-100);
  border: 1px solid var(--border-10);
  border-radius: var(--r-10);
  box-shadow: var(--shadow-card);
}
.hero__card--main {
  width: 100%;
  max-width: 460px;
  overflow: hidden;
}
.hero__card-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface-300);
  border-bottom: 1px solid var(--border-10);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-55);
}
.hero__card-bar .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--text-15);
}
.hero__card-bar .hero__card-title {
  margin-left: 6px;
}
.hero__card-body { padding: 18px 18px 22px; }

.ledger { display: flex; flex-direction: column; gap: 4px; }
.ledger__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--r-8);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  transition: background-color 150ms ease;
}
.ledger__row:hover { background: var(--surface-300); }
.ledger__row .muted { color: var(--text-55); }
.ledger__row--total {
  margin-top: 6px;
  border-top: 1px dashed var(--border-10);
  padding-top: 14px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
}
.ledger__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  padding: 3px 0;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  background: var(--surface-300);
  color: var(--text);
}
.tag-jf  { background: rgba(223,168,143,0.30); color: #8a4d35; }
.tag-jwl { background: rgba(192,168,221,0.30); color: #5d4485; }
.tag-kit { background: rgba(159,201,162,0.32); color: #2f6b3c; }
.tag-prx { background: rgba(159,187,224,0.32); color: #355a8a; }

/* Dark mode: invert tag colors so the pill text pops on dark surfaces */
:root[data-theme="dark"] .tag-jf  { background: rgba(223,168,143,0.18); color: #f1c5af; }
:root[data-theme="dark"] .tag-jwl { background: rgba(192,168,221,0.18); color: #d8c2f0; }
:root[data-theme="dark"] .tag-kit { background: rgba(159,201,162,0.18); color: #b9e0bb; }
:root[data-theme="dark"] .tag-prx { background: rgba(159,187,224,0.18); color: #b9d2f0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--text);
  color: var(--surface-200);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11px;
}
.badge .icon svg { width: 12px; height: 12px; color: var(--accent); }

.hero__card--float {
  position: absolute;
  right: -8px;
  bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--border-10);
  border-radius: var(--r-10);
  box-shadow: var(--shadow-card);
  font-family: var(--font-display);
}
.hero__card-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero__card--float strong {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.hero__card--float .muted { font-size: 12px; }

/* ----- 10. Stats -------------------------------------- */
.stats {
  padding: 24px 0 64px;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--surface-300);
  border: 1px solid var(--border-10);
  border-radius: var(--r-10);
  overflow: hidden;
}
.stats__item {
  padding: 28px 24px;
  border-right: 1px solid var(--border-10);
}
.stats__item:last-child { border-right: none; }
.stats__value {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 8px;
}
.stats__label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-55);
}

/* ----- 11. Services ----------------------------------- */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.service {
  display: flex;
  flex-direction: column;
  background: var(--surface-100);
  border: 1px solid var(--border-10);
  border-radius: var(--r-10);
  overflow: hidden;
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.service:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.service__media {
  height: 220px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.service__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, var(--media-overlay-end) 100%);
}
.service__body {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.service__tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  background: var(--surface-300);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-60);
  text-transform: uppercase;
}
.service__title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}
.service__desc {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text-55);
  margin: 0;
}
.service__features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
}
.service__features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text);
}
.service__features .icon svg { width: 14px; height: 14px; color: var(--success); }

.service__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}
.service__more:hover { color: var(--error); }
.service__more .icon svg {
  width: 14px; height: 14px;
  transition: transform 150ms ease;
}
.service__more:hover .icon svg { transform: translateX(3px); }

/* ----- 12. About -------------------------------------- */
.section--about {
  padding-top: 56px;
}
.about__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about__copy .section__title { margin-bottom: 24px; }
.about__copy p {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 18px;
}
.about__highlights {
  margin: 28px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--border-10);
  display: grid;
  gap: 18px;
}
.about__highlights > div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 18px;
  align-items: baseline;
}
.about__highlights dt {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-55);
  margin: 0;
}
.about__highlights dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text);
}
.about__visual {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 50px);
  gap: 16px;
}
.about__media {
  grid-column: 1 / span 6;
  grid-row: 1 / span 4;
  border-radius: var(--r-10);
  overflow: hidden;
  border: 1px solid var(--border-10);
  box-shadow: var(--shadow-card);
}
.about__media img { width: 100%; height: 100%; object-fit: cover; }
.about__media--small {
  grid-column: 3 / span 4;
  grid-row: 4 / span 3;
  z-index: 2;
  background: var(--surface-200);
}

/* ----- 13. Pillars (work) ----------------------------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pillar {
  padding: 28px;
  background: var(--surface-100);
  border: 1px solid var(--border-10);
  border-radius: var(--r-10);
  position: relative;
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.pillar:hover { box-shadow: var(--shadow-ambient); transform: translateY(-1px); }
.pillar__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 18px;
}
.pillar__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  color: var(--text);
}
.pillar__desc {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-55);
  margin: 0;
}

/* ----- 14. CTA banner --------------------------------- */
.section--cta { padding-top: 32px; }
.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  padding: 56px 56px;
  background: var(--text);
  color: var(--surface-200);
  border-radius: 18px;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 78, 0, 0.30), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(192, 133, 50, 0.25), transparent 45%);
  pointer-events: none;
}
.cta__copy { max-width: 560px; position: relative; }
.cta__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 14px;
  color: var(--surface-200);
}
.cta__title .gradient-text {
  background: linear-gradient(95deg, var(--accent) 0%, #ffd6a8 60%, #ffece2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cta__desc {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.55;
  color: rgba(242, 241, 237, 0.72);
  margin: 0;
}
.cta__actions { display: flex; gap: 12px; position: relative; flex-wrap: wrap; }
.cta .btn--primary {
  background: var(--surface-200);
  color: var(--text);
}
.cta .btn--primary:hover { background: var(--white); color: var(--text); }
.cta .btn--ghost {
  background: transparent;
  color: var(--surface-200);
  border-color: rgba(242,241,237,0.25);
}
.cta .btn--ghost:hover { background: rgba(242,241,237,0.08); color: var(--surface-200); }

/* ----- 15. Contact ------------------------------------ */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact__copy .section__title { margin-bottom: 18px; }
.contact__channels {
  margin-top: 32px;
  display: grid;
  gap: 20px;
}
.contact__channels li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-10);
}
.contact__channels li:last-child { border-bottom: none; }
.contact__label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-55);
}
.contact__channels a { color: var(--accent); }
.contact__channels a:hover { color: var(--error); }

.contact__form {
  background: var(--surface-100);
  border: 1px solid var(--border-10);
  border-radius: var(--r-10);
  padding: 32px;
  display: grid;
  gap: 18px;
  box-shadow: var(--shadow-ambient);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: grid; gap: 6px; }
.form-field span {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-55);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-200);
  border: 1px solid var(--border-10);
  border-radius: var(--r-8);
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--border-20);
  box-shadow: 0 0 0 4px rgba(245, 78, 0, 0.10);
}
.form-note { font-family: var(--font-mono); font-size: 11px; }

/* ----- 15b. Map block --------------------------------- */
.contact__map {
  margin: 56px 0 0;
  background: var(--surface-100);
  border: 1px solid var(--border-10);
  border-radius: var(--r-10);
  overflow: hidden;
  box-shadow: var(--shadow-ambient);
}
.contact__map iframe {
  display: block;
  border: 0;
  width: 100%;
  background: var(--surface-300);
  transition: filter 220ms ease;
}
.contact__map-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-top: 1px solid var(--border-10);
  flex-wrap: wrap;
}
.contact__map-caption .contact__label { display: block; margin-bottom: 4px; }
.contact__map-caption strong {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.contact__map-caption .btn--sm .icon svg { width: 12px; height: 12px; }

/* Soften Google Maps' bright canvas in dark mode */
:root[data-theme="dark"] .contact__map iframe {
  filter: invert(0.92) hue-rotate(180deg) brightness(0.95) contrast(0.95) saturate(0.85);
}

@media (max-width: 600px) {
  .contact__map iframe { height: 320px; }
  .contact__map-caption { padding: 14px 18px; }
}

/* ----- 15c. Company / Privacy pages ------------------- */
.section--company .section__head,
.section--privacy .section__head { margin-bottom: 56px; }

.profile {
  margin: 0 0 32px;
  background: var(--surface-100);
  border: 1px solid var(--border-10);
  border-radius: var(--r-10);
  overflow: hidden;
}
.profile__row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-10);
  align-items: baseline;
}
.profile__row:last-child { border-bottom: none; }
.profile__row dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-55);
  margin: 0;
}
.profile__row dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
}
.profile__row dd .muted {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}
.profile__row dd a { color: var(--accent); }
.profile__row dd a:hover { color: var(--error); }

.profile__subhead {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 48px 0 8px;
  color: var(--text);
}
.profile__bank-note { margin: 0 0 18px; font-family: var(--font-serif); }

/* Privacy page */
.privacy h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 40px 0 12px;
  color: var(--text);
}
.privacy h2:first-of-type { margin-top: 24px; }
.privacy ul {
  list-style: disc;
  padding-left: 20px;
  margin: 0 0 18px;
  font-family: var(--font-serif);
  color: var(--text);
}
.privacy ul li { margin-bottom: 6px; }
.privacy__contact {
  font-style: normal;
  font-family: var(--font-display);
  background: var(--surface-100);
  border: 1px solid var(--border-10);
  border-radius: var(--r-10);
  padding: 18px 22px;
  margin: 12px 0 24px;
  line-height: 1.6;
}
.privacy__contact a { color: var(--accent); }

@media (max-width: 600px) {
  .profile__row { grid-template-columns: 1fr; gap: 6px; padding: 16px 18px; }
}

/* ----- 15d. Careers ----------------------------------- */
.section--careers .section__head { margin-bottom: 64px; }

.job-list {
  display: grid;
  gap: 16px;
}

.job-card {
  display: block;
  padding: 28px 32px;
  background: var(--surface-100);
  border: 1px solid var(--border-10);
  border-radius: var(--r-10);
  color: var(--text);
  transition: box-shadow 200ms ease, transform 200ms ease, border-color 200ms ease;
}
.job-card:hover {
  color: var(--text);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
  border-color: var(--border-20);
}
.job-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.job-card__dept {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--surface-300);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-60);
  text-transform: uppercase;
}
.job-card__date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-55);
}
.job-card__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: var(--text);
}
.job-card:hover .job-card__title { color: var(--accent); }
.job-card__intro {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-55);
  margin: 0 0 16px;
}
.job-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-55);
}
.job-card__meta .icon svg { width: 14px; height: 14px; vertical-align: middle; }
.job-card__meta .dot-sep { opacity: 0.55; }
.job-card__more {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
}
.job-card__more .icon svg {
  width: 14px; height: 14px;
  transition: transform 150ms ease;
}
.job-card:hover .job-card__more .icon svg { transform: translateX(3px); }

.careers__cta {
  margin-top: 64px;
  padding: 40px 32px;
  text-align: center;
  background: var(--surface-100);
  border: 1px solid var(--border-10);
  border-radius: var(--r-10);
}
.careers__cta h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--text);
}
.careers__cta p { margin: 0 auto 18px; max-width: 480px; }

/* Job detail */
.back-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-55);
  margin-bottom: 24px;
}
.back-link:hover { color: var(--accent); }

.job-hero { margin-bottom: 48px; }
.job-hero .section__title { margin: 14px 0 28px; }
.job-hero__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin: 0 0 28px;
  padding: 24px;
  background: var(--surface-100);
  border: 1px solid var(--border-10);
  border-radius: var(--r-10);
}
.job-hero__meta dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-55);
  margin: 0 0 6px;
}
.job-hero__meta dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.job-body__intro {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-10);
}
.job-body h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 36px 0 14px;
  color: var(--text);
}
.job-body h2:first-of-type { margin-top: 0; }
.job-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: grid;
  gap: 10px;
}
.job-body ul li {
  position: relative;
  padding-left: 24px;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
}
.job-body ul li::before {
  content: "";
  position: absolute;
  left: 6px; top: 0.7em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.job-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-10);
}

@media (max-width: 600px) {
  .job-card { padding: 22px 20px; }
  .job-card__head { flex-wrap: wrap; gap: 8px; }
  .job-card__more { margin-left: 0; }
}

/* ----- 15e. Life at Dogo ------------------------------ */

/* Photo system — works with real <img> or pretty gradient placeholder */
.life-photo {
  position: relative;
  border-radius: var(--r-10);
  overflow: hidden;
  background: var(--surface-300);
  isolation: isolate;
}
.life-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.life-photo__ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  color: var(--text);
}
.life-photo__icon { display: inline-flex; }
.life-photo__icon svg { width: 38px; height: 38px; opacity: 0.85; }
.life-photo__label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-align: center;
  padding: 0 16px;
  color: var(--text);
}
.life-photo__chip {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.45);
  color: var(--text-60);
}
:root[data-theme="dark"] .life-photo__chip {
  background: rgba(0,0,0,0.32);
  color: rgba(235, 234, 229, 0.7);
}

/* 6 palettes, perceptually balanced for both themes */
.life-photo--peach    { background: linear-gradient(135deg, #f7d4c4 0%, #f1ad8c 50%, #e4885d 100%); }
.life-photo--lavender { background: linear-gradient(135deg, #e0d2f3 0%, #c0a8dd 55%, #8c6fc4 100%); }
.life-photo--sage     { background: linear-gradient(135deg, #d3ebd5 0%, #9fc9a2 55%, #5fa46e 100%); }
.life-photo--blue     { background: linear-gradient(135deg, #cfe0f3 0%, #9fbbe0 55%, #5b86b8 100%); }
.life-photo--cream    { background: linear-gradient(135deg, #f9efd9 0%, #e9cf94 50%, #c9a85a 100%); }
.life-photo--orange   { background: linear-gradient(135deg, #ffd8b8 0%, #ff9c5c 55%, #f54e00 100%); }

:root[data-theme="dark"] .life-photo--peach    { background: linear-gradient(135deg, #4a2418 0%, #6b3020 55%, #8a4128 100%); }
:root[data-theme="dark"] .life-photo--lavender { background: linear-gradient(135deg, #2a1f3c 0%, #3d2c5a 55%, #533c80 100%); }
:root[data-theme="dark"] .life-photo--sage     { background: linear-gradient(135deg, #1f2d22 0%, #2c4733 55%, #3d6a48 100%); }
:root[data-theme="dark"] .life-photo--blue     { background: linear-gradient(135deg, #1d2734 0%, #2a3a55 55%, #3d537a 100%); }
:root[data-theme="dark"] .life-photo--cream    { background: linear-gradient(135deg, #2c2614 0%, #463a1d 55%, #6a5a2c 100%); }
:root[data-theme="dark"] .life-photo--orange   { background: linear-gradient(135deg, #3a1804 0%, #5e2706 55%, #8a3a08 100%); }

:root[data-theme="dark"] .life-photo__label,
:root[data-theme="dark"] .life-photo__icon { color: rgba(248, 240, 230, 0.92); }

/* Hero collage — asymmetric Pinterest-style grid */
.section--life-hero { padding-top: 64px; padding-bottom: 0; }
.life-hero__head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 56px;
}
.life-hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 18px 0 18px;
  color: var(--text);
}
.life-hero__lede {
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.5;
  color: var(--text-55);
  margin: 0;
}

.life-collage {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 110px;
  gap: 16px;
  margin-top: 24px;
}
.life-collage__tile {
  margin: 0;
  position: relative;
  transition: transform 280ms ease, box-shadow 280ms ease;
}
.life-collage__tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }

/* Caption overlay on hero collage tiles when an image is present */
.life-collage__cap {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  background: rgba(15, 14, 11, 0.55);
  color: #f2f1ed;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 220ms ease, transform 220ms ease;
}
.life-collage__cap-icon { display: inline-flex; }
.life-collage__cap-icon svg { width: 12px; height: 12px; }
.life-collage__tile:hover .life-collage__cap { opacity: 1; transform: none; }
.life-collage__tile img + .life-collage__cap { /* keep selector specific */ }
@media (hover: none) {
  .life-collage__cap { opacity: 1; transform: none; }
}

/* When an <img> is present, give it a soft gradient at bottom for legibility */
.life-collage__tile img {
  filter: saturate(1.05);
}
.life-collage__tile::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.30) 100%);
  opacity: 0;
  transition: opacity 220ms ease;
  z-index: 1;
}
.life-collage__tile:hover::after { opacity: 1; }
.life-collage__tile--1 { grid-column: span 5; grid-row: span 3; }
.life-collage__tile--2 { grid-column: span 4; grid-row: span 2; }
.life-collage__tile--3 { grid-column: span 3; grid-row: span 2; }
.life-collage__tile--4 { grid-column: span 4; grid-row: span 3; }
.life-collage__tile--5 { grid-column: span 4; grid-row: span 2; }
.life-collage__tile--6 { grid-column: span 4; grid-row: span 2; }

/* Stats strip on Life page reuses the homepage stats__grid */
.section--life-stats { padding-top: 80px; padding-bottom: 0; }

/* Categories grid — uniform 3-up, with gradient media + body */
.section--life-cats { padding-top: 96px; }
.life-cats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.life-cat {
  display: flex;
  flex-direction: column;
  background: var(--surface-100);
  border: 1px solid var(--border-10);
  border-radius: var(--r-10);
  overflow: hidden;
  transition: box-shadow 220ms ease, transform 220ms ease;
}
.life-cat:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.life-cat__media {
  aspect-ratio: 4 / 3;
  border-radius: 0;
}
.life-cat__body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.life-cat__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0;
}
.life-cat__desc {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-55);
  margin: 0;
}

/* Voices */
.section--life-voices { padding-top: 96px; }
.voices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.voice {
  margin: 0;
  padding: 32px;
  background: var(--surface-100);
  border: 1px solid var(--border-10);
  border-radius: var(--r-10);
  position: relative;
}
.voice::before {
  content: "“";
  position: absolute;
  top: 8px; left: 24px;
  font-family: var(--font-serif);
  font-size: 80px;
  line-height: 1;
  color: var(--text-15);
  pointer-events: none;
}
.voice__quote {
  position: relative;
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.5;
  color: var(--text);
  margin: 0 0 24px;
}
.voice__author {
  display: flex;
  align-items: center;
  gap: 14px;
}
.voice__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
}
.voice__meta { display: flex; flex-direction: column; line-height: 1.3; }
.voice__meta strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}
.voice__meta .muted { font-size: 13px; }

.section--life-cta { padding-top: 96px; padding-bottom: 96px; }

@media (max-width: 1024px) {
  .life-collage {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 120px;
  }
  .life-collage__tile--1 { grid-column: span 6; grid-row: span 3; }
  .life-collage__tile--2 { grid-column: span 3; grid-row: span 2; }
  .life-collage__tile--3 { grid-column: span 3; grid-row: span 2; }
  .life-collage__tile--4 { grid-column: span 6; grid-row: span 2; }
  .life-collage__tile--5 { grid-column: span 3; grid-row: span 2; }
  .life-collage__tile--6 { grid-column: span 3; grid-row: span 2; }

  .life-cats { grid-template-columns: repeat(2, 1fr); }
  .voices    { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .life-collage {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 100px;
  }
  .life-collage__tile { grid-column: span 1 !important; grid-row: span 2 !important; }
  .life-collage__tile--1 { grid-column: span 2 !important; grid-row: span 3 !important; }
  .life-cats { grid-template-columns: 1fr; }
  .voice { padding: 24px; }
}

/* ----- 16. Footer ------------------------------------- */
.site-footer {
  margin-top: 96px;
  background: var(--surface-300);
  border-top: 1px solid var(--border-10);
  padding: 64px 0 32px;
  position: relative;
}
.site-footer__top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-10);
}
.site-footer__brand { max-width: 360px; display: flex; flex-direction: column; gap: 18px; }
.site-footer__logo img { height: 32px; width: auto; }
.site-footer__tagline {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-55);
  margin: 0;
}
.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.site-footer__title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-55);
  margin: 0 0 14px;
  font-weight: 500;
}
.site-footer__col ul { display: flex; flex-direction: column; gap: 8px; }
.site-footer__col a { font-size: 14px; color: var(--text); }
.site-footer__col a:hover { color: var(--error); }

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-55);
}
.site-footer__bottom p { margin: 0; }

.back-to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--surface-200);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease, background-color 150ms ease;
  z-index: 40;
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--accent); }
.back-to-top .icon svg { width: 18px; height: 18px; }

/* ----- 17. Post grid (blog fallback) ------------------ */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.post-card {
  background: var(--surface-100);
  border: 1px solid var(--border-10);
  border-radius: var(--r-10);
  overflow: hidden;
}
.post-card__media img { width: 100%; height: auto; }
.post-card__body { padding: 24px; }
.post-card__title { font-family: var(--font-display); font-size: 20px; margin: 0 0 10px; }
.post-card__excerpt { font-family: var(--font-serif); color: var(--text-55); margin-bottom: 12px; }
.post-card__more { color: var(--accent); font-size: 14px; }

.section--404 .section__title { font-size: clamp(48px, 6vw, 80px); }

/* ----- 18. Search form -------------------------------- */
.search-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 14px;
  background: var(--surface-300);
  border: 1px solid var(--border-10);
  border-radius: var(--r-pill);
}
.search-form input {
  border: none;
  background: transparent;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text);
  min-width: 240px;
}
.search-form input:focus { outline: none; }

/* ----- 19. Responsive --------------------------------- */
@media (max-width: 1024px) {
  .hero__inner,
  .about__grid,
  .contact__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__visual { max-width: 540px; margin: 0 auto; width: 100%; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stats__item:nth-child(2) { border-right: none; }
  .stats__item:nth-child(odd) { border-right: 1px solid var(--border-10); }
  .stats__item:nth-child(1),
  .stats__item:nth-child(2) { border-bottom: 1px solid var(--border-10); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer__top { grid-template-columns: 1fr; }
  .site-footer__cols { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --section-y: 64px; }
  .site-nav { display: none; }
  .site-nav.is-open {
    display: block;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--surface-200);
    border-bottom: 1px solid var(--border-10);
    padding: 12px 24px 18px;
  }
  .site-nav.is-open .site-nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-header__toggle { display: inline-flex; }
  .site-header__actions .btn { display: none; }
  .services { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: 1fr; }
  .stats__item { border-right: none !important; border-bottom: 1px solid var(--border-10); }
  .stats__item:last-child { border-bottom: none; }
  .cta { padding: 36px 28px; }
  .form-row { grid-template-columns: 1fr; }
  .hero__card--float { right: 12px; bottom: -16px; }
  .site-footer__cols { grid-template-columns: 1fr 1fr; gap: 24px; }
  .site-footer__bottom { flex-direction: column; gap: 8px; align-items: flex-start; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .hero__title { font-size: 40px; }
  .section__title { font-size: 32px; }
  .about__highlights > div { grid-template-columns: 1fr; gap: 4px; }
  .contact__channels li { grid-template-columns: 1fr; gap: 4px; }
}

/* ----- 20. Theme toggle + light/dark swaps ------------ */
.theme-toggle {
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-10);
  border-radius: var(--r-pill);
  background: var(--surface-300);
  color: var(--text-60);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 150ms ease, background-color 150ms ease, transform 200ms ease;
}
.theme-toggle:hover { color: var(--accent); background: var(--surface-400); }
.theme-toggle:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.theme-toggle__icon {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 200ms ease, transform 300ms ease;
}
.theme-toggle__icon svg { width: 16px; height: 16px; }

/* Dark theme is active -> show sun (action: switch to light). Light -> show moon. */
:root[data-theme="dark"]  .theme-toggle__icon--moon { opacity: 0; transform: rotate(-90deg) scale(0.6); pointer-events: none; }
:root[data-theme="dark"]  .theme-toggle__icon--sun  { opacity: 1; transform: none; }
:root[data-theme="light"] .theme-toggle__icon--sun  { opacity: 0; transform: rotate(90deg) scale(0.6); pointer-events: none; }
:root[data-theme="light"] .theme-toggle__icon--moon { opacity: 1; transform: none; }

/* Logo swap. Stack the two images via grid so the visible one keeps spacing. */
.site-header__brand,
.site-footer__logo {
  display: inline-grid;
  grid-template-areas: "logo";
  align-items: center;
  gap: 10px;
}
.site-header__brand .brand-logo,
.site-footer__logo .brand-logo {
  grid-area: logo;
  transition: opacity 200ms ease;
}
.site-header__brand .site-header__brand-text { grid-column: 2; grid-row: 1; }

:root[data-theme="dark"]  .brand-logo--dark  { opacity: 0; }
:root[data-theme="dark"]  .brand-logo--light { opacity: 1; }
:root[data-theme="light"] .brand-logo--dark  { opacity: 1; }
:root[data-theme="light"] .brand-logo--light { opacity: 0; }

/* CTA banner is "always dark" — feature panel that contrasts with both themes */
.cta {
  background: #18170f;
  color: #ebeae5;
}
.cta__title  { color: #ebeae5; }
.cta__desc   { color: rgba(235, 234, 229, 0.72); }
.cta .btn--primary { background: #ebeae5; color: #18170f; }
.cta .btn--primary:hover { background: #fff; color: #18170f; }
.cta .btn--ghost {
  background: transparent;
  color: #ebeae5;
  border-color: rgba(235, 234, 229, 0.25);
}
.cta .btn--ghost:hover { background: rgba(235, 234, 229, 0.08); color: #ebeae5; }

/* Dark-mode tweak: use a slightly elevated card surface for the floating hero card so it pops off the bg */
:root[data-theme="dark"] .hero__card--float { background: var(--surface-400); }
:root[data-theme="dark"] .hero__card--main  { background: var(--surface-400); }

/* Selection in dark mode: make the white text a touch warmer */
:root[data-theme="dark"] ::selection { background: var(--accent); color: #fff; }

/* ----- 21. Reveal-on-scroll --------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
  will-change: opacity, transform;
}
.reveal.is-revealed { opacity: 1; transform: none; }

.site-header.is-scrolled { box-shadow: 0 1px 0 var(--border-10), 0 12px 24px rgba(0,0,0,0.04); }

/* ----- 21. Reduced motion ----------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
