/* skystaapp.com — the app's own design system, on the web.
   Colours are SkystaTheme.swift verbatim; the serif is the app's own file. */

@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/SourceSerif4.ttf") format("truetype");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --ink: #0E1B32;
  --ink2: #626C7F;
  --ink3: #8F95A3;
  --ink-on-sky: #FFFCF7;
  --paper: #FFFCF7;
  --cream: #FFF7EF;
  --cream-tint: #F6F1EB;
  --sand: #D8CEC3;
  --coral: #FF6C65;
  --coral-deep: #C5413D;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--coral); color: var(--ink-on-sky); }
a:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

/* ---- Header ---------------------------------------------------------- */
header.site {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  padding: 22px 0;
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; }
.wordmark {
  font-family: var(--serif); font-weight: 650; font-size: 24px;
  color: var(--ink-on-sky); text-decoration: none; letter-spacing: 0.2px;
  display: flex; align-items: center; gap: 10px;
}
.wordmark img { width: 30px; height: 30px; border-radius: 8px; }
header.site nav { display: flex; gap: 22px; }
header.site nav a {
  color: var(--ink-on-sky); opacity: 0.85; text-decoration: none;
  font-weight: 600; font-size: 14.5px;
}
header.site nav a:hover { opacity: 1; }
header.inner { position: static; background: var(--paper); border-bottom: 1px solid var(--sand); }
header.inner .wordmark, header.inner nav a { color: var(--ink); }

/* ---- Hero: the dawn, slowly ----------------------------------------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; flex-direction: column; justify-content: center;
  text-align: center;
  color: var(--ink-on-sky);
  overflow: hidden;
  /* The app's own dawn ramp, breathing very slowly. */
  background: linear-gradient(180deg,
    #1a2440 0%, #3A3E63 34%, #815A74 58%, #C7756D 76%, #EBA26B 90%, #F2C089 100%);
  background-size: 100% 220%;
  animation: dawn 36s ease-in-out infinite alternate;
}
@keyframes dawn {
  from { background-position: 50% 0%; }
  to   { background-position: 50% 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero { animation: none; background-position: 50% 60%; }
}
.hero .sun {
  /* Off the centre line, like the app's own sky — the CTA owns the middle. */
  position: absolute; left: 71%; bottom: 24%;
  width: 150px; height: 150px; border-radius: 50%;
  transform: translateX(-50%);
  z-index: 0;
  background: radial-gradient(circle at 50% 45%,
    #FFF3D9 0%, #FFD9A0 34%, rgba(255, 190, 120, 0.45) 62%, rgba(255, 180, 110, 0) 72%);
  filter: blur(2px);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 {
  font-family: var(--serif); font-weight: 660;
  font-size: clamp(38px, 6.4vw, 64px);
  line-height: 1.12;
  max-width: 15ch; margin: 0 auto;
  text-wrap: balance;
}
.hero .sub {
  margin: 18px auto 0; max-width: 44ch;
  font-size: clamp(16px, 2.2vw, 19px);
  color: rgba(255, 252, 247, 0.88);
}
.hero .cta { margin-top: 34px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.store-chip {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--ink-on-sky);
  border: 1px solid rgba(255, 252, 247, 0.25);
  padding: 13px 26px; border-radius: 16px;
  text-decoration: none; font-weight: 600; font-size: 16px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.store-chip:hover { transform: translateY(-1px); border-color: rgba(255, 252, 247, 0.45); }
.store-chip .apple { line-height: 0; }
.store-chip .apple svg { width: 19px; height: 19px; fill: currentColor; }
.store-chip small { display: block; font-size: 11px; font-weight: 600; opacity: 0.7; text-align: left; }
.honesty {
  font-size: 13.5px; color: rgba(255, 252, 247, 0.78); font-weight: 600;
  letter-spacing: 0.2px; max-width: 90vw;
}
.honesty span { margin: 0 7px; }
.honesty i { font-style: normal; white-space: nowrap; }
.hero .peek {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: rgba(255, 252, 247, 0.6); font-size: 22px; text-decoration: none;
  animation: peek 2.6s ease-in-out infinite;
}
@keyframes peek {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 6px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero .peek { animation: none; }
}

/* ---- Sections -------------------------------------------------------- */
section { padding: 84px 0; }
section.alt { background: var(--paper); border-top: 1px solid var(--sand); border-bottom: 1px solid var(--sand); }
.kicker {
  font-size: 12px; font-weight: 800; letter-spacing: 2.2px;
  color: var(--coral-deep); text-transform: uppercase;
}
h2 {
  font-family: var(--serif); font-weight: 640;
  font-size: clamp(28px, 4vw, 38px); line-height: 1.15;
  margin: 10px 0 14px; text-wrap: balance;
}
.lede { color: var(--ink2); max-width: 58ch; font-size: 17px; }

.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
  align-items: center; margin-top: 64px;
}
.feature:nth-child(even of .feature) .shot { order: -1; }
.feature h3 { font-family: var(--serif); font-weight: 630; font-size: 26px; margin-bottom: 10px; }
.feature p { color: var(--ink2); max-width: 46ch; }
.feature .fact { margin-top: 14px; font-weight: 700; color: var(--coral-deep); font-size: 14.5px; }
.shot { display: flex; justify-content: center; }
.shot img {
  width: min(300px, 78vw);
  border-radius: 42px;
  border: 10px solid var(--ink);
  box-shadow: 0 30px 60px rgba(14, 27, 50, 0.22);
  background: var(--ink);
}

/* ---- Footer ---------------------------------------------------------- */
footer {
  background: var(--paper); border-top: 1px solid var(--sand);
  padding: 44px 0 54px; color: var(--ink2); font-size: 14.5px;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 34px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
footer a { color: var(--ink2); text-decoration: none; font-weight: 600; }
footer a:hover { color: var(--ink); }

/* ---- Inner pages (legal, support, press) ----------------------------- */
main.doc { max-width: 720px; margin: 0 auto; padding: 56px 24px 96px; }
main.doc h1 { font-family: var(--serif); font-weight: 650; font-size: 40px; margin-bottom: 6px; }
main.doc .updated { color: var(--ink3); font-size: 14px; margin-bottom: 34px; }
main.doc h2 { font-size: 26px; margin: 40px 0 10px; }
main.doc h3 { font-family: var(--serif); font-weight: 630; font-size: 20px; margin: 28px 0 8px; }
main.doc p, main.doc li { color: #2A3650; }
main.doc li { margin: 6px 0; }
main.doc a { color: var(--coral-deep); font-weight: 600; text-decoration: none; }
main.doc a:hover { text-decoration: underline; }
main.doc blockquote {
  border-left: 3px solid var(--sand); padding: 2px 0 2px 18px;
  color: var(--ink2); margin: 16px 0;
}
main.doc table {
  border-collapse: collapse; width: 100%; margin: 18px 0; font-size: 14.5px;
  display: block; overflow-x: auto; /* wide tables scroll inside themselves on small screens */
}
main.doc th { text-align: left; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink3); }
main.doc th, main.doc td { padding: 9px 12px; border-bottom: 1px solid var(--sand); vertical-align: top; }
main.doc hr { border: none; border-top: 1px solid var(--sand); margin: 34px 0; }
main.doc code { background: var(--cream-tint); border-radius: 6px; padding: 1px 6px; font-size: 0.9em; }
.card {
  background: var(--paper); border: 1px solid var(--sand);
  border-radius: 20px; padding: 22px 26px; margin: 18px 0;
}

@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; gap: 30px; }
  .feature:nth-child(even of .feature) .shot { order: 0; }
  header.site nav { gap: 14px; }
  header.site nav a { font-size: 15px; white-space: nowrap; }
  header.site .wordmark { font-size: 22px; margin-right: 14px; }
  section { padding: 60px 0; }
  main.doc h1 { font-size: 32px; }
  /* On narrow screens the sun glow would sit behind the honesty strip —
     sink it to the warm band at the very bottom, quieter. */
  .hero .sun { width: 110px; height: 110px; left: 80%; bottom: 3%; opacity: 0.7; }
}

/* The very smallest phones: keep the header on one line with room to spare. */
@media (max-width: 400px) {
  header.site nav { gap: 11px; }
  header.site nav a { font-size: 13.5px; }
  header.site .wordmark { font-size: 20px; margin-right: 10px; }
  header.site .wordmark img { width: 26px; height: 26px; }
}

/* ---- /s/ — a shared sky, for somebody without the app ---------------- */
/* One page, no post id, no photograph. The sky it points at is only ever
   rendered by the app; this is the page that says so. Same hero as the
   homepage, shortened, because it has one thing to say. */
.hero.single { min-height: 78vh; padding: 132px 0 72px; }
.hero .kicker { display: block; margin-bottom: 14px; }
.hero .kicker.on-sky { color: rgba(255, 252, 247, 0.72); }
.hero .aside {
  margin: 32px auto 0; max-width: 42ch;
  font-size: 14.5px; line-height: 1.55;
  color: rgba(255, 252, 247, 0.68);
}

/* ---- 404 ------------------------------------------------------------- */
/* Classes, not inline styles, so the site can ship a strict
   Content-Security-Policy with no 'unsafe-inline' anywhere. */
main.doc.lost { text-align: center; padding-top: 16vh; padding-bottom: 16vh; }
main.doc.lost .muted { color: var(--ink2); }
main.doc.lost .back { margin-top: 18px; }
main.doc.lost .back a { color: var(--coral-deep); font-weight: 700; }
