/* ============================================================
   oravec.codes — Spotlight V6
   Fonts: Bricolage Grotesque (display/body) · JetBrains Mono (labels)
   ============================================================ */

/* ---------- Theme tokens ---------- */

:root {
  /* Width of the original design frame — keeps the page a column on large screens */
  --page-max: 1240px;
  --bg: #f4f1ea;
  --spot: rgba(190, 150, 80, 0.18);
  --spot-strength: 92% 56% at 50% -10%;
  --text: #1a1712;
  --muted: #5b564b;
  --label: #8a8474;
  --wordmark: #6f6a5e;
  --beyond: #4f4a3f;
  --footer: #9a9384;
  --accent: oklch(0.6 0.14 62);
  --ring: oklch(0.66 0.14 65);
  --ring-shadow: 0 24px 60px rgba(94, 72, 30, 0.22);
  --line: #ddd6c6;
  --menu-bg: #efebe0;
  --btn-bg: #1a1712;
  --btn-fg: #f4f1ea;
  --btn2-border: #cfc7b5;
  --btn2-fg: #1a1712;
  --logo-filter: brightness(0);
  --logo-opacity: 0.7;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0c0b0a;
  --spot: rgba(232, 170, 90, 0.18);
  --text: #f0ece4;
  --muted: #a7a298;
  --label: #8a857a;
  --wordmark: #c9c3b6;
  --beyond: #c4bfb4;
  --footer: #5e5a52;
  --accent: oklch(0.8 0.13 72);
  --ring: oklch(0.8 0.13 72);
  --ring-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 46px rgba(232, 170, 90, 0.14);
  --line: #211f1b;
  --menu-bg: #0e0d0b;
  --btn-bg: oklch(0.8 0.13 72);
  --btn-fg: #0c0b0a;
  --btn2-border: rgba(240, 236, 228, 0.2);
  --btn2-fg: #f0ece4;
  --logo-filter: brightness(0) invert(1);
  --logo-opacity: 0.72;
  color-scheme: dark;
}

/* System dark for no-JS visitors (JS always sets data-theme explicitly) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0c0b0a;
    --spot: rgba(232, 170, 90, 0.18);
    --text: #f0ece4;
    --muted: #a7a298;
    --label: #8a857a;
    --wordmark: #c9c3b6;
    --beyond: #c4bfb4;
    --footer: #5e5a52;
    --accent: oklch(0.8 0.13 72);
    --ring: oklch(0.8 0.13 72);
    --ring-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 46px rgba(232, 170, 90, 0.14);
    --line: #211f1b;
    --menu-bg: #0e0d0b;
    --btn-bg: oklch(0.8 0.13 72);
    --btn-fg: #0c0b0a;
    --btn2-border: rgba(240, 236, 228, 0.2);
    --btn2-fg: #f0ece4;
    --logo-filter: brightness(0) invert(1);
    --logo-opacity: 0.72;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  background: var(--bg);
  color: var(--text);
  font-family: 'Bricolage Grotesque', 'Avenir Next', sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s ease, color 0.35s ease;
  overflow-x: clip;
}

/* Amber spotlight — its own layer so it can breathe */
body::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: min(120vh, 1100px);
  background: radial-gradient(var(--spot-strength), var(--spot), transparent 62%);
  pointer-events: none;
  animation: spot-breathe 9s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes spot-breathe {
  from { opacity: 0.78; }
  to   { opacity: 1; }
}

.site-main, .site-footer { position: relative; z-index: 1; }
.site-head { position: relative; z-index: 10; }

/* Content column. Blocks whose rules should bleed to the viewport edges
   (.stats, .tech) stay full-width and constrain an inner wrapper instead. */
.site-head,
.site-footer,
.hero,
.clients,
.contact,
.stats-inner,
.tech-inner {
  max-width: var(--page-max);
  margin-inline: auto;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.mono, .eyebrow, .section-label, .cat-label, .stat-label, .card-num,
.work-meta, .tech, .nav, .wordmark, .contact-links, .site-footer,
.menu-num, .menu-email, .email-noscript {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

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

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

section { scroll-margin-top: 24px; }

/* ---------- Top bar ---------- */

.site-head { position: relative; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 64px 0;
}

.wordmark {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--wordmark);
  transition: color 0.2s ease;
}
.wordmark:hover { color: var(--text); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav {
  display: flex;
  gap: 26px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--label);
}

.nav a { transition: color 0.2s ease; }
.nav a:hover { color: var(--text); }
.nav .nav-contact { color: var(--accent); }
.nav .nav-contact:hover { color: var(--text); }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--label);
  transition: color 0.2s ease, transform 0.3s ease;
}
.theme-toggle:hover { color: var(--text); transform: rotate(18deg); }
:root[data-theme="dark"] .icon-moon { display: none; }
:root:not([data-theme="dark"]) .icon-sun { display: none; }

/* Hamburger — mobile only */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  align-items: center;
}
.menu-bar {
  width: 20px;
  height: 2px;
  background: var(--wordmark);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
body.menu-open .menu-bar:first-child { transform: translateY(3.5px) rotate(45deg); }
body.menu-open .menu-bar:last-child  { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Mobile menu panel ---------- */

.menu-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 20px;
  background: var(--menu-bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s;
  z-index: 20;
}
body.menu-open .menu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-panel > a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.menu-num { font-size: 11px; color: var(--accent); }
.menu-word { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.menu-panel > a:active .menu-word { color: var(--accent); }

.menu-email { padding: 18px 24px 22px; }
.menu-email a { font-size: 13px; color: var(--muted); }

/* Dim page content while menu is open */
.site-main, .site-footer { transition: opacity 0.3s ease; }
body.menu-open .site-main,
body.menu-open .site-footer {
  opacity: 0.3;
  pointer-events: none;
}

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: 56px 80px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 30px;
}

.portrait {
  width: 184px;
  height: 184px;
  border-radius: 50%;
  overflow: hidden;
  border: 8px solid var(--ring);
  box-shadow: var(--ring-shadow);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero h1 {
  font-size: clamp(34px, 5.2vw, 62px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 38px 0 0;
  max-width: 18ch;
}

.lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 52ch;
  margin: 24px 0 38px;
}

.cta { display: flex; gap: 13px; }

.btn {
  font-size: 16px;
  padding: 15px 30px;
  border-radius: 13px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease,
              background-color 0.25s ease, border-color 0.25s ease, filter 0.25s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
}
.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.btn-ghost {
  border: 1px solid var(--btn2-border);
  color: var(--btn2-fg);
  font-weight: 500;
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

/* Hero load-in — pure CSS, staggered */
.hero > * { animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero .eyebrow  { animation-delay: 0.05s; }
.hero .portrait { animation-delay: 0.14s; animation-name: rise-portrait; }
.hero h1        { animation-delay: 0.26s; }
.hero .lede     { animation-delay: 0.36s; }
.hero .cta      { animation-delay: 0.46s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes rise-portrait {
  from { opacity: 0; transform: translateY(22px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Stats strip ---------- */

.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats-inner {
  display: flex;
}
/* Side borders only once the column detaches from the viewport edges —
   below this they would sit flush against the window and read as artefacts.
   Breakpoint clears --page-max plus room for a scrollbar. */
@media (min-width: 1290px) {
  .stats-inner { border-inline: 1px solid var(--line); }
}
.stat {
  flex: 1;
  text-align: center;
  padding: 26px 0;
}
.stat + .stat { border-left: 1px solid var(--line); }
.stat-num {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.stat-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--label);
  margin-top: 6px;
}

/* ---------- Section labels ---------- */

.section-label {
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--label);
}
.section-label.center { text-align: center; }
.section-label.accent { color: var(--accent); }

/* ---------- Clients ---------- */

.clients { padding-top: 52px; }
.clients .section-label { padding: 0 32px; }

.client-groups {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 0 56px;
  display: flex;
  flex-direction: column;
}

.client-group { padding: 36px 0; border-top: 1px solid var(--line); }

.cat-label {
  text-align: center;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 26px;
}

.logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 30px 52px;
}
.logo-row-tight { gap: 26px 40px; }

.client-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}
.client-duo .client-group { border-top: 0; padding: 36px 24px; }
.client-duo .client-group:first-child { border-right: 1px solid var(--line); }
.duo-last { border-bottom: 1px solid var(--line); }

.logo img {
  height: var(--h, 28px);
  max-width: var(--mw, 150px);
  object-fit: contain;
  filter: var(--logo-filter);
  opacity: var(--logo-opacity);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.logo:hover img { opacity: 1; transform: translateY(-2px); }

/* Per-theme logo artwork (knockouts differ between variants) */
:root[data-theme="dark"] .logo-light { display: none; }
:root:not([data-theme="dark"]) .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .logo-light { display: none; }
  :root:not([data-theme]) .logo-dark { display: block; }
}

/* ---------- What I do ---------- */

.what {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 32px 0;
}
.what .section-label { margin-bottom: 26px; }

.what-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
  padding-bottom: 48px;
}

.card-num { font-size: 12px; color: var(--accent); margin-bottom: 14px; }

.what-card h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.what-card p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Selected work ---------- */

.work {
  max-width: 920px;
  margin: 0 auto;
  padding: 16px 32px 24px;
}
.work .section-label { margin-bottom: 10px; }

.work-row {
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.work-row:last-child { border-bottom: 1px solid var(--line); }

.work-row:not(.work-row-media),
.work-cols {
  display: grid;
  grid-template-columns: 300px 1fr;
  column-gap: 44px;
}

.work-title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  transition: color 0.25s ease;
}
.work-row:hover .work-title { color: var(--accent); }

.work-meta {
  font-size: 11.5px;
  color: var(--label);
  margin-top: 10px;
  line-height: 1.6;
}

.work-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  align-self: center;
}

.work-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.work-photos img,
.beyond-photos img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.work-photos img:hover,
.beyond-photos img:hover { transform: scale(1.015); }

/* ---------- Beyond code ---------- */

.beyond {
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 32px 56px;
}
.beyond .section-label { margin-bottom: 22px; }

.beyond-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 44px;
  align-items: center;
}
.beyond-text {
  font-size: 17px;
  line-height: 1.65;
  color: var(--beyond);
}
.beyond-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.beyond-photos img { height: 240px; }

/* ---------- Tech strip ---------- */

.tech {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
  line-height: 2;
  color: var(--label);
  letter-spacing: 0.04em;
}
.tech-inner { padding: 26px 100px; }

/* ---------- Contact ---------- */

/* No border-top — the tech strip's border-bottom already closes it */
.contact {
  text-align: center;
  padding: 64px 80px 34px;
}
.contact .section-label { margin-bottom: 20px; }

.email-big {
  font-size: clamp(26px, 4.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: color 0.25s ease;
}
.email-big:hover { color: var(--accent); }

.contact-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 20px;
}
.contact-links a { transition: color 0.2s ease; }
.contact-links a:hover { color: var(--text); }

.email-noscript {
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
}

.site-footer {
  text-align: center;
  font-size: 11px;
  color: var(--footer);
  padding: 0 0 40px;
  letter-spacing: 0.03em;
}

/* ---------- Scroll reveals (JS adds .in) ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
html.js .reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Tablet ---------- */

@media (max-width: 900px) {
  .topbar { padding: 22px 28px 0; }
  .nav { display: none; }
  .menu-toggle { display: flex; }
  .menu-panel { display: block; }
  .topbar-right { gap: 14px; }

  .hero { padding: 44px 28px 52px; }

  .what-grid { grid-template-columns: 1fr; gap: 0; padding-bottom: 26px; }
  .what .section-label { margin-bottom: 6px; }
  .what-card { padding: 22px 0; border-bottom: 1px solid var(--line); }
  .what-card:last-child { border-bottom: 0; }
  .what-card .card-num { margin-bottom: 10px; }
  .what-card h3 { font-size: 18px; margin-bottom: 8px; }

  .work-row:not(.work-row-media),
  .work-cols { grid-template-columns: 1fr; }
  .work-desc { margin-top: 12px; }
  .work-title { font-size: 19px; line-height: 1.3; }
  .work-meta { margin-top: 8px; font-size: 11px; }

  .tech { font-size: 11.5px; }
  .tech-inner { padding: 22px 28px; }
}

/* ---------- Mobile ---------- */

@media (max-width: 700px) {
  :root { --spot-strength: 140% 30% at 50% -6%; }

  .topbar { padding: 20px 22px 0; }
  .menu-panel { margin-top: 16px; }

  .hero { padding: 36px 24px 44px; }
  .eyebrow { font-size: 11px; letter-spacing: 0.2em; margin-bottom: 22px; }
  .portrait { width: 132px; height: 132px; border-width: 6px; }
  .hero h1 { margin-top: 26px; line-height: 1.1; }
  .lede { font-size: 16px; margin: 16px 0 26px; }

  .cta {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 280px;
  }
  .btn { display: block; text-align: center; padding: 15px 0; }

  .stats-inner { flex-direction: column; }
  .stat { padding: 20px 0; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .stat-num { font-size: 26px; }
  .stat-label { font-size: 10.5px; margin-top: 5px; }

  .clients { padding-top: 40px; }
  .client-groups { padding: 8px 24px 40px; }
  .client-group { padding: 26px 0 24px; }
  .client-duo { grid-template-columns: 1fr; border-top: 0; }
  .client-duo .client-group { padding: 26px 0 24px; border-top: 1px solid var(--line); }
  .client-duo .client-group:first-child { border-right: 0; }
  .duo-last { border-bottom: 1px solid var(--line); }
  .cat-label { font-size: 10.5px; letter-spacing: 0.15em; margin-bottom: 20px; }
  .logo-row { gap: 22px 30px; }
  .logo-row-tight { gap: 20px 26px; }
  .logo img { height: calc(var(--h, 28px) * 0.85); max-width: calc(var(--mw, 150px) * 0.85); }

  .what { padding: 36px 24px 0; }
  .work { padding: 36px 24px 8px; }
  .work-photos { grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
  .work-photos img { height: 200px; }

  .beyond { padding: 36px 24px 40px; }
  .beyond-grid { grid-template-columns: 1fr; }
  .beyond-text { font-size: 15.5px; }
  .beyond-photos { grid-template-columns: 1fr; gap: 12px; margin-top: 18px; }
  .beyond-photos img { height: 240px; }

  .tech-inner { padding: 22px 24px; }

  .contact { padding: 44px 24px 26px; }
  .contact .section-label { margin-bottom: 16px; }
  .contact-links { margin-top: 16px; }

  .site-footer { font-size: 10.5px; padding-bottom: 32px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
}
