/* isobar landing page: dark ink on a teal sea that isobars.js shades by pressure, pale under the
   high over the logo and deeper in the lows. The teals and the dark cards are the app's
   (services/frontend/src/styles/App.css). */
:root {
  --bg: #a6dde4;
  --ink: #171415;
  --ink-soft: rgba(23, 20, 21, 0.8);
  --bg-card: rgba(23, 20, 21, 0.86);
  --border: rgba(161, 164, 159, 0.16);
  --border-ink: rgba(23, 20, 21, 0.3);
  --text: #fafaf9;
  --muted: #a1a49f;
  --primary: #1b8494;
  --accent: #4fc1cf;
  --brand: #239bac;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --width: 1120px;
  --gutter: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  /* Until isobars.js draws the sea, and without scripts: the same sweep from the logo down. */
  background: linear-gradient(170deg, #dcf2f4 0%, #a6dde4 28%, #4fb9c6 58%, #2398a8 100%) fixed;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

/* The sea and its isobars, fixed behind everything. */
.isobars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.top,
main,
.foot {
  width: min(100% - 2 * var(--gutter), var(--width));
  margin-inline: auto;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}

.brand img {
  height: 76px;
  width: auto;
}

/* The header's links: the quick start guide and the app. */
.top-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.top-link {
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}

.top-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.closing-link {
  font-size: 0.9rem;
  color: var(--muted);
  text-underline-offset: 3px;
}

.closing-link:hover {
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 6px 18px rgba(23, 20, 21, 0.3);
}

.btn-primary:hover {
  background: #2a2627;
  transform: translateY(-1px);
}

/* On a dark card, the app's own teal button. */
.closing .btn-primary {
  background: linear-gradient(135deg, #1b8494 0%, #166f7d 100%);
  box-shadow: 0 4px 14px rgba(27, 132, 148, 0.35);
}

.closing .btn-primary:hover {
  background: linear-gradient(135deg, #166f7d 0%, #125b66 100%);
}

.btn-quiet {
  border: 1px solid rgba(23, 20, 21, 0.45);
  background: rgba(220, 242, 244, 0.45);
  backdrop-filter: blur(6px);
}

.btn-quiet:hover {
  border-color: var(--ink);
}

.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 48px;
  padding-block: 8px 72px;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 700;
}

h1 em {
  font-style: italic;
  color: #1b8494;
  padding-right: 0.06em;
}

.lead {
  margin-top: 18px;
  font-size: 1.12rem;
  color: rgba(23, 20, 21, 0.85);
  max-width: 34em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.fineprint {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Device frames */
.frame-desktop {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #231f20;
  box-shadow:
    0 30px 60px -20px rgba(10, 40, 46, 0.6),
    0 0 0 1px rgba(0, 0, 0, 0.3);
}

.frame-bar {
  display: flex;
  gap: 6px;
  padding: 9px 12px;
  background: #2a2627;
  border-bottom: 1px solid var(--border);
}

.frame-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(161, 164, 159, 0.35);
}

.frame-phone {
  border-radius: 34px;
  padding: 7px;
  background: #0d0b0c;
  border: 1px solid rgba(161, 164, 159, 0.28);
  box-shadow: 0 30px 60px -18px rgba(10, 40, 46, 0.6);
}

.frame-phone img {
  border-radius: 27px;
}

.hero-shots {
  position: relative;
  padding-bottom: 40px;
}

.hero-shots .frame-desktop {
  margin-right: 8%;
}

.hero-shots .frame-phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 27%;
}

/* When the live app takes over (hero-app.js), the phone slides out to the right and the laptop
   grows into its room. */
.hero-shots .frame-desktop {
  transition: margin 0.9s ease;
}

.hero-shots .frame-phone {
  transition:
    transform 0.9s ease,
    opacity 0.9s ease,
    visibility 0s linear 0.9s;
}

.hero-shots.is-live .frame-desktop {
  margin-right: 0;
}

.hero-shots.is-live .frame-phone {
  transform: translateX(140%);
  opacity: 0;
  visibility: hidden;
}

@media (min-width: 901px) {
  .hero-shots.is-live .frame-desktop {
    margin-left: -32px;
  }
}

/* Sections */
.section-title {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-lead {
  margin-top: 8px;
  color: var(--ink-soft);
}

.features {
  padding-block: 24px 72px;
}

.feature-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.feature-grid li {
  padding: 22px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-ink);
  color: var(--text);
  backdrop-filter: blur(6px);
}

.feature-grid svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-grid h3 {
  margin-top: 12px;
  font-size: 1.05rem;
  font-weight: 600;
}

.feature-grid p {
  margin-top: 6px;
  font-size: 0.93rem;
  color: var(--muted);
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--text);
}

.screens {
  padding-block: 24px 72px;
}

.frame-wide {
  margin-top: 28px;
}

.phone-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 4vw, 56px);
  max-width: 860px;
  margin: 48px auto 0;
}

.phone-row figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 56px 24px;
  margin-bottom: 56px;
  text-align: center;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-ink);
  color: var(--text);
  backdrop-filter: blur(6px);
}

.closing h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
}

.foot {
  padding-block: 28px 40px;
  border-top: 1px solid var(--border-ink);
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.foot img {
  height: 52px;
  width: auto;
  margin-bottom: 12px;
}

.foot-note {
  margin-top: 6px;
  opacity: 0.75;
}

.foot-contact {
  margin-top: 12px;
}

.foot-contact a {
  text-underline-offset: 3px;
}

.foot-contact a:hover {
  color: var(--ink);
}

/* Tablet */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-block: 8px 56px;
  }

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

/* Phone */
@media (max-width: 600px) {
  :root {
    --gutter: 16px;
  }

  .brand img {
    height: 56px;
  }

  .top .btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .top-links {
    gap: 12px;
  }

  .top-link {
    font-size: 0.85rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* The icon beside the title, so six features fit in little more than a screen. */
  .feature-grid li {
    display: grid;
    grid-template-columns: 26px 1fr;
    column-gap: 14px;
    padding: 16px;
  }

  .feature-grid svg {
    grid-row: span 2;
  }

  .feature-grid h3 {
    margin-top: 1px;
  }

  .feature-grid p {
    margin-top: 4px;
  }

  /* Phones swipe sideways rather than shrinking to stamps. */
  .phone-row {
    grid-template-columns: repeat(3, 68%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 12px;
    scrollbar-width: none;
  }

  .phone-row figure {
    scroll-snap-align: center;
  }

  .frame-phone {
    border-radius: 28px;
    padding: 5px;
  }

  .frame-phone img {
    border-radius: 23px;
  }

  .hero-shots .frame-phone {
    width: 32%;
  }
}

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

  .btn {
    transition: none;
  }
}

/* A narrow phone has no room beside the logo: the guide is linked from the closing card instead. */
@media (max-width: 480px) {
  .top-link {
    display: none;
  }
}

/* The live app under the laptop's screenshot (hero-app.js): drawn at 1280 × 800 and scaled to the
   frame; once it is ready the screenshot fades out. */
.app-view {
  position: relative;
  /* Its own stacking context, so the screenshot raised over the app stays under the phone. */
  isolation: isolate;
  overflow: hidden;
}

.app-view img {
  transition: opacity 0.8s ease;
}

.app-view iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  transform: scale(var(--app-scale, 0.5));
  transform-origin: 0 0;
}

/* The screenshot lies over the app rather than the app being hidden: a browser may hold back
   drawing in a frame that is invisible, and the app would then not load the wind it shows. */
.app-view img {
  position: relative;
  z-index: 1;
}

.app-view.live img {
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .app-view img,
  .hero-shots .frame-desktop,
  .hero-shots .frame-phone {
    transition: none;
  }
}
