/* ============================================================
   SUMMIT POINT CREATIVE — Global Stylesheet
   ============================================================

   Design system: dark navy base, SPC gold accent, white nav
   Fonts: Barlow Condensed (display) + DM Sans (body)

   TABLE OF CONTENTS
   -----------------
   1.  Design Tokens (CSS Variables)
   2.  Reset & Base
   3.  Typography
   4.  Navigation
   5.  Buttons
   6.  Page Hero (shared inner-page hero)
   7.  Brands / Logo Row
   8.  Portfolio Pieces Grid
   9.  Portfolio Page Shared Styles
   10. Footer
   11. Scroll Reveal Animations
   12. Mobile Nav
   13. Responsive Breakpoints

   ============================================================ */


/* ============================================================
   1. DESIGN TOKENS
   ============================================================
   Edit these variables to change the site's color palette,
   fonts, or spacing globally. Every component references these.
   ------------------------------------------------------------ */
:root {
  /* ── Colors ── */
  --bg:           #0c1119;       /* Dark navy — main background        */
  --surface:      #131d29;       /* Slightly lighter — card backgrounds */
  --border:       #1e2f40;       /* Subtle borders                     */
  --text:         #e8edf2;       /* Primary text (on dark bg)          */
  --muted:        #7a9ab0;       /* Secondary/subdued text             */
  --accent:       #c99b3a;       /* SPC gold — primary accent          */
  --accent-lt:    #d4b05c;       /* Lighter gold — hover states        */
  --accent-blue:  #3d7aaa;       /* Blue accent (used sparingly)       */
  --navy:         #1b3a5c;       /* Deep blue for gradients            */

  /* ── Light-section colors ── */
  --light-bg:     #f5f4f1;       /* Cream background for light sections  */
  --light-bg-alt: #f2f4f6;       /* Slightly cooler light background     */
  --light-text:   #0c1119;       /* Dark text on light backgrounds       */
  --light-muted:  #4a6070;       /* Subdued text on light backgrounds    */
  --light-border: #e2e6ea;       /* Borders on light sections            */

  /* ── Fonts ── */
  --font-display: 'Barlow Condensed', sans-serif;  /* Headlines       */
  --font:         'DM Sans', sans-serif;            /* Body text       */
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}


/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

/* Eyebrow — small uppercase label above headlines */
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Section label — like eyebrow but muted (used in work grid header) */
.section-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}


/* ============================================================
   4. NAVIGATION
   ============================================================
   White bar, fixed to top. Logo left, links right.
   Scrolled state adds shadow. Mobile menu is fullscreen overlay.

   To change nav link text: edit the <ul class="nav-links"> in
   the HTML. Links are plain <a> tags inside <li> items.
   ------------------------------------------------------------ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 20px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: box-shadow 0.3s, border-color 0.3s;
}

/* Nav after user scrolls down */
nav.scrolled {
  background: #fff;
  border-bottom-color: rgba(0,0,0,0.12);
  box-shadow: 0 2px 24px rgba(0,0,0,0.09);
}

/* Logo */
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo img { height: 36px; width: auto; }

/* Nav links row */
.nav-links { display: flex; gap: 36px; list-style: none; align-items: center; }

.nav-links a {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2a3a4a;
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

/* "Let's Talk" CTA button in nav */
.nav-links a.nav-cta {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: #2a3a4a;
  border: 1.5px solid rgba(0,0,0,0.2);
  padding: 9px 26px;
  border-radius: 100px;
  display: inline-block;
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
}

.nav-links a.nav-cta:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.04);
}


/* ============================================================
   5. BUTTONS
   ============================================================
   .btn          — Primary gold button (solid)
   .btn-ghost    — Outlined/transparent button

   To change button text: edit the <a class="btn"> in the HTML.
   ------------------------------------------------------------ */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  border: none;
  padding: 15px 36px;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  transform-origin: center;
}

.btn:hover { background: #a07a28; transform: scale(1.04); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
  transform: scale(1.04);
}

/* Ghost button on light backgrounds */
.btn-ghost-dark {
  background: transparent;
  border: 1px solid rgba(0,0,0,0.2);
  color: var(--light-muted);
}

.btn-ghost-dark:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
  transform: scale(1.04);
}


/* ============================================================
   6. PAGE HERO (shared inner-page banner)
   ============================================================
   Full-bleed background image with gradient overlay.
   Used on: Work, Services, About, Contact pages.

   To change the hero image: swap the <img src="..."> inside
   .page-hero-bg in the page's HTML.

   To change the headline: edit the <h1 class="page-hero-headline">.
   ------------------------------------------------------------ */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 180px 48px 100px;
  border-bottom: 1px solid var(--border);
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: brightness(0.7);
}

/* Dark-left-to-transparent-right gradient overlay */
.page-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(12,17,25,1.0) 0%,
    rgba(12,17,25,1.0) 25%,
    rgba(12,17,25,0.85) 40%,
    rgba(12,17,25,0.4) 65%,
    rgba(12,17,25,0.0) 100%
  );
}

.page-hero .eyebrow { margin-bottom: 20px; }

/* All hero text sits above the overlay */
.page-hero .eyebrow,
.page-hero-headline,
.page-hero-sub {
  position: relative;
  z-index: 2;
}

.page-hero-headline {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 86px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.page-hero-sub {
  font-size: 17px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
  max-width: 520px;
}

/* ── Page-specific hero image overrides ──
   Use these to adjust image positioning or filters per page.
   Applied via a class on <body> or via inline style on img.  */

/* About page: flip image horizontally, custom crop */
.about-hero .page-hero-bg img {
  object-position: center 15%;
  filter: brightness(0.58);
  transform: scaleX(-1);
}

/* Work page: desaturated hero */
.work-hero .page-hero-bg img {
  filter: grayscale(1) brightness(0.58);
}

/* Services page: desaturated hero */
.services-hero .page-hero-bg img {
  filter: brightness(0.58);
}

/* Contact page: custom crop */
.contact-hero .page-hero-bg img {
  object-position: center 20%;
}


/* ============================================================
   7. BRANDS / LOGO ROW
   ============================================================
   Row of client logos on cream background.

   To add a logo: drop a PNG into images/logos/ and add an
   <img> tag inside .brands-row.
   ------------------------------------------------------------ */
#brands {
  padding: 64px 48px;
  border-top: 1px solid var(--light-border);
  border-bottom: 1px solid var(--light-border);
  text-align: center;
  background: var(--light-bg);
}

.brands-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a9aaa;
  margin-bottom: 40px;
}

.brands-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 55px;
}

.brands-row img {
  height: 80px;
  width: auto;
  opacity: 0.75;
  /* Converts logo to near-black regardless of original color */
  filter: brightness(0) saturate(100%) invert(7%) sepia(15%) saturate(900%) hue-rotate(180deg) brightness(95%);
  object-fit: contain;
}

/* ── Size overrides for specific logos ──
   Some logos need to be smaller to stay visually balanced.
   EDIT HERE: adjust height or add new overrides by alt text. */
.brands-row img[alt="GMP"],
.brands-row img[alt="Sēk Sauna Studio"] {
  height: 58px;
}


/* ============================================================
   8. PORTFOLIO PIECES GRID
   ============================================================
   2-column grid for video embeds on work detail pages
   (work/event.html, work/real-estate.html, etc.)

   Last odd piece spans full width but stays visually balanced.
   ------------------------------------------------------------ */
.pieces-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px 40px;
}

/* Last piece alone on a row: full-width but capped */
.pieces-grid .piece:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: 760px;
}

.pieces-grid .piece { margin-bottom: 0; }


/* ============================================================
   9. PORTFOLIO PAGE SHARED STYLES
   ============================================================
   Styles shared across all work detail pages (work/*.html).
   Includes: Vimeo embed wrapper, piece metadata, back link,
   CTA strip, and short-form vertical grid.
   ------------------------------------------------------------ */

/* ── Portfolio section padding ── */
.portfolio-pieces { padding: 64px 48px 120px; }

/* ── Vimeo video embed wrapper ──
   Responsive 2:1 aspect ratio container.
   To change aspect ratio, edit padding-bottom:
   - 50%    = 2:1 (current — wide cinematic)
   - 56.25% = 16:9 (standard video)
   - 177.78% = 9:16 (vertical/social)           */
.vimeo-wrap {
  position: relative;
  border-radius: 12px;
  padding-bottom: 50%;
  height: 0;
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 20px;
}

.vimeo-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* Vertical video override (9:16) */
.vimeo-wrap.vertical {
  padding-bottom: 177.78%;
  max-width: 380px;
}

/* Placeholder for videos not yet embedded */
.vimeo-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #0a1f35 0%, #1b3a5c 45%, #0e2538 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.vimeo-placeholder svg { width: 48px; height: 48px; opacity: 0.12; }
.vimeo-placeholder span { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #1a3550; }

/* ── Piece metadata (title + credits) ── */
.piece-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.piece-oneliner {
  font-size: 14px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.6;
  max-width: 640px;
}

.piece-credit {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--border);
  white-space: nowrap;
}

/* ── Back link ("← All work") ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 48px;
  transition: color 0.2s;
}

.back-link:hover { color: var(--accent-lt); }

/* ── Portfolio CTA strip ── */
.portfolio-cta {
  padding: 80px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.portfolio-cta-text h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 800;
  line-height: 0.97;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.portfolio-cta-text p {
  font-size: 15px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
  max-width: 440px;
}

/* ── Short-form / vertical video grid ── */
.short-form { padding: 0 48px 120px; }

.short-form-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
  padding-top: 64px;
  border-top: 1px solid var(--border);
}

.vertical-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 50%;
}

.vertical-grid .piece .vimeo-wrap { padding-bottom: 177.78%; }


/* ============================================================
   10. FOOTER
   ============================================================
   Three-part footer: logo, links, copyright.

   To update copyright year: edit the <span class="footer-copy">
   in the HTML.
   ------------------------------------------------------------ */
footer {
  padding: 36px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo img { height: 22px; width: auto; opacity: 0.5; }

.footer-copy {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.footer-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.footer-links a {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent-lt); }


/* ============================================================
   11. SCROLL REVEAL ANIMATIONS
   ============================================================
   Add class="reveal" to any element to fade-up on scroll.
   Add class="reveal-left" or "reveal-right" for directional.
   Triggered by IntersectionObserver in shared.js.
   ------------------------------------------------------------ */

/* Fade up */
.reveal {
  opacity: 0;
  translate: 0 36px;
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              translate 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  translate: 0 0;
}

/* Slide in from left */
.reveal-left {
  opacity: 0;
  translate: -60px 0;
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              translate 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-left.visible {
  opacity: 1;
  translate: 0 0;
}

/* Slide in from right */
.reveal-right {
  opacity: 0;
  translate: 60px 0;
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              translate 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 0.1s;
}
.reveal-right.visible {
  opacity: 1;
  translate: 0 0;
}


/* ============================================================
   12. MOBILE NAV (slide-in drawer)
   ============================================================ */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  position: relative;
  z-index: 300;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: #2a3a4a;
  transition: all 0.3s;
}

/* ── Drawer overlay (dim background) ── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 250;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav-overlay.open {
  display: block;
  opacity: 1;
}

/* ── Drawer panel ── */
.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  max-width: 85vw;
  background: var(--bg);
  z-index: 260;
  display: flex;
  flex-direction: column;
  padding: 28px 32px 40px;
  border-radius: 0 0 20px 0;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Suppress drawer transition on page load to prevent flash during navigation.
   Only applied at desktop widths — mobile needs the transition for the
   open/close animation. The 'preload' class is removed by JS after first paint. */
@media (min-width: 901px) {
  body.preload .nav-drawer,
  body.preload .nav-overlay {
    transition: none !important;
  }
}

.nav-drawer.open {
  transform: translateX(0);
}

/* Drawer header: logo left, X right */
.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
}

.nav-drawer-logo img {
  height: 30px;
  width: auto;
}

.nav-drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  line-height: 1;
  font-size: 24px;
  transition: color 0.2s;
}
.nav-drawer-close:hover { color: var(--text); }

/* Drawer link list */
.nav-drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-drawer-links li a {
  display: block;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}

.nav-drawer-links li:last-child a {
  border-bottom: none;
}

.nav-drawer-links li a:hover { color: var(--accent); }

/* Let's Talk — gold button directly below the links */
.nav-drawer-cta {
  margin-top: 28px;
}

.nav-drawer-cta a {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  padding: 16px 24px;
  border-radius: 100px;
  transition: background 0.15s, transform 0.15s;
}

.nav-drawer-cta a:hover {
  background: #a07a28;
  transform: scale(1.02);
}


/* ============================================================
   13. RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ── Tablet / Small Desktop (≤900px) ── */
@media (max-width: 900px) {
  /* Nav */
  nav { padding: 22px 24px; }

  /* Page hero */
  .page-hero { padding: 130px 24px 72px; }

  /* Brands */
  #brands { padding: 56px 24px; }
  .brands-row { gap: 37px; }
  .brands-row img { height: 58px; }

  /* Portfolio grid collapses to single column */
  .pieces-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .pieces-grid .piece:last-child:nth-child(odd) {
    grid-column: span 1;
    max-width: 100%;
  }

  /* Portfolio pages */
  .portfolio-pieces { padding: 48px 24px 80px; }
  .short-form { padding: 0 24px 80px; }
  .vertical-grid { grid-template-columns: repeat(2, 1fr); max-width: 100%; }
  .portfolio-cta { padding: 64px 24px; flex-direction: column; align-items: flex-start; }

  /* Desktop nav links hidden on mobile — drawer handles navigation */
  .nav-links { display: none; }
  .nav-toggle { display: flex; z-index: 300; }

  /* Footer stacks vertically */
  footer {
    padding: 28px 24px;
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .footer-links { justify-content: center; }
}

/* ── Phone (≤540px) ── */
@media (max-width: 540px) {
  .page-hero { padding: 110px 20px 48px; }
  .vertical-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .vertical-grid .piece .vimeo-wrap {
    max-width: 100%;
  }
}
