/* The single-page site (src/pages/site.tsx). Meadow palette, from the ditsala 003 prototype;
   eucalyptus-text replaces eucalyptus for text on cream, which fails AA contrast. */

:root {
  --ink: #1f2a33;
  --eucalyptus: #5e7f6a;
  --eucalyptus-text: #4f6d5a;
  --sage: #8fa98b;
  --peach: #f2b28c;
  --cream: #f5f2ec;
  --slate: #4a5560;
  --white: #fff;
  --ink-raised: #2a3742;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  /* Menu jumps land below the sticky header. */
  scroll-padding-top: 80px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  font:
    18px / 1.6 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  color: var(--ink);
  background: var(--cream);
}
a {
  color: var(--eucalyptus-text);
}
img {
  max-width: 100%;
  display: block;
}
.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  background: var(--ink);
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}
.logo {
  color: var(--white);
  display: block;
  line-height: 0;
  padding: 6px 0;
}
.logo:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 4px;
  border-radius: 6px;
}
.wordmark {
  display: block;
  width: 110px;
  height: auto;
  transform: translateY(-4px); /* optical: the letters sit low in the SVG box */
}
.wordmark .ts {
  stroke: var(--peach);
}
nav ul {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
nav a {
  color: var(--sage);
  text-decoration: none;
  font-size: 16px;
}
nav li + li::before {
  content: "|" / "";
  color: #5c6b76;
  margin-right: 16px;
}
nav a:hover,
nav a:focus {
  color: var(--peach);
  text-decoration: underline;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  background: var(--peach);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 17px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover,
.btn:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 2px;
}

/* ---- Hero ---- */
.hero {
  background: var(--ink);
  color: var(--cream);
  padding: 40px 0 72px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 56px;
  align-items: center;
}
.hero-img {
  width: 100%;
  max-width: 340px;
  height: auto;
  margin: 0 auto;
}
.hero-grid > .hero-img {
  order: -1;
}
.eyebrow {
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}
.hero h1 {
  font-size: clamp(36px, 7vw, 60px);
  line-height: 1.1;
  margin: 12px 0 20px;
}
.hero h1 span {
  color: var(--peach);
}
.hero .lead {
  font-size: 20px;
  max-width: 40em;
}
.cta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.hero .note {
  color: var(--sage);
  font-size: 16px;
  line-height: 1.4;
  margin: 0;
}

/* The word card: tsala, how to say it, what it means. */
.word {
  display: grid;
  gap: 7px 10px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #3a4954;
}
.word-name {
  display: grid;
  line-height: 1;
}
.word-name .w {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--cream);
}
.word-name .pron {
  font-size: 14px;
  color: var(--sage);
  margin-top: 3px;
  letter-spacing: 0.5px;
}
.word-name .pron b {
  color: var(--cream);
}
.word-def p {
  margin: 0;
}
.meaning {
  font-size: 15px;
  color: var(--cream);
}
.meaning mark {
  background: rgb(143 169 139 / 28%);
  color: var(--cream);
  padding: 0 4px;
  border-radius: 3px;
}
.word-def .plural {
  font-size: 14px;
  color: var(--sage);
  margin-top: 3px;
}
.plural i {
  color: var(--cream);
}
.lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink-raised);
  color: var(--cream);
  border-radius: 999px;
  padding: 2px 8px 2px 3px;
  margin-left: 6px;
  font-size: 13px;
  white-space: nowrap;
}
.badge {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--eucalyptus);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 8px;
  font-weight: 700;
}

/* ---- Sections and cards ---- */
section {
  padding: 64px 0;
}
section h2 {
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.2;
  margin: 0 0 16px;
  color: var(--ink);
}
.intro {
  max-width: 40em;
  color: var(--slate);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  border-top: 6px solid var(--sage);
}
.card h3 {
  margin: 0 0 8px;
}
.card-img {
  height: 340px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto 18px;
}
.zoom {
  display: block;
  text-decoration: none;
  cursor: zoom-in;
  text-align: center;
  border-radius: 12px;
}
.zoom:focus-visible {
  outline: 3px solid var(--eucalyptus);
  outline-offset: 4px;
}
.zoom .card-img {
  margin-bottom: 6px;
  transition: transform 0.15s ease;
}
.zoom:hover .card-img {
  transform: scale(1.03);
}
@media (prefers-reduced-motion: reduce) {
  .zoom .card-img {
    transition: none;
  }
  .zoom:hover .card-img {
    transform: none;
  }
}
.zoom-hint {
  display: inline-block;
  font-size: 14px;
  color: var(--eucalyptus-text);
  margin-bottom: 14px;
}
.dark {
  background: var(--ink);
  color: var(--cream);
}
.dark h2,
.dark .intro {
  color: var(--cream);
}
.dark .card {
  background: var(--ink-raised);
  color: var(--cream);
  border-top-color: var(--peach);
}
#privacy .card h3 {
  color: var(--peach);
}
.dark .tracking {
  color: var(--sage);
  margin-top: 24px;
}
.dark a:not(.btn) {
  color: var(--sage);
}
.dark a:not(.btn):hover {
  color: var(--cream);
}
.accent {
  color: var(--eucalyptus-text);
}
.dark .accent,
.hero .accent {
  color: var(--peach);
}
#what .intro .accent,
.wait .accent {
  font-weight: 700;
}
.price {
  font-size: 28px;
  font-weight: 700;
  color: var(--eucalyptus-text);
  margin: 4px 0 8px;
}
.tagline {
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--eucalyptus-text);
  margin: -4px 0 10px;
}
.offer {
  background: var(--peach);
  border-radius: 12px;
  padding: 14px 18px;
  margin-top: 24px;
  font-weight: 700;
}
.small {
  color: var(--slate);
  font-size: 16px;
}
.cta-band {
  text-align: center;
  padding: 40px 0;
}

/* ---- Request an invite ---- */
.request {
  background: var(--white);
}
.signup-form {
  max-width: 520px;
  display: grid;
  gap: 16px;
  margin-top: 20px;
}
.signup-form label,
.signup-form .field {
  font-weight: 700;
  display: grid;
  gap: 6px;
}
.signup-form input,
.signup-form select {
  font: inherit;
  padding: 12px;
  border: 2px solid var(--slate);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
}
.signup-form select {
  /* Native selects ignore padding in Safari; draw our own arrow so it matches the inputs. */
  appearance: none;
  background: var(--white)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231f2a33' stroke-width='2'/%3E%3C/svg%3E")
    no-repeat right 14px center;
  padding-right: 40px;
}
.signup-form input:focus-visible,
.signup-form select:focus-visible {
  outline: 3px solid var(--eucalyptus);
  outline-offset: 1px;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.rest {
  display: grid;
  gap: 16px;
}
.rest[hidden],
.too-young[hidden] {
  display: none;
}
.too-young {
  margin: 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--cream);
  border-left: 4px solid var(--eucalyptus-text);
  font-weight: 700;
}
.privacy-note {
  font-size: 15px;
  color: var(--slate);
  background: var(--cream);
  padding: 12px;
  border-radius: 10px;
}

/* ---- About and FAQ ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
  align-items: start;
}
.about-grid .intro p {
  margin: 0 0 16px;
}
.about-img {
  width: 100%;
  max-width: 280px;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  justify-self: center;
  margin-top: 8px;
}
details {
  background: var(--white);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 12px 0;
}
summary {
  font-weight: 700;
  cursor: pointer;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--ink);
  color: var(--sage);
  padding: 32px 0;
  font-size: 16px;
}
.site-footer a {
  color: var(--cream);
}

/* ---- Narrow screens ---- */
@media (max-width: 760px) {
  .hero-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }
  .hero-img {
    max-width: 260px;
    margin-top: 8px;
  }
  .hero-grid > .hero-img {
    order: 0;
  }
}
@media (max-width: 520px) {
  .row {
    grid-template-columns: 1fr;
  }
  .site-header {
    position: static;
  }
  html {
    scroll-padding-top: 0;
  }
  .site-header .btn {
    display: none;
  }
}

/* ---- Signup screens and personal pages (src/pages/flow.tsx) ---- */
.panel {
  min-height: 60vh;
}
.panel h1 {
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.2;
  margin: 0 0 16px;
}
.panel h2 {
  font-size: 24px;
  margin: 0 0 8px;
}
.referral-note {
  display: inline-block;
  background: var(--peach);
  color: var(--ink);
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 14px;
  margin: 0 0 16px;
}
.field-error {
  color: #a3341a;
  font-weight: 400;
  font-size: 15px;
}
.form-message,
.form-notice {
  border-radius: 10px;
  padding: 12px;
  margin: 0;
}
.form-message {
  background: #fbe9e4;
  color: #7a2611;
}
.form-notice {
  background: var(--cream);
  color: var(--ink);
}
.signup-form [aria-invalid="true"] {
  border-color: #a3341a;
}
.signup-form .code {
  letter-spacing: 8px;
  font-size: 28px;
  text-align: center;
  max-width: 240px;
}
/* The field people never see: off screen, out of the tab order, ignored by screen readers. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.secondary-form {
  margin-top: 16px;
}
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--eucalyptus-text);
  text-decoration: underline;
  cursor: pointer;
}
.reflink {
  background: var(--cream);
  border-radius: 10px;
  padding: 12px;
  word-break: break-all;
  font-family: ui-monospace, monospace;
  font-size: 16px;
}
.share-actions,
.inline-forms {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.qr {
  margin: 8px 0 0;
  width: 220px;
  max-width: 100%;
}
.qr svg {
  display: block;
  width: 100%;
  height: auto;
}
.manage-block {
  border-top: 1px solid #ddd8ce;
  padding-top: 24px;
  margin-top: 32px;
}
.btn-quiet {
  background: var(--cream);
  border: 2px solid var(--slate);
}
.btn-danger {
  background: #a3341a;
  color: var(--white);
}

/* ---- Privacy notice (src/pages/privacy.tsx) ---- */
.notice {
  max-width: 720px;
}
.notice h2 {
  margin-top: 32px;
}
.notice ul {
  padding-left: 1.25em;
}
.notice li + li {
  margin-top: 8px;
}
