/* The Nap Group — single-page site. Black, full-bleed, SpaceX-inspired. */

@font-face { font-family: 'D-DIN'; src: url('/assets/fonts/D-DIN.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'D-DIN'; src: url('/assets/fonts/D-DIN-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --black: #000;
  --white: #fff;
  --muted: rgba(255, 255, 255, .68);
  --line: rgba(255, 255, 255, .22);
  --pad: clamp(24px, 5vw, 80px);
  --max: 1360px;
  --header-h: 104px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: 'D-DIN', 'DIN Alternate', 'Arial Narrow', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, p, figure { margin: 0; }
section[id], div[id] { scroll-margin-top: var(--header-h); }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 12px 16px; background: var(--white); color: var(--black); }
.skip-link:focus { left: 16px; top: 16px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- Type ---------- */
.eyebrow {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--white);
}
.display, .headline {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.02;
}
.display { font-size: clamp(40px, 6.2vw, 84px); }
.headline { font-size: clamp(30px, 3.6vw, 52px); }
.copy { font-size: 17px; line-height: 1.7; color: var(--muted); max-width: 34em; font-style: normal; }

/* ---------- Button: thin white outline, fills white on hover ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 50px;
  padding: 0 26px;
  border: 1px solid var(--white);
  border-radius: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease;
}
.btn:hover, .btn:focus-visible { background: var(--white); color: var(--black); }
.btn:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.btn-arrow { position: relative; width: 16px; height: 1px; background: currentColor; }
.btn-arrow::after {
  content: ''; position: absolute; right: 0; top: -3px; width: 7px; height: 7px;
  border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--pad);
  background: linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
  transition: background-color .3s ease, height .3s ease;
}
.site-header.is-scrolled { background: rgba(0, 0, 0, .92); --header-h: 80px; }
.site-logo { display: block; flex: none; padding: 8px 0; }
.site-logo img { width: 280px; height: auto; transition: width .3s ease; }
.site-header.is-scrolled .site-logo img { width: 230px; }
.site-nav { display: flex; gap: 40px; }
.site-nav a {
  font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
  padding: 6px 0; border-bottom: 1px solid transparent; transition: border-color .2s ease;
}
.site-nav a:hover { border-bottom-color: var(--white); }

/* Hamburger + full-screen mobile menu */
.menu-toggle { display: none; position: relative; width: 48px; height: 48px; margin-right: -12px; padding: 0; border: 0; background: transparent; color: var(--white); cursor: pointer; }
.menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after { position: absolute; left: 12px; width: 24px; height: 1.5px; background: currentColor; transition: transform .3s ease, opacity .2s ease; }
.menu-toggle-bars { top: 50%; }
.menu-toggle-bars::before, .menu-toggle-bars::after { content: ''; left: 0; }
.menu-toggle-bars::before { top: -7px; }
.menu-toggle-bars::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before { transform: translateY(7px) rotate(45deg); background: var(--white); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); background: var(--white); }
.mobile-menu { position: fixed; inset: 0; z-index: 40; background: var(--black); padding: calc(var(--header-h) + 24px) var(--pad) 40px; overflow-y: auto; opacity: 0; transition: opacity .25s ease; }
.mobile-menu.is-open { opacity: 1; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu a { display: block; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); font-size: 22px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.mobile-menu a.sub { padding: 12px 0 12px 20px; font-size: 15px; font-weight: 400; letter-spacing: .18em; color: var(--muted); }
.menu-open, .menu-open body { overflow: hidden; }
.menu-open .site-header { background: var(--black); }

/* Down-arrow "next section" buttons */
.scroll-next {
  position: absolute; left: 50%; bottom: 28px; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-left: -24px;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 50%;
  color: var(--white); text-decoration: none;
  transition: border-color .25s ease, background-color .25s ease, color .25s ease;
}
.scroll-next:hover, .scroll-next:focus-visible { border-color: var(--white); background: var(--white); color: var(--black); }
.scroll-next:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.chevron { width: 10px; height: 10px; margin-top: -5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); animation: nap-bob 2.2s ease-in-out infinite; }
@keyframes nap-bob { 0%, 100% { translate: 0 -2px; } 50% { translate: 0 4px; } }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: var(--black); }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .75) 0%, rgba(0, 0, 0, 0) 45%), linear-gradient(to right, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 60%); }
.hero-content {
  position: absolute; left: 0; right: 0; bottom: clamp(100px, 15vh, 150px);
  max-width: var(--max); margin: 0 auto; padding: 0 var(--pad);
}
.hero-content .eyebrow { margin-bottom: 18px; }
.hero-content .display { max-width: 9.5em; margin-bottom: 36px; }

/* ---------- Companies ---------- */
.intro { position: relative; padding: clamp(120px, 18vh, 200px) 0 clamp(120px, 16vh, 180px); }
.intro .eyebrow { margin-bottom: 24px; color: var(--muted); }
.intro-title { font-size: clamp(34px, 5.6vw, 80px); }

.company { position: relative; display: flex; align-items: center; padding: 56px 0 96px; border-top: 1px solid rgba(255, 255, 255, .08); overflow: hidden; }
.company-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: clamp(40px, 6vw, 120px); }
.company-text .eyebrow { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.company-index { color: var(--muted); padding-right: 16px; border-right: 1px solid var(--line); }
.company-name { font-size: 15px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.company-text .headline { max-width: 13em; margin-bottom: 28px; }
.company-text .copy { margin-bottom: 40px; }
.company-mark { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; }
.company-mark::before {
  content: ''; position: absolute; inset: -10%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .10), rgba(255, 255, 255, .03) 55%, rgba(255, 255, 255, 0) 75%);
}
.company-mark img { position: relative; width: 62%; height: 62%; object-fit: contain; }

/* ---------- Cities ---------- */
.cities { display: flex; height: clamp(360px, 68vh, 640px); background: var(--black); }
.city { position: relative; flex: 1 1 50%; min-width: 0; overflow: hidden; }
.city img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; filter: saturate(.9); }
.city-sf img { object-position: 50% 30%; }
.city::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 40%); pointer-events: none; }
.city figcaption { position: absolute; left: var(--pad); bottom: 32px; z-index: 1; font-weight: 700; }
.city + .city { border-left: 1px solid var(--black); }

/* ---------- Offices ---------- */
.offices { padding: clamp(100px, 16vh, 180px) 0 clamp(64px, 10vh, 120px); }
.offices-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 6vw, 120px); }
.office { padding-top: 32px; border-top: 1px solid var(--line); }
.office .eyebrow { margin-bottom: 20px; color: var(--muted); }
.office .headline { margin-bottom: 20px; }
.office address { color: var(--white); font-size: 18px; letter-spacing: .02em; }

/* ---------- Contact ---------- */
.contact-section { padding: clamp(64px, 10vh, 120px) 0 clamp(100px, 16vh, 180px); }
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 8vw, 140px); align-items: start; padding-top: 32px; border-top: 1px solid var(--line); }
.contact-intro .eyebrow { margin-bottom: 20px; color: var(--muted); }

.contact-form { display: grid; gap: 28px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field label.caption, .field label.title { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.description.required { margin-left: 4px; color: var(--muted); }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form select, .contact-form textarea {
  width: 100%; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: transparent; color: var(--white); font: inherit; font-size: 17px; outline: none;
  transition: border-color .2s ease;
}
.contact-form textarea { resize: vertical; min-height: 132px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-bottom-color: var(--white); }
.contact-form [aria-invalid="true"] { border-bottom-color: #ff6b6b; }
.select-wrap { position: relative; }
.contact-form select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer; }
.contact-form select option { background: #111; color: var(--white); }
.select-wrap::after { content: ''; position: absolute; right: 6px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 1px solid var(--white); border-bottom: 1px solid var(--white); transform: rotate(45deg); pointer-events: none; }
.checkbox { display: inline-flex; align-items: center; gap: 12px; margin-top: 10px; padding: 8px 0; min-height: 44px; font-size: 14px; color: var(--muted); cursor: pointer; }
.checkbox input { width: 16px; height: 16px; margin: 0; accent-color: var(--white); }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-button-wrapper { padding-top: 8px; }
.btn-submit { min-width: 180px; justify-content: center; }
form[data-contact-form] button[disabled] { opacity: .6; cursor: default; }
.nap-field-error { color: #ff8a8a; font-size: 13px; letter-spacing: .02em; margin: 0 0 8px; }
.form-button-wrapper .nap-field-error { margin: 0 0 12px; }
.sqs-form-block-submission-html { display: none; }
.sqs-form-block-submission-html p { font-size: 22px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid rgba(255, 255, 255, .1); padding: 36px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-footer p, .site-footer a { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.site-footer nav { display: flex; gap: 8px 32px; flex-wrap: wrap; }
.site-footer nav a { display: inline-block; padding: 14px 0; }
.site-footer a:hover { color: var(--white); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .company-mark.reveal { transition-delay: .15s; }

/* ---------- Tablet ---------- */
@media (max-width: 899px) {
  :root { --header-h: 76px; }
  .site-header.is-scrolled { --header-h: 64px; }
  .site-logo img, .site-header.is-scrolled .site-logo img { width: 220px; }
  .site-nav { display: none; }
  .menu-toggle { display: block; }
  .company { padding: 64px 0 104px; }
  .company-grid { gap: 48px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .site-logo img, .site-header.is-scrolled .site-logo img { width: 200px; }
  .copy { font-size: 16px; }
  .display { font-size: clamp(34px, 10vw, 48px); }
  .headline { font-size: clamp(26px, 7.6vw, 36px); }
  .intro-title { font-size: clamp(30px, 9vw, 44px); }
  .hero-content { bottom: 116px; }
  .hero-content .display { margin-bottom: 28px; }
  .scroll-next { bottom: 24px; width: 44px; height: 44px; margin-left: -22px; }

  .intro { padding: 96px 0 120px; }
  .company { padding: 36px 0 80px; }
  .company .scroll-next { bottom: 16px; }
  .company-grid { grid-template-columns: 1fr; gap: 32px; }
  .company-mark { order: -1; width: 52%; max-width: 220px; }
  .company-text .eyebrow { margin-bottom: 18px; }
  .company-text .headline { margin-bottom: 20px; }
  .company-text .copy { margin-bottom: 32px; }

  .cities { flex-direction: column; height: auto; }
  .city { flex: none; height: 38vh; min-height: 220px; max-height: 360px; }
  .city + .city { border-left: 0; border-top: 1px solid var(--black); }
  .city figcaption { bottom: 18px; }

  .offices { padding: 80px 0 48px; }
  .offices-grid { grid-template-columns: 1fr; gap: 48px; }
  .office address { font-size: 17px; }
  .contact-section { padding: 48px 0 96px; }
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .form-row { grid-template-columns: 1fr; gap: 28px; }
  .btn { min-height: 52px; }
  .btn-submit { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 374px) {
  .site-logo img, .site-header.is-scrolled .site-logo img { width: 176px; }
  .mobile-menu a { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .chevron { animation: none; }
}
