/* Colours mirror apps/web/src/styles/palette.css so page and app feel like one product. */
:root {
  --ink: hsl(224 76% 19%);
  --text: #233e6a;
  --text-muted: hsl(219 24% 48%);
  --teal: hsl(185.854 88.489% 27.255%);
  --teal-bright: hsl(184 70% 34%);
  --teal-dark: #03444b;
  --teal-tint: hsl(174 45% 97%);
  --teal-soft: hsl(174 43% 93%);
  --sky: #cfe4f3;
  --sky-soft: #dfedf7;
  --surface: #fff;
  --surface-subtle: #fafbfc;
  --border: hsl(214 16% 91%);
  --border-strong: hsl(214 14% 80%);
  --danger: #b4232f;
  --radius: 14px;
  --radius-large: 24px;
  --header-height: 84px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --shadow: 0 24px 70px hsl(185.854 88% 27% / 0.1), 0 4px 16px hsl(224 76% 19% / 0.04);
  --shadow-soft: 0 1px 2px hsl(224 76% 19% / 0.05), 0 8px 24px hsl(224 76% 19% / 0.06);
  --shadow-shot: 0 2px 6px hsl(224 76% 19% / 0.06), 0 30px 80px hsl(205 60% 30% / 0.18);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--teal);
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.15;
  margin: 0;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.container.narrow {
  max-width: 780px;
}

/* Header: a floating pill. The negative margin lets the hero's sky run behind it. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-height);
  margin-bottom: calc(-1 * var(--header-height));
  padding-top: 14px;
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 58px;
  padding: 0 10px 0 14px;
  border: 1px solid hsl(0 0% 100% / 0.9);
  border-radius: 18px;
  background: hsl(0 0% 100% / 0.82);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  pointer-events: auto;
}

/* Pushes navigation and the login button to the right, with or without nav. */
.header-inner .brand {
  margin-right: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(145deg, var(--surface), var(--teal-tint) 48%, var(--teal-soft));
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.header-nav {
  display: flex;
  gap: 28px;
}

.header-nav a {
  color: var(--text);
  font-size: 15px;
  font-weight: 550;
  text-decoration: none;
}

.header-nav a:hover {
  color: var(--teal);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.15s,
    color 0.15s,
    transform 0.25s var(--ease);
}

.button-primary {
  background-color: var(--teal);
  background-image: linear-gradient(180deg, var(--teal-bright), var(--teal));
  box-shadow:
    inset 0 1px 0 hsl(0 0% 100% / 0.22),
    inset 0 0 0 100px hsl(186 90% 12% / 0),
    0 6px 18px hsl(185.854 88% 27% / 0.28);
  color: #fff;
}

/* Darken with an inset shadow: a gradient cannot transition to a plain colour, and
   swapping one for the other flashes the button white halfway through. */
.button-primary:hover {
  box-shadow:
    inset 0 1px 0 hsl(0 0% 100% / 0.22),
    inset 0 0 0 100px hsl(186 90% 12% / 0.16),
    0 8px 22px hsl(185.854 88% 27% / 0.32);
}

.button-primary:disabled {
  opacity: 0.7;
  cursor: progress;
}

.button-dark {
  background: var(--teal-dark);
  box-shadow: inset 0 1px 0 hsl(0 0% 100% / 0.15);
  color: #fff;
}

.button-dark:hover {
  background: hsl(186 92% 19%);
}

.button-small {
  height: 38px;
  padding: 0 16px;
  border-radius: 11px;
  font-size: 14.5px;
}

.button-large {
  height: 52px;
  padding: 0 28px;
  font-size: 16px;
}

/* Small pill above section titles. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 5px 14px 5px 8px;
  border: 1px solid hsl(0 0% 100% / 0.9);
  border-radius: 999px;
  background: hsl(0 0% 100% / 0.75);
  box-shadow: var(--shadow-soft);
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 600;
}

.eyebrow-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 3px, transparent 3.5px),
    linear-gradient(145deg, var(--teal-bright), var(--teal-dark));
}

/* Soft sky with clouds, shared by the hero and the closing call to action. */
.sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 85% 10%, hsl(174 50% 88% / 0.9), transparent 70%),
    linear-gradient(
      180deg,
      var(--sky) 0%,
      var(--sky-soft) 45%,
      var(--teal-tint) 80%,
      var(--surface)
    );
}

.sky::before,
.sky::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, hsl(0 0% 100% / 0.95), hsl(0 0% 100% / 0)) 0 40% / 55% 70%
      no-repeat,
    radial-gradient(closest-side, hsl(0 0% 100% / 0.9), hsl(0 0% 100% / 0)) 40% 0 / 60% 90%
      no-repeat,
    radial-gradient(closest-side, hsl(0 0% 100% / 0.85), hsl(0 0% 100% / 0)) 100% 60% / 55% 65%
      no-repeat;
  filter: blur(8px);
}

.sky::before {
  top: 12%;
  left: -6%;
  width: 420px;
  height: 220px;
}

.sky::after {
  top: 30%;
  right: -8%;
  width: 520px;
  height: 260px;
}

.hero .sky::before {
  animation: cloud-in-left 1.8s var(--ease) both;
}

.hero .sky::after {
  animation: cloud-in-right 1.8s 0.15s var(--ease) both;
}

@keyframes cloud-in-left {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
}

@keyframes cloud-in-right {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  padding: calc(var(--header-height) + 72px) 0 0;
}

.hero .sky {
  bottom: 22%;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero h1 {
  font-size: clamp(40px, 6.4vw, 72px);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.lead {
  max-width: 600px;
  margin: 22px 0 32px;
  color: var(--text);
  font-size: clamp(17px, 2vw, 20px);
}

.hero-shot {
  max-width: 1160px;
  margin-top: 64px;
}

/* Frosted frame around the app screenshot. */
.glass-frame {
  padding: 10px;
  border: 1px solid hsl(0 0% 100% / 0.85);
  border-radius: 26px;
  background: hsl(0 0% 100% / 0.45);
  box-shadow: var(--shadow-shot);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-frame img {
  display: block;
  width: 100%;
  border-radius: 17px;
}

/* Waitlist */
.waitlist-card {
  width: 100%;
  max-width: 540px;
}

.field-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.email-row {
  display: flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid hsl(0 0% 100% / 0.9);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.email-row:focus-within {
  border-color: var(--teal);
}

input[type='email'] {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

input[type='email']:focus {
  outline: none;
}

.email-row .button {
  height: 48px;
}

.button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-message {
  min-height: 0;
  margin: 0;
  font-size: 14px;
}

.form-message:not(:empty) {
  margin-top: 12px;
}

.form-message.is-error {
  color: var(--danger);
}

.waitlist-success {
  padding: 22px 24px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.waitlist-success h2 {
  font-size: 22px;
}

.waitlist-success p {
  margin: 8px 0 0;
}

/* Short facts in place of a logo strip. */
.trust {
  padding: 40px 0 8px;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 36px;
  margin: 0 auto;
  list-style: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 550;
}

.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.trust-list li::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--teal-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2303444b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
    center / 11px no-repeat;
}

/* Sections */
.section {
  padding: 112px 0;
}

.section-sky {
  background: linear-gradient(180deg, var(--surface), var(--teal-tint) 30%, var(--sky-soft) 100%);
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-title {
  max-width: 720px;
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 730;
  letter-spacing: -0.03em;
}

.section-lead {
  max-width: 560px;
  margin: 16px 0 0;
  font-size: 18px;
}

/* Feature rows: copy beside a cropped app screenshot on a sky panel. */
.showcase {
  display: grid;
  gap: 104px;
  margin-top: 80px;
}

.showcase-row {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 72px;
  align-items: center;
}

.showcase-row-flip {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.showcase-row-flip .showcase-copy {
  order: 2;
}

.kicker {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.showcase-copy h3 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 730;
  letter-spacing: -0.025em;
}

.showcase-copy > p:not(.kicker) {
  margin: 18px 0 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 550;
}

.shot-panel {
  position: relative;
  overflow: hidden;
  aspect-ratio: 6 / 5;
  border-radius: 28px;
  background:
    radial-gradient(ellipse 50% 35% at 20% 15%, hsl(0 0% 100% / 0.85), transparent 70%),
    radial-gradient(ellipse 45% 30% at 90% 85%, hsl(0 0% 100% / 0.6), transparent 70%),
    linear-gradient(160deg, var(--sky) 0%, var(--sky-soft) 50%, var(--teal-soft) 100%);
}

.shot-panel img {
  position: absolute;
  display: block;
  max-width: none;
  border: 1px solid hsl(0 0% 100% / 0.9);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-shot);
}

/* Wide crops start inside the panel and run off its bottom-right edge. */
.shot-panel-bleed img {
  top: 12%;
  left: 9%;
  width: 135%;
}

/* A tall crop sits centred and runs off the bottom edge. */
.shot-panel-tall img {
  top: 9%;
  left: 50%;
  width: 52%;
  transform: translateX(-50%);
}

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 56px;
}

.feature {
  padding: 30px;
  border: 1px solid hsl(0 0% 100% / 0.9);
  border-radius: var(--radius-large);
  background: hsl(0 0% 100% / 0.8);
  box-shadow: var(--shadow-soft);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--teal-tint), var(--teal-soft));
  box-shadow: inset 0 0 0 1px hsl(174 40% 85%);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--teal-dark);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature h3 {
  font-size: 20px;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 10px 0 0;
  color: var(--text);
}

/* FAQ */
.faq {
  display: grid;
  gap: 12px;
  margin-top: 48px;
  -webkit-user-select: none;
  user-select: none;
}

.faq details {
  padding: 0 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.faq details:hover,
.faq details[open] {
  border-color: var(--border-strong);
}

.faq details[open] {
  box-shadow: var(--shadow-soft);
}

.faq summary {
  position: relative;
  padding: 20px 40px 20px 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  top: 50%;
  right: 0;
  color: var(--teal);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-50%);
  transition: transform 0.22s ease;
}

.faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

/* main.js animates this wrapper's height when a question opens or closes. */
.faq-answer {
  overflow: hidden;
}

.faq details p {
  margin: 0 0 22px;
}

/* Closing call to action */
.cta {
  padding-top: 0;
}

.cta-inner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 96px 24px;
  border-radius: 32px;
  text-align: center;
}

.cta-inner .sky {
  background:
    radial-gradient(ellipse 60% 60% at 85% 0%, hsl(174 50% 88% / 0.9), transparent 70%),
    linear-gradient(180deg, var(--sky), var(--sky-soft) 60%, var(--teal-soft));
}

.cta h2 {
  max-width: 640px;
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 730;
  letter-spacing: -0.03em;
}

.cta p {
  max-width: 460px;
  margin: 16px 0 32px;
  font-size: 18px;
}

/* Footer */
.site-footer {
  padding: 40px 0 48px;
  color: var(--text-muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

.footer-inner nav {
  display: flex;
  gap: 24px;
}

.footer-inner a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--teal);
}

/* Legal pages: quieter type than the marketing sections. */
.legal {
  padding: calc(var(--header-height) + 56px) 0 96px;
  font-size: 16px;
}

.legal h1 {
  font-size: clamp(30px, 4vw, 36px);
  letter-spacing: -0.02em;
}

.legal h2 {
  margin-top: 36px;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.legal h3 {
  margin-top: 24px;
  font-size: 16px;
}

.legal p,
.legal li {
  margin: 12px 0 0;
  color: var(--text);
}

.not-found {
  display: grid;
  place-items: center;
  min-height: 60vh;
  padding-top: var(--header-height);
  text-align: center;
}

.not-found p {
  margin: 12px 0 28px;
}

/* Fade content in as it enters the viewport (main.js adds .visible). Hidden only
   when scripting runs, so the page stays readable without JavaScript. */
@media (scripting: enabled) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition:
      opacity 0.9s var(--ease),
      transform 0.9s var(--ease);
    transition-delay: var(--delay, 0s);
  }

  /* Safari paints a fading element on its own layer and repaints it a pixel off when
     the fade ends, which reads as a flicker on the main call to action. Fade without
     moving, and keep the layer so there is no repaint. */
  .waitlist-card.reveal {
    transform: none;
    will-change: opacity;
  }

  .glass-frame.reveal,
  .shot-panel.reveal {
    transform: translateY(28px) scale(0.985);
    transition-duration: 1.1s;
  }

  .reveal.visible {
    opacity: 1;
    transform: none;
  }
}

/* Small screens */
@media (max-width: 900px) {
  .header-nav {
    display: none;
  }

  .hero {
    padding-top: calc(var(--header-height) + 40px);
  }

  .hero-shot {
    margin-top: 48px;
  }

  .section {
    padding: 80px 0;
  }

  .showcase {
    gap: 72px;
    margin-top: 56px;
  }

  .showcase-row,
  .showcase-row-flip {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .showcase-row-flip .showcase-copy {
    order: 0;
  }

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

@media (max-width: 520px) {
  .container {
    padding: 0 16px;
  }

  .header-inner {
    gap: 16px;
  }

  .email-row {
    flex-direction: column;
  }

  .email-row .button {
    width: 100%;
  }

  .glass-frame {
    padding: 6px;
    border-radius: 18px;
  }

  .glass-frame img {
    border-radius: 12px;
  }

  .shot-panel {
    border-radius: 22px;
  }

  .shot-panel-tall img {
    width: 72%;
  }

  .faq details {
    padding: 0 18px;
  }

  .cta-inner {
    padding: 72px 20px;
    border-radius: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
