/* Lumea website: shared styles, loaded on every page.
   Colors and fonts (:root), header and footer, type, buttons, and the pieces
   several pages use: section headings, the gold divider, cards, numbered
   steps, the FAQ, the back-to-top button and tap-size rules. */

/* Lumea website. Same brand as the app: a dark gallery wall, off-white
   text, Instrument Serif + Instrument Sans, a thin gold frame line. The
   accent color is borrowed from the painting on the wall (main.js sets
   --accent), the way the app borrows it from each day's painting. */

:root {
  --wall: #121110;
  --wall-lit: #1a1815;
  --surface: #1c1a17;
  --line: #2a2722;
  --line-strong: #3a352e;
  --text: #f2eee6;
  --text-soft: #d8d3c8;
  --text-muted: #a39e94;
  --gold: #c9a96a;
  --accent: #c9a96a; /* replaced by the painting's own accent */

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", -apple-system, "Segoe UI", system-ui, sans-serif;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 72rem;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--wall);
  color: var(--text-soft);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--text);
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-color: var(--accent);
}

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

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
  z-index: 10;
  background: var(--surface);
  padding: 0.5rem 0.75rem;
}

/* ---------- Header and footer ---------- */

.site-header,
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  font: 400 1.6rem/1 var(--serif);
  color: var(--text);
  text-decoration: none;
}

/* The Lumea mark: the gold L from the app icon, without its frame. */
.wordmark .mark {
  display: block;
  width: auto;
  height: 30px;
}

.nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
}

.site-footer {
  margin-top: 6rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
  padding-bottom: 3rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  align-items: flex-start;
}

.site-footer nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--text-muted);
}

/* ---------- Shared type ---------- */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--text);
  margin: 0;
}

h1 {
  font-size: clamp(2.75rem, 6.5vw, 4.75rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.08;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.2;
}

p {
  margin: 0;
  max-width: var(--measure);
}

.section {
  margin-top: clamp(5rem, 10vw, 8rem);
}

/* Divider: a gold hairline that fades out at both ends, with the Lumea L in
   the middle. Marks the move from the app line-up to the details. */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 62rem;
  margin: clamp(4rem, 8vw, 6rem) auto 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 169, 106, 0.5));
}

.divider::after {
  background: linear-gradient(90deg, rgba(201, 169, 106, 0.5), transparent);
}

.divider img {
  display: block;
  width: auto;
  height: 22px;
}

.section-after-divider {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.section-head {
  max-width: var(--measure);
  margin-bottom: 2.5rem;
}

.section-head p {
  margin-top: 1rem;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font: 500 1rem/1 var(--sans);
  color: var(--text);
  text-decoration: none;
  background: transparent;
}

.button:hover {
  border-color: var(--text-muted);
}

.button-solid {
  background: var(--text);
  border-color: var(--text);
  color: var(--wall);
}

.button-solid:hover {
  background: #fff;
}

.button[aria-disabled="true"] {
  cursor: default;
}

/* a row of buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* small print under a section */
.fine {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 44rem;
}

/* ---------- Numbered steps ("How it works") and cards ---------- */

/* Centered heading, like the introduction above it. */
.how .section-head {
  max-width: 44rem;
  margin: 0 auto 3.5rem;
  text-align: center;
}

.how .section-head p {
  max-width: 40rem;
  margin: 1.25rem auto 0;
  text-wrap: pretty;
}

/* Three numbered steps joined by a thin gold line. */
.journey {
  --dot: 3.25rem;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 62rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  text-align: center;
}

.journey li {
  position: relative;
  padding: 0 0.5rem;
}

/* the line from each step to the next */
.journey li + li::before {
  content: "";
  position: absolute;
  top: calc(var(--dot) / 2);
  right: calc(50% + var(--dot) / 2 + 0.75rem);
  width: calc(100% + 2rem - var(--dot) - 1.5rem);
  height: 1px;
  background: linear-gradient(90deg, rgba(201, 169, 106, 0.15), rgba(201, 169, 106, 0.55));
}

.journey-num {
  display: grid;
  place-items: center;
  width: var(--dot);
  height: var(--dot);
  margin: 0 auto 1.4rem;
  border: 1px solid rgba(201, 169, 106, 0.5);
  border-radius: 50%;
  background: var(--wall);
  font: italic 400 1.6rem/1 var(--serif);
  color: var(--gold);
}

.journey h3 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
}

.journey p {
  max-width: 17rem;
  margin: 0 auto;
  color: var(--text-muted);
  line-height: 1.6;
  text-wrap: pretty;
}

@media (max-width: 47.99rem) {
  .journey {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    text-align: left;
  }

  .journey li {
    padding: 0 0 0 calc(var(--dot) + 1.25rem);
    min-height: var(--dot);
  }

  .journey li + li::before {
    top: calc(-2.25rem + 0.4rem);
    left: calc(var(--dot) / 2);
    right: auto;
    width: 1px;
    height: calc(2.25rem - 0.8rem);
    background: rgba(201, 169, 106, 0.45);
  }

  .journey-num {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
  }

  .journey h3 {
    padding-top: 0.7rem;
  }

  .journey p {
    max-width: none;
    margin: 0;
  }
}

/* The three promises every Lumea app makes, as museum wall labels:
   a quiet card, a gold line icon, a serif title. */
.promises {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 62rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1.25rem;
}

.promises li {
  position: relative;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--wall-lit), var(--wall));
  transition: border-color 250ms ease, transform 250ms ease;
}

.promises li:hover {
  border-color: rgba(201, 169, 106, 0.4);
  transform: translateY(-2px);
}

.promise-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(201, 169, 106, 0.4);
  border-radius: 50%;
  color: var(--gold);
}

.promise-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.promises h3 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
}

.promises p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
  text-wrap: pretty;
}

@media (prefers-reduced-motion: reduce) {
  .promises li,
  .promises li:hover {
    transition: none;
    transform: none;
  }
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 44rem;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 0 0 0.1rem;
}

.faq details[open] {
  padding-bottom: 1.1rem;
}

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

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 0;
  min-height: 2.75rem;
  font: 400 1.35rem/1.3 var(--serif);
  color: var(--text);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

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

.faq summary::after {
  content: "+";
  font-family: var(--sans);
  color: var(--text-muted);
  transition: transform 200ms ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details > *:not(summary) {
  margin-top: -0.25rem;
}

/* Home FAQ: centered heading, two columns of questions. */
.faq-home {
  max-width: 62rem;
  margin-left: auto;
  margin-right: auto;
}

.faq-home .section-head {
  max-width: none;
  margin-bottom: 3rem;
  text-align: center;
}

.faq-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.faq-label {
  margin: 0 0 1rem;
  font: 600 0.75rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.faq-home summary {
  font: 500 1.12rem/1.4 var(--sans);
  align-items: baseline;
}

.faq-home details p {
  color: var(--text-muted);
  line-height: 1.65;
  text-wrap: pretty;
}

@media (max-width: 47.99rem) {
  .faq-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav {
    gap: 1rem;
  }
}

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

.app-icon {
  flex: none;
  width: clamp(48px, 9vw, 64px);
  height: auto;
  border-radius: 22.5%;
  box-shadow: 0 0 0 1px var(--line-strong), 0 6px 18px rgba(0, 0, 0, 0.45);
}

/* ---------- Back to top ---------- */

.to-top {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 20;
  width: 2.875rem;
  height: 2.875rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(28, 26, 23, 0.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s, border-color 0.2s ease, color 0.2s ease;
}

.to-top.is-shown {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s, border-color 0.2s ease, color 0.2s ease;
}

.to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .to-top,
  .to-top.is-shown {
    transition: none;
    transform: none;
  }
}

/* Headings break into even lines, never leaving one word alone. */
h1,
h2,
h3 {
  text-wrap: balance;
}

.site-footer .copyright {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.8;
}

@media (max-width: 47.99rem) {
  /* lift the back-to-top button above the bar while it shows */
  .get-bar-shown .to-top {
    bottom: calc(max(0.75rem, env(safe-area-inset-bottom)) + 4.5rem);
    transition: opacity 0.25s ease, transform 0.25s ease, bottom 0.3s ease;
  }
}

@media (pointer: coarse) {
  .wordmark,
  .nav a,
  .site-footer nav a,
  .support-jump {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
  }

  .site-footer nav a {
    margin: -0.6rem 0;
  }
}
