/* ==========================================================================
   AirClear marketing site
   Values translated from the Claude Design handoff (AirClear Website Final.dc.html)
   and the AirClear design-system tokens. Locked to the light palette.
   ========================================================================== */

:root {
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Light palette (marketing site is locked to light) */
  --ac-app-bg: #ffffff;
  --ac-app-bg-2: #f3f5f8;
  --ac-card: #ffffff;
  --ac-text: #15181d;
  --ac-muted: #333a42;   /* darkened per handoff for marketing readability */
  --ac-faint: #5f6772;
  --ac-border: #e4e8ee;
  --ac-field: #d9dee5;

  --ac-accent: #0a84ff;
  --ac-accent-hover: #0668cc;
  --ac-accent-soft: rgba(10, 132, 255, 0.10);

  --ac-ink: #15181d;     /* dark surfaces (phone frames, coverage band, badges) */

  --shadow-accent: 0 8px 20px rgba(10, 132, 255, 0.30);

  --frame: 1240px;       /* design card width */
  --gutter: 64px;        /* design horizontal padding */

  /* Phone-frame system. Every phone frame shares these ratios, so the border
     thickness and corner radius are mathematically identical across all sizes.
     Each frame only sets its own width via --pw; padding, outer radius and the
     inner screen radius are all derived from it. Screen ratio = radius - pad,
     which keeps the screen perfectly concentric inside the bezel. */
  --phone-pad-ratio: 0.04;     /* bezel thickness as a fraction of width */
  --phone-radius-ratio: 0.17;  /* outer corner radius / width */
  --phone-screen-ratio: 0.13;  /* inner (screen) radius / width = 0.17 - 0.04 */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ac-text);
  background: var(--ac-app-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }

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

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

/* ============================== Header ============================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--ac-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ac-text);
}
.brand:hover { color: var(--ac-text); }
.brand-wordmark {
  height: 34px;
  width: auto;
  display: block;
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--ac-muted);
}
.nav-link:hover { color: var(--ac-text); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  background: var(--ac-accent-soft);
  color: var(--ac-accent);
  font-size: 14px;
  font-weight: 800;
  border-radius: 12px;
}
.nav-cta:hover { color: var(--ac-accent); background: rgba(10, 132, 255, 0.16); }

/* ============================== Hero ============================== */
.hero {
  position: relative;
  /* Clip horizontally so the off-frame phone can't cause h-scroll, but leave
     the vertical axis visible so the phone's drop shadow fades into the next
     section instead of being sliced off in a hard seam. */
  overflow-x: clip;
  background: var(--ac-app-bg-2);
  padding-bottom: 140px;
}
.hero-field {
  background: var(--ac-accent);
  clip-path: polygon(0 0, 100% 0, 100% 74%, 0 100%);
  padding: 64px 0 190px;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 560px;
}
.hero-title {
  margin: 0;
  font-size: 64px;
  line-height: 1.02;
  letter-spacing: -1.9px;
  font-weight: 800;
  color: #ffffff;
}
.hero-sub {
  margin: 0;
  max-width: 480px;
  font-size: 19px;
  line-height: 1.45;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

/* Waitlist card */
.waitlist-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 22px 22px 22px 22px;
  box-shadow: 0 18px 44px rgba(6, 54, 102, 0.35);
  max-width: 520px;
  width: 100%;
}
.waitlist-eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--ac-accent);
  margin-bottom: 12px;
}
.waitlist-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.waitlist-submit { width: 190px; flex: none; }
.waitlist-msg {
  font-size: 13px;
  font-weight: 700;
  padding: 12px 0 0 2px;
}

/* Field + Button (from design-system TextField / Button) */
.field {
  height: 54px;
  width: 100%;
  flex: 1 1 0;
  min-width: 0;
  border: 2px solid var(--ac-field);
  border-radius: 14px;
  padding: 0 16px;
  font-size: 15px;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--ac-text);
  background: var(--ac-card);
  outline: none;
  transition: border-color 0.15s ease;
}
.field::placeholder { color: var(--ac-faint); }
.field:focus { border-color: var(--ac-accent); }

.btn {
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  border-radius: 16px;
  padding: 0 24px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.btn-primary {
  background: var(--ac-accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover { background: var(--ac-accent-hover); }
.btn:disabled { opacity: 0.5; cursor: default; }

/* Hero phone + floating alert, positioned against the centered 1240 frame */
.hero-phone {
  position: absolute;
  top: 56px;
  right: calc(50% - var(--frame) / 2 + 88px);
  --pw: 322px;
  width: var(--pw);
  background: var(--ac-ink);
  border-radius: calc(var(--pw) * var(--phone-radius-ratio));
  padding: calc(var(--pw) * var(--phone-pad-ratio));
  box-shadow: 0 30px 70px rgba(21, 24, 29, 0.35);
  z-index: 1;
}
.hero-phone img {
  width: 100%;
  display: block;
  border-radius: calc(var(--pw) * var(--phone-screen-ratio));
}
.hero-alert {
  position: absolute;
  top: 470px;
  right: calc(50% - var(--frame) / 2 + 352px);
  width: 250px;
  background: #ffffff;
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 16px 40px rgba(21, 24, 29, 0.22);
  z-index: 2;
}
.hero-alert-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.hero-alert-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(139, 0, 0, 0.12);
  color: #8b0000;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hero-alert-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.1px;
  color: #8b0000;
}
.hero-alert-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ac-text);
  margin-bottom: 4px;
}
.hero-alert-body {
  font-size: 12px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--ac-muted);
}

/* ============================== Hero, mobile single column (design 2b) ==============================
   Hidden by default; swapped in for the desktop hero at the mobile breakpoint. */
.hero-mobile { display: none; background: var(--ac-app-bg-2); }
.hero-m-field {
  background: var(--ac-accent);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 0 100%);
  padding: 32px 24px 108px;
}
.hero-m-title {
  margin: 0 0 12px 0;
  font-size: 34px;
  line-height: 1.0;
  letter-spacing: -1.2px;
  font-weight: 800;
  color: #ffffff;
}
.hero-m-sub {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}
.hero-m-body { padding: 0 24px 28px; }
.hero-m-card {
  max-width: none;
  margin-top: -92px;
  position: relative;
  z-index: 1;
  padding: 18px;
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(6, 54, 102, 0.16);
}
.hero-m-card .field { margin-bottom: 10px; }
.hero-m-card .waitlist-submit { width: 100%; }
.hero-m-card .waitlist-msg { padding: 10px 0 0 2px; }
.hero-m-visual {
  margin-top: 22px;
  display: flex;
  justify-content: center;
}
.hero-m-stage { position: relative; }
.hero-m-phone {
  --pw: 200px;
  width: var(--pw);
  background: var(--ac-ink);
  border-radius: calc(var(--pw) * var(--phone-radius-ratio));
  padding: calc(var(--pw) * var(--phone-pad-ratio));
  box-shadow: 0 16px 38px rgba(21, 24, 29, 0.22);
}
.hero-m-phone img { width: 100%; display: block; border-radius: calc(var(--pw) * var(--phone-screen-ratio)); }
.hero-m-alert {
  position: absolute;
  left: -30px;
  bottom: 20px;
  width: 172px;
  background: #ffffff;
  border-radius: 13px;
  padding: 11px 13px;
  box-shadow: 0 10px 26px rgba(21, 24, 29, 0.25);
}
.hero-m-alert .hero-alert-icon { width: 16px; height: 16px; font-size: 9px; }
.hero-m-alert .hero-alert-label { font-size: 9px; letter-spacing: 0.9px; }
.hero-m-alert-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--ac-text);
  margin-bottom: 2px;
}
.hero-m-alert-body {
  font-size: 10px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--ac-muted);
}

/* ============================== Shared section bits ============================== */
.section { padding: 72px 0; scroll-margin-top: 100px; }
.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--ac-accent);
  margin-bottom: 12px;
}
.eyebrow-dark { color: #3b9bff; }
.section-title {
  margin: 0 0 16px 0;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.9px;
  font-weight: 800;
  color: var(--ac-text);
}
.section-lead {
  margin: 0 0 40px 0;
  max-width: 620px;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--ac-muted);
}

/* ============================== The four layers ============================== */
.layers { background: var(--ac-ink); }
.layers-title { font-size: 40px; letter-spacing: -1.1px; max-width: 760px; color: #eef2f7; }
.layers .section-lead { color: #9aa4b2; }
.layer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.layer-card {
  background: #1d242e;
  border-radius: 18px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.layer-tag {
  align-self: flex-start;
  background: var(--ac-accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 6px 14px;
}
.layer-text {
  margin: 6px 0 0 0;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
  color: #9aa4b2;
}

/* ============================== Inside the app ============================== */
.gallery-title { margin-bottom: 44px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}
.gallery-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.phone {
  --pw: 280px;
  width: var(--pw);
  max-width: 100%;
  background: var(--ac-ink);
  border-radius: calc(var(--pw) * var(--phone-radius-ratio));
  padding: calc(var(--pw) * var(--phone-pad-ratio));
  box-shadow: 0 20px 50px rgba(21, 24, 29, 0.25);
}
.phone img { display: block; width: 100%; border-radius: calc(var(--pw) * var(--phone-screen-ratio)); }
.gallery-item figcaption { text-align: center; max-width: 280px; }
.gallery-item-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--ac-text);
  margin-bottom: 4px;
}
.gallery-item-body {
  font-size: 14px;
  font-weight: 600;
  color: var(--ac-muted);
}

/* ============================== Coverage ============================== */
.coverage { background: var(--ac-app-bg-2); }
.coverage-title { color: var(--ac-text); max-width: 640px; }
.coverage-lead { color: var(--ac-muted); }
.coverage-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 900px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #ffffff;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ac-text);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }

/* ============================== Bottom signup ============================== */
.signup { background: var(--ac-accent); }
.signup-inner { text-align: center; }
.signup-title {
  margin: 0 0 12px 0;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -1.2px;
  font-weight: 800;
  color: #ffffff;
}
.signup-sub {
  margin: 0 0 32px 0;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}
.signup-card {
  margin: 0 auto;
  max-width: 560px;
  text-align: left;
}
.store-badges {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}
.store-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ac-ink);
  border-radius: 14px;
  padding: 12px 22px;
  width: 210px;
  text-align: left;
}
/* Fixed icon slot so the Apple (27) and Google (25) glyphs occupy the same
   width and the icon-to-text spacing matches across both badges. */
.store-badge svg { flex: 0 0 26px; width: 26px; height: 26px; }
.store-badge-top {
  font-size: 10px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}
.store-badge-name {
  font-size: 17px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: #ffffff;
}

/* ============================== Footer ============================== */
.site-footer { padding: 36px 0 44px; background: #ffffff; }
.footer-brand { margin-bottom: 8px; }
.footer-wordmark { height: 22px; }
.footer-disclaimer {
  margin: 0;
  max-width: 760px;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--ac-muted);
}
.footer-tagline {
  margin: 0 0 18px 0;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 700;
  color: var(--ac-text);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  :root { --gutter: 40px; }
  /* Phone/alert can no longer sit beside a 1240 frame; anchor to viewport edge */
  .hero-phone { right: 40px; }
  .hero-alert { right: calc(40px + 264px); }
}

@media (max-width: 960px) {
  .hero { padding-bottom: 0; }
  .hero-field {
    clip-path: none;
    padding: 56px 0 64px;
  }
  .hero-title { font-size: 48px; letter-spacing: -1.4px; }
  .hero-copy { max-width: 100%; }
  /* Stack the phone below the copy, drop the absolute alert overlay */
  .hero-phone {
    position: static;
    margin: -32px auto 0;
    /* Shrink to 280px; padding and radii re-derive from --pw automatically. */
    --pw: 280px;
  }
  .hero-alert { display: none; }
  .hero { background: var(--ac-app-bg-2); padding-bottom: 56px; }

  .layer-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: 1fr; gap: 44px; max-width: 420px; margin: 0 auto; }
}

@media (max-width: 760px) {
  :root { --gutter: 22px; }
  /* Mobile header: keep only the logo and the "Join the waitlist" button.
     No hamburger, no popout menu; the section links are dropped since the
     page is a single scroll. */
  .nav { display: flex; }
  .nav-link { display: none; }
  .site-header { position: relative; }
  .section { scroll-margin-top: 0; }

  /* Swap the desktop hero for the single-column mobile hero (2b) */
  .hero { display: none; }
  .hero-mobile { display: block; }

  /* Tighter section rhythm and type, matching the mobile mock */
  .section { padding: 32px 0; }
  .eyebrow { font-size: 10px; letter-spacing: 1px; margin-bottom: 8px; }
  .section-title { font-size: 22px; letter-spacing: -0.6px; }
  .layers-title { font-size: 22px; letter-spacing: -0.6px; }
  .gallery-title { margin-bottom: 20px; }
  .section-lead { font-size: 13px; margin-bottom: 18px; }
  .coverage-title { font-size: 22px; }

  /* Stacked waitlist inputs everywhere */
  .waitlist-row { flex-direction: column; }
  .waitlist-submit { width: 100%; }
  /* flex:none so the field keeps its 54px height once the row is a column;
     otherwise flex-basis:0 collapses it to the text's min-height. */
  .field { width: 100%; flex: none; }

  /* Four layers: single column */
  .layer-grid { grid-template-columns: 1fr; gap: 12px; }
  .layer-card { padding: 16px; border-radius: 16px; }

  /* Gallery: single column, smaller phones */
  .gallery-grid { gap: 32px; max-width: 320px; }
  /* Smaller phone; the shared ratios re-derive padding and radii from --pw. */
  .phone { --pw: 220px; }

  /* Coverage pills */
  .coverage-pills { gap: 8px; }
  .pill { padding: 8px 13px; font-size: 11.5px; }

  /* Signup band: smaller heading, badges stacked vertically */
  .signup { padding: 36px 0; }
  .signup-title { font-size: 26px; letter-spacing: -0.8px; }
  .signup-sub { font-size: 13px; margin-bottom: 20px; }
  .store-badges { flex-direction: column; align-items: center; gap: 10px; margin-top: 20px; }
  /* Left-align content (not centered) so both stacked badges line up:
     same icon position, same text start, same gap. */
  .store-badge { width: 210px; justify-content: flex-start; }
}
