/* Composite Sky: sky.penpoint.dev styles.
   Palette and type: docs/design_handoff_composite_sky/ §2, mirrored in
   tokens/CompositeSkyTheme.swift. Keep these values in sync with that file. */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;700&display=swap');

:root {
  /* Broadcast palette — handoff §2 */
  --header-purple-a: #2a0959;
  --header-purple-b: #3b1174;
  --field-blue-a: #16257e;
  --field-blue-b: #2a3fa8;
  --field-blue-c: #3d55c6;
  --header-orange: #f4791f;
  --caption-yellow: #ffd21f;
  --readout-white: #ffffff;
  --low-blue: #8fd0ff;
  --ldl-blue-a: #122a86;
  --ldl-blue-b: #0c1e63;
  --alert-red: #c00d0d;

  /* Page surfaces */
  --color-bg: #f2f2f3;
  --color-surface: #e9e9ea;
  --color-text: #1d1f20;
  --color-accent: var(--field-blue-b);
  --color-accent-strong: var(--field-blue-a);
  --color-divider: color-mix(in srgb, #1d1f20 16%, transparent);

  --font-display: Archivo, 'Helvetica Neue', Arial, sans-serif;
  --font-body: Archivo, 'Helvetica Neue', Arial, sans-serif;
  --font-display-weight: 700;
}

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
}

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

a { color: var(--color-accent-strong); text-underline-offset: 3px; }
a:hover { color: var(--ldl-blue-b); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* — layout — */
.container { max-width: 1100px; margin: 0 auto; padding-inline: 48px; }

.kicker {
  display: block;
  font-size: 13px;
  line-height: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-accent-strong);
  margin-bottom: 12px;
}

.rule { height: 1px; border: 0; margin: 0; background: var(--color-divider); }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-display); font-weight: var(--font-display-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent;
  border: 1px solid var(--color-divider);
  border-radius: 0;
  padding: 6.8px 12.24px;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); color: var(--color-bg); border-color: var(--color-accent); }
.btn-primary:hover { background: var(--field-blue-a); }
.btn-primary:active { background: var(--ldl-blue-b); }
.btn-ghost { color: var(--color-accent); border-color: transparent; padding-inline: 3.4px; }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }

/* — forms — */
.field > label {
  display: block; font-size: 12px; margin-bottom: 5px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.input {
  width: 100%; min-height: 36px; padding: 6px 10px; font: inherit;
  font-size: 14px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: 0;
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; }

/* — tags — */
.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px; border-radius: 0;
}
.tag-accent { background: color-mix(in srgb, var(--field-blue-c) 14%, white); color: var(--field-blue-a); }

/* — arrow links (uppercase link rows on cards and app rows) — */
.arrow-link {
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; text-decoration: none;
}
.arrow-link-muted {
  font-size: 13px; font-weight: 400; letter-spacing: 0.06em;
  text-transform: uppercase; text-decoration: none;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
}

/* — nav — */
.nav {
  display: flex; align-items: center; flex-wrap: wrap; gap: 13.6px;
  padding-block: 10.2px;
  padding-inline: max(48px, calc((100% - 1100px) / 2 + 48px));
}
.nav-wordmark {
  font-family: var(--font-display); font-weight: var(--font-display-weight);
  font-size: 18px; margin-right: auto;
  display: flex; align-items: center; gap: 10px;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--color-text); text-decoration: none;
}
.nav-wordmark img { width: 24px; height: 24px; }
.nav a { color: inherit; text-decoration: none; font-size: 14px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--color-accent); }
.nav a.btn-primary { color: var(--color-bg); }
.nav a.btn-primary:hover { color: var(--color-bg); }

/* — footer — */
.footer {
  border-top: 1px solid var(--color-divider);
  margin-top: 64px; padding-block: 32px;
  padding-inline: max(48px, calc((100% - 1100px) / 2 + 48px));
  display: flex; flex-wrap: wrap; gap: 32px;
  font-size: 13px;
}
.footer-brand { margin-right: auto; max-width: 320px; }
.footer-heading {
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 8px; color: color-mix(in srgb, var(--color-text) 60%, transparent);
}
.footer-links { display: flex; flex-direction: column; gap: 4px; }
.footer-credit {
  width: 100%; padding-top: 16px;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
}

/* — blueprint frame —
   Ported from penpoint.dev/src/styles/global.css; the .cell and .closer
   rules below extend it, and the Blueprint component that supplied it
   does not exist on this static site. */
.blueprint { position: relative; border: 1px solid var(--color-divider); border-radius: 0; }
.blueprint > .corner {
  position: absolute; width: 11px; height: 11px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.blueprint > .corner::before, .blueprint > .corner::after {
  content: ""; position: absolute; background: currentColor;
}
.blueprint > .corner::before { left: 5px; top: 0; width: 1px; height: 100%; }
.blueprint > .corner::after  { top: 5px; left: 0; width: 100%; height: 1px; }
.blueprint > .corner.tl { top: -6px; left: -6px; }
.blueprint > .corner.tr { top: -6px; right: -6px; }
.blueprint > .corner.bl { bottom: -6px; left: -6px; }
.blueprint > .corner.br { bottom: -6px; right: -6px; }

/* ——————————————————————————————————————————————————————————————
   Product page. Ported from the scoped <style> block of
   penpoint.dev/src/pages/composite-sky.astro. Astro scoped these to the
   component; only index.html uses them, so they are unscoped here.
   —————————————————————————————————————————————————————————————— */

/* Hero — field-blue band after the app's tvOS Top Shelf art */
.hero {
  background: linear-gradient(149deg, #16257e 0%, #2a3fa8 58%, #3d55c6 100%);
  color: #ffffff; overflow: hidden;
}
.hero-inner { padding-block: 96px 88px; position: relative; }
/* `top` sits low enough that the art clears the headline and sits beside the
   body copy instead. Archivo is wider than the condensed face this layout was
   originally drawn around, so the third headline line now reaches further
   right and the art has to begin below it. */
.hero-sky {
  position: absolute; right: -40px; top: 78%; transform: translateY(-50%);
  width: 420px; height: auto; pointer-events: none;
}
@media (max-width: 1100px) {
  .hero-sky { width: 340px; right: -60px; }
}
.hero-kicker {
  display: block; font-size: 13px; line-height: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; font-weight: 600;
  color: #ffd21f; margin-bottom: 20px; position: relative;
}
.hero-display {
  font-size: clamp(52px, 7vw, 96px); line-height: 1.02;
  letter-spacing: 0.01em; text-transform: uppercase;
  margin: 0 0 0 -0.052em; position: relative;
}
.hero-display span { display: block; }
.hero-alt { color: #ffd21f; }
.hero-rule {
  display: block; width: 128px; height: 6px; background: #ffd21f;
  margin-top: 28px; position: relative;
}
.hero-sub {
  font-size: 16px; line-height: 24px; max-width: 52ch;
  margin: 28px 0 0; position: relative;
  color: color-mix(in srgb, #ffffff 88%, transparent);
}
.hero-actions { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 32px; position: relative; }
.hero-link {
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  color: #ffd21f;
}
.hero-link:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .hero-sky { display: none; }
}

/* Section scaffolding — matches Narcissus */
.section { padding: 96px 0 36px; }
.section-mid { padding: 36px 0; }
.section-last { padding: 36px 0 96px; }
.rule-gap { margin-bottom: 40px; }
.section-title {
  font-size: 28px; line-height: 28px; text-transform: uppercase;
  letter-spacing: 0.02em; margin: 0 0 28px;
}

.cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; }
.cell { padding: 24px; }
.cell-title {
  font-size: 22px; line-height: 24px; text-transform: uppercase;
  letter-spacing: 0.02em; margin: 0;
}
.cell-body {
  font-size: 14px; line-height: 22px; margin: 12px 0 0;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}
.body-copy {
  font-size: 15px; line-height: 24px; margin: 0 0 20px; max-width: 56ch;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}
.body-copy:last-child { margin-bottom: 0; }

/* On screen */
.grid-shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 40px; }
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption {
  font-size: 13px; line-height: 20px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 70%, transparent); margin-top: 8px;
}

/* By the numbers */
.fact-tags { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.stat-cells { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat-n {
  font-size: 44px; line-height: 44px; margin: 0;
  letter-spacing: 0.02em;
}
.stat-n-accent { color: var(--color-accent-strong); }

/* Music */
.music-quote { max-width: 30ch; }

/* FAQ — matches Narcissus */
.faq-list { max-width: 760px; }
.faq-item { border: 1px solid var(--color-divider); }
.faq-item + .faq-item { margin-top: -1px; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 16px 20px;
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; float: right; color: var(--color-accent-strong); }
.faq-item[open] summary::after { content: '−'; }
.faq-item summary:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }
.faq-more { margin: 20px 0 0; }
.faq-item .faq-link { margin-top: -8px; }
.faq-item p {
  margin: 0; padding: 0 20px 16px;
  font-size: 14px; line-height: 22px;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
  max-width: 62ch;
}

/* Closer / beta */
.closer { padding: 32px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.closer-title {
  font-size: 28px; line-height: 28px; text-transform: uppercase;
  letter-spacing: 0.02em; margin: 0;
}
.closer-body {
  font-size: 15px; line-height: 24px; margin: 0; max-width: 58ch;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}
.beta-form { display: flex; gap: 12px; align-items: stretch; width: 100%; max-width: 480px; margin-top: 6px; }
.beta-form .input { flex: 1; min-height: 36px; }
.beta-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.beta-form[hidden], .beta-done[hidden], .beta-error[hidden] { display: none; }
.beta-done { font-size: 15px; line-height: 24px; margin: 6px 0 0; }
.beta-error {
  font-size: 14px; line-height: 22px; margin: 0;
  color: var(--alert-red);
}
.fine-print {
  margin: 26px 0 0; font-size: 13px; line-height: 20px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}

/* Simulated loop — three bands at the app's own 235/890 boundaries.
   No shadows, no scan lines, Title Case everywhere but the label role. */
.tv {
  position: relative; width: 100%; aspect-ratio: 16 / 9; max-width: 960px;
  overflow: hidden; border-radius: 6px; background: #16257e;
  font-family: Archivo, 'Helvetica Neue', Arial, sans-serif; font-weight: 400;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.45);
  display: flex; flex-direction: column;
}
.tv-header {
  height: 21.8%; flex: none; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; padding: 0 4.5%;
  background: linear-gradient(100deg, #2a0959 0%, #3b1174 100%);
}
.tv-seg { font-size: clamp(17px, 3.1vw, 40px); font-weight: 700; letter-spacing: -0.01em; color: #f4791f; }
.tv-loc { font-size: clamp(11px, 1.85vw, 23px); font-weight: 700; color: #ffd21f; margin-top: 0.35em; }
.tv-header-right { text-align: right; }
.tv-clock { font-size: clamp(16px, 2.9vw, 37px); color: #ffffff; }
.tv-date { font-size: clamp(10px, 1.5vw, 19px); font-weight: 500; letter-spacing: 0.03em; color: #ffd21f; margin-top: 0.3em; }
.tv-field {
  flex: 1; min-height: 0; padding: 3.4% 4.5%;
  background: linear-gradient(180deg, #16257e 0%, #2a3fa8 62%, #3d55c6 100%);
  display: flex; flex-direction: column; justify-content: center;
}
.tv-panel[hidden] { display: none; }

/* Label role — the only surface that stays uppercase */
.tv-label {
  font-size: clamp(10px, 1.6vw, 20px); font-weight: 500;
  letter-spacing: 0.03em; color: #ffd21f;
}
.tv-caption { font-size: clamp(13px, 2.2vw, 28px); font-weight: 500; color: #ffd21f; }
.tv-underline {
  display: block; padding-bottom: 0.35em; margin-bottom: 0.7em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

/* Current Conditions — hero left, metrics rail flush right */
.panel-now { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6%; }
.tv-bigtemp { font-size: clamp(52px, 10vw, 128px); color: #ffffff; line-height: 0.95; }
.now-cond { font-size: clamp(13px, 2.2vw, 28px); color: #ffd21f; margin-top: 0.7em; }
.now-wind { font-size: clamp(11px, 1.6vw, 20px); color: #ffffff; margin-top: 0.6em; }
.now-wind .tv-label { margin-right: 0.5em; }
.now-rail { display: grid; gap: 0.55em; min-width: 42%; }
.rail-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 2em;
  font-size: clamp(11px, 1.85vw, 23px); color: #ffffff;
}

/* Your Local Forecast */
.panel-fcst { font-size: clamp(12px, 2vw, 25px); color: #ffffff; line-height: 1.5; }
.panel-fcst .tv-caption { font-size: clamp(13px, 2.2vw, 28px); }

/* Hourly Forecast — six columns at a two-hour stride */
.panel-hourly { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2%; text-align: center; }
.hour-t { font-size: clamp(13px, 2.2vw, 28px); color: #ffffff; margin-top: 1.4em; }
.hour-p { font-size: clamp(10px, 1.55vw, 19px); color: rgba(255, 255, 255, 0.6); margin-top: 0.5em; }

/* Local Radar */
/* Negative block margins cancel the field's own 3.4% padding (both
   resolve against the same width), so the map spans the full band. */
.panel-radar { flex: 1; min-height: 0; margin-block: -3.4%; display: flex; justify-content: center; }
.panel-radar img { height: 100%; width: auto; max-width: 100%; object-fit: cover; display: block; }

/* Extended Forecast */
.panel-ext { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2%; text-align: center; }
.ext-day .tv-caption { font-weight: 700; }
.ext-cond { font-size: clamp(11px, 1.7vw, 21px); color: #ffffff; margin-top: 1.5em; }
.ext-temps { font-size: clamp(13px, 2.1vw, 26px); margin-top: 0.8em; }
.ext-hi { color: #ffd21f; }
.ext-lo { color: var(--low-blue); }

/* Almanac */
.panel-alm {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7%;
  font-size: clamp(11px, 1.7vw, 21px); color: #ffffff;
}
.alm-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 0.6em; margin-top: 0.7em; }
.alm-head { margin-top: 0.4em; }
.alm-key { color: #ffd21f; }

/* Tides */
.panel-tides {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 3%;
  font-size: clamp(11px, 1.75vw, 22px); color: #ffffff; line-height: 1.7;
}
.tide-low { color: var(--low-blue); }

/* This Date in History */
.panel-hist { font-size: clamp(10px, 1.6vw, 20px); color: #ffffff; }
.hist-row { display: grid; grid-template-columns: 4.5em 1fr; gap: 1.4em; margin-top: 0.9em; }
.hist-year { color: #ffd21f; }

/* Lower display line */
.tv-ldl {
  height: 17.6%; flex: none; display: flex; align-items: center; overflow: hidden;
  background: linear-gradient(180deg, #122a86, #0c1e63);
}
.tv-ldl.is-alert { background: #c00d0d; }
.ldl-normal {
  flex: 1; display: flex; align-items: baseline;
  gap: 6%; padding: 0 3.6%; white-space: nowrap;
}
.ldl-normal[hidden], .ldl-crawl[hidden] { display: none; }
.ldl-pair { display: flex; align-items: baseline; gap: 0.7em; }
.ldl-label { font-size: clamp(10px, 1.55vw, 19px); font-weight: 500; letter-spacing: 0.03em; color: #ffd21f; }
.ldl-value { font-size: clamp(12px, 1.9vw, 23px); color: #ffffff; }
.ldl-crawl {
  display: flex; white-space: nowrap; animation: cs-crawl 48s linear infinite;
  font-size: clamp(11px, 1.75vw, 22px); letter-spacing: 0.01em; color: #ffffff;
}
.ldl-crawl span { padding-right: 3em; }
@keyframes cs-crawl { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ldl-crawl { animation: none; }
}
.loop-bar {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; flex-wrap: wrap; max-width: 960px; margin-top: 14px;
}
.loop-note {
  font-size: 13px; line-height: 20px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 70%, transparent); margin: 0;
  max-width: 60ch;
}
.loop-buttons { display: flex; gap: 12px; }
