/* ==========================================================================
   AAEC — AIRIK ART & ENTERTAINMENT CO.
   Design system: black / red / white / silver, cinematic + editorial.
   Fonts: Bebas Neue (headline), Jost (Futura substitute), Inter (Helvetica Neue substitute).
   NOTE: brand guide specifies Futura + Helvetica Neue. Those are commercial
   fonts without default free web licensing. Jost/Inter are used as close,
   free, geometric-sans substitutes until Airik confirms a font license.
   ========================================================================== */

:root {
  --aaec-black: #000000;
  --aaec-red: #B0151B;
  --aaec-white: #FFFFFF;
  --aaec-silver: #A6A6A6;
  --aaec-black-soft: #0a0a0a;
  --aaec-line: rgba(255, 255, 255, 0.12);
  /* Brand red (#B0151B) on black only hits ~3:1 contrast, which fails WCAG AA
     for small text (needs 4.5:1). Used for small text on black (eyebrows, nav/
     footer hover) instead of --aaec-red, which stays reserved for fills/borders
     where the text sitting on it is white (already >7:1, no issue there). */
  --aaec-red-text: #E63946;

  --font-display: "Bebas Neue", "Anton", sans-serif;
  --font-structural: "Jost", "Futura", sans-serif;
  --font-body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --container-max: 1320px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--aaec-black);
  color: var(--aaec-white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  margin: 0 0 var(--space-2);
  line-height: 1.05;
  text-transform: uppercase;
}

h1 { font-size: clamp(3rem, 8vw, 7rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.4rem, 3vw, 2rem); }

p { margin: 0 0 var(--space-2); color: var(--aaec-silver); max-width: 60ch; }

.eyebrow {
  font-family: var(--font-structural);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--aaec-red-text);
  margin-bottom: var(--space-2);
  display: inline-block;
}

/* Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  font-family: var(--font-structural);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  border: 1px solid var(--aaec-white);
  background: transparent;
  color: var(--aaec-white);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.btn:hover { background: var(--aaec-white); color: var(--aaec-black); }
.btn-primary { background: var(--aaec-red); border-color: var(--aaec-red); color: var(--aaec-white); }
.btn-primary:hover { background: transparent; color: var(--aaec-red); }

/* Header ----------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: var(--space-2) 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.85), transparent);
  transition: background 0.3s ease;
}
.site-header.is-scrolled { background: var(--aaec-black); border-bottom: 1px solid var(--aaec-line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.brand-mark img { height: 34px; width: auto; }

.main-nav { display: flex; align-items: center; gap: var(--space-4); }
.main-nav ul { list-style: none; display: flex; gap: var(--space-3); margin: 0; padding: 0; }
.main-nav a {
  font-family: var(--font-structural);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--aaec-white);
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.main-nav a:hover, .main-nav a.active { color: var(--aaec-red-text); border-color: var(--aaec-red-text); }

.nav-toggle { display: none; background: none; border: 0; color: var(--aaec-white); font-size: 1.6rem; cursor: pointer; }

@media (max-width: 900px) {
  .main-nav { position: fixed; inset: 0; background: var(--aaec-black); flex-direction: column; justify-content: center; transform: translateY(-100%); transition: transform 0.4s var(--ease); }
  .main-nav.is-open { transform: translateY(0); }
  .main-nav ul { flex-direction: column; align-items: center; gap: var(--space-3); }
  /* align-items:center above only centers each link's box; its wrapped text
     still defaults to text-align:left within that box, which looked
     lopsided on "Live From The Living Room" wrapping to 2 lines — text-align
     here fixes that. Slightly smaller size + tighter letter-spacing than
     before so it's less likely to wrap to 2 lines in the first place. */
  .main-nav a { font-size: 1.15rem; letter-spacing: 0.08em; text-align: center; }
  .nav-toggle { display: block; z-index: 110; }
}

/* Hero --------------------------------------------------------------------*/
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: var(--space-6) 0 var(--space-5);
  background: radial-gradient(ellipse at 50% 0%, #1a1a1a 0%, #000 70%);
  overflow: hidden;
}
.hero video, .hero .hero-media {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.55;
}
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, #000 5%, transparent 60%);
}

/* Brand photo treatment ----------------------------------------------------
   Source photography (stock, until real AAEC work replaces it) is never
   naturally black/red/white/silver, so instead of hunting for photos that
   happen to match, every photo gets the same grayscale + red-duotone
   treatment. Guarantees the whole site reads as one system regardless of
   what's underneath. Apply .brand-photo to the <img>/background element and
   wrap it in .brand-photo-frame if it needs the red overlay (::after). */
.brand-photo { filter: grayscale(1) contrast(1.15) brightness(0.85); }
.brand-photo-frame { position: relative; }
.brand-photo-frame::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(176,21,27,0.35), rgba(0,0,0,0.55) 65%);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 2; }
.hero p.lede { color: var(--aaec-white); font-size: 1.15rem; max-width: 42ch; }

/* Section blocks ------------------------------------------------------- */
section { padding: var(--space-6) 0; border-top: 1px solid var(--aaec-line); }
section:first-of-type, .hero + section { border-top: none; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }

/* Reveal on scroll ------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Grid cards --------------------------------------------------------------*/
.grid { display: grid; gap: var(--space-3); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
  border: 1px solid var(--aaec-line);
  padding: var(--space-3);
  background: var(--aaec-black-soft);
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.card:hover { border-color: var(--aaec-red); transform: translateY(-4px); }

.media-card { position: relative; overflow: hidden; aspect-ratio: 4/5; border: 1px solid var(--aaec-line); background: #111; }
.media-card .placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-structural); letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--aaec-silver); font-size: 0.75rem; text-align: center; padding: var(--space-2);
}
.media-card .caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-2);
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  transition: background 0.3s ease;
}
.media-card .caption .eyebrow { margin-bottom: 0.25rem; }
.media-card .caption h4 { margin: 0; font-size: 1.1rem; }

/* Clickable work tiles (Home Featured Work + Work page grid, see
   renderWorkGrid() in main.js) get an obvious hover state — plain
   non-clickable .media-card galleries elsewhere (project detail pages)
   don't, since a.media-card only matches when it IS the link itself. */
a.media-card { transition: border-color 0.3s ease; }
a.media-card img { transition: transform 0.5s var(--ease); }
a.media-card:hover { border-color: var(--aaec-red-text); }
a.media-card:hover img { transform: scale(1.08); }
a.media-card:hover .caption { background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.1)); }
.media-card .caption .view-link {
  display: block; margin-top: 0.4rem; font-family: var(--font-structural); text-transform: uppercase;
  font-size: 0.7rem; letter-spacing: 0.1em; color: var(--aaec-white);
  opacity: 0; transform: translateY(6px); transition: opacity 0.3s ease, transform 0.3s ease;
}
a.media-card:hover .caption .view-link { opacity: 1; transform: translateY(0); }

/* Filters (Work page) ------------------------------------------------------ */
.filter-bar { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-bottom: var(--space-4); }
.filter-btn {
  font-family: var(--font-structural); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.1em;
  padding: 0.5rem 1rem; border: 1px solid var(--aaec-line); background: transparent; color: var(--aaec-silver);
  cursor: pointer; transition: all 0.25s ease;
}
.filter-btn:hover { color: var(--aaec-white); border-color: var(--aaec-white); }
.filter-btn.active { background: var(--aaec-red); border-color: var(--aaec-red); color: var(--aaec-white); }

/* Team ------------------------------------------------------------------ */
.team-member { cursor: pointer; text-align: left; }
.team-member .media-card { aspect-ratio: 1/1; margin-bottom: var(--space-2); }
.team-member h4 { margin-bottom: 0.15rem; }
.team-member .role { font-family: var(--font-structural); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.1em; color: var(--aaec-red); }

/* Modal ------------------------------------------------------------------ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: var(--space-3);
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.modal-box { background: var(--aaec-black-soft); border: 1px solid var(--aaec-line); max-width: 640px; width: 100%; padding: var(--space-4); position: relative; max-height: 85vh; overflow-y: auto; }
.modal-close { position: absolute; top: var(--space-2); right: var(--space-2); background: none; border: 0; color: var(--aaec-white); font-size: 1.5rem; cursor: pointer; }

/* Forms -------------------------------------------------------------------*/
form { display: grid; gap: var(--space-2); max-width: 640px; }
label { font-family: var(--font-structural); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.1em; color: var(--aaec-silver); display: block; margin-bottom: 0.35rem; }
input, select, textarea {
  width: 100%; background: var(--aaec-black-soft); border: 1px solid var(--aaec-line); color: var(--aaec-white);
  padding: 0.8rem; font-family: var(--font-body); font-size: 0.95rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--aaec-red-text); }
textarea { min-height: 140px; resize: vertical; }
.form-status { font-family: var(--font-structural); font-size: 0.85rem; letter-spacing: 0.05em; min-height: 1.2em; }

/* Honeypot field (see api/submit-lead.php) — off-screen rather than
   display:none/visibility:hidden, since some bots specifically skip fields
   hidden that way. Real users never see or reach it (tabindex="-1" in the
   markup keeps it out of keyboard tab order too). */
.hp-field { position: absolute; left: -9999px; top: -9999px; }

/* Footer ------------------------------------------------------------------*/
.site-footer { padding: var(--space-5) 0 var(--space-3); border-top: 1px solid var(--aaec-line); }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-4); }
.footer-col h4 { font-size: 0.9rem; color: var(--aaec-white); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.footer-col a { color: var(--aaec-silver); font-size: 0.9rem; }
.footer-col a:hover { color: var(--aaec-red-text); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2); font-size: 0.8rem; color: var(--aaec-silver); border-top: 1px solid var(--aaec-line); padding-top: var(--space-2); }

/* Utility ------------------------------------------------------------------*/
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag { border: 1px solid var(--aaec-line); padding: 0.3rem 0.75rem; font-family: var(--font-structural); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--aaec-silver); }
.page-hero { position: relative; overflow: hidden; padding: calc(var(--space-6) + 3rem) 0 var(--space-5); border-top: none; }
.page-hero .container { position: relative; z-index: 2; }
.page-hero-media {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.32; z-index: 0;
}
.page-hero.brand-photo-frame::after { z-index: 1; }
.stat { font-family: var(--font-display); font-size: 3rem; color: var(--aaec-red); }

/* Testimonials ------------------------------------------------------------*/
blockquote.card { margin: 0; display: grid; gap: var(--space-1); }

/* Video embeds --------------------------------------------------------------
   16:9 responsive wrapper for YouTube iframes. aspect-ratio does the sizing
   work at every viewport (mobile full-width down to desktop grid columns),
   no padding-hack needed. max-width caps it at ~60% of full container width
   (was 960px/full-bleed) so a single embed doesn't dominate the viewport on
   desktop; margin:auto centers it when it's alone in a wider container. In a
   grid (multiple videos on one project), wrap the grid itself in a narrower
   container instead of relying on this alone — see .video-grid below. */
.video-embed { position: relative; width: 100%; max-width: 576px; margin: 0 auto; aspect-ratio: 16/9; background: #000; overflow: hidden; border: 1px solid var(--aaec-line); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-embed-caption { margin-top: 0.6rem; }
.video-grid { max-width: 800px; margin: 0 auto; }

/* Keyboard focus ------------------------------------------------------------
   Mouse clicks don't show this ring (default :focus-visible behavior); tab
   navigation does. Declared after the form/nav rules above so it wins the
   cascade and isn't cancelled by their `outline: none`. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--aaec-white);
  outline-offset: 3px;
}
