/* ═══════════════════════════════════════════════════════════════
   Oficio EV — single stylesheet.
   4 themes × 2 modes (day/night), no frameworks, no external fonts.
   ═══════════════════════════════════════════════════════════════ */

/* ── Structural tokens ──────────────────────────────────────── */
:root {
  --font-display:
    "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman",
    serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: clamp(1.0625rem, 0.55vw + 0.95rem, 1.125rem);
  --step-2: clamp(1.375rem, 1.1vw + 1.15rem, 1.75rem);
  --step-3: clamp(1.75rem, 2.1vw + 1.2rem, 2.5rem);
  --step-4: clamp(2.1rem, 4vw + 1rem, 3.55rem);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --wrap: 1080px;
  --gutter: clamp(20px, 5vw, 40px);
  --measure: 60ch;

  --radius-sm: 6px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 220ms;

  --header-h: 64px;
}

/* ── Surfaces per mode ──────────────────────────────────────── */
[data-mode="light"] {
  color-scheme: light;
  --bg: #faf8f4;
  --bg-soft: #f2eee7;
  --ink: #16130f;
  --ink-soft: #3a352d;
  --muted: #6f6a62;
  --line: #e4dfd5;
  --line-strong: #d2cabb;
  --control-line: #8b857c;
  --on-accent: #ffffff;
  --surface: #ffffff;
}

[data-mode="dark"] {
  color-scheme: dark;
  --bg: #131210;
  --bg-soft: #1a1815;
  --ink: #f4f1ea;
  --ink-soft: #d9d4ca;
  --muted: #9c958a;
  --line: #2b2723;
  --line-strong: #3a352f;
  --control-line: #6f6a62;
  --on-accent: #0c0b0a;
  --surface: #1b1917;
}

/* ── Themes: accent + surface tint ──────────────────────────── */

/* Blue */
[data-theme="blue"][data-mode="light"] {
  --accent: #1e6fd9;
  --accent-soft: #e0ebfd;
  --accent-ink: #ffffff;
  --bg: #f7f9fc;
  --bg-soft: #eef2f9;
  --line: #e0e6f0;
  --line-strong: #c9d3e3;
}
[data-theme="blue"][data-mode="dark"] {
  --accent: #8ab4ff;
  --accent-soft: #10243f;
  --accent-ink: #061a33;
  --bg: #0f1218;
  --bg-soft: #171b22;
  --line: #252b35;
  --line-strong: #343c48;
  --surface: #171c24;
}

/* Green */
[data-theme="green"][data-mode="light"] {
  --accent: #25d366;
  --accent-soft: #dcf8e7;
  --accent-ink: #04361f;
}
[data-theme="green"][data-mode="dark"] {
  --accent: #5be38a;
  --accent-soft: #123024;
  --accent-ink: #04160c;
}

/* Mono */
[data-theme="mono"][data-mode="light"] {
  --accent: #111111;
  --accent-soft: #ececec;
  --accent-ink: #ffffff;
  --bg: #ffffff;
  --bg-soft: #f5f5f5;
  --line: #e7e7e7;
  --line-strong: #cfcfcf;
  --surface: #ffffff;
}
[data-theme="mono"][data-mode="dark"] {
  --accent: #f5f5f5;
  --accent-soft: #1f1f1f;
  --accent-ink: #0a0a0a;
  --bg: #0b0b0b;
  --bg-soft: #151515;
  --line: #262626;
  --line-strong: #3a3a3a;
  --surface: #141414;
}

/* Orange */
[data-theme="orange"][data-mode="light"] {
  --accent: #f97316;
  --accent-soft: #fee7d6;
  --accent-ink: #2b1104;
  --bg: #fdf9f5;
  --bg-soft: #f8f1ea;
  --line: #eee2d6;
  --line-strong: #dccbb9;
}
[data-theme="orange"][data-mode="dark"] {
  --accent: #ffa35c;
  --accent-soft: #33200f;
  --accent-ink: #241003;
  --bg: #151110;
  --bg-soft: #1d1815;
  --line: #2f2824;
  --line-strong: #3f352f;
  --surface: #1d1714;
}

/* ── Reset ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition:
    background-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

h1,
h2,
h3,
p,
blockquote,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
}
ol,
ul {
  padding: 0;
  list-style: none;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Layout ─────────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  z-index: 100;
}
.skip:focus {
  left: 12px;
  top: 12px;
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition:
    border-color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1;
}

.brand-name {
  font-size: var(--step-0);
}
.brand-dot {
  color: var(--accent);
}

.nav {
  display: flex;
  justify-self: center;
  gap: clamp(14px, 3vw, 28px);
  font-size: var(--step--1);
  color: var(--muted);
}
.nav a {
  position: relative;
  padding-block: 6px;
  transition: color var(--dur) var(--ease);
}
.nav a:hover {
  color: var(--ink);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav a:hover::after {
  transform: scaleX(1);
}

/* ── Controls: theme, mode, language ────────────────────────── */
.controls {
  display: none;
  align-items: center;
  gap: 12px;
}

/* Enhanced only: without JS the controls would do nothing. */
.js .controls {
  display: flex;
}

.swatches {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* 24×24 target size (WCAG 2.2 AA), 16px visible dot */
.swatch {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.swatch::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid var(--control-line);
  background: var(--swatch);
  transition:
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.swatch:hover::before {
  transform: scale(1.14);
}

.swatch[aria-checked="true"]::before {
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 3.5px var(--ink);
}

.mode-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--control-line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    background-color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}
.mode-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.mode-btn:active {
  transform: scale(0.94);
}

.mode-btn[aria-checked="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.modes {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ico {
  width: 16px;
  height: 16px;
}

.lang {
  position: relative;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 30px;
  padding: 0 7px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--control-line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease);
}
.lang-btn:hover {
  border-color: var(--ink);
}
.lang-chevron {
  width: 12px;
  height: 12px;
  opacity: 0.6;
  transition: transform var(--dur) var(--ease);
}
.lang-btn[aria-expanded="true"] .lang-chevron {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  min-width: 164px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.lang-option:hover,
.lang-option:focus-visible {
  background: var(--bg-soft);
}
.lang-option:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}
.lang-option[aria-selected="true"] {
  color: var(--accent);
}
.lang-option-code {
  width: 22px;
  flex: none;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.lang-option[aria-selected="true"] .lang-option-code {
  color: var(--accent);
}

@media (max-width: 860px) {
  .header-inner {
    grid-template-columns: auto 1fr;
  }
  .nav {
    display: none;
  }
  .controls {
    justify-self: end;
  }
}

/* Two-row header on narrow screens: no horizontal scroll at 320px */
@media (max-width: 560px) {
  :root {
    --header-h: 92px;
  }
  .site-header {
    height: auto;
  }
  .header-inner {
    grid-template-columns: 1fr;
    row-gap: 8px;
    padding-block: 10px;
  }
  .brand {
    justify-self: start;
  }
  .controls {
    justify-self: stretch;
    justify-content: space-between;
  }
}
@media (max-width: 400px) {
  .controls {
    gap: 10px;
  }
  .swatches {
    gap: 4px;
  }
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  padding-block: clamp(40px, 7vw, 88px) clamp(32px, 5vw, 64px);
}

.kicker {
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-5);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-4);
  line-height: 1.03;
  letter-spacing: -0.022em;
  max-width: 18ch;
  text-wrap: balance;
}

.lede {
  margin-top: var(--space-5);
  max-width: 52ch;
  font-size: var(--step-1);
  color: var(--ink-soft);
}

.actions-label {
  margin-top: var(--space-6);
  font-size: var(--step--1);
  color: var(--muted);
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
  max-width: 452px;
}

.actions .btn {
  justify-content: center;
  padding-inline: 14px;
}

@media (max-width: 560px) {
  .actions {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    transform var(--dur) var(--ease),
    opacity var(--dur) var(--ease);
}
.btn:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}
.btn:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--ink);
  opacity: 1;
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
}

.avail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-6);
  font-size: var(--step--1);
  color: var(--muted);
}

.hero-meta {
  margin-top: var(--space-2);
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ── Sections ───────────────────────────────────────────────── */
.section {
  border-top: 1px solid var(--line);
  padding-block: clamp(40px, 5.6vw, 72px);
}

.label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-5);
}
.label span:first-child {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.section h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-3);
  line-height: 1.08;
  letter-spacing: -0.018em;
  max-width: 20ch;
  text-wrap: balance;
}

/* ── Services ───────────────────────────────────────────────── */
.list {
  margin-top: var(--space-7);
}

.row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: var(--space-4) var(--space-5);
  align-items: start;
  padding-block: var(--space-5);
  border-top: 1px solid var(--line);
}
.row:last-child {
  border-bottom: 1px solid var(--line);
}

.row-num {
  font-family: var(--font-display);
  font-size: var(--step--1);
  color: var(--muted);
  padding-top: 4px;
}

.row-body h3 {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 0;
}

.row-body p {
  max-width: 48ch;
  color: var(--muted);
  font-size: var(--step--1);
}

.row-meta {
  font-size: var(--step--1);
  color: var(--muted);
  white-space: nowrap;
  padding-top: 6px;
  font-variant-numeric: tabular-nums;
}

.services-note {
  margin-top: var(--space-4);
  max-width: 62ch;
  font-size: var(--step--1);
  color: var(--muted);
}

@media (max-width: 700px) {
  .row {
    grid-template-columns: 32px minmax(0, 1fr);
  }
  .row-meta {
    grid-column: 2;
    padding-top: 0;
    color: var(--ink-soft);
  }
}

/* ── Work ───────────────────────────────────────────────────── */
.work {
  margin-top: var(--space-7);
}

.work-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 56px 20px;
  gap: var(--space-4);
  align-items: center;
  padding-block: var(--space-5);
  border-top: 1px solid var(--line);
  transition: background-color var(--dur) var(--ease);
}
.work-row:last-child {
  border-bottom: 1px solid var(--line);
}
.work-row:hover {
  background: var(--bg-soft);
}

.work-kicker {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.work-title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  letter-spacing: -0.01em;
}
.work-row:hover .work-title {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.work-year {
  font-size: var(--step--1);
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.work-row .icon {
  color: var(--muted);
  transition:
    transform var(--dur) var(--ease),
    color var(--dur) var(--ease);
}
.work-row:hover .icon {
  transform: translate(2px, -2px);
  color: var(--ink);
}

@media (max-width: 700px) {
  .work-row {
    grid-template-columns: minmax(0, 1fr) 20px;
    gap: 6px var(--space-4);
  }
  .work-kicker {
    grid-column: 1;
  }
  .work-title {
    grid-column: 1;
  }
  .work-year {
    display: none;
  }
  .work-row .icon {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }
}

/* ── About ──────────────────────────────────────────────────── */
.prose {
  margin-top: var(--space-6);
  max-width: var(--measure);
  display: grid;
  gap: var(--space-4);
  font-size: var(--step-1);
  color: var(--ink-soft);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}
.facts dt {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.facts dd {
  font-family: var(--font-display);
  font-size: var(--step-2);
  letter-spacing: -0.01em;
}

.facts dd.fact-langs {
  font-size: var(--step-1);
  white-space: nowrap;
}

.lang-list {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}

.lang-item:not(:last-child)::after {
  content: "·";
  margin: 0 0.4em;
  color: var(--muted);
}

/* ── Works ──────────────────────────────────────────────────── */
.works {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-7);
}

.works > li {
  display: flex;
}

.work-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-2);
  color: inherit;
}

.work-card:hover h3,
.work-card:focus-visible h3 {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.work-media {
  position: relative;
  margin-bottom: var(--space-2);
}

.work-thumb {
  display: block;
  width: 100%;
  height: auto;
}

.wt-bg {
  fill: var(--surface);
  stroke: var(--line);
}
.wt-bar,
.wt-btn {
  fill: var(--accent);
}
.wt-line {
  fill: var(--line-strong);
}
.wt-img {
  fill: var(--accent-soft);
  stroke: var(--line-strong);
}

.work-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.work-card h3 {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.work-meta {
  font-size: var(--step--1);
  color: var(--accent);
}

.work-desc {
  max-width: 36ch;
  font-size: var(--step--1);
  color: var(--muted);
}

.work-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: var(--space-2);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--accent);
}

.work-cta .icon {
  width: 15px;
  height: 15px;
  transition: transform var(--dur) var(--ease);
}
.work-card:hover .work-cta .icon,
.work-card:focus-visible .work-cta .icon {
  transform: translateX(3px);
}

/* ── Reviews ────────────────────────────────────────────────── */
.reviews-carousel {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.reviews-btn {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition:
    border-color var(--dur) var(--ease),
    opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}
.reviews-btn:hover {
  border-color: var(--ink);
}
.reviews-btn:active {
  transform: scale(0.98);
}
.reviews-btn:disabled {
  opacity: 0.3;
  cursor: default;
  border-color: var(--line-strong);
}
.reviews-btn .ico {
  width: 18px;
  height: 18px;
}

.reviews {
  display: flex;
  gap: var(--space-5);
  margin: 0;
  padding-bottom: 2px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.reviews::-webkit-scrollbar {
  display: none;
}

.review {
  flex: 0 0 clamp(250px, 31%, 360px);
  scroll-snap-align: start;
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

@media (max-width: 700px) {
  .reviews-carousel {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: var(--space-2);
  }
  .reviews-btn .ico {
    width: 14px;
    height: 14px;
  }
  .review {
    flex-basis: 100%;
    padding: var(--space-4);
  }
}

.review blockquote {
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink-soft);
}

.review-name {
  margin-top: var(--space-4);
  font-size: var(--step--1);
  font-weight: 600;
}

.review-meta {
  font-size: var(--step--1);
  color: var(--muted);
}

/* ── Contact ────────────────────────────────────────────────── */
.contact .lede {
  max-width: 46ch;
}

.channels {
  margin-top: var(--space-7);
  border-top: 1px solid var(--line);
}
.channels li {
  border-bottom: 1px solid var(--line);
}

.channel {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-4) 0;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.channel-icon svg {
  width: 22px;
  height: 22px;
}

.channel-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink-soft);
  transition:
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.channel-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.channel-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.channel-value {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.25;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.channel-icon--wa,
.channel-icon--tg,
.channel-icon--ig,
.channel-icon--mail {
  color: var(--ink);
}

.channel-icon--wa {
  color: #25d366;
}

.channel-icon--tg {
  color: #2aabee;
}

.channel-icon--ig {
  color: #e1306c;
}

.channel-icon--mail {
  color: #ea4335;
}

.channel-action {
  font-size: var(--step--1);
  color: var(--muted);
  transition: color var(--dur) var(--ease);
}

.channel:hover .channel-value {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.channel:hover .channel-icon {
  border-color: var(--ink);
}
.channel:hover .channel-action {
  color: var(--ink);
}

@media (max-width: 560px) {
  .channel {
    grid-template-columns: 40px minmax(0, 1fr);
  }
  .channel-action {
    display: none;
  }
}

.meta-line {
  margin-top: var(--space-6);
  font-size: var(--step--1);
  color: var(--muted);
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-6);
  font-size: var(--step--1);
  color: var(--muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ── Section reveal ─────────────────────────────────────────── */
/* Hiding applies only when .reveal-ready is on <html>. The class is
   removed automatically if the JS module did not load (see index.html). */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 620ms var(--ease),
    transform 620ms var(--ease);
}

.reveal-ready [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media print {
  .reveal-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ── Hero layout and illustration ───────────────────────────── */
.hero {
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.6;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.25) 60%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.25) 60%, transparent 92%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.hero-copy {
  min-width: 0;
}
.hero-art-wrap {
  min-width: 0;
}

.hero-art {
  position: relative;
  display: block;
  width: 100%;
  max-width: 400px;
  margin-left: auto;
  aspect-ratio: 440 / 380;
  font-size: 11px;
  container-type: inline-size;
}

@supports (font-size: 1cqw) {
  .hero-art {
    font-size: clamp(7px, 2.2cqw, 10.5px);
  }
}

/* Device frames */
.device {
  position: absolute;
  overflow: hidden;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  box-shadow: 0 1.4em 2.6em rgba(0, 0, 0, 0.1);
}

.device--browser {
  left: 1.8%;
  top: 6%;
  width: 80%;
  bottom: 25.4%;
  border-radius: 1.2em;
  display: flex;
  flex-direction: column;
  animation: float-a 5.6s ease-in-out infinite;
}

.device--phone {
  left: 71%;
  top: 38%;
  width: 21.5%;
  bottom: 8%;
  border-radius: 2em;
  display: flex;
  flex-direction: column;
  animation: float-b 4.6s ease-in-out infinite;
}

@keyframes float-a {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1.6em);
  }
}

@keyframes float-b {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(1.45em);
  }
}

.device-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.45em;
  height: 2.3em;
  padding: 0 0.9em;
  border-bottom: 1px solid var(--line);
}

.device-bar i {
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: var(--line-strong);
}

.device-url {
  margin-left: 0.5em;
  height: 0.85em;
  width: 45%;
  border-radius: 0.45em;
  background: var(--bg);
}

.device-screen {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
}

/* Soft fade so scrolling content does not cut hard */
.device-screen::before,
.device-screen::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2.4em;
  pointer-events: none;
  z-index: 1;
}

.device-screen::before {
  top: 0;
  background: linear-gradient(to bottom, var(--bg), transparent);
}

.device-screen::after {
  bottom: 0;
  background: linear-gradient(to top, var(--bg), transparent);
}

.device-notch {
  position: absolute;
  top: 0.65em;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 0.42em;
  border-radius: 0.21em;
  background: var(--line-strong);
  z-index: 2;
}

/* Scrolling mock pages */
.mock-scroll {
  display: flex;
  flex-direction: column;
  animation: mock-scroll 34s linear infinite;
  will-change: transform;
}

.mock-scroll--phone {
  animation-duration: 21s;
}

@keyframes mock-scroll {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-50%);
  }
}

.mock-page {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
  padding: 1.5em;
}

.mock-page--phone {
  gap: 1.1em;
  padding: 1.9em 1em 1em;
}

.mock-sec {
  display: flex;
  flex-direction: column;
  gap: 0.55em;
}

.mock-sec.m-hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1em;
  align-items: start;
}

.m-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.m-kicker {
  width: 40%;
  height: 0.55em;
  border-radius: 0.28em;
  background: var(--accent);
}
.m-title {
  width: 96%;
  height: 1.15em;
  border-radius: 0.3em;
  background: var(--ink);
  opacity: 0.85;
}
.m-title.m-short {
  width: 66%;
}
.m-line {
  width: 92%;
  height: 0.42em;
  border-radius: 0.21em;
  background: var(--muted);
  opacity: 0.45;
}
.m-line.m-short {
  width: 70%;
}
.m-btn {
  width: 42%;
  height: 1.9em;
  border-radius: 0.5em;
  background: var(--accent);
  margin-top: 0.45em;
}
.m-thumb {
  border-radius: 0.6em;
  background: var(--accent-soft);
  height: 5.2em;
}
.m-h2 {
  width: 58%;
  height: 0.95em;
  border-radius: 0.28em;
  background: var(--ink);
  opacity: 0.85;
}
.m-h2.m-short {
  width: 44%;
}

.m-rows {
  display: flex;
  flex-direction: column;
  margin-top: 0.45em;
}

.m-row {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.55em 0;
  border-top: 1px solid var(--line);
}

.m-row i {
  flex: none;
  width: 1.6em;
  height: 1.6em;
  border: 1px solid var(--line-strong);
  border-radius: 0.35em;
  background: var(--surface);
}

.m-row b {
  flex: 1;
  max-width: 70%;
  height: 0.5em;
  border-radius: 0.25em;
  background: var(--muted);
  opacity: 0.4;
}

.m-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6em;
  margin-top: 0.6em;
}

.m-cards i {
  height: 3.4em;
  border-radius: 0.5em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.mock-page--phone .m-cards {
  grid-template-columns: repeat(2, 1fr);
}

/* Phone-specific mock shapes (different from the desktop page) */
.m-profile {
  display: flex;
  align-items: center;
  gap: 0.7em;
}

.m-avatar {
  flex: none;
  width: 2.6em;
  height: 2.6em;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--line);
}

.m-photo {
  display: block;
  height: 6em;
  border-radius: 0.8em;
  background: var(--accent-soft);
}

.m-bubbles {
  align-items: flex-start;
}

.m-bubble {
  display: block;
  width: 72%;
  height: 2.1em;
  border-radius: 0.8em 0.8em 0.8em 0.3em;
  background: var(--surface);
  border: 1px solid var(--line);
}

.m-bubble--alt {
  align-self: flex-end;
  width: 56%;
  border-radius: 0.8em 0.8em 0.3em 0.8em;
  background: var(--accent);
  border-color: var(--accent);
}

.m-list {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.m-item {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.5em;
  border: 1px solid var(--line);
  border-radius: 0.6em;
  background: var(--surface);
}

.m-item i {
  flex: none;
  width: 1.8em;
  height: 1.8em;
  border-radius: 0.4em;
  background: var(--bg-soft);
}

.m-item b {
  flex: 1;
  height: 0.45em;
  border-radius: 0.22em;
  background: var(--muted);
  opacity: 0.4;
}

/* Google pin badge */
.device-badge {
  position: absolute;
  left: 85%;
  top: 25.5%;
  width: 9%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 1.1em 2.2em rgba(0, 0, 0, 0.12);
  display: grid;
  place-items: center;
}

.device-badge svg {
  width: 58%;
  height: auto;
}

@media (prefers-reduced-motion: reduce) {
  .mock-scroll,
  .device {
    animation: none;
  }
}

@media print {
  .mock-scroll,
  .device {
    animation: none;
  }
}

@media (max-width: 820px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-art-wrap {
    order: 2;
    width: 100%;
    max-width: 300px;
    margin-top: var(--space-3);
  }
}

/* ── Row icons ──────────────────────────────────────────────── */
.row-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.row-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent);
}

.row-icon svg {
  width: 18px;
  height: 18px;
}

/* ── About illustration ─────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  margin-top: var(--space-6);
}

.about-grid .prose {
  margin-top: 0;
}
.about-art svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Code lines scrolling inside the laptop screen */
.code-scroll {
  animation: code-scroll 18s linear infinite;
}

@keyframes code-scroll {
  to {
    transform: translateY(-110px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .code-scroll {
    animation: none;
  }
}

@media print {
  .code-scroll {
    animation: none;
  }
}

@media (max-width: 820px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-art {
    display: block;
    max-width: 280px;
    margin-top: var(--space-4);
  }
}

/* ── Higher contrast on request ─────────────────────────────── */
@media (prefers-contrast: more) {
  [data-mode="light"] {
    --muted: #3a352d;
    --line: #b8b1a6;
    --line-strong: #8b857c;
    --control-line: #3a352d;
  }
  [data-mode="dark"] {
    --muted: #e6e1d8;
    --line: #4a443d;
    --line-strong: #6f6a62;
    --control-line: #e6e1d8;
  }
  .label span:first-child {
    color: var(--ink);
  }
  .swatch::before {
    border-width: 2px;
  }
}

/* ── Print ──────────────────────────────────────────────────── */
@media print {
  .site-header,
  .actions,
  .nav,
  .skip,
  .controls {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
  .section {
    break-inside: avoid;
  }
}
