/*
 * Styles for the pairnest.app landing page (index.html and pl/index.html).
 *
 * Hand-authored, like the two pages that use it: the generator in
 * src/features/legal/ owns everything under /legal/ and nothing here.
 *
 * The colour values mirror src/design/design-tokens.ts, which is the source
 * of truth for the app. They are repeated as literals because this page ships
 * without a build step — nothing compiles the token module into CSS here.
 * When a token changes there, change it here too; the names are identical so
 * the pairs are greppable.
 *
 * The Penpot boards for this page live on page "07 Landing" of the mockup
 * file. Note that Penpot's own theme-light set still carries the pre-AA
 * values, so the hexes below come from the code, not from the boards.
 */

/* ── Fonts ───────────────────────────────────────────────────
 * Self-hosted rather than pulled from fonts.gstatic.com: a page that carries
 * our own privacy policy should not hand every visitor's IP address to a
 * third party to render its headings.
 */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/fraunces-600-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: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/fraunces-600-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;
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/nunito-sans-400-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: "Nunito Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/nunito-sans-400-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;
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/nunito-sans-600-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: "Nunito Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/nunito-sans-600-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;
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/nunito-sans-700-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: "Nunito Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/nunito-sans-700-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;
}

/* ── Tokens ──────────────────────────────────────────────────
 * Names match src/design/design-tokens.ts one for one.
 */

:root {
  color-scheme: light dark;

  --nest-bg: #faf6f0;
  --nest-surface: #ffffff;
  --nest-surface-alt: #fef7f6;
  --nest-border: #efe6da;

  --ink-primary: #332e38;
  --ink-secondary: #766e80;
  --ink-muted: #c9bfb2;
  --ink-disabled: #a99c8d;

  --on-accent: #ffffff;

  --ember-base: #dd381d;
  --ember-soft: #fbe5df;
  --ember-text: #aa412f;

  --juniper-base: #398274;
  --juniper-soft: #e0f0ec;
  --juniper-text: #2c6b5e;

  --honey-base: #f2b84b;
  --honey-soft: #fdf3de;
  --honey-text: #8f6718;
  --honey-text-strong: #8a6114;

  --danger-base: #c72c38;

  --inverse-surface: #332e38;
  --inverse-text: #ffffff;
  --inverse-text-muted: #c9bfb2;

  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-card: 18px;
  --radius-input: 14px;
  --radius-pill: 999px;

  --gutter: 24px;
  --content: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --nest-bg: #1c1917;
    --nest-surface: #2a2622;
    --nest-surface-alt: #2e2623;
    --nest-border: #3e3832;

    --ink-primary: #f5efe8;
    --ink-secondary: #b5aba1;
    --ink-muted: #80756b;
    --ink-disabled: #6e665e;

    --on-accent: #221e1b;

    --ember-base: #f2836e;
    --ember-soft: #3d2722;
    --ember-text: #f7a794;

    --juniper-base: #5fb3a1;
    --juniper-soft: #1f3630;
    --juniper-text: #82cfbb;

    --honey-base: #f5c56b;
    --honey-soft: #372e20;
    --honey-text: #f0c57f;
    --honey-text-strong: #f8dcab;

    --danger-base: #f2707c;

    --inverse-surface: #443d36;
    --inverse-text: #f5efe8;
    --inverse-text-muted: #b3a9a0;
  }
}

/* ── Base ────────────────────────────────────────────────────*/

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--nest-bg);
  color: var(--ink-primary);
  font-family:
    "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ember-base);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--nest-surface);
  color: var(--ink-primary);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  z-index: 10;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

.wrap {
  max-width: var(--content);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ember-text);
  margin: 0;
}

.section-title {
  font-size: 26px;
  margin-top: 14px;
}

.section-lead {
  color: var(--ink-secondary);
  max-width: 62ch;
  margin-top: 14px;
}

/* ── Header ──────────────────────────────────────────────────*/

.site-header {
  padding-block: 20px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 20px;
  text-decoration: none;
}

/* Two overlapping dots — partner A and partner B in one nest. */
.mark {
  display: inline-block;
  width: 26px;
  height: 16px;
  flex: none;
  position: relative;
}

.mark::before,
.mark::after {
  content: "";
  position: absolute;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.mark::before {
  left: 0;
  background: var(--ember-base);
}

.mark::after {
  right: 0;
  background: var(--juniper-base);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 15px;
  font-weight: 600;
}

.site-nav a {
  color: var(--ink-secondary);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink-primary);
}

.lang-switch {
  border: 1px solid var(--nest-border);
  background: var(--nest-surface);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-primary);
  text-decoration: none;
}

@media (max-width: 640px) {
  .site-nav .nav-link {
    display: none;
  }
}

/* ── Hero ────────────────────────────────────────────────────*/

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 100px;
  align-items: center;
  padding-block: 48px 88px;
}

.badge {
  display: inline-block;
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--ember-soft);
  color: var(--ember-text);
}

.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  margin-top: 22px;
}

.hero-lead {
  font-size: 18px;
  color: var(--ink-secondary);
  margin-top: 22px;
  max-width: 52ch;
}

.cta {
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 32px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--ember-base);
  color: var(--on-accent);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  opacity: 0.9;
}

.cta-note {
  font-size: 13px;
  color: var(--ink-secondary);
  margin-top: 12px;
  max-width: 48ch;
}

/* ── App preview ─────────────────────────────────────────────
 * A drawing of the app in HTML rather than a screenshot: it stays sharp on
 * every display, follows the dark theme, and there is no screenshot to go
 * stale the next time the Home screen changes.
 */

.preview {
  background: var(--nest-bg);
  border: 1px solid var(--nest-border);
  border-radius: 34px;
  padding: 22px 16px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.preview-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: var(--ember-soft);
  color: var(--ember-text);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
}

.preview-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 18px;
}

.preview-card {
  background: var(--nest-surface);
  border: 1px solid var(--nest-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.preview-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.preview-card-head h3 {
  font-size: 17px;
}

.chip {
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--honey-soft);
  color: var(--honey-text);
  white-space: nowrap;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.box {
  width: 20px;
  height: 20px;
  flex: none;
  border: 1px solid var(--ink-muted);
  border-radius: 4px;
  background: var(--nest-surface);
}

.check-row.done .box {
  background: var(--juniper-base);
  border-color: var(--juniper-base);
  position: relative;
}

.check-row.done .box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid var(--on-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.check-row.done span {
  color: var(--ink-disabled);
}

.author-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  display: inline-block;
  background: var(--juniper-base);
}

.preview-note-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-note-head h3 {
  font-size: 16px;
}

.preview-note-body {
  font-size: 13px;
  color: var(--ink-secondary);
}

.preview-event {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

/* ── Features / privacy ──────────────────────────────────────*/

.band-alt {
  background: var(--nest-surface-alt);
}

.band .wrap {
  padding-block: 72px;
}

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

.card {
  background: var(--nest-surface);
  border: 1px solid var(--nest-border);
  border-radius: var(--radius-card);
  padding: 28px;
}

.card h3 {
  font-size: 20px;
  margin-top: 14px;
}

.card p {
  color: var(--ink-secondary);
  font-size: 15px;
  margin-top: 12px;
}

.icon-tile {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
}

.icon-tile svg {
  width: 24px;
  height: 24px;
}

.icon-tile.ember {
  background: var(--ember-soft);
  color: var(--ember-text);
}

.icon-tile.juniper {
  background: var(--juniper-soft);
  color: var(--juniper-text);
}

.icon-tile.honey {
  background: var(--honey-soft);
  color: var(--honey-text-strong);
}

/* The private and solo cards deliberately carry no badge — absence of the
 * shared badge is what "private" looks like in the app. The label keeps the
 * three card headers on one baseline and names the absence out loud. */
.card-label {
  display: inline-block;
  min-height: 26px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-disabled);
  padding-block: 5px;
}

.card-label.shared {
  background: var(--honey-soft);
  color: var(--honey-text);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
}

/* ── Launch band ─────────────────────────────────────────────*/

.launch {
  background: var(--inverse-surface);
  color: var(--inverse-text);
}

.launch .wrap {
  padding-block: 72px;
  display: grid;
  /* A fixed second column so the field and the button stay on one line —
     with an auto column the form wrapped as soon as the copy grew. */
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 80px;
  align-items: center;
}

.launch .eyebrow {
  color: var(--honey-base);
}

.launch h2 {
  font-size: 30px;
  margin-top: 14px;
}

.launch p {
  color: var(--inverse-text-muted);
  margin-top: 14px;
  max-width: 52ch;
}

.launch .cta-note {
  color: var(--inverse-text-muted);
}

/* ── Footer ──────────────────────────────────────────────────*/

.site-footer .wrap {
  padding-block: 64px 40px;
}

.footer-columns {
  display: grid;
  grid-template-columns: 320px repeat(3, minmax(0, 1fr));
  gap: 48px;
}

.footer-tagline {
  color: var(--ink-secondary);
  font-size: 14px;
  margin-top: 14px;
  max-width: 34ch;
}

.footer-columns h2 {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-primary);
  margin-bottom: 12px;
}

.footer-columns ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-secondary);
}

.footer-columns a {
  color: var(--ink-secondary);
  text-decoration: none;
}

.footer-columns a:hover {
  color: var(--ink-primary);
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--nest-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-secondary);
}

/* ── Narrow screens ──────────────────────────────────────────*/

@media (max-width: 900px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-block: 24px 56px;
  }

  .preview {
    max-width: 340px;
    margin-inline: auto;
  }

  .band .wrap,
  .launch .wrap,
  .site-footer .wrap {
    padding-block: 56px;
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-top: 28px;
  }

  .launch .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .footer-columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ── Launch-notification form ────────────────────────────────
 * Posts to the public waitlist endpoint; the contract lives in
 * docs/waitlist-endpoint.md. Both instances of the form (hero and launch
 * band) share these rules, so the dark band overrides only the colours.
 */

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

.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
  max-width: 520px;
}

.signup input {
  flex: 1 1 240px;
  min-width: 0;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--nest-border);
  border-radius: var(--radius-input);
  background: var(--nest-surface);
  color: var(--ink-primary);
  font-family: inherit;
  font-size: 16px;
}

.signup input::placeholder {
  color: var(--ink-disabled);
}

.signup input:focus-visible {
  border-color: var(--ember-base);
}

.signup input[aria-invalid="true"] {
  border-color: var(--danger-base);
  box-shadow: inset 0 0 0 1px var(--danger-base);
}

.signup button[disabled] {
  opacity: 0.65;
  cursor: progress;
}

.form-status {
  flex: 1 0 100%;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
}

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

.launch .form-status {
  color: var(--inverse-text-muted);
}

.launch .signup {
  margin-top: 0;
}

/* Confirmation replaces the fields — the page should not invite the same
 * address twice. Shown for `already_registered` as well: a visibly different
 * outcome would turn a public endpoint into an address-existence oracle. */
.signup-done {
  max-width: 520px;
  margin-top: 26px;
  padding: 18px 20px;
  border: 1px solid var(--juniper-base);
  border-radius: var(--radius-lg);
  background: var(--juniper-soft);
  color: var(--juniper-text);
}

.signup-done .done-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
}

.signup-done .tick {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--juniper-base);
}

.signup-done .tick::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  width: 5px;
  height: 9px;
  border: solid var(--on-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.signup-done p {
  margin-top: 6px;
  font-size: 14px;
}

/* On a phone the field and the button each take the full row — a
 * content-width button next to a full-width field reads as an afterthought.
 */
@media (max-width: 640px) {
  .signup input,
  .signup button {
    flex: 1 1 100%;
  }
}
