:root {
  --color-background: #050505;
  --color-surface: #0e0e0e;
  --color-foreground: #ededea;
  --color-muted-foreground: #8b8b86;
  --color-border: #1f1f1d;
  --color-accent: #d4a24c;
  --color-on-accent: #050505;

  --font-display: "Inter", system-ui, sans-serif;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --space-gutter: clamp(20px, 3.2vw, 48px);
  --space-section: clamp(120px, 16vw, 240px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
p, h1, h2, h3 { margin: 0; }
::selection { background: var(--color-accent); color: var(--color-on-accent); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; border-radius: 2px; }
.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted-foreground);
}
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

/* Film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scroll progress */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: var(--color-accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---------- Header ---------- */
.bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto auto;
  column-gap: clamp(18px, 2.6vw, 40px);
  align-items: center;
  padding: 14px var(--space-gutter);
  mix-blend-mode: difference;
}
.bar .brand { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; color: #fff; justify-self: start; }
.bar .brand { font-size: 16px; letter-spacing: -0.03em; }
.bar .brand { display: inline-flex; align-items: center; gap: 10px; }
.bar .brand .mark { width: 24px; height: auto; flex: none; transition: transform 400ms var(--ease-out); }
.bar .brand:hover .mark { transform: rotate(-8deg); }
.bar .brand .tld { opacity: 0.45; font-weight: 500; transition: opacity 250ms; }
.bar .brand:hover .tld { opacity: 1; }
.bar .call .sep { opacity: 0.45; }
.bar .call .num { font-variant-numeric: tabular-nums; }
.bar .call {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px;
  color: #fff;
}
.bar .call .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #fff;
  transition: transform 250ms var(--ease-out);
}
.bar .call:hover .dot { transform: scale(1.8); }
.bar .lang {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
  color: #fff;
}
.bar .lang a { display: inline-flex; align-items: center; min-height: 44px; opacity: 0.45; transition: opacity 250ms; }
.bar .lang a:hover, .bar .lang a[aria-current] { opacity: 1; }
.bar .lang .sep { opacity: 0.45; }

/* ---------- Hero: layered parallax ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
}
.wm {
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.06em;
  white-space: nowrap;
  text-transform: uppercase;
  will-change: transform;
}
.hero .back {
  position: absolute; left: -4vw; top: 8%;
  z-index: 1;
  font-size: 36vw;
  color: transparent;
  -webkit-text-stroke: 1px #3d3d39;
}
.hero h1.front {
  position: absolute; left: var(--space-gutter); bottom: 14%;
  z-index: 3;
  font-size: 20.5vw;
}
.hero .slogan {
  position: absolute; right: var(--space-gutter); top: 26%;
  z-index: 2;
  text-align: right;
}
.hero-meta {
  position: absolute;
  left: var(--space-gutter); right: var(--space-gutter); bottom: var(--space-gutter);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  gap: 24px;
  z-index: 4;
  pointer-events: none;
}
.slogan {
  font-size: clamp(26px, 2.6vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.slogan .serif { color: var(--color-accent); }
.hero-meta .center { justify-self: center; text-align: center; }
.hero-meta .right { justify-self: end; text-align: right; }
.scroll-cue { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; }
.scroll-cue i {
  display: block; width: 1px; height: 44px; background: var(--color-muted-foreground);
  transform-origin: 50% 0;
  animation: cue 2.4s var(--ease-out) infinite;
}
@keyframes cue {
  0% { transform: scaleY(0); opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- Manifesto ---------- */
.manifesto {
  padding: var(--space-section) var(--space-gutter);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}
.manifesto .mono { grid-column: 1 / span 3; padding-top: 1.2em; }
.manifesto .big {
  grid-column: 4 / span 9;
  font-size: clamp(36px, 5.4vw, 88px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
  max-width: 16ch;
}
.js .manifesto .w { opacity: 0.14; }
.manifesto .serif { letter-spacing: -0.02em; color: var(--color-accent); }

/* ---------- Principles ---------- */
.principles { padding: 0 var(--space-gutter) var(--space-section); }
.principles header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 28px;
}
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-border); }
.row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: baseline;
  padding: clamp(32px, 3.6vw, 56px) 0;
  border-bottom: 1px solid var(--color-border);
}
.row::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--color-accent);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 700ms var(--ease-out);
}
.row:hover::after { transform: scaleX(1); }
.row > .mono { grid-column: 1 / span 1; }
.row h3 {
  grid-column: 2 / span 6;
  font-size: clamp(56px, 9vw, 152px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.055em;
  transition: transform 600ms var(--ease-out);
}
.row:hover h3 { transform: translateX(14px); }
.row .copy { grid-column: 8 / span 5; }
.row .copy .serif { display: block; font-size: clamp(22px, 1.9vw, 30px); line-height: 1.2; margin-bottom: 12px; }
.row .copy p:last-child { color: var(--color-muted-foreground); max-width: 40ch; }

/* ---------- Services ---------- */
.services { padding: 0 var(--space-gutter) var(--space-section); }
.services header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 28px;
}
.services .lead {
  font-size: clamp(30px, 4vw, 64px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.04em;
  max-width: 20ch;
  margin-bottom: clamp(48px, 6vw, 96px);
}
.services .lead .serif { letter-spacing: -0.02em; color: var(--color-accent); }
.services .grid {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--color-border);
  border-block: 1px solid var(--color-border);
}
.cell {
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
  padding: clamp(28px, 2.8vw, 44px) clamp(20px, 2.4vw, 36px) clamp(28px, 2.8vw, 44px) 0;
  background: var(--color-background);
  transition: background 400ms var(--ease-out);
}
.cell:not(:nth-child(3n + 1)) { padding-left: clamp(20px, 2.4vw, 36px); }
.cell h3 {
  font-size: clamp(26px, 2.4vw, 38px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-top: 18px;
  transition: transform 500ms var(--ease-out);
}
.cell p:not(.mono) { color: var(--color-muted-foreground); max-width: 34ch; }
.cell .tags { margin-top: auto; padding-top: 10px; text-transform: none; letter-spacing: 0.02em; }
.cell > .mono:first-child { transition: color 300ms; }
.cell:hover > .mono:first-child { color: var(--color-accent); }
.cell:hover h3 { transform: translateX(8px); }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  padding: clamp(40px, 6vw, 90px) 0;
  border-block: 1px solid var(--color-border);
}
.marquee .track { display: flex; width: max-content; animation: slide 40s linear infinite; }
.marquee span {
  flex: none;
  font-size: clamp(48px, 8vw, 128px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.1;
  padding-right: 0.45em;
  white-space: nowrap;
}
.marquee .serif { font-weight: 400; color: var(--color-accent); letter-spacing: -0.02em; }
.marquee .ghost { color: transparent; -webkit-text-stroke: 1px #55554f; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Contact ---------- */
.contact {
  min-height: 100svh;
  padding: var(--space-section) var(--space-gutter) var(--space-gutter);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 96px;
}
.contact .label { margin-bottom: 32px; }
.contact h2 {
  font-size: clamp(56px, 11.5vw, 200px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
}
.contact h2 .serif { letter-spacing: -0.03em; color: var(--color-accent); }
.contact h2 .ln { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.contact h2 .ln > span { display: inline-block; }

.phone {
  display: inline-flex;
  align-items: center;
  gap: clamp(16px, 2vw, 32px);
  margin-top: clamp(48px, 6vw, 88px);
  padding-bottom: 10px;
  position: relative;
  font-size: clamp(30px, 4.6vw, 76px);
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.phone::before, .phone::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
}
.phone::before { background: var(--color-border); }
.phone::after {
  background: var(--color-accent);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 700ms var(--ease-out);
}
.phone:hover::after, .phone:focus-visible::after { transform: scaleX(1); }
.phone .arrow {
  display: inline-grid; place-items: center;
  width: 1.25em; height: 1.25em;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-on-accent);
  transition: transform 500ms var(--ease-out);
}
.phone .arrow svg { width: 40%; height: 40%; }
.wa-note { margin-top: 18px; }
.phone:hover .arrow { transform: rotate(-45deg); }

.foot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: end;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
}
.foot .center { justify-self: center; text-align: center; }
.foot .right { justify-self: end; text-align: right; transition: color 200ms; }
.foot a:hover { color: var(--color-foreground); }

/* ---------- Small screens ---------- */
@media (max-width: 820px) {
  .bar .call .label, .bar .call .sep { display: none; }
  .hero .back { font-size: 62vw; top: 11%; left: -6vw; }
  .hero .slogan { top: auto; bottom: 34%; }
  .hero h1.front { font-size: 21.5vw; bottom: 15%; }
  .hero-meta { grid-template-columns: 1fr auto; }
  .hero-meta .center { display: none; }
  .manifesto { display: block; }
  .manifesto .mono { margin-bottom: 28px; padding-top: 0; }
  .row { grid-template-columns: auto 1fr; row-gap: 28px; column-gap: 16px; align-items: start; }
  .row > .mono { grid-column: 1; padding-top: 0.6em; }
  .row h3 { grid-column: 2; }
  .row .copy { grid-column: 1 / -1; }
  .services .grid { grid-template-columns: 1fr 1fr; }
  .cell, .cell:not(:nth-child(3n + 1)) { padding-left: 0; }
  .cell:nth-child(2n) { padding-left: 20px; }
  .foot { grid-template-columns: 1fr; gap: 10px; }
  .foot .center, .foot .right { justify-self: start; text-align: left; }
}

@media (max-width: 560px) {
  .bar .brand .tld { display: none; }
  .bar .call .num { display: none; }
  .bar .call .label { display: inline; }
  .services .grid { grid-template-columns: 1fr; }
  .cell, .cell:nth-child(2n) { padding: 28px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee .track, .scroll-cue i { animation: none; }
  .js .manifesto .w { opacity: 1; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
