/* ==========================================================
   Viviane Canuto — Portfolio
   Clean editorial system: paper background, ink type, one accent.
   ========================================================== */

:root {
  --bg: #f3f2ee;
  --surface: #ffffff;
  --ink: #0e0e0e;
  --muted: #6e6c66;
  --faint: #b9b6ad;
  --line: rgba(14, 14, 14, .12);
  --accent: #3858e9;          /* WordPress blue, used sparingly */
  --dark: #0e0e0e;
  --dark-2: #1a1a1a;
  --on-dark: #f3f2ee;
  --on-dark-muted: #8f8d87;
  --line-dark: rgba(243, 242, 238, .14);

  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: fixed; left: 16px; top: -80px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 16px; }

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

/* ---------- Type helpers ---------- */
.label {
  font: 500 .72rem/1.4 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.label b { color: var(--ink); font-weight: 500; }
.on-dark .label { color: var(--on-dark-muted); }
.on-dark .label b { color: var(--on-dark); }

.h-xl, .h-lg, .h-md {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -.045em;
  margin: 0;
}
.h-xl { font-size: clamp(3.1rem, 9.6vw, 9.5rem); line-height: .92; }
.h-lg { font-size: clamp(2.5rem, 6.4vw, 6rem); line-height: .95; }
.h-md { font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1.05; letter-spacing: -.035em; }
.muted { color: var(--muted); }
.on-dark .muted { color: var(--on-dark-muted); }
.accent { color: var(--accent); }

.lead { font-size: clamp(1rem, 1.25vw, 1.15rem); line-height: 1.6; color: var(--muted); max-width: 46ch; margin: 0; }
.on-dark .lead { color: var(--on-dark-muted); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 22px;
  border-radius: 999px;
  font: 500 .95rem/1 var(--body);
  border: 1px solid var(--ink);
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
  white-space: nowrap;
}
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.on-dark .btn { border-color: var(--on-dark); }
.on-dark .btn-solid { background: var(--on-dark); color: var(--ink); }
.on-dark .btn-solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.on-dark .btn-ghost { color: var(--on-dark); }
.on-dark .btn-ghost:hover { background: var(--on-dark); color: var(--ink); }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translate(2px, -2px); }

.link-u { position: relative; display: inline-flex; gap: 6px; align-items: center; }
.link-u::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.link-u:hover::after, .link-u:focus-visible::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Scroll progress ---------- */
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 120; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  transition: transform .45s var(--ease), background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { background: rgba(243, 242, 238, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.header-inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font: 600 1.05rem/1 var(--display); letter-spacing: -.03em; display: inline-flex; align-items: center; gap: 2px; }
.brand sup { font-size: .55em; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 28px; font-size: .92rem; }
.nav a:not(.btn) { color: var(--muted); transition: color .25s; }
.nav a:not(.btn):hover, .nav a:not(.btn)[aria-current="page"] { color: var(--ink); }
.nav .btn { height: 40px; padding: 0 18px; font-size: .88rem; }
.menu-toggle { display: none; background: none; border: 0; height: 40px; padding: 0 4px; font: 500 .8rem var(--mono); letter-spacing: .06em; text-transform: uppercase; }

@media (max-width: 1024px), (hover: none) and (max-width: 1366px) {
  .menu-toggle { display: inline-flex; align-items: center; gap: 10px; }
  .menu-toggle i { display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; transition: background .2s; }
  .menu-toggle i::before, .menu-toggle i::after { content: ""; position: absolute; left: 0; width: 100%; height: 100%; background: currentColor; transition: transform .3s var(--ease); }
  .menu-toggle i::before { top: -6px; } .menu-toggle i::after { top: 6px; }
  .menu-toggle[aria-expanded="true"] i { background: transparent; }
  .menu-toggle[aria-expanded="true"] i::before { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] i::after { transform: translateY(-6px) rotate(-45deg); }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path .45s var(--ease), visibility 0s .45s;
  }
  .nav.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .45s var(--ease); }
  .nav a:not(.btn) { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line); font: 500 1.6rem/1.1 var(--display); letter-spacing: -.03em; color: var(--ink); }
  .nav .btn { margin-top: 20px; height: 48px; }
  .site-header.menu-open { background: var(--bg); }
}

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding-block: clamp(96px, 13vw, 180px); }
.section-head { display: grid; grid-template-columns: minmax(180px, 1fr) 3fr; gap: 24px; margin-bottom: clamp(48px, 7vw, 96px); }
.section-head .h-lg { max-width: 15ch; }
.section-head .lead { margin-top: 28px; }
@media (max-width: 900px) { .section-head { grid-template-columns: 1fr; gap: 20px; } }

.on-dark { background: var(--dark); color: var(--on-dark); }
.rounded-top { border-radius: clamp(20px, 3vw, 36px) clamp(20px, 3vw, 36px) 0 0; }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; padding-top: 120px; padding-bottom: 32px; }
.hero-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; margin: 0; padding: 0; }
.hero-title { margin: clamp(48px, 10vh, 120px) 0 clamp(36px, 6vh, 64px); }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.is-loaded .hero-title .line > span { transform: none; }
.is-loaded .hero-title .line:nth-child(2) > span { transition-delay: .09s; }
.is-loaded .hero-title .line:nth-child(3) > span { transition-delay: .18s; }
.hero-title .serif { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -.02em; }
.hero-bottom { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; }
.scroll-cue i { width: 1px; height: 28px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; inset: 0; background: var(--ink); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { from { transform: translateY(-100%); } to { transform: translateY(100%); } }
@media (max-width: 900px) { .hero-bottom { grid-template-columns: 1fr; } }

.fade-up { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease) .35s, transform .9s var(--ease) .35s; }
.is-loaded .fade-up { opacity: 1; transform: none; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(220px, 1fr) 3fr; gap: 24px; align-items: start; }
.portrait { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; background: #ddd; max-width: 320px; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; filter: grayscale(1) contrast(1.05); transition: filter .8s var(--ease), transform 1.2s var(--ease); }
.portrait:hover img { filter: none; transform: scale(1.03); }
.portrait figcaption { position: absolute; left: 12px; bottom: 12px; background: var(--surface); padding: 6px 10px; border-radius: 999px; font: 500 .7rem var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.statement { font: 500 clamp(1.6rem, 3.6vw, 3.3rem)/1.12 var(--display); letter-spacing: -.035em; margin: 0 0 clamp(48px, 6vw, 80px); }
.statement .w { color: var(--faint); transition: color .4s; }
.statement .w.on { color: var(--ink); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.facts div { padding: 20px 20px 0 0; }
.facts dt { margin-bottom: 8px; }
.facts dd { margin: 0; font-weight: 500; }
.facts dd span { display: block; color: var(--muted); font-weight: 400; font-size: .92rem; }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 260px; }
  .facts { grid-template-columns: 1fr; }
  .facts div { padding: 16px 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Featured: Sorell ---------- */
.feature { padding-top: clamp(96px, 12vw, 160px); }
.feature-intro { display: grid; grid-template-columns: minmax(180px, 1fr) 3fr; gap: 24px; }
.feature-intro .h-xl { letter-spacing: -.06em; }
.feature-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); font: 500 .72rem var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.on-dark .chip { border-color: var(--line-dark); color: var(--on-dark); }

.stage { height: 260vh; position: relative; margin-top: clamp(40px, 6vw, 80px); }
.stage-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; overflow: hidden; perspective: 1600px; }
.device {
  width: min(1180px, 92vw);
  aspect-ratio: 16 / 10;
  max-height: 78vh;
  border-radius: 14px;
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 0, 0, .6);
  overflow: hidden;
  display: flex; flex-direction: column;
  transform-origin: 50% 100%;
  transform: rotateX(var(--rx, 24deg)) scale(var(--sc, .78)) translateY(var(--ty, 40px));
  will-change: transform;
}
.device-bar { flex: none; height: 38px; display: flex; align-items: center; gap: 14px; padding: 0 14px; background: #262626; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.dots { display: flex; gap: 6px; } .dots i { width: 10px; height: 10px; border-radius: 50%; background: #4a4a4a; }
.dots i:nth-child(1) { background: #ff5f57; } .dots i:nth-child(2) { background: #febc2e; } .dots i:nth-child(3) { background: #28c840; }
.url { flex: 1; max-width: 420px; margin: 0 auto; height: 24px; border-radius: 6px; background: #1a1a1a; color: #9a9a9a; font: 400 .72rem/24px var(--mono); text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 10px; }
.screen { position: relative; flex: 1; background: #0b0b0b center top / cover no-repeat; }
.screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }
.screen-cover { position: absolute; inset: 0; z-index: 2; display: flex; align-items: flex-end; justify-content: flex-end; padding: 16px; background: transparent; border: 0; }
.screen-cover span { background: rgba(14, 14, 14, .8); backdrop-filter: blur(8px); color: #fff; border-radius: 999px; padding: 8px 14px; font: 500 .72rem var(--mono); text-transform: uppercase; letter-spacing: .05em; opacity: 0; transform: translateY(6px); transition: .3s var(--ease); }
.screen-cover:hover span, .screen-cover:focus-visible span { opacity: 1; transform: none; }
.screen.is-live .screen-cover { display: none; }

.notes { position: absolute; inset: 0; pointer-events: none; }
.note {
  position: absolute; max-width: 250px;
  background: rgba(26, 26, 26, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line-dark); border-radius: 12px; padding: 14px 16px;
  opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.note.on { opacity: 1; transform: none; }
.note .label { display: block; margin-bottom: 6px; color: var(--accent); filter: brightness(1.6); }
.note p { margin: 0; font-size: .9rem; line-height: 1.45; color: var(--on-dark); }
.note:nth-child(1) { left: 4%; top: 18%; }
.note:nth-child(2) { right: 4%; top: 30%; }
.note:nth-child(3) { left: 6%; bottom: 16%; }
.note:nth-child(4) { right: 6%; bottom: 10%; }
/* Phones only: the Sorell frame is a plain block (tablets and up keep the scroll effect) */
@media (max-width: 767px) {
  .stage { height: auto; }
  .stage-sticky { position: relative; height: auto; display: block; padding-block: 24px; perspective: none; }
  .device { width: 100%; aspect-ratio: 4 / 5; max-height: none; transform: none !important; }
  .notes { position: static; display: grid; gap: 10px; margin-top: 16px; pointer-events: auto; }
  .note { position: static; max-width: none; opacity: 1; transform: none; }
}
@media (max-width: 900px) { .feature-intro { grid-template-columns: 1fr; } }

.spec { display: grid; grid-template-columns: minmax(180px, 1fr) 3fr; gap: 24px; padding-block: clamp(48px, 6vw, 80px) clamp(96px, 12vw, 160px); }
.spec dl { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line-dark); }
.spec dl div { padding: 20px 20px 20px 0; border-bottom: 1px solid var(--line-dark); }
.spec dt { margin-bottom: 6px; }
.spec dd { margin: 0; }
.spec-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
@media (max-width: 900px) { .spec { grid-template-columns: 1fr; } .spec dl { grid-template-columns: 1fr; } }

/* ---------- Process ---------- */
.process-grid { display: grid; grid-template-columns: minmax(180px, 1fr) 3fr; gap: 24px; }
.process-aside { position: sticky; top: calc(var(--header-h) + 8px); align-self: start; }
.counter { font: 500 clamp(5rem, 11vw, 10rem)/.85 var(--display); letter-spacing: -.06em; display: flex; overflow: hidden; height: .85em; margin-top: 18px; }
.counter .roll { display: flex; flex-direction: column; transition: transform .7s var(--ease); }
.counter .roll span { height: .85em; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { display: grid; grid-template-columns: 80px 1fr 1fr; gap: 24px; padding: clamp(28px, 4vw, 48px) 0; border-top: 1px solid var(--line); transition: opacity .5s var(--ease); }
.step:last-child { border-bottom: 1px solid var(--line); }
.js .step { opacity: .28; }
.js .step.on { opacity: 1; }
.step h3 { margin: 0; font: 500 clamp(1.4rem, 2.4vw, 2.1rem)/1.05 var(--display); letter-spacing: -.035em; }
.step p { margin: 0; color: var(--muted); }
.step code { font: 400 .82em var(--mono); background: rgba(14, 14, 14, .06); padding: 2px 6px; border-radius: 4px; color: var(--ink); }
@media (max-width: 900px) {
  .process-grid { grid-template-columns: 1fr; }
  .process-aside { position: static; }
  .counter { display: none; }
  .step { grid-template-columns: 48px 1fr; }
  .step p { grid-column: 2; }
}

/* ---------- Design (UI/UX) ---------- */
.design { overflow-x: clip; }
.track-wrap { margin-top: clamp(40px, 6vw, 72px); }
.track { display: flex; gap: 16px; padding-inline: var(--gutter); will-change: transform; }
.shot { flex: none; width: clamp(280px, 42vw, 620px); margin: 0; }
.shot-img { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: #e7e5df; border: 1px solid var(--line); }
.shot-img img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.shot.dark .shot-img { background: #111; }
.shot.dark .shot-img img { object-fit: contain; }
.shot figcaption { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: clamp(64px, 8vw, 110px); }
.principle { border-top: 1px solid var(--line); padding-top: 20px; }
.principle h3 { margin: 12px 0 10px; font: 500 1.35rem/1.15 var(--display); letter-spacing: -.03em; }
.principle p { margin: 0; color: var(--muted); }
@media (max-width: 900px) {
  .track { overflow-x: auto; scroll-snap-type: x mandatory; transform: none !important; scrollbar-width: none; }
  .track::-webkit-scrollbar { display: none; }
  .shot { scroll-snap-align: start; width: 82vw; }
  .principles { grid-template-columns: 1fr; }
}

/* ---------- Framer templates ---------- */
.templates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tpl { display: flex; flex-direction: column; }
.tpl-media { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--dark-2); }
.tpl-media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform 1s var(--ease); }
.tpl-media:hover img { transform: scale(1.04); }
.tpl-media .fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--on-dark); font: 500 2rem var(--display); letter-spacing: -.04em; z-index: 0; }
.tpl-media img { position: relative; z-index: 1; }
.tpl-body { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-top: 16px; }
.tpl h3 { margin: 0 0 4px; font: 500 1.4rem/1.1 var(--display); letter-spacing: -.03em; }
.tpl p { margin: 0; color: var(--muted); font-size: .92rem; }
.tpl-links { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: .88rem; white-space: nowrap; }
.templates-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .templates { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- Project list ---------- */
.projects { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.project { position: relative; display: grid; grid-template-columns: 60px 1.2fr 1.6fr auto; gap: 24px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--line); transition: padding .4s var(--ease); }
.project:hover { padding-inline: 12px; }
.project h3 { margin: 0; font: 500 clamp(1.4rem, 2.6vw, 2.2rem)/1 var(--display); letter-spacing: -.04em; transition: color .3s; }
.project:hover h3 { color: var(--accent); }
.project p { margin: 0; color: var(--muted); }
.project-links { display: flex; gap: 18px; font-size: .9rem; white-space: nowrap; }
.project-thumb { display: none; }
.preview {
  position: fixed; left: 0; top: 0; z-index: 90; width: 340px; aspect-ratio: 4 / 3;
  border-radius: 12px; overflow: hidden; pointer-events: none;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .35);
  opacity: 0; transform: translate(-50%, -50%) scale(.85);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.preview.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.preview img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
@media (hover: none), (max-width: 900px) { .preview { display: none; } }
@media (max-width: 900px) {
  .project { grid-template-columns: 1fr; gap: 10px; padding: 28px 0; }
  .project:hover { padding-inline: 0; }
  .project-thumb { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 10; margin-bottom: 8px; border: 1px solid var(--line); }
  .project-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
}

/* ---------- Stack marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 22px; }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; list-style: none; margin: 0; padding: 0; }
.marquee li { font: 500 clamp(1.6rem, 3.4vw, 3rem)/1 var(--display); letter-spacing: -.04em; padding-right: clamp(28px, 4vw, 56px); display: flex; align-items: center; gap: clamp(28px, 4vw, 56px); white-space: nowrap; }
.marquee li::after { content: "✦"; font-size: .45em; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Contact / CTA ---------- */
.cta { padding-block: clamp(96px, 14vw, 200px) 40px; }
.cta .h-xl { max-width: 12ch; }
.cta-grid { display: grid; grid-template-columns: minmax(180px, 1fr) 3fr; gap: 24px; }
.cta-mail { display: inline-block; margin-top: 40px; font: 500 clamp(1.3rem, 3vw, 2.4rem)/1.1 var(--display); letter-spacing: -.03em; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.footer { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: clamp(80px, 10vw, 140px); padding-top: 24px; border-top: 1px solid var(--line-dark); font-size: .92rem; }
.footer ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.footer a { color: var(--on-dark); }
.footer .label { display: block; }
.giant { margin-top: clamp(48px, 7vw, 96px); font: 600 clamp(3rem, 15.5vw, 15rem)/.8 var(--display); letter-spacing: -.07em; color: var(--dark-2); white-space: nowrap; user-select: none; overflow: hidden; }
.giant span { display: inline-block; color: transparent; -webkit-text-stroke: 1px rgba(243, 242, 238, .22); }
@media (max-width: 900px) {
  .cta-grid { grid-template-columns: 1fr; }
  .footer { grid-template-columns: 1fr 1fr; }
}

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-title .line > span, .fade-up, .js .reveal { transform: none !important; opacity: 1 !important; }
  .device { transform: none !important; }
  .stage { height: auto; }
  .stage-sticky { position: relative; height: auto; padding-block: 24px; }
  .note { opacity: 1; transform: none; }
  .statement .w { color: var(--ink); }
  .js .step { opacity: 1; }
}

.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; }
.screen { overflow: hidden; }
.screen iframe { z-index: 1; visibility: hidden; }
.screen.is-live iframe { visibility: visible; z-index: 3; }
.screen-shot { position: absolute; left: 0; top: 0; width: 100%; height: auto; will-change: transform; }
.screen-cover span { opacity: 1; transform: none; }
@media (max-width: 900px) { .js .step { opacity: 1; } }

/* Language switch */
.lang-switch { margin: 0 4px 0 auto; font: 500 .72rem/1 var(--mono); letter-spacing: .06em; color: var(--faint); }
.lang-switch [aria-current] { color: var(--ink); }
.lang-switch a { color: var(--muted); transition: color .2s; }
.lang-switch a:hover { color: var(--ink); }
@media (min-width: 1025px) and (hover: hover), (min-width: 1367px) { .lang-switch { margin-right: 28px; } }

/* Figma gallery: pinned, moves sideways and holds on each slide */
.gallery { position: relative; margin-top: clamp(40px, 6vw, 72px); }
.gallery-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.gallery-track { display: flex; gap: clamp(16px, 2vw, 32px); padding-inline: calc((100% - var(--slide-w)) / 2); will-change: transform; --slide-w: min(72vw, 1100px); }
.slide { flex: none; width: var(--slide-w); margin: 0; opacity: .35; transition: opacity .5s var(--ease); }
.slide.on { opacity: 1; }
.slide-img { aspect-ratio: 16 / 10; max-height: 66vh; width: 100%; border-radius: var(--radius); overflow: hidden; background: #e7e5df; border: 1px solid var(--line); display: grid; place-items: center; padding: clamp(12px, 2.5vw, 36px); }
.slide-img img { width: 100%; height: 100%; object-fit: contain; }
.slide figcaption { display: grid; grid-template-columns: 90px 1fr 1.4fr; gap: 16px; align-items: baseline; margin-top: 18px; }
.slide h3 { margin: 0; font: 500 1.3rem/1.15 var(--display); letter-spacing: -.03em; }
.slide p { margin: 0; color: var(--muted); }
.gallery-bar { margin-top: 28px; }
.gallery-bar::before { content: ""; display: block; height: 1px; background: var(--line); }
.gallery-bar span { display: block; height: 1px; margin-top: -1px; background: var(--ink); transform-origin: left; transform: scaleX(0); }
@media (max-width: 767px), (prefers-reduced-motion: reduce) {
  .gallery-sticky { position: static; height: auto; overflow: visible; }
  .gallery-track { flex-direction: column; gap: 48px; padding-inline: var(--gutter); transform: none !important; --slide-w: 100%; }
  .slide { opacity: 1; }
  .slide figcaption { grid-template-columns: 1fr; gap: 6px; }
  .gallery-bar { display: none; }
}
.slide-wide .slide-img { aspect-ratio: 2.44 / 1; padding: 0; background: #1e1e1e; }
.slide-wide .slide-img img { object-fit: cover; }
.slide-wide .slide-img { cursor: zoom-in; }
.slide-framer .slide-img { padding: 0; background: #111; cursor: zoom-in; }
/* Uniform frame for every gallery slide: same size, image letterboxed inside */
.gallery .slide-img { aspect-ratio: 16 / 9; height: auto; max-height: 64vh; width: 100%; padding: 0; background: #161616; cursor: zoom-in; }
.gallery .slide-img img { width: 100%; height: 100%; object-fit: contain; }
@media (min-width: 768px) { .gallery .slide-img { width: min(100%, calc(64vh * 16 / 9)); margin-inline: auto; } }

/* ---------- Type rhythm (one scale for the whole site) ----------
   Inter Tight is already narrow, so display sizes get only light negative tracking. */
body { line-height: 1.65; }
.h-xl { line-height: 1; letter-spacing: -.032em; }
.h-lg { line-height: 1.04; letter-spacing: -.028em; }
.h-md { line-height: 1.15; letter-spacing: -.02em; }
.feature-intro .h-xl { letter-spacing: -.035em; }
.hero-title .line { padding-bottom: .04em; }
.hero-title .serif { letter-spacing: -.01em; }
.statement { line-height: 1.28; letter-spacing: -.018em; }
.lead { line-height: 1.7; max-width: 52ch; }
.label, .chip, .lang-switch, .portrait figcaption, .screen-cover span { letter-spacing: .08em; }
.step h3, .slide h3, .tpl h3, .principle h3, .entry h3 { letter-spacing: -.015em; line-height: 1.2; }
.step p, .slide p, .tpl p, .note p, .facts dd span, .spec dd { line-height: 1.6; }
.note p { line-height: 1.5; }
.counter { letter-spacing: -.04em; }
.cta-mail { letter-spacing: -.015em; }
.brand { letter-spacing: -.015em; }
.nav a:not(.btn) { letter-spacing: -.005em; }
.btn { letter-spacing: -.005em; }
@media (max-width: 1024px), (hover: none) and (max-width: 1366px) { .nav a:not(.btn) { letter-spacing: -.02em; } }

/* Hero: headline first */
.hero-title { margin-top: auto; }
.hero { padding-top: var(--page-top); }

/* Utility bar above the header: location and stack, kept quiet */
.topbar { background: #e7e6e1; color: #85837c; font-size: .78rem; letter-spacing: .01em; }
.topbar-inner > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.topbar-inner { height: var(--bar-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; white-space: nowrap; }
@media (max-width: 900px) { .topbar-stack { display: none; } }

/* ---------- Responsive pass ----------
   Layout breakpoints:
   - "compact" = up to 1024px, or a touch screen up to 1366px (tablets in landscape):
     menu button, content-height hero, smaller section rhythm.
   - 767px: phones. The pinned scroll effects (Sorell frame, design gallery) run from
     768px up, touch or not, and turn off below it or with reduced motion.
   - 900px: two-column layouts drop to one column.
   Small refinements on top of those: 600px (browser frame stays landscape above it)
   and 480px (headline and statement sizes for phones). */
:root { --bar-h: 32px; --nav-h: 72px; --header-h: calc(var(--bar-h) + var(--nav-h)); --page-top: calc(var(--header-h) + 36px); }
/* Short screens (laptops around 768px tall, phones in landscape): slimmer utility bar and header */
@media (max-height: 820px) {
  :root { --bar-h: 26px; --nav-h: 56px; }
  .topbar { font-size: .74rem; }
  .nav .btn { height: 36px; }
}
html { scroll-padding-top: calc(var(--header-h) + 16px); }
html.menu-locked { overflow: hidden; }
@media (max-width: 1024px), (hover: none) and (max-width: 1366px) {
  .nav { inset: var(--header-h) 0 auto; max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; }
}

/* Tap targets: at least 44px for the language switch, menu button and footer links */
.lang-switch { display: inline-flex; align-items: center; }
.lang-switch a, .lang-switch [aria-current] { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: -14px -10px; }
.menu-toggle { height: 44px; }
.footer ul { gap: 0; }
.footer ul a { display: inline-block; padding-block: 10px; }

/* Type at the small end: let the sizes keep scaling down on phones */
.lead { font-size: clamp(.95rem, .88rem + .35vw, 1.15rem); }
.h-md { font-size: clamp(1.3rem, 1rem + 1.7vw, 2.6rem); }
@media (max-width: 480px) {
  .h-xl { font-size: clamp(2.35rem, 11.5vw, 3.1rem); }
  .h-lg { font-size: clamp(2rem, 9.6vw, 2.5rem); }
  .statement { font-size: clamp(1.4rem, 6.4vw, 1.6rem); }
}

/* Gallery on phones and tablets: say that each slide opens full size */
.slide-img { position: relative; }
.slide-hint { display: none; }
@media (max-width: 767px), (hover: none), (prefers-reduced-motion: reduce) {
  .slide-hint { display: block; position: absolute; right: 10px; bottom: 10px; z-index: 1; padding: 6px 10px; border-radius: 999px; background: rgba(14, 14, 14, .78); color: #fff; font: 500 .68rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
}
/* Wider touch screens: keep the browser frame landscape instead of a 4:5 block */
@media (min-width: 601px) and (max-width: 767px) {
  .device { aspect-ratio: 16 / 10; }
}
@media (max-width: 767px) { .stage-sticky { padding-inline: var(--gutter); } }
/* Phones, tablets and touch screens: the hero sizes to its content instead of filling the
   screen, so the headline starts right under the header. Same top space on every page. */
@media (max-width: 1024px), (hover: none) and (max-width: 1366px) {
  :root { --page-top: calc(var(--header-h) + clamp(40px, 6vw, 64px)); }
  .hero { min-height: 0; padding-top: var(--page-top); padding-bottom: 0; }
  .hero-title { margin: 0 0 clamp(32px, 5vw, 48px); }
  /* One vertical rhythm for every section on smaller screens */
  :root { --section-y: clamp(72px, 10vw, 112px); }
  .section { padding-block: var(--section-y); }
  .feature, .cta { padding-top: var(--section-y); }
  .cta { padding-bottom: clamp(56px, 10vw, 72px); }
  .spec { padding-bottom: var(--section-y); }
}
.portrait { margin-inline: 0; }
/* Menu button: icon only, 44px square tap target */
.menu-toggle { width: 44px; height: 44px; padding: 0; justify-content: center; margin-right: -12px; }
@media (max-width: 360px) { .topbar { font-size: .72rem; } }
/* Gallery captions: title and text share the row; both columns can shrink and wrap */
.slide figcaption { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px 32px; }
.slide h3, .slide p { min-width: 0; overflow-wrap: break-word; }
@media (max-width: 900px) { .slide figcaption { grid-template-columns: 1fr; gap: 6px; } }
/* Pinned Sorell frame (768px and up): the header hides while it is pinned, the frame takes
   the screen height, and the notes show one at a time in a strip under the frame, so they
   never cover the frame or each other on short laptop screens. */
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .stage-sticky { --notes-h: 112px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }
  .device { flex: none; max-height: none; width: min(1180px, 92vw, calc((100svh - var(--notes-h) - 72px) * 1.6)); }
  .notes { position: relative; inset: auto; flex: none; width: min(1180px, 92vw, calc((100svh - var(--notes-h) - 72px) * 1.6)); height: var(--notes-h); }
  .note, .note:nth-child(n) { left: 0; right: auto; top: 0; bottom: auto; max-width: 520px; }
  .screen-cover { align-items: flex-start; }
}
/* Pinned design gallery (768px and up): the header hides while it is pinned too, so each slide
   uses the screen height minus room for its caption and the progress bar. */
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .gallery-track { --slide-h: calc(100svh - 210px); --slide-w: min(84vw, 1280px, calc(var(--slide-h) * 16 / 9)); }
  .gallery .slide-img { max-height: var(--slide-h); width: 100%; }
  .gallery-bar { width: var(--slide-w); margin-inline: auto; }
}
/* Pinned gallery: only the active slide shows its caption, so neighbours' text never peeks in at the edges */
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .slide figcaption { transition: opacity .4s var(--ease); }
  .slide:not(.on) figcaption { opacity: 0; }
}
/* Laptop-height screens: slightly smaller type so headings and captions fit the shorter view */
@media (min-width: 768px) and (max-height: 820px) {
  .h-xl { font-size: clamp(3rem, 7.6vw, 7rem); }
  .h-lg { font-size: clamp(2.2rem, 5vw, 4.6rem); }
  .statement { font-size: clamp(1.5rem, 2.9vw, 2.6rem); }
  .lead { font-size: 1rem; }
  .slide h3 { font-size: 1.1rem; }
  .slide p { font-size: .9rem; }
  .slide figcaption { margin-top: 14px; }
  .gallery-bar { margin-top: 20px; }
}
/* Framer template cards: more room between cards, smaller titles, links kept apart from the title */
.templates { gap: clamp(24px, 3vw, 40px); }
.tpl h3 { font-size: clamp(1.05rem, .9rem + .4vw, 1.25rem); }
.tpl p { font-size: .88rem; }
.tpl-body { gap: 20px; padding-top: 14px; }
.tpl-body > div:first-child { min-width: 0; }
.tpl-links { font-size: .82rem; gap: 4px; }
