/* =========================================================
   LocaVisio – Design System
   Built on the LocaVisio brand palette (Brand Black + Brand Blue).
   ========================================================= */

:root {
  /* Brand */
  --color-brand-black: #1f1f1f;
  --color-brand-blue:  #2e6dff;

  /* Neutrals */
  --color-white:    #FFFFFF;
  --color-gray-50:  #F4F6F8;
  --color-gray-200: #E5E7EB;
  --color-gray-500: #6B7280;
  --color-gray-900: #111827;

  /* Aliases used throughout this stylesheet */
  --bg:        var(--color-gray-50);    /* light surface */
  --bg-elev:   var(--color-white);      /* elevated white */
  --bg-deep:   var(--color-gray-900);   /* near-black for dark sections */
  --ink:       var(--color-brand-black);/* primary text — Brand Black */
  --ink-mute:  var(--color-gray-500);   /* muted greys, eyebrows */
  --line:      var(--color-gray-200);   /* dividers */
  --accent:    var(--color-brand-blue); /* Brand Blue */

  --max-w:     1280px;
  --pad-x:     clamp(20px, 4vw, 56px);

  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 32px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur-1: .35s;
  --dur-2: .6s;
  --dur-3: 1.1s;

  --font-sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* -------- Reset -------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--ink); color: var(--bg); }

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

/* -------- Layout helpers -------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.section {
  position: relative;
  z-index: 2;
  background: var(--bg);
  padding-block: clamp(80px, 12vw, 160px);
}

/* The first section after .hero curves over the video for a smooth transition */
.intro {
  margin-top: -32px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding-top: clamp(96px, 14vw, 200px);
  padding-bottom: clamp(56px, 7vw, 96px);
  box-shadow: 0 -30px 60px -30px rgba(10, 10, 10, .25);
}

/* Tighten the gap into the first content section (otherwise intro-bottom + work-top padding doubles up) */
.work { padding-top: clamp(56px, 7vw, 96px); }

.section-eyebrow {
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 24px;
}
.section-head { margin-bottom: clamp(48px, 8vw, 96px); }
.section-title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -.03em;
  margin: 0;
  color: var(--ink);
}

/* =========================================================
   HERO VIDEO LAYER
   ========================================================= */
.hero-video-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg-deep);
}
.hero-video-fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 30% 20%, var(--accent) 0%, transparent 55%),
    radial-gradient(120% 80% at 80% 80%, var(--ink) 0%, transparent 60%),
    linear-gradient(180deg, var(--ink) 0%, var(--bg-deep) 100%);
  z-index: 0;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
  will-change: opacity, transform;
}
.hero-video.is-ready { opacity: 1; }
.hero-video-tint {
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(180deg, rgba(10,10,10,.45) 0%, rgba(10,10,10,.30) 30%, rgba(10,10,10,.55) 65%, rgba(10,10,10,.85) 100%);
  pointer-events: none;
}

/* =========================================================
   NAV
   ========================================================= */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding-block: 18px;
  transition: background-color var(--dur-1) var(--ease),
              backdrop-filter var(--dur-1) var(--ease),
              padding var(--dur-1) var(--ease),
              box-shadow var(--dur-1) var(--ease);
  color: #fff;
}
.site-nav.is-scrolled {
  background: rgba(244, 246, 248, .92);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  color: var(--ink);
  padding-block: 12px;
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  height: 40px;
}
.nav-logo img {
  height: 100%;
  width: auto;
  transition: filter var(--dur-1) var(--ease);
  filter: brightness(0) invert(1);
}
.site-nav.is-scrolled .nav-logo img { filter: none; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: .9375rem;
  font-weight: 500;
}
.nav-list a {
  position: relative;
  padding-block: 6px;
  transition: opacity var(--dur-1) var(--ease);
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transition: right var(--dur-1) var(--ease);
}
.nav-list a:hover::after,
.nav-list a:focus-visible::after { right: 0; }
.nav-cta {
  border: 1px solid currentColor;
  padding: 8px 16px !important;
  border-radius: 999px;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: currentColor; color: var(--bg); }
.site-nav.is-scrolled .nav-cta:hover { color: var(--bg); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 8px; right: 8px; height: 1.5px;
  background: currentColor;
  transition: transform var(--dur-1) var(--ease), top var(--dur-1) var(--ease);
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 23px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { top: 19px; transform: rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: clamp(96px, 14vh, 140px) var(--pad-x) clamp(80px, 12vw, 140px);
  color: #fff;
  background: transparent;
}
.hero-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  margin-top: auto; /* push content to the bottom, but collapse safely on short screens so it never slides behind the nav */
  width: 100%;
  padding-bottom: 4vh;
}
.hero-eyebrow {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0 0 32px;
  opacity: 1;
}
.hero-title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(2.25rem, 5.2vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -.025em;
  max-width: 16ch;
  margin: 0 0 18px;
}
/* Brand claim under the headline – keeps the recognizable two-tone wordmark feel */
.hero-claim {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -.03em;
  text-transform: lowercase;
  margin: 0 0 28px;
}
.hero-claim .claim-accent { color: var(--accent); }
.hero-sub {
  font-size: clamp(1.0625rem, 1.6vw, 1.375rem);
  max-width: 540px;
  margin: 0 0 40px;
  opacity: .92;
  font-weight: 400;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform var(--dur-1) var(--ease),
              background var(--dur-1) var(--ease),
              color var(--dur-1) var(--ease),
              border-color var(--dur-1) var(--ease);
  will-change: transform;
}
.btn svg { transition: transform var(--dur-1) var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #fff; color: var(--ink); }
.btn-ghost {
  border: 1px solid rgba(255,255,255,.45);
  color: #fff;
}
.btn-ghost:hover { background: rgba(255,255,255,.10); border-color: #fff; }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: .75;
}
.scroll-indicator .dot {
  width: 2px;
  height: 38px;
  background: linear-gradient(180deg, currentColor 0%, transparent 100%);
  animation: scrollDot 2.4s var(--ease) infinite;
}

/* =========================================================
   INTRO
   ========================================================= */
.intro-headline {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -.03em;
  margin: 0 0 32px;
  max-width: 22ch;
  color: var(--ink);
}
.intro-body {
  max-width: 56ch;
  font-size: 1.125rem;
  color: var(--ink);
  margin: 0;
}

/* =========================================================
   WORK
   ========================================================= */
.work-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-block: clamp(48px, 8vw, 96px);
}
@media (min-width: 900px) {
  .work-card {
    grid-template-columns: 7fr 4fr;
    gap: 64px;
    align-items: center;
  }
  .work-card--rev {
    grid-template-columns: 4fr 7fr;
  }
  .work-card--rev .work-media { order: 2; }
  .work-card--rev .work-meta { order: 1; }
}
.work-media {
  position: relative;
  background: var(--bg-elev);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow:
    0 1px 0 var(--line),
    0 24px 60px -24px rgba(10,10,10,.25);
  aspect-ratio: 4 / 5;
}
.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.work-card:hover .work-media img { transform: scale(1.025); }
.work-tag {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 16px;
}
.work-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  margin: 0 0 20px;
  color: var(--ink);
}
.work-text {
  font-size: 1.0625rem;
  color: var(--ink);
  margin: 0 0 24px;
  max-width: 38ch;
}
.work-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: gap var(--dur-1) var(--ease);
}
.work-link a:hover { gap: 14px; }

/* =========================================================
   SERVICES
   ========================================================= */
.services { background: var(--bg-deep); color: #fff; }
.services .section-eyebrow { color: rgba(255,255,255,.55); }
.services .section-title { color: #fff; }

.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 768px) {
  .service-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}
.service-card {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--r-md);
  padding: 40px 32px;
  background: linear-gradient(180deg, rgba(255,255,255,.025), transparent);
  transition: border-color var(--dur-1) var(--ease), transform var(--dur-2) var(--ease);
}
.service-card:hover { border-color: rgba(255,255,255,.35); transform: translateY(-4px); }
.service-num {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 32px;
  letter-spacing: -.04em;
}
.service-name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.625rem;
  margin: 0 0 16px;
  letter-spacing: -.02em;
}
.service-text { color: rgba(255,255,255,.72); margin: 0; font-size: 1rem; }

/* =========================================================
   STORY
   ========================================================= */
.story-grid {
  display: grid;
  gap: 48px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .story-grid { grid-template-columns: 8fr 3fr; gap: 96px; align-items: end; }
}
.story-quote {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.625rem, 3.4vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--ink);
}
.story-quote p { margin: 0 0 24px; }
.story-quote .quote-mark { color: var(--accent); }
.story-quote footer {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: .9375rem;
  letter-spacing: .04em;
  color: var(--ink-mute);
}
.meta-list {
  display: grid;
  gap: 24px;
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.meta-list > div { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.meta-list dt { color: var(--ink-mute); font-size: .875rem; font-weight: 500; letter-spacing: .04em; }
.meta-list dd { margin: 0; font-weight: 600; font-size: .9375rem; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact { background: var(--bg-deep); color: #fff; padding-block: clamp(96px, 14vw, 180px); }
.contact-eyebrow { color: rgba(255,255,255,.55); }
.contact-headline {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(3rem, 9vw, 8rem);
  letter-spacing: -.04em;
  line-height: .95;
  margin: 0 0 32px;
}
.contact-sub {
  max-width: 52ch;
  font-size: 1.125rem;
  color: rgba(255,255,255,.72);
  margin: 0 0 56px;
}
.contact-mail {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.625rem, 3.6vw, 2.75rem);
  letter-spacing: -.02em;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.20);
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), gap var(--dur-1) var(--ease);
}
.contact-mail:hover { color: var(--accent); border-color: var(--accent); gap: 22px; }
.contact-mail svg { transition: transform var(--dur-1) var(--ease); }
.contact-mail:hover svg { transform: translate(3px, -3px); }
.contact-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin: 80px 0 0;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.12);
}
@media (min-width: 768px) {
  .contact-meta { grid-template-columns: repeat(2, 1fr); gap: 48px; }
}
.contact-meta dt {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 12px;
}
.contact-meta dd { margin: 0; font-size: 1.0625rem; line-height: 1.5; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--bg-deep);
  color: rgba(255,255,255,.55);
  padding-block: 28px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .875rem;
  position: relative;
  z-index: 2;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-brand { margin: 0; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { transition: color var(--dur-1) var(--ease); }
.footer-links a:hover { color: #fff; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
  .nav-list { display: none; }
  .nav-toggle { display: block; }

  .site-nav.is-open .nav-list {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px var(--pad-x) 24px;
    background: rgba(244, 246, 248, .96);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    color: var(--ink);
    border-top: 1px solid var(--line);
  }
  .site-nav.is-open .nav-list a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .site-nav.is-open .nav-list a::after { display: none; }
  .site-nav.is-open .nav-list a.nav-cta { border: 1px solid var(--ink); margin-top: 12px; text-align: center; padding: 14px 16px !important; }
}

@media (max-width: 600px) {
  .hero { padding-bottom: 96px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .scroll-indicator { display: none; }
  .work-card { margin-block: 48px; }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .hero-video { display: none; }
  .hero-video-fallback {
    background:
      linear-gradient(180deg, var(--ink) 0%, var(--bg-deep) 100%);
  }
}
