/* candlelit.app. Colors and type follow the app (Shared/Palette.swift, Design/Theme.swift). */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/Fraunces.woff2") format("woff2");
  font-weight: 300 600;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/Figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #180b0f;
  --surface: #26141a;
  --room-top: #24121a;
  --room-bottom: #110709;
  --smoke-top: #2e1610;
  --smoke-bottom: #14080a;
  --rose-gold: #f2bc9c;
  --blush: #f4b8b2;
  --text: #fbf0e6;
  --muted: #e3c9be;
  --flame: #f2a65a;
  --flame-top: #ffd8ae;
  --flame-rose: #ec8f86;
  --on-flame: #2b1418;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gutter: 20px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--ground);
  background-image:
    radial-gradient(60vmax 45vmax at 50% 18%, rgba(242, 166, 90, 0.16), transparent 70%),
    radial-gradient(50vmax 40vmax at 50% 105%, rgba(236, 143, 134, 0.08), transparent 70%),
    linear-gradient(180deg, var(--room-top), var(--room-bottom));
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
}

a { color: var(--rose-gold); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--flame-top); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--flame-top); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 var(--gutter); }

header.site {
  padding: 22px 0 0;
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark:hover { color: var(--text); }

main { flex: 1; }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rose-gold);
  margin: 0 0 14px;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--text); line-height: 1.15; }
h1 { font-size: clamp(36px, 9vw, 54px); margin: 0 0 16px; letter-spacing: -0.01em; }
h2 { font-size: 26px; margin: 40px 0 12px; }
h3 { font-size: 20px; margin: 28px 0 8px; }
p { margin: 0 0 14px; }
.lede { font-size: 19px; color: var(--muted); max-width: 32em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* The light everything sits under. */
.glow {
  width: 18px;
  height: 30px;
  margin: 0 0 28px;
  border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%;
  background: linear-gradient(180deg, var(--flame-top), var(--flame) 60%, var(--flame-rose));
  box-shadow: 0 0 18px rgba(242, 166, 90, 0.6), 0 0 60px rgba(236, 143, 134, 0.35);
  animation: flicker 3.2s ease-in-out infinite;
}
@keyframes flicker {
  0%, 100% { transform: scale(1) rotate(-1deg); opacity: 1; }
  40% { transform: scale(1.04, 0.97) rotate(1.5deg); opacity: 0.94; }
  70% { transform: scale(0.98, 1.03) rotate(-0.5deg); opacity: 0.98; }
}
@media (prefers-reduced-motion: reduce) { .glow { animation: none; } }

/* Frosted smoked glass. */
.glass {
  position: relative;
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(46, 22, 16, 0.62), rgba(20, 8, 10, 0.7));
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
  border: 1px solid rgba(255, 216, 174, 0.14);
  box-shadow: 0 20px 60px rgba(17, 7, 9, 0.6);
}
@media (prefers-reduced-transparency: reduce) {
  .glass { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.hero { padding-top: 12vh; padding-bottom: 48px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  border: 0;
  font: 600 17px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  color: var(--on-flame);
  background: linear-gradient(180deg, var(--flame-top), var(--flame) 60%, var(--flame-rose));
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.4) inset, 0 0 16px rgba(242, 166, 90, 0.35), 0 0 40px rgba(236, 143, 134, 0.2);
}
.button:hover { color: var(--on-flame); filter: brightness(1.05); }
.button.quiet {
  color: var(--text);
  background: rgba(251, 240, 230, 0.06);
  box-shadow: 0 0 0 1px rgba(255, 216, 174, 0.18) inset;
}
.button.quiet:hover { color: var(--text); background: rgba(251, 240, 230, 0.1); }

/* Stand-in until Ally drops in Apple's official badge artwork. */
.store-badge {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  padding: 8px 20px;
  border-radius: 12px;
  border: 1px solid rgba(251, 240, 230, 0.5);
  background: #000;
  color: var(--text);
  text-decoration: none;
  line-height: 1.15;
}
.store-badge:hover { color: var(--text); border-color: var(--text); }
.store-badge .top { font-size: 11px; letter-spacing: 0.02em; }
.store-badge .bottom { font-size: 20px; font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 28px 0 18px; }

.note { font-size: 15px; color: var(--muted); }
.note strong { color: var(--rose-gold); font-weight: 600; }

/* Join page */
.code {
  font-family: var(--serif);
  font-size: clamp(44px, 15vw, 72px);
  letter-spacing: 0.14em;
  line-height: 1;
  margin: 6px 0 18px;
  color: var(--text);
  text-shadow: 0 0 24px rgba(242, 166, 90, 0.35);
  word-break: break-all;
}
ol.steps { margin: 0 0 6px; padding-left: 22px; color: var(--muted); }
ol.steps li { margin: 0 0 8px; padding-left: 4px; }
ol.steps strong { color: var(--text); font-weight: 600; }
[hidden] { display: none !important; }
.after-card { margin-top: 18px; }

/* Long pages */
.doc { padding-top: 48px; padding-bottom: 24px; }
.doc ul { padding-left: 22px; margin: 0 0 14px; }
.doc li { margin: 0 0 6px; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid rgba(255, 216, 174, 0.12); }
.doc th { color: var(--rose-gold); font-weight: 600; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.table-scroll { overflow-x: auto; margin: 0 0 18px; }
.table-scroll table { min-width: 480px; margin: 0; }
.draft {
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 28px;
  border: 1px dashed var(--flame);
  color: var(--flame-top);
  font-size: 15px;
}
details.faq { border-bottom: 1px solid rgba(255, 216, 174, 0.12); padding: 14px 0; }
details.faq summary { cursor: pointer; font-family: var(--serif); font-size: 19px; color: var(--text); list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; float: right; color: var(--rose-gold); font-family: var(--sans); }
details.faq[open] summary::after { content: "\2013"; }
details.faq p { margin: 10px 0 4px; color: var(--muted); }

footer.site { padding: 40px 0 32px; font-size: 14px; color: var(--muted); }
footer.site nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 10px; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--rose-gold); }
