/* yuvaldor.com - cinematic, warm-dark, editorial, quiet */

:root {
  --ink: #1A1814;
  --cream: #F5F2EC;
  --rust: #8B3A2A;
  --stone: #9E9890;
  --paper: #EDE9E1;
  --scrim: linear-gradient(180deg, rgba(26, 24, 20, 0.35) 0%, rgba(26, 24, 20, 0.82) 100%);
  --max: 1120px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Courier Prime", "Cousine", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

@font-face {
  font-family: "Cousine";
  src: url("/fonts/Cousine-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Hebrew has no Courier Prime glyphs; the bold face keeps .build-kicker
   a real bold on the Hebrew page instead of a synthesized one. */
@font-face {
  font-family: "Cousine";
  src: url("/fonts/Cousine-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Courier Prime";
  src: url("/fonts/CourierPrime-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Courier Prime";
  src: url("fonts/CourierPrime-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--cream);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--rust);
}

.skip-link {
  position: absolute;
  /* inline-start stays outside scrollable overflow in both LTR and RTL;
     a hard left:-9999px becomes 10000px of horizontal scroll on the RTL page */
  inset-inline-start: -9999px;
  top: 0;
  background: var(--cream);
  color: var(--ink);
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  inset-inline-start: 0.75rem;
  top: 0.75rem;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem var(--pad);
  background: linear-gradient(180deg, rgba(26, 24, 20, 0.92), rgba(26, 24, 20, 0));
  pointer-events: none;
  max-width: 100%;
}

.site-header a {
  pointer-events: auto;
  text-decoration: none;
}

.logo {
  font-family: var(--mono);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 0.5rem 0.7rem;
  font-size: 0.72rem;
  max-width: calc(100% - 6.5rem);
  overflow: hidden;
}

@media (max-width: 480px) {
  .site-nav a:not([href="#sec-showreel"]):not([href="#sec-contact"]):not(.lang-toggle) {
    display: none;
  }
}

.site-nav a {
  color: var(--stone);
}

.site-nav a:hover {
  color: var(--cream);
}

.section {
  position: relative;
  width: 100%;
  max-width: 100vw;
}

.section-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) 1.75rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
}

/* An h2 carrying .eyebrow must render exactly like the p eyebrows */
h2.eyebrow {
  font-weight: 400;
  line-height: inherit;
  max-width: none;
}

.section-sub {
  margin: 0;
  color: var(--stone);
  font-size: 0.95rem;
  max-width: 42ch;
}

h1,
h2,
h3 {
  font-weight: 550;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2rem, 5.5vw, 3.75rem);
  max-width: 16ch;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  max-width: 22ch;
}

h3 {
  font-size: 1.15rem;
}

.subline {
  margin: 0;
  color: var(--stone);
  font-size: 1.05rem;
  max-width: 36ch;
}

/* Hero */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: end start;
  overflow: hidden;
}

.video-slot {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid rgba(158, 152, 144, 0.25);
}

.video-slot--hero {
  position: absolute;
  inset: 0;
  border: 0;
}

.slot-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--ink);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: calc(5rem + env(safe-area-inset-top, 0px)) var(--pad) 3.5rem;
  max-width: var(--max);
}

/* What I build */
.build {
  padding: 5rem 0 3rem;
  background: var(--ink);
}

.build-card {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.build-card--wide {
  margin-bottom: 2.5rem;
}

.video-slot--wide {
  aspect-ratio: 16 / 9;
}

.video-slot--tall {
  aspect-ratio: 9 / 16;
}

.build-copy h3 {
  margin-top: 1.1rem;
}

.build-copy p {
  margin: 0 0 0.5rem;
  color: var(--stone);
  max-width: 46ch;
}

.build-note {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--rust);
}

.build-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

/* Closing statement of the section: four systems run themselves, this is what doesn't */
.build-kicker {
  max-width: var(--max);
  margin: 3.5rem auto 0;
  padding: 0 var(--pad);
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.3rem, 3.2vw, 2.15rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--cream);
}

.build-kicker::before {
  content: "";
  display: block;
  width: 3rem;
  height: 2px;
  margin-bottom: 1.35rem;
  background: var(--rust);
}

.build-grid .build-card {
  padding: 0;
  /* 9:16 slots get tall fast — cap them so a card never exceeds the viewport,
     and so the 540px-wide sources stay above 1.5x of their display size. */
  max-width: 340px;
  justify-self: center;
}

/* Showreel */
.showreel {
  padding: 5rem 0 2rem;
  background: var(--ink);
}

.reel-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.reel-card {
  margin: 0;
}

.reel-card .video-slot {
  aspect-ratio: 16 / 9;
}

.reel-card figcaption {
  margin-top: 0.85rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--stone);
}

/* About */
.about {
  padding: 4rem 0;
  background: var(--cream);
  color: var(--ink);
}

.about a {
  color: var(--ink);
}

.about .eyebrow {
  color: var(--rust);
}

.about-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.about-copy p {
  margin: 0 0 1rem;
  max-width: 42ch;
  color: #3a3530;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.video-slot--portrait {
  aspect-ratio: 4 / 5;
  max-width: 420px;
  width: 100%;
  justify-self: center;
}

/* Services */
.services {
  padding: 5rem 0 3rem;
  background: var(--ink);
}

.service-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  background: rgba(245, 242, 236, 0.03);
  border: 1px solid rgba(158, 152, 144, 0.2);
  padding: 0 0 1.25rem;
}

.service-card .video-slot {
  border: 0;
  border-bottom: 1px solid rgba(158, 152, 144, 0.2);
  aspect-ratio: 16 / 9;
}

.service-card h3,
.service-card p {
  margin-left: 1.1rem;
  margin-right: 1.1rem;
}

.service-card h3 {
  margin-top: 1.1rem;
}

.service-card p {
  margin-top: 0;
  color: var(--stone);
  max-width: 40ch;
}

/* CTA — tokens only, no new colors */
.cta {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.7rem 1.4rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--rust);
  border: 1px solid var(--rust);
  text-decoration: none;
}

.cta:hover {
  background: var(--ink);
  border-color: var(--cream);
  color: var(--cream);
}

.cta-row {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem var(--pad) 0;
}

/* Contact */
.contact {
  padding: 5rem 0 4rem;
  background: var(--paper);
  color: var(--ink);
}

.contact .eyebrow {
  color: var(--rust);
}

.contact .section-head {
  padding-bottom: 1rem;
}

.contact-form {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) 2rem;
}

/* Honeypot: off-screen for humans, present in the DOM for bots */
.contact-form .hp {
  position: absolute;
  inset-inline-start: -9999px;
}

.contact-form label {
  display: block;
  margin: 1.1rem 0 0.35rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust);
}

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  max-width: 40rem;
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(26, 24, 20, 0.35);
  border-radius: 0;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--rust);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form .cta {
  margin-top: 1.25rem;
  cursor: pointer;
}

.form-status {
  margin: 0.75rem 0 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink);
  min-height: 1.2em;
}

.contact-line {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  font-size: 1rem;
  color: var(--stone);
}

.contact-line a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rust);
}

.contact-line a:hover {
  color: var(--rust);
}

.contact-links {
  max-width: var(--max);
  margin: 1.25rem auto 0;
  padding: 0 var(--pad);
  color: var(--stone);
  font-family: var(--mono);
  font-size: 0.9rem;
}

.contact-links a {
  color: var(--ink);
}

.site-footer {
  padding: 1.5rem var(--pad) 2.5rem;
  background: var(--ink);
  color: var(--stone);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.site-footer p {
  margin: 0;
  max-width: var(--max);
}

/* Reduced motion: posters only */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .slot-video {
    display: none;
  }

  .video-slot {
    background-color: var(--ink);
    background-image: none;
  }

  .video-slot::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: inherit;
  }

  .video-slot--hero {
    background-image: url("posters/hero.svg");
    background-size: cover;
    background-position: center;
  }

  .reel-card:nth-child(1) .video-slot {
    background-image: url("posters/reel-01.svg");
    background-size: cover;
    background-position: center;
  }

  .reel-card:nth-child(2) .video-slot {
    background-image: url("posters/reel-02.svg");
    background-size: cover;
    background-position: center;
  }

  .reel-card:nth-child(3) .video-slot {
    background-image: url("posters/reel-03.svg");
    background-size: cover;
    background-position: center;
  }

  .video-slot--portrait {
    background-image: url("posters/about.svg");
    background-size: cover;
    background-position: center;
  }

  .build-card--wide .video-slot {
    background-image: url("posters/build-dreampics.jpg");
    background-size: cover;
    background-position: center;
  }

  .build-grid .build-card:nth-child(3) .video-slot {
    background-image: url("posters/build-agents.jpg");
    background-size: cover;
    background-position: center;
  }

  .build-grid .build-card:nth-child(1) .video-slot {
    background-image: url("posters/build-gameplay.jpg");
    background-size: cover;
    background-position: center;
  }

  .build-grid .build-card:nth-child(2) .video-slot {
    background-image: url("posters/build-influencer.jpg");
    background-size: cover;
    background-position: center;
  }

  .service-card:nth-child(1) .video-slot {
    background-image: url("posters/service-video.svg");
    background-size: cover;
    background-position: center;
  }

  .service-card:nth-child(2) .video-slot {
    background-image: url("posters/service-systems.svg");
    background-size: cover;
    background-position: center;
  }
}

/* Desktop */
@media (min-width: 768px) {
  .site-nav {
    max-width: none;
    gap: 0.85rem 1.25rem;
    font-size: 0.85rem;
  }

  .reel-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .build-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }

  .about-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
  }

  .video-slot--portrait {
    justify-self: end;
  }

  .service-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1280px) {
  :root {
    --pad: 3rem;
  }
}

/* Poster fallback: SVG posters render unreliably as poster attr in Chromium — serve
   them as backgrounds; a failed video load keeps the placeholder visible. */
.slot-video { background-size: cover; background-position: center; }
