/* =========================================================================
   PEDRO DUARTE — Creative & Photography Director
   Dark, image-led, bold grotesque. Type: Archivo + Spline Sans Mono
   ========================================================================= */

:root {
  /* dark (default) */
  --bg:      oklch(0.135 0.004 270);
  --bg-2:    oklch(0.175 0.005 270);
  --fg:      oklch(0.965 0.002 250);
  --fg-soft: oklch(0.74 0.004 255);
  --muted:   oklch(0.56 0.006 258);
  --line:    oklch(0.30 0.006 268);
  --accent:  oklch(0.80 0.055 70);

  --scale: 1;
  --gutter: clamp(18px, 4.2vw, 64px);
  --maxw: 1680px;

  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: "Archivo Expanded", "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg:      oklch(0.965 0.002 250);
  --bg-2:    oklch(0.925 0.003 250);
  --fg:      oklch(0.16 0.004 270);
  --fg-soft: oklch(0.34 0.006 268);
  --muted:   oklch(0.50 0.006 262);
  --line:    oklch(0.84 0.004 255);
  --accent:  oklch(0.52 0.10 60);
}

[data-scale="compact"] { --scale: 0.92; }
[data-scale="large"]   { --scale: 1.1; }

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.6s var(--ease), color 0.6s var(--ease);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--fg); color: var(--bg); }

/* ---- primitives ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); position: relative; }
.mono { font-family: var(--mono); }
.kicker {
  font-family: var(--mono);
  font-size: calc(11px * var(--scale));
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); font-weight: 500;
}
.eyebrow { display: inline-flex; align-items: center; gap: 0.7em; }
.eyebrow .dot { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }

/* expanded grotesque display */
.display {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 0.9;
  text-transform: uppercase;
}

/* ======================= HEADER ======================= */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.site-head.stuck {
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom-color: var(--line);
}
@media (max-width: 767px), (pointer: coarse) {
  .site-head.stuck { background: color-mix(in oklab, var(--bg) 94%, transparent); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: clamp(56px, 6vw, 72px); gap: 24px; }
.head-brand { font-family: var(--display); font-weight: 700; letter-spacing: 0.02em; font-size: calc(14px * var(--scale)); text-transform: uppercase; }
.head-nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); }
.head-nav a {
  font-family: var(--mono); font-size: calc(11.5px * var(--scale)); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-soft); position: relative; padding: 12px 0;
  transition: color 0.3s var(--ease);
}
.head-nav a::after { content: ""; position: absolute; left: 0; bottom: 2px; height: 1px; width: 100%; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
.head-nav a:hover { color: var(--fg); }
.head-nav a:hover::after { transform: scaleX(1); }

/* ======================= HERO ======================= */
.hero { position: relative; height: 100svh; min-height: 600px; overflow: hidden; display: grid; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media image-slot { width: 100%; height: 120%; position: absolute; inset: 0; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 40%, color-mix(in oklab, var(--bg) 55%, transparent) 100%),
    linear-gradient(180deg, color-mix(in oklab, var(--bg) 70%, transparent) 0%, transparent 22%, transparent 62%, var(--bg) 100%); }
.hero-inner { position: relative; z-index: 2; align-self: center; justify-self: center; text-align: center; padding-inline: var(--gutter); }
.hero h1 {
  font-size: calc(clamp(56px, 16vw, 280px) * var(--scale));
  color: #fff; text-shadow: 0 2px 60px rgba(0,0,0,0.4);
}
[data-theme="light"] .hero h1 { color: #fff; }
.hero h1 span { display: block; }
.hero-sub { margin-top: clamp(18px, 2.4vw, 30px); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero-sub .role { font-family: var(--mono); font-size: calc(11.5px * var(--scale)); letter-spacing: 0.3em; line-height: 1.7; text-transform: uppercase; color: rgba(255,255,255,0.86); }
.hero-sub .loc { font-family: var(--mono); font-size: calc(11px * var(--scale)); letter-spacing: 0.3em; color: rgba(255,255,255,0.6); }
.hero-scroll {
  position: absolute; z-index: 3; left: 50%; bottom: clamp(20px, 4vh, 40px); translate: -50% 0;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(255,255,255,0.65);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero-scroll .bar { width: 1px; height: 40px; background: linear-gradient(rgba(255,255,255,0.7), transparent); animation: drop 2.4s var(--ease) infinite; transform-origin: top; }
@keyframes drop { 0% { transform: scaleY(0); } 40% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* corner datelines over hero */
.hero-corner { position: absolute; z-index: 3; top: clamp(70px, 9vw, 96px); font-family: var(--mono); font-size: calc(10.5px * var(--scale)); letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.7); }
.hero-corner.left { left: var(--gutter); }
.hero-corner.right { right: var(--gutter); text-align: right; }
.hero-corner b { color: #fff; font-weight: 500; font-variant-numeric: tabular-nums; }

/* ======================= SECTION SHELL ======================= */
.section { padding-block: clamp(64px, 9vw, 150px); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 56px); }
.sec-head h2 { font-size: calc(clamp(30px, 5vw, 76px) * var(--scale)); }
.sec-head .num { font-family: var(--mono); font-size: calc(11px * var(--scale)); letter-spacing: 0.2em; color: var(--muted); }

/* ======================= WORK ======================= */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(22px, 3vw, 40px); }
.filters button {
  font-family: var(--mono); font-size: calc(11.5px * var(--scale)); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap;
  color: var(--fg-soft); background: transparent; border: 1px solid var(--line); border-radius: 100px;
  padding: 11px 20px; cursor: pointer; transition: all 0.3s var(--ease);
  min-height: 44px;
}
.filters button:hover { color: var(--fg); border-color: var(--fg-soft); }
.filters button.active { color: var(--bg); background: var(--fg); border-color: var(--fg); }

.grid { columns: 3; column-gap: clamp(10px, 1.2vw, 20px); }
@media (max-width: 1000px) { .grid { columns: 2; } }
@media (max-width: 600px)  { .grid { columns: 1; } }

.tile {
  break-inside: avoid; margin-bottom: clamp(10px, 1.2vw, 20px); position: relative;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), filter 0.5s var(--ease);
}
.tile.hide { display: none; }
.tile image-slot { width: 100%; height: auto; display: block; }

/* striped fallback behind every slot (shows until a real photo is dropped;
   also keeps captures/exports from rendering empty slots as black voids) */
.tile image-slot, .hero-media image-slot, .about-portrait image-slot {
  background-color: #1e1e24;
  background-image: repeating-linear-gradient(45deg, #282831 0 2px, transparent 2px 18px);
}
[data-theme="light"] .tile image-slot,
[data-theme="light"] .hero-media image-slot,
[data-theme="light"] .about-portrait image-slot {
  background-color: #e6e6ea;
  background-image: repeating-linear-gradient(45deg, #d6d6dc 0 2px, transparent 2px 18px);
}
.tile .meta {
  position: absolute; inset: auto 0 0 0; z-index: 2; padding: 16px 18px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  background: linear-gradient(transparent, color-mix(in oklab, #000 78%, transparent));
  opacity: 0; transform: translateY(8px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  pointer-events: none;
}
.tile .meta .t { font-family: var(--display); font-weight: 700; font-size: calc(16px * var(--scale)); color: #fff; text-transform: uppercase; letter-spacing: 0.01em; }
.tile .meta .c { font-family: var(--mono); font-size: calc(10px * var(--scale)); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.7); white-space: nowrap; }
@media (hover: hover) {
  .tile image-slot { transition: transform 0.7s var(--ease); backface-visibility: hidden; }
  .tile:hover image-slot { transform: scale(1.03) translateZ(0); }
  .tile { overflow: hidden; }
  .tile:hover .meta { opacity: 1; transform: none; }
}

/* ======================= ABOUT ======================= */
.about { border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1fr; gap: clamp(34px, 5vw, 76px); align-items: start; }
@media (min-width: 980px) { .about-grid { grid-template-columns: 0.78fr 1.22fr; } }
.about-portrait image-slot { width: 100%; height: auto; aspect-ratio: 4/5; }
.about-portrait .cap { font-family: var(--mono); font-size: calc(10px * var(--scale)); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 12px; }
.about-lead p { font-size: calc(clamp(21px, 2.4vw, 34px) * var(--scale)); line-height: 1.34; font-weight: 420; letter-spacing: -0.01em; text-wrap: pretty; max-width: 22ch; }
.about-lead p .em { color: var(--accent); }
.about-body { margin-top: clamp(26px, 3vw, 40px); display: grid; grid-template-columns: 1fr; gap: 18px; max-width: 62ch; }
.about-body p { font-size: calc(clamp(15px, 1.35vw, 18px) * var(--scale)); line-height: 1.62; color: var(--fg-soft); text-wrap: pretty; }
.about-body p b { color: var(--fg); font-weight: 600; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: clamp(34px, 4vw, 56px); border-top: 1px solid var(--line); padding-top: clamp(26px, 3vw, 40px); }
.stats .stat .n { font-family: var(--display); font-weight: 800; font-size: calc(clamp(30px, 4vw, 58px) * var(--scale)); line-height: 1; letter-spacing: -0.02em; }
.stats .stat .l { font-family: var(--mono); font-size: calc(10.5px * var(--scale)); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }

.client-row { margin-top: clamp(36px, 4vw, 60px); }
.client-row h4, .ps-card h4 { font-family: var(--mono); font-size: calc(10.5px * var(--scale)); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.clients { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.clients span, .clients a { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: calc(clamp(18px, 2vw, 28px) * var(--scale)); color: var(--fg-soft); letter-spacing: 0.01em; transition: color 0.3s var(--ease); }
.clients span:hover, .clients a:hover { color: var(--fg); }

.ps-card { margin-top: clamp(36px, 4vw, 56px); border: 1px solid var(--line); border-radius: 4px; padding: clamp(24px, 3vw, 40px); background: var(--bg-2); }
.ps-card .ps-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ps-card .ps-name { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: calc(clamp(22px, 3vw, 40px) * var(--scale)); letter-spacing: -0.01em; color: inherit; text-decoration: none; transition: opacity 0.3s ease; }
.ps-card a.ps-name:hover { opacity: 0.6; }
.ps-card .ps-tag { font-family: var(--mono); font-size: calc(10.5px * var(--scale)); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.ps-card p { margin-top: 16px; font-size: calc(clamp(15px, 1.35vw, 18px) * var(--scale)); line-height: 1.6; color: var(--fg-soft); max-width: 64ch; }

/* ======================= INQUIRIES / FOOTER ======================= */
.foot { border-top: 1px solid var(--line); }
.foot .big { font-size: calc(clamp(40px, 9vw, 150px) * var(--scale)); line-height: 0.9; }
.foot .mail { display: inline-block; margin-top: clamp(26px, 3.5vw, 46px); }
.foot .mail a {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: calc(clamp(20px, 3vw, 44px) * var(--scale)); letter-spacing: -0.01em;
  background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size 0.5s var(--ease), color 0.4s var(--ease); padding-bottom: 0.06em;
}
.foot .mail a:hover { color: var(--accent); background-size: 100% 2px; }
.foot-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px; margin-top: clamp(48px, 6vw, 84px); }.foot-meta .col h5 { font-family: var(--mono); font-size: calc(10px * var(--scale)); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.foot-meta .col a, .foot-meta .col p { display: block; font-family: var(--mono); font-size: calc(12px * var(--scale)); letter-spacing: 0.04em; color: var(--fg-soft); padding-block: 3px; transition: color 0.3s var(--ease); }
.foot-meta .col a:hover { color: var(--accent); }
.contact-form { margin-top: clamp(40px, 5vw, 64px); max-width: 620px; display: flex; flex-direction: column; gap: 18px; }
.contact-form .hp { position: absolute; left: -9999px; }
.contact-form .cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .contact-form .cf-row { grid-template-columns: 1fr; } }
.cf-field { display: flex; flex-direction: column; gap: 8px; }
.cf-field span { font-family: var(--mono); font-size: calc(10px * var(--scale)); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.cf-field input, .cf-field textarea { font-family: var(--mono); font-size: calc(13px * var(--scale)); color: var(--fg); background: transparent; border: 1px solid var(--line); border-radius: 4px; padding: 13px 14px; transition: border-color 0.3s var(--ease); resize: vertical; }
.cf-field input:focus, .cf-field textarea:focus { outline: none; border-color: var(--fg-soft); }
.cf-field input::placeholder, .cf-field textarea::placeholder { color: var(--muted); }
.contact-form button { align-self: flex-start; font-family: var(--mono); font-size: calc(11.5px * var(--scale)); letter-spacing: 0.1em; text-transform: uppercase; color: var(--bg); background: var(--fg); border: 1px solid var(--fg); border-radius: 100px; padding: 13px 26px; min-height: 44px; cursor: pointer; transition: all 0.3s var(--ease); }
.contact-form button:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.colophon { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: clamp(50px, 7vw, 100px); padding-top: 20px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: calc(10.5px * var(--scale)); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.colophon a { color: var(--fg-soft); }
.colophon a:hover { color: var(--accent); }

/* ======================= reveal ======================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; } .reveal.d2 { transition-delay: 0.16s; } .reveal.d3 { transition-delay: 0.24s; }
.stagger > * { opacity: 0; transform: translateY(20px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.stagger.in > * { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .stagger > *, .hero-scroll .bar { transition: none !important; animation: none !important; opacity: 1 !important; transform: none !important; }
}

@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-portrait image-slot { aspect-ratio: 16/10; }
}
@media (max-width: 700px) {
  .head-nav { gap: 14px; }
  .stats { grid-template-columns: 1fr; gap: 22px; }
  .hero-corner { font-size: 9px; }
}
