/* Welvin website - light theme (direction B). Tokens mirror the app's light palette
   (lib/core/themes/welvin_colors.dart) plus the dark app colours for the phone mockups. */

@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #F5F4F0;
  --surface: #FFFFFF;
  --ink: #1A1A1C;
  --text: rgba(60, 60, 67, 0.85);
  --text-soft: rgba(60, 60, 67, 0.75);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --accent: #C68A1F;
  --accent-text: #8A6516;
  --accent-text-hover: #6E5011;
  --accent-soft: #FBF1DC;
  --amber: #E8B046;

  /* dark app (phone mockups, dark panels) */
  --app-bg: #0A0A0B;
  --app-surface: #161618;
  --app-surface2: #1F1F22;
  --app-elevated: #26262A;
  --app-text: #F2F2F5;
  --app-dim: rgba(235, 235, 245, 0.7);
  --app-faint: rgba(235, 235, 245, 0.45);
  --app-border: rgba(255, 255, 255, 0.12);
  --app-hairline: rgba(255, 255, 255, 0.08);

  --trip: #1AA7E8;
  --health: #E64C66;
  --ideas: #F5A524;
  --shopping: #7A5AE0;
  --teal: #14B8A6;
  --danger: #EF4444;

  --radius-card: 24px;
  --shadow-card: 0 18px 40px rgba(26, 26, 28, 0.12);
  --max: 1200px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: var(--accent-text); }
a:hover { color: var(--accent-text-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, p { margin: 0; }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ic-sm { width: 16px; height: 16px; }
.ic-xs { width: 14px; height: 14px; }
.ic-lg { width: 22px; height: 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.dots { background-image: radial-gradient(rgba(26, 26, 28, 0.09) 1px, transparent 1.2px); background-size: 22px 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 26px; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--ink); color: #FFFFFF; }
.btn-dark:hover { background: #33333A; color: #FFFFFF; }
.btn-light { background: var(--surface); color: var(--ink); border: 1px solid var(--border-strong); font-weight: 600; }
.btn-light:hover { background: #FAF9F6; color: var(--ink); box-shadow: 0 6px 18px rgba(26, 26, 28, 0.08); }
.btn-sm { height: 42px; padding: 0 20px; font-size: 14px; font-weight: 600; }
.btn-md { height: 48px; padding: 0 22px; font-size: 15px; }
.btn .accent-icon { color: var(--amber); display: flex; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(245, 244, 240, 0.85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.site-header.bordered { border-bottom: 1px solid var(--border); }
.nav { height: 76px; display: flex; align-items: center; gap: 32px; }
.nav .brand img { height: 24px; width: auto; }
.nav-links { flex: 1; display: flex; justify-content: center; gap: 30px; font-size: 15px; font-weight: 500; }
.nav-links a { color: var(--text); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.nav-back { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none; }
.nav-back:hover { color: var(--ink); }
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
}

/* ---------- Section basics ---------- */
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section-white { background: var(--surface); border-top: 1px solid rgba(0, 0, 0, 0.06); border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; color: var(--accent-text); text-transform: uppercase; }
.h2 { font-size: clamp(34px, 4.4vw, 58px); line-height: 1.04; letter-spacing: -0.04em; font-weight: 700; }
.lead { font-size: 18px; line-height: 1.55; color: var(--text); }
.section-head { display: flex; flex-direction: column; gap: 16px; }
.section-head.center { align-items: center; text-align: center; }
.section-head .h2 { max-width: 760px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 6vw, 88px); }
.hero-copy { max-width: 920px; margin: 0 auto; padding: 0 var(--gutter); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 26px; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid rgba(0, 0, 0, 0.1); font-size: 13px; font-weight: 500; color: rgba(60, 60, 67, 0.9); }
.pill strong { padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.hero h1 { font-size: clamp(44px, 7vw, 96px); line-height: 0.98; letter-spacing: -0.045em; font-weight: 700; }
.underlined { position: relative; display: inline-block; white-space: nowrap; }
.underlined svg { position: absolute; left: -2%; bottom: -0.16em; width: 104%; height: 0.26em; overflow: visible; }
.underlined path { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; }
.hero .sub { max-width: 600px; font-size: clamp(17px, 1.7vw, 21px); line-height: 1.55; color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* the thread with saved things on it */
.thread-stage { position: relative; height: 330px; margin-top: clamp(40px, 5vw, 64px); overflow: hidden; }
.thread-stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.thread-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
.thread-items { position: relative; height: 100%; display: flex; justify-content: center; align-items: flex-start; gap: 26px; padding-top: 30px; }
.chip-card { flex-shrink: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-card); text-align: left; }
.chip-label { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent-text); }
.chip-title { font-size: 15px; font-weight: 600; line-height: 1.35; }
.chip-caption { padding: 0 4px; font-size: 13px; font-weight: 600; }
.chip-note { width: 190px; margin-top: 70px; transform: rotate(-4deg); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chip-photo { width: 176px; margin-top: 4px; transform: rotate(3deg); padding: 8px 8px 12px; display: flex; flex-direction: column; gap: 10px; }
.chip-photo .photo { width: 100%; height: 128px; border-radius: 12px; object-fit: cover; background: var(--trip); }
.chip-thread { flex-shrink: 0; margin-top: 104px; display: flex; align-items: center; gap: 12px; padding: 12px 20px 12px 12px; border-radius: 999px; background: var(--ink); color: #FFFFFF; box-shadow: 0 22px 50px rgba(26, 26, 28, 0.28); }
.chip-thread .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--amber); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.chip-thread .name { display: block; font-size: 16px; font-weight: 700; }
.chip-thread .meta { display: block; font-size: 12.5px; color: rgba(255, 255, 255, 0.65); }
.chip-file { width: 200px; margin-top: 10px; transform: rotate(-3deg); padding: 14px; display: flex; gap: 12px; align-items: center; }
.chip-file .file-icon { width: 44px; height: 44px; border-radius: 12px; background: #FDE8E8; color: #D92D2D; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chip-file .size { display: block; font-size: 12px; color: var(--text-soft); }
.chip-link { width: 196px; margin-top: 92px; transform: rotate(4deg); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.chip-place { width: 184px; margin-top: 18px; transform: rotate(-2deg); padding: 8px 8px 12px; display: flex; flex-direction: column; gap: 10px; }
.map { height: 92px; border-radius: 12px; background-color: #E6EEF0; background-image: linear-gradient(rgba(26, 26, 28, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(26, 26, 28, 0.07) 1px, transparent 1px); background-size: 16px 16px; display: flex; align-items: center; justify-content: center; color: var(--health); }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; padding: 8px var(--gutter) 0; font-size: 14px; font-weight: 500; color: rgba(60, 60, 67, 0.8); }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust .ic { color: var(--accent-text); }
@media (max-width: 640px) {
  .thread-stage { height: 250px; }
  .thread-items { transform: scale(0.72); transform-origin: top center; }
}

/* ---------- The app (dark panel with phones) ---------- */
.app-band { padding: 0 16px; }
.app-panel {
  max-width: 1240px; margin: 0 auto; border-radius: 36px; overflow: hidden;
  background-color: var(--app-bg);
  background-image: radial-gradient(50% 60% at 70% 50%, rgba(232, 176, 70, 0.18), rgba(232, 176, 70, 0) 70%);
  color: var(--app-text);
  padding: clamp(36px, 6vw, 80px) clamp(24px, 5vw, 72px) 0;
  display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-end;
}
.app-panel .copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 18px; padding-bottom: clamp(36px, 6vw, 80px); align-self: center; }
.app-panel .eyebrow { color: var(--amber); }
.app-panel .h2 { font-size: clamp(32px, 4vw, 52px); }
.app-panel .lead { color: var(--app-dim); }
.phones { flex: 1 1 520px; min-width: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; height: 520px; overflow: hidden; }
.phone { width: 270px; height: 580px; flex-shrink: 0; border-radius: 44px 44px 0 0; padding: 10px 10px 0; background: #1A1A1D; border: 1px solid rgba(255, 255, 255, 0.14); border-bottom: 0; }
.phone + .phone { margin-top: 48px; }
/* Real screenshots keep their own aspect ratio: no side crop, so the app's margins stay true. */
.screen-shot { display: block; width: 100%; height: auto; border-radius: 35px 35px 0 0; background: var(--app-bg); }

/* ---------- Features ---------- */
.features { padding-top: clamp(80px, 10vw, 136px); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 16px; margin-top: 56px; }
.card { border-radius: var(--radius-card); background: var(--surface); border: 1px solid rgba(0, 0, 0, 0.07); padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.card h3 { font-size: 20px; font-weight: 700; }
.card p { font-size: 15.5px; line-height: 1.55; color: var(--text); }
.icon-tile { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }

/* ---------- How it works ---------- */
.steps-wrap { position: relative; margin-top: 64px; }
.steps-wrap > svg { position: absolute; left: 0; top: 0; width: 100%; height: 60px; }
.steps { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 40px; }
.steps li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.step-num { width: 60px; height: 60px; border-radius: 50%; background: var(--ink); color: var(--amber); font-size: 20px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 8px var(--surface); }
.steps h3 { margin-top: 8px; font-size: 22px; font-weight: 700; }
.steps p { max-width: 320px; font-size: 16px; line-height: 1.55; color: var(--text); }
@media (max-width: 960px) { .steps-wrap > svg { display: none; } }

/* ---------- AI (coming later) ---------- */
.ai { padding: clamp(72px, 9vw, 128px) 16px; }
.ai-panel {
  max-width: var(--max); margin: 0 auto; border-radius: 36px; color: var(--app-text);
  background-color: var(--ink);
  background-image: radial-gradient(60% 80% at 100% 0%, rgba(232, 176, 70, 0.2), rgba(232, 176, 70, 0) 70%);
  padding: clamp(28px, 5vw, 64px); display: flex; flex-wrap: wrap; gap: 48px; align-items: center;
}
.ai-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.ai-copy .h2 { font-size: clamp(32px, 4vw, 50px); }
.ai-copy .lead { color: var(--app-dim); }
.ai-copy .note { font-size: 14px; color: rgba(235, 235, 245, 0.6); }
.badge-dark { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #3A2C12; color: #D9C08A; font-size: 13px; font-weight: 600; }
.ai-demo { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: 24px; background: var(--app-bg); border: 1px solid var(--app-hairline); }
.bubble-me { align-self: flex-end; max-width: 80%; padding: 12px 16px; border-radius: 18px 18px 4px 18px; background: var(--app-surface2); border: 0.5px solid var(--app-border); font-size: 15px; }
.bubble-ai { align-self: flex-start; max-width: 88%; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 18px 18px 18px 4px; background: var(--app-surface); border: 1px solid rgba(232, 176, 70, 0.3); font-size: 15px; line-height: 1.5; }
.bubble-ai .who { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--amber); }
.bubble-ai .source { align-self: flex-start; padding: 5px 10px; border-radius: 8px; background: var(--app-elevated); font-size: 12px; color: rgba(235, 235, 245, 0.75); }
.ask { height: 46px; border-radius: 23px; background: var(--app-surface); border: 1px solid var(--app-border); padding: 0 16px; display: flex; align-items: center; font-size: 14px; color: var(--app-faint); }

/* ---------- Privacy ---------- */
.privacy-wrap { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.privacy-wrap .section-head { flex: 1 1 360px; min-width: 0; }
.privacy-grid { flex: 1 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.privacy-grid .card { padding: 24px; border-radius: 20px; gap: 8px; }
.privacy-grid h3 { font-size: 17px; }
.privacy-grid p { font-size: 15px; line-height: 1.5; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; padding: 0 var(--gutter); }
.faq .h2 { text-align: center; margin-bottom: 40px; }
.faq details { border-bottom: 1px solid rgba(0, 0, 0, 0.1); padding: 22px 0; }
.faq summary { cursor: pointer; font-size: 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; font-weight: 400; color: var(--accent-text); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 12px; font-size: 16px; line-height: 1.6; color: var(--text); }
.faq strong { color: var(--ink); }

/* ---------- Join the beta ---------- */
.join { position: relative; padding: clamp(88px, 10vw, 150px) var(--gutter); overflow: hidden; }
.join > svg { position: absolute; left: 0; top: 50%; width: 100%; height: 200px; transform: translateY(-50%); }
.join > svg path { stroke-opacity: 0.45; }
.join-card { position: relative; max-width: 920px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; padding: clamp(32px, 5vw, 56px) clamp(20px, 4vw, 48px); border-radius: 32px; background: var(--surface); border: 1px solid rgba(0, 0, 0, 0.07); box-shadow: 0 30px 70px rgba(26, 26, 28, 0.12); }
.join-card > img { width: 72px; height: 72px; }
.join-card .h2 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.02; letter-spacing: -0.045em; }
.join-card .lead { max-width: 560px; }
.platforms { width: 100%; margin-top: 8px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; text-align: left; }
.platform { padding: 26px; border-radius: 22px; background: var(--bg); border: 1px solid rgba(0, 0, 0, 0.06); display: flex; flex-direction: column; gap: 18px; }
.platform-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.platform-head h3 { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; }
.tag { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.tag-open { background: var(--ink); color: var(--amber); }
.tag-soon { background: var(--accent-soft); color: var(--accent-text); }
.platform ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.platform li { display: flex; flex-direction: column; gap: 10px; }
.platform li > span, .platform p { font-size: 15px; line-height: 1.55; color: rgba(60, 60, 67, 0.9); }
.platform .btn { align-self: flex-start; }
.platform small { font-size: 13.5px; color: var(--text-soft); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--text-soft); }
.footer-brand img { height: 20px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; }
.footer-links a { color: var(--text); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Legal + support pages ---------- */
.doc { padding: clamp(48px, 7vw, 96px) var(--gutter); }
.doc article, .doc .doc-inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
.doc .doc-inner.wide { max-width: 960px; gap: 56px; }
.doc-head { display: flex; flex-direction: column; gap: 16px; }
.doc-head.ruled { padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.doc h1 { font-size: clamp(38px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 700; }
.doc .updated { font-size: 15px; color: var(--text-soft); }
.summary { padding: 20px 22px; border-radius: 16px; background: var(--accent-soft); font-size: 16px; line-height: 1.6; }
.summary strong { color: var(--accent-text); }
.doc section { display: flex; flex-direction: column; gap: 14px; }
.doc h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.doc section p, .doc section li { font-size: 16.5px; line-height: 1.65; color: var(--text); }
.doc section ul, .doc section ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.doc section strong { color: var(--ink); }

.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.help-card { text-decoration: none; color: var(--ink); padding: 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.help-card:hover { color: var(--ink); box-shadow: var(--shadow-card); transform: translateY(-2px); }
.help-card .icon-tile { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); }
.help-card .title { font-size: 20px; font-weight: 700; }
.help-card .desc { font-size: 15.5px; line-height: 1.55; color: var(--text); }
.help-card .cta { font-size: 15px; font-weight: 600; color: var(--accent-text); }

.danger-zone { display: flex; flex-direction: column; gap: 22px; padding: clamp(24px, 4vw, 44px); border-radius: 24px; border: 1px solid rgba(239, 68, 68, 0.35); background: #FFF6F6; }
.danger-zone h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.1; letter-spacing: -0.03em; }
.danger-zone > p { font-size: 16.5px; line-height: 1.6; color: var(--text); }
.danger-zone .grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.danger-zone .card { padding: 22px; border-radius: 18px; gap: 12px; }
.danger-zone .card h3 { font-size: 18px; }
.danger-zone ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 16px; line-height: 1.55; color: var(--text); }
