/* VIVIR. — always dark: black background, white text
   Fonts: Times New Roman (headings & subheadings) + Arial (body text) */

:root {
  --bg: #000000;
  --fg: #ffffff;
  --muted: #a8a8a8;
  --line: rgba(255, 255, 255, 0.18);
  --field: #111111;
  --logo-filter: invert(1);
  --head: "Times New Roman", Times, "Liberation Serif", serif;
  --body: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --max: 1120px;
  --header-h: 57px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
section[id] { scroll-margin-top: var(--header-h); }

/* ---------- Type ---------- */
h1, h2, h3, .subhead {
  font-family: var(--head);
  font-weight: 400;
  font-style: normal;
  line-height: 1.08;
  margin: 0;
}
h1 { font-size: clamp(46px, 7.5vw, 96px); letter-spacing: -0.01em; }
h2 { font-size: clamp(36px, 5vw, 60px); }
h3 { font-size: 28px; }
.subhead { font-size: clamp(24px, 2.8vw, 34px); line-height: 1.25; max-width: 820px; }
.eyebrow { font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; margin: 0 0 16px; color: var(--muted); }
/* the app name in running text */
.brand { font-family: var(--head); font-style: italic; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: var(--max); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo img { height: 28px; width: auto; filter: var(--logo-filter); }
.nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; align-items: center; }
.nav a { text-decoration: none; font-size: 15px; }
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.nav .nav-cta { border: 1px solid var(--fg); padding: 8px 16px; border-radius: 999px; }
.nav .nav-cta:hover { background: var(--fg); color: var(--bg); text-decoration: none; }
@media (max-width: 760px) { .nav li.hide-sm { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 700;
  padding: 14px 28px; border-radius: 999px; text-decoration: none;
  border: 1px solid currentColor; background: transparent; color: inherit;
}
.btn-solid { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn:hover { opacity: 0.85; }

/* ---------- Hero ---------- */
.home-hero { position: relative; height: calc(100svh - var(--header-h)); min-height: 560px; overflow: hidden; color: #fff; background: #3a2a3a; }
.home-hero picture, .home-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 70%; }
.home-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.42) 0%, rgba(0,0,0,0.15) 50%, rgba(0,0,0,0) 65%, rgba(0,0,0,0.35) 100%);
}
.hero-copy {
  position: relative; z-index: 1; max-width: var(--max); margin: 0 auto;
  padding: 10vh 24px 0; text-shadow: 0 1px 24px rgba(0,0,0,0.3);
}
.hero-copy p { font-size: clamp(17px, 1.6vw, 20px); max-width: 560px; margin: 22px 0 30px; }
.home-hero .btn-solid { background: #fff; color: #000; border-color: #fff; text-shadow: none; }
.scroll-cue {
  position: absolute; z-index: 1; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: #fff; text-decoration: none; font-size: 13px; letter-spacing: 0.08em;
  text-shadow: 0 1px 12px rgba(0,0,0,0.4);
}
.scroll-cue svg { width: 22px; height: 22px; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue svg { animation: none; } }
@media (orientation: portrait) {
  .home-hero img { object-position: center bottom; }
  .hero-copy { padding-top: 11vh; text-align: center; }
  .hero-copy p { margin-left: auto; margin-right: auto; }
}

/* ---------- Sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: 104px 24px; }
.section + .section { padding-top: 24px; }
.section-head { margin-bottom: 48px; }
.section-head h2 + p { color: var(--muted); font-size: 19px; max-width: 640px; margin: 16px 0 0; }

/* About: three feature boxes */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.features article { border: 1px solid var(--line); border-radius: 6px; padding: 30px 28px 34px; }
.features h3 { margin: 0 0 12px; }
.features p { margin: 0; color: var(--muted); font-size: 16px; }
.features p + p { margin-top: 12px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; border: 1px solid var(--fg); border-radius: 999px; padding: 3px 10px; margin-bottom: 20px; }
.tag.solid { background: var(--fg); color: var(--bg); }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } }

/* How it works: three plain boxes */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { border: 1px solid var(--line); border-radius: 6px; padding: 30px 28px 34px; }
.step .num { font-size: 13px; letter-spacing: 0.14em; color: var(--muted); }
.step h3 { margin: 10px 0 12px; }
.step p { margin: 0; font-size: 16px; color: var(--muted); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

/* Our story: dictionary-entry header */
.story { max-width: 720px; }
.story .word, .story .pos, .story .definition { font-family: "Times New Roman", Times, serif; }
.entry { width: fit-content; min-width: 280px; border: 1px solid var(--line); border-radius: 6px; padding: 28px 40px 30px 32px; margin-bottom: 40px; }
.story .word { font-weight: 700; font-style: normal; font-size: clamp(44px, 5vw, 60px); line-height: 1; margin: 0; }
.story .pos { font-size: 18px; color: var(--muted); margin: 8px 0 0; }
.story .definition { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.2; margin: 18px 0 0; }
.story p { font-size: 18px; }

/* ---------- Signup ---------- */
.join { border-top: 1px solid var(--line); max-width: none; }
.join-inner { max-width: calc(var(--max) - 48px); margin: 0 auto; }
.join-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
@media (max-width: 900px) { .join-grid { grid-template-columns: 1fr; gap: 32px; } }
.join-copy > p { font-size: 18px; }
.join-copy ul { padding-left: 18px; color: var(--muted); }
.beta-note { border: 1px solid var(--fg); border-radius: 8px; padding: 18px 20px; margin: 28px 0; font-size: 16px; }
.beta-note strong { display: block; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px; }

form { display: grid; gap: 18px; }
.toggle { display: inline-flex; border: 1px solid var(--fg); border-radius: 999px; padding: 4px; gap: 4px; width: fit-content; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle label { padding: 8px 18px; border-radius: 999px; cursor: pointer; font-size: 15px; }
.toggle input:checked + label { background: var(--fg); color: var(--bg); }
.toggle input:focus-visible + label { outline: 2px solid var(--fg); outline-offset: 2px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field > span, fieldset legend { font-size: 14px; font-weight: 700; }
.field small, legend small { color: var(--muted); font-weight: 400; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  font: inherit; color: var(--fg); background: var(--field);
  border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--fg); outline-offset: 1px; }
fieldset { border: 0; padding: 0; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 15px; }
.chips input { accent-color: var(--fg); }
.chips label:has(input:checked) { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.consent { border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 14px; }
.opt { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; font-size: 14px; line-height: 1.5; cursor: pointer; }
.opt input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--fg); }
.opt.disabled { opacity: 0.45; cursor: not-allowed; }
.fineprint { font-size: 13px; color: var(--muted); margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }
.form-msg { font-size: 15px; margin: 0; }
.form-msg.error { font-weight: 700; }
.success { padding: 40px 0; }
.success h3 { margin-bottom: 10px; }

/* ---------- Privacy page ---------- */
.prose { max-width: 720px; }
.prose h3 { margin-top: 36px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); }
.foot { max-width: var(--max); margin: 0 auto; padding: 40px 24px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.foot img { height: 20px; filter: var(--logo-filter); margin-bottom: 8px; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

textarea { resize: vertical; min-height: 96px; line-height: 1.5; }

/* ---------- vivirapp.com/join : signup-only view ---------- */
.join-back { display: none; font-size: 15px; margin-bottom: 28px; }
.join-only .home-hero, .join-only #about, .join-only #how, .join-only #story { display: none; }
.join-only .join { border-top: 0; padding-top: 64px; }
.join-only .join-back { display: inline-block; }
@media (max-width: 900px) { .join-only .join-extra { display: none; } .join-only .join { padding-top: 40px; } }
