/* The Third Sphere: marketing site. Colours and faces come from the app's default Y2K theme
   (frontend/src/theme/themes.ts, DEC-142): a silver-lavender desktop on graph paper, a deep violet-navy ink,
   soft violet buttons, and retro windows with an iridescent title bar as the one signature. */

@font-face {
  font-family: "Audiowide";
  src: url("/fonts/Audiowide_400Regular.latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/fonts/Montserrat_400Regular.latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/fonts/Montserrat_600SemiBold.latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #17152f;          /* slate 900 */
  --ink-2: #363256;        /* slate 700 */
  --muted: #5c5679;        /* slate 500: 6.1:1 on the page */
  --violet: #6249c2;       /* brand 500: buttons */
  --violet-deep: #4c359c;  /* brand 700: hover */
  --link: #5a41b8;         /* brand 600 */
  --tint: #f4f1ff;         /* brand 50 */
  --card: #fffeff;
  --page-1: #faf9fd;
  --page-2: #f3f1fa;
  --page-3: #ebe9f6;
  --line: #7d78aa;         /* window outline */
  --shadow: #ddd6f4;       /* window hard shadow */
  --grid: rgba(184, 158, 232, 0.32);
  --chrome: linear-gradient(90deg, #d6e5ff, #e4defd 50%, #f8e0f0);
  --night-1: #050109;
  --night-2: #0d0626;
  --night-3: #1c0a3f;
  --hot-pink: #ff5cc0;
  --electric: #2f6bff;
  --display: "Audiowide", "Trebuchet MS", sans-serif;
  --body: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius-window: 14px;
  --wrap: 1160px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-synthesis: none;
  /* Graph paper like the app's Y2K wallpaper, on its lavender page gradient. */
  background-color: var(--page-2);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    radial-gradient(circle at 88% 4%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 32rem),
    radial-gradient(circle at 4% 70%, rgba(168, 212, 255, 0.35), rgba(168, 212, 255, 0) 36rem),
    linear-gradient(180deg, var(--page-1), var(--page-2) 45%, var(--page-3));
  background-size: 28px 28px, 28px 28px, auto, auto, auto;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--violet-deep); text-decoration-thickness: 2px; }

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

strong { font-weight: 600; }

h1, h2, h3 { margin: 0; font-weight: 400; }
h1, h2 { font-family: var(--display); letter-spacing: 0.005em; }
h3 { font-family: var(--body); font-weight: 600; font-size: 1.15rem; line-height: 1.35; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
}
.skip:focus { top: 1rem; }

/* --- Header ------------------------------------------------------------------------------------------------ */

.site-head { padding-block: 1.1rem; }
.site-head-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1.2;
}
.brand img { width: 53px; height: 32px; }
.brand:hover { color: var(--ink); }
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.nav a:hover { background: var(--tint); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--violet); color: #fff; }

/* --- Windows: the app's retro window frame ------------------------------------------------------------------ */

.window {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius-window);
  box-shadow: 7px 7px 0 var(--shadow);
  overflow: hidden;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.55rem 1rem;
  background: var(--chrome);
  border-bottom: 2px solid var(--line);
  font-family: var(--display);
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--ink);
}
.window-bar img { flex: none; image-rendering: pixelated; }
.window-body { padding: clamp(1.25rem, 3vw, 2.25rem); }

.button {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
}
.button:hover { background: var(--violet-deep); color: #fff; }

/* --- Phones ----------------------------------------------------------------------------------------------- */

.phone {
  margin: 0;
  width: 100%;
  max-width: 290px;
  padding: 9px;
  border-radius: 44px;
  background: var(--ink);
  box-shadow: 0 0 0 2px var(--line), 10px 10px 0 var(--shadow);
}
.phone-screen {
  position: relative;
  overflow: hidden;
  border-radius: 35px;
  /* A status bar strip in the app's page colour, with the camera pill, above the screenshot. */
  padding-top: 11%;
  background: #f8f7fc;
}
.phone-screen::before {
  /* Percent margins and aspect-ratio both follow the width, so the pill stays inside the strip at every size. */
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 31%;
  aspect-ratio: 4 / 1;
  margin-top: 2.4%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--ink);
}
.phone-screen img { width: 100%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }

/* --- Hero ------------------------------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(1.5rem, 5vw, 4.5rem) clamp(3rem, 7vw, 6rem);
}
.hero h1 {
  font-size: clamp(2.35rem, 5.4vw, 4.4rem);
  line-height: 1.06;
  max-width: 13em;
}
.h1-brand {
  display: block;
  margin-bottom: 0.35em;
  font-size: 0.42em;
  line-height: 1.2;
  color: var(--violet);
}
.lede {
  margin-top: 1.5rem;
  max-width: 34em;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  color: var(--ink-2);
}
.window-note { margin-top: 2rem; max-width: 30rem; }
.window-note .window-body { padding: 1.1rem 1.35rem; }
.note-big { font-weight: 600; font-size: 1.1rem; margin-bottom: 0.25rem; }
.window-note p:last-child { color: var(--muted); font-size: 0.95rem; }

.hero-phones {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  max-width: 560px;
  justify-self: center;
  width: 100%;
}
.hero-phones .phone-back { grid-column: 1; grid-row: 1; margin-top: 3.5rem; justify-self: end; margin-right: -2.5rem; }
.hero-phones .phone-front { grid-column: 2; grid-row: 1; position: relative; z-index: 1; }

/* --- Feature windows -------------------------------------------------------------------------------------- */

.features { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); }

.feature-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.feature-flip .feature-copy { order: 2; }
.feature h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); line-height: 1.15; margin-bottom: 1rem; }
.feature-copy { max-width: 36em; }
.feature-copy p { color: var(--ink-2); }

.feature-phones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  justify-items: center;
  align-items: start;
}
.feature-phones .phone:nth-child(2) { margin-top: 2.5rem; }
.feature-phones-one { grid-template-columns: minmax(0, 280px); justify-content: center; }

.ticks { margin: 1.25rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.7rem; }
.ticks li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--ink-2);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 10px;
  height: 10px;
  background: var(--violet);
  /* a square pixel bullet */
}

/* The Grapevine's window wears Y2K Night, the app's dark theme. */
.feature-night { border-color: var(--hot-pink); box-shadow: 7px 7px 0 var(--electric); }
.feature-night .window-bar {
  background: linear-gradient(90deg, #33105e, #1d1f6b 50%, #0f2c78);
  border-bottom-color: var(--hot-pink);
  color: #fff0fb;
}
.feature-night .window-body {
  background: linear-gradient(180deg, var(--night-1), var(--night-2) 50%, var(--night-3));
  color: #fff0fb;
}
.feature-night .feature-copy p { color: #e9dcf2; }
.feature-night .phone { box-shadow: 0 0 0 2px var(--hot-pink), 10px 10px 0 rgba(47, 107, 255, 0.55); background: #000; }
.feature-night .phone-screen { background: #0b0520; }
.feature-night .phone-screen::before { background: #000; }

/* --- Promises --------------------------------------------------------------------------------------------- */

.promises { padding-block: clamp(4rem, 9vw, 7rem) clamp(2rem, 5vw, 3rem); }
.promises h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); line-height: 1.15; max-width: 20em; }
.promise-list {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 0;
  border-top: 2px solid var(--line);
}
.promise-list li {
  padding: 1.1rem 1.25rem 1.2rem 0;
  border-bottom: 1px solid #cbc6e0;
  color: var(--ink-2);
}
.promise-list strong { display: block; color: var(--ink); margin-bottom: 0.2rem; }
.promise-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin-top: 1.5rem; font-weight: 600; }

/* --- Business teaser --------------------------------------------------------------------------------------- */

.biz-teaser { padding-block: clamp(2rem, 5vw, 3rem) clamp(4rem, 9vw, 6rem); }
.biz-teaser-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}
.biz-teaser h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.2; margin-bottom: 0.5rem; }
.biz-teaser-body > div { max-width: 38em; }
.biz-teaser-body p { color: var(--ink-2); }

/* --- Night band: the app's sign-in sky ------------------------------------------------------------------- */

.night {
  position: relative;
  color: #fff0fb;
  background-color: var(--night-2);
  background-image:
    url("/img/stars.svg"),
    radial-gradient(circle at 80% 20%, rgba(255, 47, 174, 0.22), rgba(255, 47, 174, 0) 26rem),
    radial-gradient(circle at 15% 90%, rgba(47, 107, 255, 0.26), rgba(47, 107, 255, 0) 30rem),
    linear-gradient(180deg, var(--night-1), var(--night-2) 45%, var(--night-3));
  background-size: 420px 420px, auto, auto, auto;
  padding-block: clamp(4rem, 9vw, 6.5rem);
  text-align: center;
}
.night-inner { display: grid; justify-items: center; gap: 1.25rem; }
.night-mark { width: 120px; height: auto; }
.night h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1.15; max-width: 18em; }
.night p { max-width: 36em; color: #e9dcf2; }
.night a { color: #ffb8e2; }
.night a:hover { color: #fff; }
.night :focus-visible { outline-color: var(--hot-pink); }

/* --- Footer ---------------------------------------------------------------------------------------------- */

.site-foot {
  background: var(--card);
  border-top: 2px solid var(--line);
  padding-block: 2.75rem 2rem;
  font-size: 0.95rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2rem 3rem;
}
.foot-name { font-family: var(--display); font-size: 1.1rem; margin-bottom: 0.5rem; }
.foot-brand p { color: var(--ink-2); max-width: 34em; }
.foot-links ul { margin: 0; padding: 0; list-style: none; columns: 2 12rem; column-gap: 2rem; }
.foot-links li { break-inside: avoid; padding-block: 0.2rem; }
.foot-legal { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid #e1def0; color: var(--muted); font-size: 0.85rem; }

/* --- Inner pages ------------------------------------------------------------------------------------------ */

.page-head { padding-block: clamp(1.5rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem); }
.page-head h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.08; max-width: 16em; }
.page-head .lede { margin-top: 1.1rem; }

.prose { max-width: 44rem; }
.prose h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); line-height: 1.2; margin: 2.75rem 0 0.9rem; }
.prose h3 { margin: 1.75rem 0 0.5rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--violet); }

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 18rem);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding-bottom: clamp(4rem, 8vw, 6rem);
}
.aside { display: grid; gap: 1.75rem; position: sticky; top: 1.5rem; }
.aside .window-body { padding: 1.15rem 1.25rem; font-size: 0.97rem; }
.aside h2 { font-family: var(--body); font-weight: 600; font-size: 1.05rem; margin-bottom: 0.5rem; }
.aside ul { margin: 0; padding-left: 1.1rem; }

.callout {
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  background: var(--tint);
  border: 2px solid var(--line);
  border-radius: 10px;
}
.callout p { color: var(--ink); }

/* Business page: what you get, and the plan table */
.biz-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.biz-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 1.6rem; }
.biz-list h2 { font-family: var(--body); font-weight: 600; font-size: 1.15rem; line-height: 1.35; margin-bottom: 0.3rem; }
.biz-list p { color: var(--ink-2); }
.biz-phones { display: grid; grid-template-columns: repeat(2, minmax(0, 230px)); gap: 1.25rem; }
.biz-phones .phone:nth-child(2) { margin-top: 2.5rem; }

.plans { padding-block: clamp(3rem, 7vw, 5rem); }
.plans h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); line-height: 1.2; margin-bottom: 0.75rem; }
.plans > p { max-width: 44em; color: var(--ink-2); }
.table-scroll { overflow-x: auto; margin-top: 1.75rem; }
.plan-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.97rem;
}
.plan-table th, .plan-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e1def0;
}
.plan-table thead th {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.05rem;
  background: var(--tint);
  border-bottom: 2px solid var(--line);
}
.plan-table thead th span { display: block; font-family: var(--body); font-weight: 600; font-size: 0.95rem; color: var(--ink-2); }
.plan-table tbody th { font-weight: 600; color: var(--ink); width: 34%; }
.plan-table td { color: var(--ink-2); }

/* FAQ */
.faq { display: grid; gap: 0.75rem; margin-top: 1rem; }
.faq details {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 10px;
}
.faq summary {
  cursor: pointer;
  padding: 0.9rem 1.1rem;
  font-weight: 600;
  list-style-position: outside;
  margin-left: 1rem;
}
.faq summary::marker { color: var(--violet); }
.faq details[open] summary { border-bottom: 1px solid #e1def0; }
.faq .faq-a { padding: 0.9rem 1.1rem 1.1rem 2.1rem; color: var(--ink-2); }

/* Legal pages */
.legal {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 46rem);
  gap: 1rem clamp(2rem, 5vw, 4rem);
  padding-block: clamp(1.5rem, 4vw, 3rem) clamp(4rem, 8vw, 6rem);
}
.legal-head { grid-column: 1 / -1; }
.legal-head h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.1; }
.legal-meta { margin-top: 0.75rem; color: var(--muted); }
.legal-toc { align-self: start; position: sticky; top: 1.5rem; font-size: 0.92rem; }
.legal-toc-title { font-weight: 600; margin-bottom: 0.5rem; }
.legal-toc ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.3rem; }
.legal-body {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius-window);
  box-shadow: 7px 7px 0 var(--shadow);
  padding: clamp(1.25rem, 4vw, 2.5rem);
}
.legal-body h2 { font-family: var(--body); font-weight: 600; font-size: 1.35rem; line-height: 1.3; margin: 2.25rem 0 0.75rem; }
.legal-body h2:first-of-type { margin-top: 1.25rem; }
.legal-body h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.legal-body ul, .legal-body ol { padding-left: 1.3rem; }
.legal-body li { margin-bottom: 0.5rem; }
.legal-body li::marker { color: var(--violet); }
.legal-body code { font-size: 0.9em; background: var(--tint); padding: 0.05em 0.3em; border-radius: 4px; }

/* Invite and 404 pages */
.solo { padding-block: clamp(2rem, 7vw, 5rem) clamp(4rem, 10vw, 7rem); display: grid; justify-items: center; }
.solo .window { width: 100%; max-width: 36rem; }
.solo h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.15; margin-bottom: 1rem; }
.solo .window-body p { color: var(--ink-2); }
.solo-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; margin-top: 1.5rem; }

/* --- Smaller screens ------------------------------------------------------------------------------------ */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-phones { max-width: 480px; }
  .feature-body, .feature-flip .feature-body { grid-template-columns: 1fr; }
  .feature-flip .feature-copy { order: 0; }
  .columns { grid-template-columns: 1fr; }
  .aside { position: static; }
  .biz-grid { grid-template-columns: 1fr; }
  .biz-phones { justify-content: center; }
  .legal { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
  .foot-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  body { font-size: 1rem; }
  .brand span { font-size: 1.05rem; }
  .nav a { padding: 0.4rem 0.7rem; font-size: 0.9rem; }
  .hero-phones .phone-back { margin-right: -1.25rem; margin-top: 2rem; }
  .phone { padding: 6px; border-radius: 30px; box-shadow: 0 0 0 2px var(--line), 6px 6px 0 var(--shadow); }
  .phone-screen { border-radius: 25px; }
  .window { box-shadow: 5px 5px 0 var(--shadow); }
  .feature-night { box-shadow: 5px 5px 0 var(--electric); }
  .feature-phones .phone:nth-child(2) { margin-top: 1.5rem; }
  .biz-phones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  body { background: #fff; }
  .site-head nav, .legal-toc, .night { display: none; }
  .window, .legal-body { box-shadow: none; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.table-note { margin-top: 1rem; color: var(--muted); font-size: 0.95rem; max-width: 44em; }
.biz-contact { padding-bottom: clamp(4rem, 9vw, 6rem); }
.biz-contact .window { max-width: 46rem; }
.biz-contact h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); line-height: 1.2; margin-bottom: 0.75rem; }
.biz-contact p { color: var(--ink-2); }
.callout h3 { margin-top: 0; }
