/* Bedside marketing site — self-hosted styles.
   Design tokens extracted from the approved Claude Design export
   (docs/design/Bedside Landing.html) and docs/design.md ("The Mix").
   Archivo is self-hosted from web/fonts/ — no third-party font CDN
   (docs/design/landing-page.md §3b: a Google Fonts @import would send
   every visitor's IP to Google, which the privacy policy promises we
   don't do). */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/archivo-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: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/archivo-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: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/archivo-vietnamese.woff2") format("woff2");
  unicode-range:
    U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
    U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
    U+1EA0-1EF9, U+20AB;
}

:root {
  --color-bg: #f0f4f5;
  --color-surface: #e3ecee;
  --color-text: #1c2b33;
  --color-muted: #46606e;
  --color-accent: #0d9488;
  --color-accent-100: #f0fdfa;
  --color-accent-700: #0f766e;
  --color-accent-800: #115e59;
  --color-accent-900: #0e2f2b;
  --color-divider: #b9cdd4;
  --color-negative: #e11d48;

  --font-heading: "Archivo", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
}

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

/* Several elements toggle visibility via the `hidden` attribute (site.js /
   account.js) while also carrying a class that sets `display` (.btn,
   .account-actions, .lang-banner, etc). Without this, `[hidden]` and the
   class selector tie on specificity, and the class -- loaded after the
   browser's own UA stylesheet -- wins the tie, so `hidden` silently does
   nothing. !important is the correct tool here, not a hack: `hidden` must
   always win over any component class, unconditionally. (Bug found live,
   2026-08-24: the language banner's dismiss button correctly set
   `hidden`, but the banner stayed visually displayed anyway.)
*/
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-2);
}
h6 {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
p {
  margin: 0 0 var(--space-3);
}
a {
  color: var(--color-accent);
  text-underline-offset: 3px;
}
img {
  display: block;
  max-width: 100%;
}
figure {
  margin: 0;
}
figcaption {
  font-size: 11px;
  margin-top: var(--space-1);
  color: var(--color-muted);
}
:focus {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
::selection {
  background: color-mix(in srgb, var(--color-accent) 30%, transparent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
  color: var(--color-text);
  background: transparent;
  border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: 10px;
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-accent-700);
}
.btn-secondary {
  border-color: var(--color-divider);
}
.btn-secondary:hover {
  background: color-mix(in srgb, var(--color-text) 7%, transparent);
}
.btn-block {
  width: 100%;
  margin-top: var(--space-2);
  justify-content: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.02em;
  padding: 3px 10px;
  border-radius: 8px;
}
.tag-accent {
  background: var(--color-accent-100);
  color: var(--color-accent-800);
}

.toggle {
  display: flex;
  border: 1px solid var(--color-divider);
  border-radius: 999px;
  overflow: hidden;
}
.toggle button {
  padding: 7px 13px;
  font-size: 12.5px;
  font-family: var(--font-heading);
  font-weight: 800;
  border: 0;
  cursor: pointer;
  background: transparent;
  color: var(--color-text);
}
.toggle button[aria-pressed="true"] {
  background: var(--color-accent-700);
  color: #fff;
}
.toggle a {
  padding: 7px 13px;
  font-size: 12.5px;
  font-family: var(--font-heading);
  font-weight: 800;
  text-decoration: none;
  color: var(--color-text);
  display: inline-block;
}
.toggle a[aria-current="true"] {
  background: var(--color-accent-700);
  color: #fff;
}

.seg {
  display: inline-flex;
  background: var(--color-bg);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.seg button {
  padding: 7px 14px;
  font: inherit;
  font-size: 12.5px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  color: var(--color-muted);
  font-weight: 500;
}
.seg button[aria-pressed="true"] {
  background: #fff;
  color: var(--color-accent-700);
  font-weight: 700;
}

.chip {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  background: none;
  color: var(--color-text);
}
.chip .box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--color-divider);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex: none;
}
.chip[aria-pressed="true"] .box {
  border-color: var(--color-accent-700);
  background: var(--color-accent-700);
}

.field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 4px;
}
.field input {
  width: 100%;
  border: 1px solid var(--color-divider);
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 14px;
  font-family: inherit;
  background: #fbfdfd;
  color: var(--color-text);
}

.wordmark {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-decoration: none;
}
.wordmark span {
  color: var(--color-accent-700);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 40px);
}
.section {
  border-top: 2px solid var(--color-divider);
}
.section-surface {
  background: var(--color-surface);
}
.section-pad {
  padding: clamp(40px, 6vw, 72px) clamp(18px, 4vw, 40px);
}

.faq-item {
  border-top: 2px solid var(--color-divider);
}
.faq-q {
  width: 100%;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: 0;
  padding: 18px 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 17px;
  color: var(--color-text);
  min-height: 56px;
}
.faq-a {
  font-size: 14.5px;
  opacity: 0.85;
  max-width: 70ch;
  margin: 0;
  padding: 0;
  height: 0;
  overflow: hidden;
}
.faq-item[data-open="true"] .faq-a {
  padding: 0 0 20px;
  height: auto;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 0 clamp(20px, 3vw, 36px);
}
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(16px, 2vw, 22px);
}
.grid-pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(18px, 3vw, 28px);
}

/* — language-suggestion banner (W2, docs/design/landing-page.md §3c) — */
.lang-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--color-accent-900);
  color: #e6f2f0;
  font-size: 13px;
  padding: 10px clamp(18px, 4vw, 40px);
  text-align: center;
}
.lang-banner a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
}
.lang-banner button {
  background: none;
  border: 0;
  color: #e6f2f0;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

/* — account/sign-in page (W2) — */
.account-shell {
  max-width: 440px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 88px) clamp(18px, 4vw, 40px);
}
.account-card {
  background: var(--color-bg);
  border: 2px solid var(--color-divider);
  border-radius: 14px;
  padding: clamp(22px, 4vw, 32px);
}
.account-card + .account-card {
  margin-top: 18px;
}
.account-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  font-size: 12px;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.account-divider::before,
.account-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-divider);
}
.account-field {
  margin-bottom: 12px;
}
.account-field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 4px;
}
.account-field input {
  width: 100%;
  border: 1px solid var(--color-divider);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fbfdfd;
  color: var(--color-text);
}
.account-error {
  color: var(--color-negative);
  font-size: 13px;
  margin: 10px 0 0;
}
.account-plan-tier {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 22px;
  margin: 4px 0;
}
.account-plan-renewal {
  font-size: 13.5px;
  color: var(--color-muted);
  margin: 0 0 16px;
}
.account-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.account-signed-in-as {
  font-size: 12.5px;
  color: var(--color-muted);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.account-loading {
  text-align: center;
  color: var(--color-muted);
  font-size: 14px;
  padding: 40px 0;
}

/* — legal pages (W3): privacy policy / terms of service — */
.legal-content {
  max-width: 70ch;
}
.legal-content .legal-updated {
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 32px;
}
.legal-content h2 {
  font-size: 20px;
  margin-top: 40px;
  margin-bottom: 10px;
}
.legal-content h2:first-of-type {
  margin-top: 8px;
}
.legal-content p {
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 14px;
}
.legal-content ul {
  margin: 0 0 14px;
  padding-left: 22px;
}
.legal-content li {
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 8px;
}
.legal-content strong {
  color: var(--color-text);
}
