/* ============================================================
   Everleigh Brouse — Acting Portfolio
   Design system / global stylesheet
   Dark cinematic theme · gold accents · mobile-first
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Colour */
  --bg:            #0b0b0d;   /* near-black canvas            */
  --bg-elevated:   #121216;   /* nav / raised surfaces        */
  --bg-card:       #17171c;   /* cards, panels                */
  --border:        rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text:          #ededf0;   /* primary text (off-white)     */
  --text-muted:    #a6a6b0;   /* secondary text               */
  --text-faint:    #74747e;   /* captions, meta               */

  --gold:          #c9a24b;   /* primary gold accent          */
  --gold-bright:   #e6c988;   /* hover / highlight            */
  --gold-soft:     rgba(201, 162, 75, 0.14);

  /* Typography */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --container: 1180px;
  --gap:       clamp(1rem, 2.5vw, 2rem);
  --section-y: clamp(3.5rem, 8vw, 7rem);
  --radius:    4px;

  /* Motion */
  --ease:      cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur:       0.5s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 999;
  background: var(--gold);
  color: #1a1400;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0.005em;
  color: var(--text);
}

h1 { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 500; }
h2 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); }

p { color: var(--text-muted); max-width: 62ch; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-block;
  margin-bottom: 1rem;
}

.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--text); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.section { padding-block: var(--section-y); }

.section-head { max-width: 60ch; margin-bottom: clamp(2rem, 5vw, 3.5rem); }

.divider {
  width: 56px;
  height: 2px;
  background: var(--gold);
  margin: 1.25rem 0 0;
  border: 0;
}
.divider.center { margin-inline: auto; }

.text-center { text-align: center; }

main { flex: 1 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.95rem 1.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--gold);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform 0.2s var(--ease);
  background: transparent;
  color: var(--gold);
  white-space: nowrap;
}
.btn:hover { background: var(--gold); color: #1a1400; }
.btn:active { transform: translateY(1px); }

.btn--solid { background: var(--gold); color: #1a1400; }
.btn--solid:hover { background: var(--gold-bright); border-color: var(--gold-bright); }

.btn--ghost { border-color: var(--border-strong); color: var(--text); }
.btn--ghost:hover { background: rgba(255,255,255,0.06); color: var(--text); border-color: var(--text-muted); }

.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 13, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-header.scrolled {
  background: rgba(11, 11, 13, 0.94);
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}
.brand span { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2vw, 2.1rem);
}
.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.4rem 0;
  position: relative;
  transition: color 0.3s var(--ease);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  background: var(--gold);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  margin-inline: auto;
}
.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); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(135deg, #16161c 0%, #0b0b0d 55%, #0d0c0a 100%);
}
/* Placeholder cinematic texture until a real hero image is added */
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 75% 30%, rgba(201,162,75,0.10), transparent 60%),
    radial-gradient(50% 60% at 20% 90%, rgba(201,162,75,0.05), transparent 70%);
}
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(11,11,13,0.85) 0%, rgba(11,11,13,0.55) 50%, rgba(11,11,13,0.30) 100%);
}
.hero__inner { max-width: 640px; padding-block: 4rem; }
.hero h1 { margin-bottom: 1.4rem; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero .lead { margin-bottom: 2.2rem; color: var(--text-muted); }

/* ---------- Generic grids ---------- */
.grid {
  display: grid;
  gap: var(--gap);
}
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--gallery { grid-template-columns: repeat(2, 1fr); }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.card:hover { border-color: var(--border-strong); }
.card__body { padding: 1.5rem 1.6rem 1.75rem; }
.card__body h3 { margin-bottom: 0.5rem; }
.card__meta { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.75rem; }

/* ---------- Media placeholder ---------- */
.ph {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, #1c1c22 0%, #131317 100%);
  color: var(--text-faint);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.ph::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(50% 50% at 50% 40%, var(--gold-soft), transparent 70%);
}
.ph span { position: relative; z-index: 1; text-align: center; padding: 1rem; }
.ph--wide { aspect-ratio: 16 / 9; }
.ph--square { aspect-ratio: 1 / 1; }
.ph--portrait { aspect-ratio: 3 / 4; }

/* ---------- Home: about strip ---------- */
.about-strip { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about-strip__media .ph { aspect-ratio: 3 / 4; max-width: 420px; }
.about-strip__body h2 { margin-bottom: 1.25rem; }

/* ---------- Latest work ---------- */
.work-grid { grid-template-columns: 1fr; gap: var(--gap); }

/* ---------- Video / reel ---------- */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Resume ---------- */
.resume-section + .resume-section { margin-top: clamp(2.25rem, 5vw, 3.25rem); }
.resume-section h3 {
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.4rem;
}
.resume-table { width: 100%; border-collapse: collapse; }
.resume-table tr { border-bottom: 1px solid var(--border); }
.resume-table td { padding: 0.85rem 0; vertical-align: top; color: var(--text-muted); }
.resume-table td:first-child { color: var(--text); font-weight: 500; width: 40%; padding-right: 1rem; }
.resume-table td:last-child { text-align: right; color: var(--text-faint); font-size: 0.9rem; white-space: nowrap; }
.skills-list { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.skills-list li {
  border: 1px solid var(--border-strong);
  border-radius: 40px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3.5rem); }
.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.field input, .field textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  padding: 0.85rem 1rem;
  transition: border-color 0.3s var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 150px; }

.contact-detail { margin-bottom: 1.6rem; }
.contact-detail .label { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: 0.3rem; }
.contact-detail a, .contact-detail p { color: var(--text); font-size: 1.05rem; }

/* ---------- Social links ---------- */
.socials { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text-muted);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.socials a:hover { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }
.socials svg { width: 20px; height: 20px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  flex-shrink: 0;
}
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.footer-brand .brand { font-size: 1.4rem; margin-bottom: 0.75rem; display: inline-block; }
.footer-brand p { font-size: 0.92rem; }
.footer-nav h4 { font-family: var(--font-body); font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.footer-nav ul { display: grid; gap: 0.65rem; }
.footer-nav a { font-size: 0.92rem; color: var(--text-muted); transition: color 0.3s var(--ease); }
.footer-nav a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* ---------- Scroll reveal ----------
   No-JS safe: content is visible by default. The hidden start state is only
   applied when the <html> element has the .js class (added by main.js before
   paint), so a failed/blocked script never hides content. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   Responsive — scale up from mobile
   ============================================================ */
@media (min-width: 640px) {
  .grid--gallery { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1.5fr 1fr 1fr; }
}

@media (min-width: 860px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .work-grid { grid-template-columns: repeat(3, 1fr); }
  .about-strip { grid-template-columns: 0.85fr 1.15fr; }
  .about-strip.reverse { grid-template-columns: 1.15fr 0.85fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

/* Desktop nav vs mobile drawer */
@media (max-width: 800px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem clamp(1.25rem, 5vw, 3rem) 1.5rem;
    transform: translateY(-120%);
    transition: transform 0.4s var(--ease);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a {
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
  }
  .nav-links a[aria-current="page"]::after { display: none; }
}

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

/* ---------- Print (resume) ---------- */
@media print {
  .site-header, .site-footer, .nav-toggle, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}
