/*
 * Minimal preflight.
 *
 * The accepted Frontpage V3 rendered on top of Tailwind's preflight, which
 * normalises box-sizing, resets element margins, removes list markers and makes
 * anchors inherit colour and text-decoration. The public marketing artifact
 * ships no Tailwind, so the same normalisation is reproduced here verbatim in
 * effect. Without it the page renders with UA-default blue underlined links,
 * indented `<ol>` markers and content-box sizing — i.e. not the accepted design.
 */
*,
::before,
::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: currentColor;
}

html {
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd,
ol,
ul {
  margin: 0;
}

ol,
ul {
  list-style: none;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: inherit;
}

b,
strong {
  font-weight: bolder;
}

img,
svg {
  display: block;
  vertical-align: middle;
}

/*
 * ELLO public marketing stylesheet.
 *
 * Derived from the accepted Frontpage V3 stylesheet `src/app/globals.css`
 * (PR #170 -> 0ecb32e). Every `.marketing-*` rule, the design tokens, the
 * `ELLO Marketing Inter` @font-face, the skip-link, the focus ring and the
 * reduced-motion block are copied verbatim from that file so the accepted
 * visual design is preserved exactly.
 *
 * Deliberately NOT copied: `@import "tailwindcss"` and the `@theme inline`
 * block. The public marketing artifact ships no Tailwind runtime and no
 * application stylesheet. The three utility effects the accepted markup relied
 * on (`min-h-dvh` on <body>, and `shadow-xs` on the marketing Button variant)
 * are expressed below as explicit rules so the rendering is unchanged.
 */

:root {
  /* Brand accents (WELLO POP DIGITAL) */
  --wello-lime: #c8f344;
  --wello-lime-hover: #bce835;
  --wello-lime-soft: #f3fcd1;
  --wello-purple: #6d5ce8;
  --wello-purple-soft: #eeebfc;
  --wello-coral: #ff765e;
  --wello-coral-soft: #ffebe7;
  --wello-sky: #62c7f2;
  --wello-sky-soft: #e6f6fd;

  /* Neutral surfaces & ink */
  --color-ink: #191923;
  --color-paper: #f8f8f4;
  --color-surface: #ffffff;
  --color-muted-surface: #f1f1ec;
  --color-muted-text: #5c5c6b;
  --color-border-subtle: #e4e4e0;
  --color-border-strong: #191923;

  /* Semantic status colours (kept distinct from decorative brand accents) */
  --color-success: #067647;
  --color-success-soft: #ecfdf3;
  --color-warning: #b54708;
  --color-warning-soft: #fffaeb;
  --color-danger: #b42318;
  --color-danger-soft: #fef3f2;
  --color-info: #026aa2;
  --color-info-soft: #f0f9ff;

  /* Typography */
  --font-sans:
    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;

  /* Radius scale */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.125rem;
  --radius-xl: 1.5rem;

  /* 4-point spacing tokens */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Resolved theme values the base rules below depend on (globals.css @theme). */
  --color-background: var(--color-paper);
  --color-foreground: var(--color-ink);
  --color-border: var(--color-border-subtle);
}

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

body {
  min-height: 100dvh;
  margin: 0;
  background-color: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* High-contrast focus indicator from the approved Style 3 accessibility tokens. */
:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--color-paper);
}

.skip-to-content {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  transform: translateY(-200%);
  border: 2px solid var(--color-ink);
  background: var(--color-paper);
  color: var(--color-ink);
  padding: 0.75rem 1rem;
}

.skip-to-content:focus {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* A distinct family name keeps the downloadable face off non-marketing routes. */
@font-face {
  font-family: "ELLO Marketing Inter";
  /*
   * Bounded performance deviation from the accepted stylesheet: the marketing
   * service ships a glyph subset of the same Inter variable face
   * (Latin-1 + punctuation + arrows, weights 100-900) instead of the full
   * 352 KB file. It is the same typeface, the same axes and the same rendering
   * for every character the public site uses; it only removes unused scripts.
   * `public/fonts/InterVariable.woff2` is unchanged for the application.
   */
  src: url("/fonts/InterVariable-marketing.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:is(.marketing-header, .marketing-page, .marketing-footer) {
  --marketing-gutter: clamp(1.25rem, 5%, 3rem);
}

.marketing-page {
  --marketing-band: clamp(3rem, 7vw, 6rem);
  --marketing-base: 200ms;
  --marketing-enter: cubic-bezier(0.05, 0.7, 0.1, 1);
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: "ELLO Marketing Inter", var(--font-sans);
}

.marketing-header .marketing-shell,
.marketing-page .marketing-shell,
.marketing-footer .marketing-shell {
  width: min(calc(100% - 2 * var(--marketing-gutter)), 70rem);
  margin-inline: auto;
}

:is(.marketing-header, .marketing-page, .marketing-footer) {
  font-family: "ELLO Marketing Inter", var(--font-sans);
}

.marketing-header-inner,
.marketing-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.marketing-header-inner {
  min-height: 4rem;
  flex-wrap: nowrap;
}
.marketing-header .marketing-nav {
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.marketing-footer-inner {
  min-height: 4rem;
}

.marketing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 52px;
  min-width: 44px;
  padding: 0.625rem 1.125rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 150ms var(--marketing-enter),
    color 150ms var(--marketing-enter),
    border-color 150ms var(--marketing-enter),
    transform 90ms var(--marketing-enter);
}

.marketing-button:hover {
  text-decoration: none;
}
.marketing-button:active {
  transform: scale(0.98);
}
.marketing-button {
  background: var(--color-ink);
  color: var(--color-paper);
  /* Mirrors the `shadow-xs` utility the accepted Button variant applied. */
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.marketing-button:hover {
  background: var(--color-border-strong);
}
.marketing-button-secondary {
  border-color: var(--color-ink);
  background: transparent;
  color: var(--color-ink);
}
.marketing-button-secondary:hover {
  background: var(--color-ink);
  color: var(--color-paper);
}
.marketing-arrow {
  display: inline-block;
  font-size: 1.1em;
  line-height: 1;
}

/*
 * Coming Soon CTA state. The public marketing deployment exposes no SaaS
 * route, so the accepted CTAs render as a non-interactive pill in the same
 * position, size and colour as the accepted button. Cursor and hover affordances
 * are removed because there is nothing to activate yet.
 */
.marketing-button-soon {
  cursor: default;
  opacity: 1;
}
.marketing-button-soon:hover {
  background: var(--color-ink);
  text-decoration: none;
}
.marketing-button-soon:active {
  transform: none;
}

.marketing-eyebrow {
  margin: 0 0 var(--space-3);
  color: var(--color-muted-text);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1rem;
  text-transform: uppercase;
}

.marketing-secondary-action {
  min-height: 44px;
  padding-block: 0.625rem;
}
.marketing-header .marketing-nav > .marketing-button {
  padding-inline: clamp(0.75rem, 3vw, 1.5rem);
}

.marketing-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-border-subtle);
}

.marketing-header > .marketing-shell,
.marketing-footer > .marketing-shell,
.marketing-nav,
.marketing-actions,
.marketing-header-inner,
.marketing-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.marketing-header > .marketing-shell,
.marketing-footer > .marketing-shell,
.marketing-header-inner,
.marketing-footer-inner {
  justify-content: space-between;
  min-width: 0;
  min-height: 4rem;
}

.marketing-hero-inner,
.marketing-finale-inner {
  width: min(calc(100% - 2 * var(--marketing-gutter)), 70rem);
  margin-inline: auto;
}

.marketing-brand,
.marketing-link,
.marketing-discover-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
}
.marketing-brand {
  font-size: 1.75rem;
  font-weight: 800;
  text-decoration: none;
}
.marketing-link,
.marketing-discover-link {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}
.marketing-link:hover,
.marketing-discover-link:hover {
  text-decoration-thickness: 2px;
}
.marketing-header .marketing-sign-in {
  display: none;
}
.marketing-page :is(main, section)[id] {
  scroll-margin-block-start: 5rem;
}

.marketing-hero {
  padding-block: var(--marketing-band);
}
.marketing-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  align-items: center;
  gap: var(--space-8);
}
.marketing-hero-copy {
  min-width: 0;
  display: grid;
  justify-items: start;
  gap: var(--space-5);
}
.marketing-hero h1 {
  font-size: 2.125rem;
  line-height: 1.12;
  font-weight: 800;
  text-wrap: balance;
}
.marketing-hero-copy > p {
  max-width: 48ch;
  line-height: 1.5;
  color: var(--color-muted-text);
}
.marketing-hero-panel {
  container-type: inline-size;
  display: grid;
  place-items: center;
  aspect-ratio: 2.7;
  background: var(--wello-lime);
  border-radius: 1rem;
}
.marketing-hero-panel > span {
  font-size: 32cqi;
  font-weight: 800;
  line-height: 1;
}
.marketing-available,
.marketing-how,
.marketing-explore {
  padding-block: var(--marketing-band);
}
.marketing-available {
  border-top: 1px solid var(--color-border-strong);
}
.marketing-how {
  background: var(--color-muted-surface);
}
.marketing-page h2 {
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 700;
  text-wrap: balance;
}
.marketing-features,
.marketing-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-8);
}
.marketing-features li,
.marketing-steps li {
  display: grid;
  align-content: start;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-subtle);
}
.marketing-features li > span:last-child,
.marketing-steps h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
}
.marketing-index {
  color: var(--color-muted-text);
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.marketing-steps p {
  color: var(--color-muted-text);
}
.marketing-explore .marketing-actions {
  margin-top: var(--space-5);
}
.marketing-finale {
  display: grid;
  align-items: center;
  background: var(--wello-lime);
  min-height: 90svh;
  padding-block: var(--marketing-band);
}
.marketing-finale-inner {
  container-type: inline-size;
  display: grid;
  justify-items: center;
  gap: clamp(1rem, 4.1svh, 2rem);
  text-align: center;
}
.marketing-finale h2 {
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
}
.marketing-finale .marketing-button {
  margin-bottom: clamp(0.75rem, 2svh, 1.25rem);
}
.marketing-wordmark {
  display: block;
  font-size: 34cqi;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.marketing-footer {
  padding-block: var(--space-6);
}
.marketing-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.marketing-brand-footer {
  font-size: 1.25rem;
}
.marketing-footer-note {
  margin-top: var(--space-3);
  color: var(--color-muted-text);
  font-size: 0.8125rem;
  line-height: 1.5;
}

@media (min-width: 48rem) {
  .marketing-header > .marketing-shell {
    min-height: 4.5rem;
  }
  .marketing-header .marketing-sign-in {
    display: inline-flex;
  }
  .marketing-hero-inner {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
  .marketing-hero h1 {
    font-size: 3.25rem;
    line-height: 1.08;
  }
  .marketing-hero-panel {
    aspect-ratio: 1.2;
  }
  .marketing-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .marketing-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .marketing-steps li {
    border-top: 0;
  }
  .marketing-steps li + li {
    border-inline-start: 1px solid var(--color-border-subtle);
    padding-inline-start: var(--space-6);
  }
  .marketing-finale {
    min-height: 90svh;
  }
  .marketing-finale h2 {
    font-size: 3rem;
  }
  .marketing-wordmark {
    font-size: 29cqi;
  }
}
@media (min-width: 64rem) {
  .marketing-features {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-8);
  }
  .marketing-wordmark {
    font-size: 25cqi;
  }
}

@keyframes ello-marketing-enter {
  from {
    transform: translateY(4px);
  }
}
@keyframes ello-marketing-rise {
  from {
    transform: translateY(4px);
  }
}
@keyframes ello-marketing-wipe {
  from {
    clip-path: inset(0 100% 0 0);
    transform: scale(0.98);
  }
}

/* All content is visible at rest. All finale beats use the same section clock. */
@media (prefers-reduced-motion: no-preference) {
  .marketing-hero h1 {
    animation: ello-marketing-enter var(--marketing-base) var(--marketing-enter) both;
  }
  .marketing-hero-copy > p {
    animation: ello-marketing-enter var(--marketing-base) var(--marketing-enter) 30ms both;
  }
  .marketing-hero-copy .marketing-button {
    animation: ello-marketing-enter 150ms var(--marketing-enter) 60ms both;
  }
  .marketing-hero-panel > span {
    animation: ello-marketing-wipe 300ms var(--marketing-enter) 120ms both;
  }
  @supports (animation-timeline: view()) {
    .marketing-features li,
    .marketing-steps li,
    .marketing-explore h2,
    .marketing-finale h2,
    .marketing-finale .marketing-button,
    .marketing-wordmark {
      animation-name: ello-marketing-rise;
      animation-duration: auto;
      animation-timing-function: var(--marketing-enter);
      animation-fill-mode: none;
      animation-timeline: view();
      animation-range: entry 5% cover 35%;
    }
    .marketing-wordmark {
      animation-name: ello-marketing-wipe;
    }
  }
}

/* 404 page reuses the marketing shell without the full composition. */
.marketing-notice {
  min-height: 60svh;
  display: grid;
  align-content: center;
  gap: var(--space-5);
  padding-block: var(--marketing-band);
}
