/* ==========================================================================
   The Scandilo Agency — shared stylesheet  (v2 — modern refresh)
   Space Grotesk (display) + Inter (UI/body) + Pinyon Script (logo).
   Dark navy theme, blue accent, symmetric layout, subtle motion.
   Class names are stable — pages reuse them; do not rename.
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------ */
:root {
  /* palette */
  --navy:      #0c1422;   /* main page background */
  --navy-2:    #121d31;   /* elevated cards / inputs / hover */
  --black:     #070b12;   /* form / stats / results section backgrounds */
  --white:     #eef1f7;   /* primary text */
  --muted:     #9aa7bd;   /* body copy / captions */
  --muted-2:   #6f7d94;   /* faint labels */
  --blue:      #4d8dff;   /* accent */
  --blue-bright:#6ba3ff;  /* hover */
  --blue-head: #7aa8ff;   /* accent headings */
  --border:    #21304c;   /* hairlines / input borders */
  --border-soft: rgba(255,255,255,0.07);

  /* radii */
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* elevation */
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.30);
  --shadow-md: 0 14px 40px rgba(0,0,0,0.42);
  --glow: 0 0 0 1px rgba(122,168,255,0.45), 0 10px 34px rgba(77,141,255,0.45);

  /* fonts */
  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-ui: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-script: 'Pinyon Script', cursive;

  /* type scale (fluid) */
  --fs-body:    clamp(15px, 0.92rem + 0.2vw, 17px);
  --fs-eyebrow: 13px;
  --fs-h3:      clamp(19px, 1rem + 0.5vw, 23px);
  --fs-display: clamp(30px, 1.9rem + 2.1vw, 50px);
  --fs-stat:    clamp(38px, 2.3rem + 2.4vw, 64px);

  /* rhythm */
  --maxw: 1180px;
  --section-pad: clamp(64px, 8vw, 112px);
  --gutter: clamp(20px, 5vw, 40px);

  /* motion */
  --dur: 0.22s;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

::selection { background: rgba(77,141,255,0.30); color: #fff; }

/* Visible keyboard focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---- Header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(12px, 1.6vw, 18px) var(--gutter);
  background: var(--navy);
  border-bottom: 1px solid var(--border);
}

/* Logo — white circle with three stacked lines */
.logo {
  width: 84px;
  height: 84px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ffffff;
  color: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.logo:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0,0,0,0.45); }

.logo-top, .logo-sub {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #24314a;
}

.logo-name {
  font-family: var(--font-script);
  font-size: 25px;
  font-weight: 400;
  color: #16233c;
  margin: 1px 0;
  line-height: 1;
}

/* Nav */
.nav { display: flex; align-items: center; gap: clamp(20px, 2.4vw, 36px); }

.nav a {
  position: relative;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  color: rgba(238,241,247,0.78);
  text-decoration: none;
  padding: 6px 0;
  transition: color var(--dur) var(--ease);
}
.nav a:hover { color: #fff; }
.nav a.active { color: #fff; }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
}

/* Hamburger (mobile only) */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--blue);
  color: #ffffff;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 14px 26px;
  border: none;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(77,141,255,0.28);
  transition: background-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.btn:hover {
  background: var(--blue-bright);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}
.btn:active { transform: translateY(0) scale(0.98); }

.btn-pill { border-radius: var(--radius-pill); }

/* Outline variant (kept for compatibility) — also lights up blue */
.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.28);
  box-shadow: none;
}
.btn-outline:hover {
  background: rgba(77,141,255,0.12);
  border-color: var(--blue);
  box-shadow: var(--glow);
}

/* ---- Section layout ----------------------------------------------------- */
.section { padding-top: var(--section-pad); padding-bottom: var(--section-pad); }

.section > .section-inner,
.section-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section-black { background: var(--black); }

/* ---- Hero --------------------------------------------------------------- */
.hero { width: 100%; padding: clamp(24px, 4vw, 52px) var(--gutter) 0; }

.hero-figure {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-md);
}
.hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 68%;
}
/* soft gradient so the overlay button always reads */
.hero-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6,10,18,0.45), rgba(6,10,18,0) 42%);
  pointer-events: none;
}
.hero-cta { position: absolute; bottom: 26px; left: 26px; z-index: 1; }

/* ---- Two-column blocks -------------------------------------------------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.two-col-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.two-col-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-soft);
  transition: transform 0.5s var(--ease-out);
}
.two-col-media:hover img { transform: scale(1.035); }

.two-col.img-left .two-col-media { order: -1; }

/* ---- Text bits ---------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-ui);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-head);
  margin: 0 0 16px;
}

.prose p {
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.75;
  margin: 0 0 18px;
  max-width: 56ch;
}
.prose p:last-child { margin-bottom: 0; }

/* Display headings */
.display, .display-blue, .display-center {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-display);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--white);
  margin: 0 0 26px;
  text-wrap: balance;
}
.display-blue   { color: var(--blue-head); text-align: center; }
.display-center { text-align: center; }

/* Per-model heading size (models page) */
.model-name { font-size: clamp(24px, 1.4rem + 1vw, 32px); margin-bottom: 20px; }

/* ---- Stats -------------------------------------------------------------- */
.stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(32px, 5vw, 76px);
  text-align: center;
  margin-top: 8px;
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-stat);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-top: 10px;
}

/* ---- Apply form --------------------------------------------------------- */
.apply-form { max-width: 640px; margin: 0 auto; }

.apply-form label {
  display: block;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: #fff;
  margin-top: 6px;
}
.apply-form .req {
  color: var(--muted-2);
  font-weight: 400;
  font-size: 12px;
  margin-left: 6px;
}

.apply-form input,
.apply-form textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 16px;
  padding: 14px 16px;
  margin-top: 8px;
  margin-bottom: 20px;
  transition: border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}
.apply-form input::placeholder,
.apply-form textarea::placeholder { color: var(--muted-2); }
.apply-form input:focus,
.apply-form textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: rgba(77,141,255,0.06);
  box-shadow: 0 0 0 3px rgba(77,141,255,0.18);
}
.apply-form textarea { min-height: 130px; resize: vertical; }

.apply-form .form-actions { text-align: center; margin-top: 10px; }

/* ---- Model results ------------------------------------------------------ */
.results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 30px);
  max-width: var(--maxw);
  margin: 0 auto;
}
.result {
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 14px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.result:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.result img { width: 100%; border-radius: 10px; border: 1px solid var(--border-soft); }
.result-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--white);
  margin: 18px 0 6px;
}
.result-sub { color: var(--muted); text-align: center; font-size: 14px; margin: 0; }

/* Clickable screenshots + hover hint */
.result { position: relative; }
.result img { cursor: zoom-in; }
.result::after {
  content: "View full size";
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 6px 11px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  background: rgba(12, 20, 34, 0.92);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  pointer-events: none;
}
.result:hover::after { opacity: 1; transform: none; }
@media (hover: none) { .result::after { opacity: 1; transform: none; } }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 56px);
  background: rgba(4, 7, 13, 0.94);
}
.lightbox.open { display: flex; animation: lb-fade 0.2s var(--ease); }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox-img {
  max-width: min(1200px, 96vw);
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.lightbox-close {
  position: absolute;
  top: clamp(14px, 2vw, 26px);
  right: clamp(16px, 2.4vw, 32px);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.16); transform: scale(1.05); }

/* ---- Footer ------------------------------------------------------------- */
.site-footer {
  background: var(--navy);
  padding: clamp(56px, 7vw, 88px) var(--gutter);
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: clamp(32px, 5vw, 64px);
  max-width: var(--maxw);
  margin: 0 auto;
}
.footer-col h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 16px;
}
.footer-col p { color: var(--muted); margin: 0 0 8px; }

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links a {
  display: inline-block;
  color: var(--muted);
  margin: 6px 0;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.footer-links a:hover { color: var(--blue-bright); }

.footer-apply { display: flex; align-items: flex-start; justify-content: flex-end; }

/* ---- Scroll reveal (progressive; no-JS shows everything) ---------------- */
html.js-reveal .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s var(--ease-out), transform 0.7s var(--ease-out);
}
html.js-reveal .reveal.in { opacity: 1; transform: none; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 860px) {
  .site-header {
    flex-wrap: nowrap;
    justify-content: space-between;
    position: relative;
    gap: 12px;
    padding: 10px 16px;
    min-height: 60px;
  }
  .nav-toggle { display: flex; }
  .logo {
    width: 48px;
    height: 48px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  .logo-name { font-size: 15px; margin: 0; }
  .logo-top, .logo-sub { font-size: 6px; letter-spacing: 0.16em; }
  .nav-cta { padding: 9px 16px; font-size: 13px; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 6px 18px 14px;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a {
    padding: 15px 4px;
    font-size: 16px;
    color: #fff;
    border-bottom: 1px solid var(--border);
  }
  .nav a:last-child { border-bottom: none; }
  .nav a.active { color: var(--blue-head); }
  .nav a.active::after { display: none; }

  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .two-col.img-left .two-col-media { order: 0; }
  body.page-models .two-col-media { aspect-ratio: auto; max-width: 460px; margin: 0 auto; }

  .results { grid-template-columns: 1fr; max-width: 460px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-apply { justify-content: flex-start; }
  .hero-figure { aspect-ratio: 4 / 3; }
}

/* Models page: uniform portrait crops for symmetry */
body.page-models .two-col-media { aspect-ratio: 4 / 5; }
body.page-models .two-col-media img { object-position: 50% 22%; }

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