/* ==========================================================================
   Nova Beam Headlight Restoration — "Optic Lab"
   Design tokens and layout transcribed from design/design_handoff_nova_beam_site.
   ========================================================================== */

/* Space Grotesk, self-hosted rather than pulled from Google Fonts: same
   typeface, one fewer third-party connection on the critical path. A single
   variable file covers weights 400–700. SIL OFL 1.1 — see assets/fonts/OFL.txt. */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Surfaces */
  --c-bg:              #0d1016;
  --c-panel:           #11151d;
  --c-slider-after:    #0c1524;
  --c-slider-before:   #151310;

  /* Text */
  --c-text:            #dfe6ef;
  --c-text-secondary:  #96a2b5;
  --c-text-tertiary:   #aeb9ca;
  --c-mono:            #6b7685;
  --c-mono-bright:     #8a96a8;
  --c-mono-value:      #c6d2e2;
  --c-footer:          #5b6577;

  /* Accents */
  --c-accent:          #3aa0ff;
  --c-accent-deep:     #2a78d6;
  --c-accent-deep-hi:  #3486e6;
  --c-accent-light:    #9fd0ff;
  --c-accent-hover:    #7cc2ff;
  --c-on-accent:       #04121f;
  --c-warm:            #c9bd90;
  --c-error:           #e0765f;

  /* Lines and fills */
  --c-hairline:        rgba(255, 255, 255, .08);
  --c-hairline-strong: rgba(255, 255, 255, .1);
  --c-input-border:    rgba(255, 255, 255, .12);
  --c-tint-fill:       rgba(42, 120, 214, .07);
  --c-tint-border:     rgba(58, 160, 255, .2);
  --c-glow:            rgba(58, 160, 255, .7);
  --c-focus-ring:      rgba(58, 160, 255, .25);

  /* Type */
  --font-sans: 'Space Grotesk', sans-serif;
  --font-mono: ui-monospace, Menlo, monospace;

  /* Metrics */
  --gutter: 44px;
  --content-max: 1200px;
  --section-pad: 70px;
  --radius-sm: 2px;
  --radius-md: 4px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-text);
  font: 400 16px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, dl, dd, ol { margin: 0; }
ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }

/* Flex/grid `display` values below would otherwise beat the UA's [hidden] rule. */
[hidden] { display: none !important; }

a {
  color: var(--c-accent);
  text-decoration: none;
}

a:hover { color: var(--c-accent-hover); }

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

.shell {
  width: 100%;
  max-width: calc(var(--content-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--c-accent);
  color: var(--c-on-accent);
  font: 600 13px var(--font-sans);
  border-radius: var(--radius-sm);
  transition: top .15s ease-out;
}

.skip-link:focus {
  top: 8px;
  color: var(--c-on-accent);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header { border-bottom: 1px solid var(--c-hairline); }

.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-block: 20px;
}

.brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
}

/* The lockup is ~3.59:1, so width drives the size and height follows. */
.brand__logo {
  width: 190px;
  height: auto;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-header__area {
  font: 400 12px var(--font-mono);
  color: var(--c-mono-bright);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  border: 0;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background-color .15s ease-out;
}

.btn--phone {
  padding: 8px 16px;
  background: var(--c-accent-deep);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* "CALL OR TEXT" rides ahead of the number as a quieter mono lede. */
.btn__lede {
  font: 400 11px var(--font-mono);
  letter-spacing: .06em;
  opacity: .85;
}

.btn--phone:hover,
.btn--phone:focus-visible {
  background: var(--c-accent-deep-hi);
  color: #fff;
}

.btn--submit {
  width: 100%;
  padding: 14px;
  background: var(--c-accent);
  color: var(--c-on-accent);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.btn--submit:hover:not(:disabled) { background: var(--c-accent-hover); }
.btn--submit:active:not(:disabled) { background: var(--c-accent-deep-hi); }

.btn--submit:disabled {
  opacity: .6;
  cursor: progress;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-block: 64px 30px;
}

.eyebrow {
  font: 400 12px var(--font-mono);
  letter-spacing: .2em;
  color: var(--c-accent);
  text-wrap: balance;
}

.hero__headline {
  max-width: 760px;
  font: 600 52px/1.08 var(--font-sans);
  letter-spacing: -.01em;
  text-wrap: balance;
}

.hero__body {
  max-width: 600px;
  font: 400 17px/1.65 var(--font-sans);
  color: var(--c-text-secondary);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Before / after comparison
   -------------------------------------------------------------------------- */

.compare-section { margin-top: 24px; }

.compare {
  position: relative;
  height: 520px;
  border: 1px solid var(--c-hairline-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Both layers occupy the exact same box; the before layer is masked with
   clip-path rather than resized, so the two photos stay in register. */
.compare__layer {
  position: absolute;
  inset: 0;
}

.compare__layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.compare__layer--after { background: var(--c-slider-after); }

.compare__layer--before {
  background: var(--c-slider-before);
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
}

.compare__input {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: ew-resize;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
}

.compare__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  z-index: 4;
  width: 2px;
  background: var(--c-accent);
  pointer-events: none;
}

.compare__handle {
  position: absolute;
  top: 50%;
  left: var(--split);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-on-accent);
  font: 700 12px var(--font-mono);
  box-shadow: 0 0 20px var(--c-glow);
  pointer-events: none;
}

/* The range input is invisible, so surface its focus on the handle instead. */
.compare__input:focus-visible ~ .compare__handle {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.compare__tag {
  position: absolute;
  top: 14px;
  z-index: 4;
  padding: 5px 10px;
  background: rgba(0, 0, 0, .5);
  border-radius: var(--radius-sm);
  font: 600 11px var(--font-mono);
  letter-spacing: .2em;
  pointer-events: none;
}

.compare__tag--before {
  left: 16px;
  color: var(--c-warm);
}

.compare__tag--after {
  right: 16px;
  color: var(--c-accent-light);
}

/* --------------------------------------------------------------------------
   Spec strip
   -------------------------------------------------------------------------- */

.specs-section { margin-top: 20px; }

.specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--c-hairline-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.specs__cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 22px;
  border-right: 1px solid var(--c-hairline);
}

.specs__cell:last-child { border-right: 0; }

.specs__label {
  font: 400 11px var(--font-mono);
  color: var(--c-mono);
}

/* The mock specified 22px, but "3M UV Extreme Coating" and "Mobile — we come
   to you" both wrap at the 1200px content width, leaving the strip ragged.
   The handoff sanctions sizing the value down for fit; 19px keeps all four
   cells on one line and the row uniform. */
.specs__value {
  font: 600 19px var(--font-sans);
  margin: 0;
}

.specs__value--accent { color: var(--c-accent); }

/* --------------------------------------------------------------------------
   Procedure
   -------------------------------------------------------------------------- */

.procedure__inner {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  padding-block: var(--section-pad);
}

.procedure__intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-heading {
  font: 600 32px var(--font-sans);
  letter-spacing: -.01em;
}

.procedure__blurb {
  font: 400 15px/1.6 var(--font-sans);
  color: var(--c-text-secondary);
}

.steps {
  display: flex;
  flex-direction: column;
}

.steps__row {
  display: grid;
  grid-template-columns: 70px 220px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--c-hairline-strong);
}

.steps__row:last-child { border-bottom: 1px solid var(--c-hairline-strong); }

.steps__code {
  font: 400 12px var(--font-mono);
  color: var(--c-accent);
}

.steps__name { font: 600 16px var(--font-sans); }

.steps__desc {
  font: 400 14px/1.6 var(--font-sans);
  color: var(--c-text-secondary);
}

/* --------------------------------------------------------------------------
   Why restore
   -------------------------------------------------------------------------- */

.why {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  padding: 44px;
  background: var(--c-tint-fill);
  border: 1px solid var(--c-tint-border);
  border-radius: var(--radius-md);
}

.why__cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.why__title {
  font: 600 17px var(--font-sans);
  color: var(--c-accent-light);
}

.why__body {
  font: 400 14px/1.6 var(--font-sans);
  color: var(--c-text-tertiary);
}

/* --------------------------------------------------------------------------
   Booking
   -------------------------------------------------------------------------- */

.booking__inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 56px;
  align-items: start;
  padding-block: var(--section-pad);
}

.booking__intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.booking__heading {
  font: 600 34px var(--font-sans);
  letter-spacing: -.01em;
}

.booking__blurb {
  font: 400 15px/1.7 var(--font-sans);
  color: var(--c-text-secondary);
}

.booking__emphasis {
  font-weight: 600;
  color: var(--c-accent-light);
}

.contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  font: 400 14px var(--font-mono);
  color: var(--c-mono-value);
}

.contact__row {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: baseline;
}

.contact__label { color: var(--c-mono-value); }
.contact__value { margin: 0; }

.contact__value a { color: var(--c-mono-value); }
.contact__value a:hover { color: var(--c-accent-hover); }

.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.honeypot { display: none; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__input {
  width: 100%;
  padding: 13px 15px;
  background: var(--c-panel);
  border: 1px solid var(--c-input-border);
  border-radius: var(--radius-sm);
  color: var(--c-text);
  font: 400 14px var(--font-sans);
  outline: none;
  transition: border-color .15s ease-out, box-shadow .15s ease-out;
}

.field__input::placeholder {
  color: var(--c-mono);
  opacity: 1;
}

.field__input:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 2px var(--c-focus-ring);
}

.field__input[aria-invalid='true'] { border-color: var(--c-error); }

.field__input[aria-invalid='true']:focus {
  box-shadow: 0 0 0 2px rgba(224, 118, 95, .25);
}

.field__error {
  font: 400 13px/1.4 var(--font-sans);
  color: var(--c-error);
}

.form__status {
  font: 400 13px/1.5 var(--font-sans);
  color: var(--c-error);
}

.form__status[data-tone='info'] { color: var(--c-text-secondary); }

.form__rescue {
  align-self: flex-start;
  font: 600 14px var(--font-sans);
}

.form-success {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px;
  background: var(--c-tint-fill);
  border: 1px solid var(--c-tint-border);
  border-radius: var(--radius-md);
}

.form-success__title {
  font: 600 17px var(--font-sans);
  color: var(--c-accent-light);
}

.form-success__body {
  font: 400 14px/1.6 var(--font-sans);
  color: var(--c-text-tertiary);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--c-hairline); }

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
  font: 400 11px var(--font-mono);
  color: var(--c-footer);
}

.site-footer__link { color: inherit; }
.site-footer__link:hover { color: var(--c-accent-hover); }

/* --------------------------------------------------------------------------
   Sticky call bar (small screens only)
   -------------------------------------------------------------------------- */

.call-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  gap: 10px;
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
  background: rgba(13, 16, 22, .94);
  border-top: 1px solid var(--c-hairline);
  backdrop-filter: blur(8px);
}

.call-bar__btn {
  flex: 1;
  padding: 13px 12px;
  border-radius: var(--radius-sm);
  font: 600 14px var(--font-sans);
  text-align: center;
}

.call-bar__btn--call {
  background: var(--c-accent);
  color: var(--c-on-accent);
}

.call-bar__btn--call:hover { color: var(--c-on-accent); }

.call-bar__btn--text {
  background: transparent;
  border: 1px solid var(--c-accent);
  color: var(--c-accent);
}

.call-bar__btn--book {
  flex: 0 0 86px;
  background: transparent;
  border: 1px solid var(--c-input-border);
  color: var(--c-text);
}

/* --------------------------------------------------------------------------
   Scroll reveals
   -------------------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s cubic-bezier(.16, 1, .3, 1), transform .5s cubic-bezier(.16, 1, .3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  * {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   Responsive — the prototype is desktop-only; breakpoints below follow the
   handoff's recommendations.
   -------------------------------------------------------------------------- */

@media (max-width: 1000px) {
  :root {
    --gutter: 28px;
    --section-pad: 56px;
  }

  .hero__headline { font-size: 44px; }

  /* The service-area line is too long to sit beside the logo and the phone
     button below this width — the booking copy still states the area. */
  .site-header__area { display: none; }

  .specs { grid-template-columns: repeat(2, 1fr); }

  .specs__cell:nth-child(2n) { border-right: 0; }
  .specs__cell:nth-child(n + 3) { border-top: 1px solid var(--c-hairline); }

  .procedure__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .why { grid-template-columns: 1fr; }

  .booking__inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .compare { height: 420px; }
}

@media (max-width: 700px) {
  :root {
    --gutter: 20px;
    --section-pad: 48px;
  }

  body { padding-bottom: 72px; }

  .brand__logo { width: 148px; }

  /* No room for the lede next to the logo — the sticky bar below carries
     explicit Call and Text buttons at this size. */
  .btn__lede { display: none; }

  .site-header__inner { padding-block: 14px; }

  .hero__inner { padding-block: 40px 24px; }
  .hero__headline { font-size: 34px; }
  .hero__body { font-size: 16px; }

  .compare { height: 300px; }

  .specs__cell { padding: 16px; }
  .specs__value { font-size: 17px; }

  .steps__row {
    grid-template-columns: 60px 1fr;
    gap: 8px 16px;
  }

  .steps__desc { grid-column: 1 / -1; }

  .why { padding: 28px; }

  .booking__heading { font-size: 28px; }

  .site-footer__inner {
    flex-direction: column;
    gap: 6px;
  }

  .call-bar { display: flex; }
}

@media (max-width: 380px) {
  .brand__logo { width: 124px; }
  .btn--phone { padding: 8px 12px; }
}
