/* Shaterian — shaterian.com

   Two palettes, on purpose:
   - .night  the header and hero: the app's own OLED black, moon and room colours
             (flutter-demo-app/lib/theme/app_theme.dart)
   - paper   everything below: the palette of the previous shaterian.com
             (paper, ink, steel, garnet accent)                                  */

:root {
  color-scheme: light;

  /* paper palette (previous site) */
  --paper: #f8f3f1;
  --paper-soft: #efe7e4;
  --bone: #f4ece8;
  --ink: #241a1e;
  --ink-on-paper: #2a211f;
  --steel: #5c4f4a;
  --line: rgba(42, 33, 31, 0.10);
  --line-strong: rgba(42, 33, 31, 0.20);
  --accent: #9b2d3a;
  --accent-2: #b23744;
  --accent-soft: rgba(155, 45, 58, 0.10);
  --teal: #1f5e5b;
  --gold: #c9a24b;
  --shadow-cta: 0 1px 0 rgba(255, 210, 210, 0.30) inset, 0 8px 24px -10px rgba(80, 10, 20, 0.35);
  --shadow-panel: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 30px 80px -40px rgba(42, 33, 31, 0.22);

  /* roles used by the components */
  --bg: var(--paper);
  --text: var(--ink-on-paper);
  --text-2: var(--steel);
  --card: var(--paper-soft);
  --hair: var(--line);
  --link: var(--accent);
  --btn-bg: var(--accent);
  --btn-fg: var(--paper);
  --btn-shadow: var(--shadow-cta);
  --focus: var(--accent);
  --shot-shadow: 0 0 0 1px rgba(42, 33, 31, 0.06), 0 30px 60px -30px rgba(42, 33, 31, 0.45);

  /* the app's room colours, in the values the app uses on light backgrounds */
  --amber: #B4761A;
  --room-gold: #9A7B22;
  --cyan: #0D7FB5;
  --mint: #108A62;
  --violet: #6B4BD6;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 38rem;
  --wide: 72rem;
  --gutter: 1rem;
}

.night {
  --bg: #000000;
  --text: #F4F6FB;
  --text-2: #9AA3B8;
  --card: rgba(255, 255, 255, 0.05);
  --hair: rgba(255, 255, 255, 0.10);
  --link: #4FC3F7;
  --btn-bg: #F4F6FB;
  --btn-fg: #000000;
  --btn-shadow: none;
  --focus: #4FC3F7;
  --amber: #F0B45E;
  --room-gold: #FFE9A8;
  --cyan: #4FC3F7;
  --mint: #57E3B4;
  --violet: #A98BFF;
  background: var(--bg);
  color: var(--text);
}

/* ---------- base ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;          /* 18px: the app's body minimum */
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (min-width: 48em) {
  body { font-size: 1.1875rem; }  /* 19px on larger screens */
}

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  color: var(--text);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
}

h2 {
  font-size: clamp(1.875rem, 1.4rem + 1.6vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.375rem;
  line-height: 1.25;
}

p { margin: 0; }
p + p { margin-top: 1em; }

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

a:hover { text-decoration-thickness: 0.14em; }

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

img, picture, svg { display: block; max-width: 100%; }

ul, ol { margin: 0; padding: 0; }

.muted { color: var(--text-2); }

.measure { max-width: var(--measure); }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  z-index: 10;
}

.skip:focus { top: 1rem; }

/* ---------- layout ---------- */

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wide));
  margin-inline: auto;
}

@media (min-width: 48em) { :root { --gutter: 2rem; } }

.section {
  padding-block: 4rem;
  border-top: 1px solid var(--hair);
}

.section:first-of-type { border-top: 0; }

@media (min-width: 48em) { .section { padding-block: 6rem; } }

.section > .wrap > h2 { margin-bottom: 1rem; }
.section > .wrap > h2 + p { margin-bottom: 2rem; }

.section-soft { background: var(--paper-soft); }

.stack > * + * { margin-top: 1em; }

/* ---------- header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  min-height: 3rem;
}

.brand img { width: 2.25rem; height: 2.25rem; border-radius: 0.55rem; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: var(--btn-shadow);
  font: inherit;
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; opacity: 0.92; }
.btn:active { transform: translateY(1px); }

.btn svg { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }

.btn-small { min-height: 3rem; padding: 0.5rem 1.1rem; font-size: 1rem; }

.btn-small .long { display: none; }
@media (min-width: 40em) {
  .btn-small .long { display: inline; }
  .btn-small .short { display: none; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  text-align: center;
  padding-block: 2rem 4rem;
  overflow: hidden;
}

@media (min-width: 48em) { .hero { padding-block: 3rem 6rem; } }

.sky {
  position: absolute;
  inset: 0 0 auto 0;
  height: 58%;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}

.sky svg { width: 100%; height: 100%; }

.sky .cyan   { fill: var(--cyan); }
.sky .amber  { fill: var(--amber); }
.sky .gold   { fill: var(--room-gold); }
.sky .mint   { fill: var(--mint); }
.sky .violet { fill: var(--violet); }
.sky .thread { stroke: var(--text); stroke-opacity: 0.14; stroke-width: 1; fill: none; }

.hero .wrap { position: relative; z-index: 1; }

.moon {
  width: clamp(12rem, 30vw, 20rem);
  margin: 0 auto 1.5rem;
}

.moon img { width: 100%; height: auto; }

@media (prefers-reduced-motion: no-preference) {
  .moon { animation: rise 1.6s ease-out both; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(0.75rem); }
    to   { opacity: 1; transform: none; }
  }
}

.hero h1 { max-width: 16ch; margin-inline: auto; }

.hero .lead {
  max-width: var(--measure);
  margin: 1.5rem auto 0;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  line-height: 1.45;
}

.hero .note {
  max-width: var(--measure);
  margin: 1rem auto 0;
  color: var(--text-2);
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  margin-top: 2.25rem;
}

.cta .fine { color: var(--text-2); font-size: 1.0625rem; }

/* ---------- steps (a real sequence) ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 2rem;
}

@media (min-width: 48em) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}

.steps li { counter-increment: step; }

.steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--paper-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.steps h3 { margin-bottom: 0.5rem; }
.steps p { color: var(--text-2); }

/* ---------- rooms ---------- */

.rooms {
  list-style: none;
  display: grid;
  gap: 2rem;
}

@media (min-width: 36em) { .rooms { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60em) { .rooms { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 76em) { .rooms { grid-template-columns: repeat(5, 1fr); gap: 1.5rem; } }

.room { --room: var(--text-2); }
.room-smith    { --room: var(--cyan); }
.room-today    { --room: var(--amber); }
.room-universe { --room: var(--room-gold); }
.room-health   { --room: var(--mint); }
.room-twin     { --room: var(--violet); }

.shot {
  margin: 0;
  border-radius: 1.6rem;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #05070C;
  box-shadow: var(--shot-shadow);
  max-width: 18.5rem;
  margin-inline: auto;
}

.shot img { width: 100%; height: auto; }

.room-name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
  color: var(--room);
  font-size: 1.375rem;
}

.room-name svg { width: 1.5rem; height: 1.5rem; flex: none; }

.room p { margin-top: 0.5rem; color: var(--text-2); font-size: 1.0625rem; }

@media (min-width: 76em) { .room p { font-size: 1rem; } }

/* ---------- two-column blocks ---------- */

.pair {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 48em) {
  .pair { grid-template-columns: minmax(0, 18.5rem) minmax(0, 1fr); gap: 4rem; }
}

.pair h2 { margin-bottom: 1rem; }
.pair p + p { margin-top: 1em; }

/* ---------- founder ---------- */

.founder {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 48em) {
  .founder { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 4rem; align-items: center; }
}

.portrait {
  margin: 0;
  max-width: 22rem;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: var(--shot-shadow);
}

.portrait img { width: 100%; height: auto; }

.founder h2 { margin-bottom: 1.25rem; }

.founder blockquote {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
  border-left: 4px solid var(--accent);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  line-height: 1.4;
  color: var(--text);
}

.founder blockquote p + p { margin-top: 0.75em; }

.founder cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-size: 1rem;
  color: var(--text-2);
}

/* ---------- plain lists of facts ---------- */

.facts {
  list-style: none;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 48em) { .facts.two { grid-template-columns: repeat(2, 1fr); gap: 3rem; } }

.facts h3 { margin-bottom: 0.5rem; }
.facts p { color: var(--text-2); }

.plain {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  max-width: var(--measure);
}

.plain li {
  padding-left: 1.75rem;
  position: relative;
}

.plain li::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.72em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
}

.plain.numbered { counter-reset: n; }
.plain.numbered li { padding-left: 2.25rem; }
.plain.numbered li::before {
  content: counter(n);
  counter-increment: n;
  width: auto;
  height: auto;
  top: 0;
  left: 0;
  background: none;
  color: var(--accent);
  font-weight: 600;
}

/* ---------- boundary card ---------- */

.boundary {
  max-width: var(--measure);
  padding: 1.75rem;
  border-radius: 1.25rem;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  box-shadow: var(--shadow-panel);
}

.boundary h2 { margin-bottom: 0.75rem; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }

/* ---------- privacy ---------- */

.leaves {
  margin-top: 2rem;
  padding: 1.5rem 1.75rem;
  border-radius: 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  max-width: var(--measure);
}

.leaves h3 { margin-bottom: 0.75rem; }
.leaves .plain { margin-top: 0.75rem; }

/* ---------- price ---------- */

.price .cta { align-items: flex-start; margin-top: 2rem; }

/* ---------- questions ---------- */

.faq {
  max-width: var(--measure);
  border-top: 1px solid var(--line-strong);
}

.faq details { border-bottom: 1px solid var(--line-strong); }

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0.25rem;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.3;
  min-height: 3.5rem;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  flex: none;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--accent);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1;
}

.faq details[open] summary::after { content: "–"; }

.faq .answer { padding: 0 0.25rem 1.5rem; color: var(--text-2); }

/* ---------- support ---------- */

.email {
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-weight: 600;
  word-break: break-all;
}

/* ---------- footer (ink, to close the page the way the hero opens it) ---------- */

.foot {
  --text: var(--paper);
  --text-2: rgba(248, 243, 241, 0.74);
  --hair: rgba(248, 243, 241, 0.16);
  --link: var(--paper);
  --focus: var(--paper);
  background: var(--ink);
  color: var(--text-2);
  padding-block: 3rem 4rem;
  font-size: 1.0625rem;
}

.foot h2 { font-size: 1.25rem; margin-bottom: 0.75rem; color: var(--text); }

.foot .disclaimer { max-width: 48rem; }

.foot-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  margin-top: 2rem;
}

.foot-links a { color: var(--text); min-height: 3rem; display: inline-flex; align-items: center; }

.foot .legal { margin-top: 1.5rem; font-size: 1rem; }
