/* Lido. One stylesheet for every page.
   The type follows the app (OneMinuteHoliday/Features/Type.swift): the pool speaks, the instrument reports.
   Voice is Fraunces Italic, WONK 0 (pinned in the font file), never under 21 px. Instrument is the system face. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 200 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --navy: #04263d;          /* the app's ink by day */
  --muted: #3e5867;         /* 4.5:1 or better on paper */
  --paper: #fffcf5;
  --card: #fbf8f1;
  --shade: #041f33;         /* the minute's own shade, and the launch colour */
  --hairline: rgba(4, 38, 61, 0.12);
  --side: 24px;
  --measure: 34rem;
  --voice: "Fraunces", "Iowan Old Style", Georgia, serif;
  --instrument: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--instrument);
  font-size: 1.0625rem;      /* 17 px, the app's lead */
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(4, 38, 61, 0.35);
  text-underline-offset: 0.22em;
  transition: text-decoration-color 0.18s ease-out;
}
a:hover { text-decoration-color: currentColor; }
a:focus-visible,
.pill:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Voice ---------- */

.voice {
  font-family: var(--voice);
  font-style: italic;
  font-synthesis: none;
}

/* The name, as the opening's wordmark: light, sharp (SOFT 0), optical size 144. */
.wordmark {
  margin: 0;
  font-family: var(--voice);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 0;
  font-size: clamp(5rem, 26vw, 8rem);
  line-height: 1;
  letter-spacing: -0.012em;
  /* Fraunces' italic leans out of its box; this keeps the L's foot on the column. */
  margin-left: -0.04em;
}

.tagline {
  margin: 0.35rem 0 0;
  font-family: var(--voice);
  font-style: italic;
  font-weight: 340;
  font-variation-settings: "opsz" 36, "SOFT" 100;
  font-size: 1.625rem;
  line-height: 1.2;
  letter-spacing: -0.008em;
}

h1.title {
  margin: 0 0 1.25rem;
  font-family: var(--voice);
  font-style: italic;
  font-weight: 320;
  font-variation-settings: "opsz" 72, "SOFT" 100;
  font-size: clamp(2.375rem, 9vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.012em;
  margin-left: -0.03em;
  text-wrap: balance;
}

/* ---------- Home ---------- */

.home {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* The pool, seen from above, lit for the visitor's own hour (light.js). */
.water {
  position: relative;
  height: clamp(300px, 54svh, 560px);
  background: #3aa8d8 url("images/pool.jpg") center 46% / cover no-repeat;
  overflow: hidden;
  /* The deck stands above the water: a soft lip where the paper meets it. */
  box-shadow: inset 0 -14px 22px -16px rgba(4, 31, 51, 0.45);
}
.water::before,
.water::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

/* Early light: cooler, a little paler. */
html[data-light="morning"] .water::before {
  opacity: 1;
  background: linear-gradient(170deg, rgba(255, 244, 228, 0.32), rgba(150, 200, 230, 0.12));
  mix-blend-mode: soft-light;
}

/* Golden hour: the light has gone gold, long and warm. */
html[data-light="golden"] .water::before {
  opacity: 1;
  background: linear-gradient(160deg, rgba(255, 176, 92, 0.5) 0%, rgba(236, 130, 70, 0.42) 55%, rgba(120, 60, 70, 0.4) 100%);
  mix-blend-mode: multiply;
}
html[data-light="golden"] .water::after {
  opacity: 1;
  background: radial-gradient(120% 80% at 18% 0%, rgba(255, 214, 150, 0.45), rgba(255, 214, 150, 0) 60%);
  mix-blend-mode: screen;
}

/* Night: the water goes deep, and the two lamps are on. */
html[data-light="night"] .water::before {
  opacity: 1;
  /* A plain wash, not multiply: multiply turns the flower's yellow heart green. */
  background: linear-gradient(180deg, rgba(5, 28, 52, 0.66) 0%, rgba(4, 24, 46, 0.72) 100%);
}
html[data-light="night"] .water::after {
  opacity: 1;
  background:
    radial-gradient(50% 40% at 8% 12%, rgba(255, 196, 120, 0.55), rgba(255, 196, 120, 0.16) 45%, rgba(255, 196, 120, 0) 72%),
    radial-gradient(50% 40% at 92% 90%, rgba(255, 196, 120, 0.5), rgba(255, 196, 120, 0.14) 45%, rgba(255, 196, 120, 0) 72%);
  mix-blend-mode: screen;
}

.intro {
  padding: 2.25rem var(--side) 0;
  max-width: calc(var(--measure) + 2 * var(--side));
}

.lead {
  text-wrap: pretty;
  margin: 1.25rem 0 0;
  max-width: 31rem;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--navy);
}

.store {
  margin: 2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

/* The app's pill: 52 high, fully round, the action role (17 Semibold). */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.pill-live {
  background: var(--navy);
  color: var(--paper);
  box-shadow: 0 1px 2px rgba(4, 31, 51, 0.18), 0 6px 18px -8px rgba(4, 31, 51, 0.45);
  transition: transform 0.18s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.18s ease-out;
}
.pill-live:hover { box-shadow: 0 1px 2px rgba(4, 31, 51, 0.18), 0 10px 24px -10px rgba(4, 31, 51, 0.5); }
.pill-live:active { transform: scale(0.97); }
.pill-soon {
  background: rgba(4, 38, 61, 0.045);
  border: 1px solid var(--hairline);
  color: var(--muted);
  font-weight: 500;
}
.pill-live[hidden],
.pill-soon[hidden] { display: none; }

.platform {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* The arrival: the words settle in once, as the app's screens cross-fade. Never with Reduce Motion. */
@media (prefers-reduced-motion: no-preference) {
  .settle {
    animation: settle 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }
  .settle-2 { animation-delay: 0.12s; }
  .settle-3 { animation-delay: 0.24s; }
  .settle-4 { animation-delay: 0.36s; }
  @keyframes settle {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- Inner pages ---------- */

.masthead {
  padding: 22px var(--side) 0;
}
.masthead a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-height: 44px;
}
.masthead img {
  width: 32px;
  height: 32px;
  border-radius: 7.5px;      /* the home screen's corner, at 32 px */
  box-shadow: 0 0 0 0.5px rgba(4, 38, 61, 0.14);
}
.masthead span {
  font-family: var(--voice);
  font-style: italic;
  font-weight: 340;
  font-variation-settings: "opsz" 36, "SOFT" 0;
  font-size: 1.625rem;
  line-height: 1;
  letter-spacing: -0.008em;
}

.page {
  flex: 1;
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--side));
  padding: 2.5rem var(--side) 1rem;
}

.page p,
.page ul { margin: 0 0 1rem; }
.page ul { padding-left: 1.15rem; }
.page li { margin: 0 0 0.4rem; }
.page li::marker { color: var(--muted); }

.page .standfirst {
  font-size: 1.1875rem;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.page h2 {
  text-wrap: balance;
  margin: 2.25rem 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}
.page h2:first-of-type { margin-top: 0; }

.page .meta {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* The support address, set as the one thing to press on the page. */
.contact {
  margin: 0 0 2.75rem;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 18px;
}
.contact p { margin: 0; }
.contact .address {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--voice);
  font-style: italic;
  font-weight: 360;
  font-variation-settings: "opsz" 36, "SOFT" 100;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.006em;
  overflow-wrap: anywhere;
}

.faq h2 {
  padding-top: 1.75rem;
  border-top: 1px solid var(--hairline);
  margin-top: 1.75rem;
}
.faq h2:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.lost {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem var(--side);
  max-width: calc(var(--measure) + 2 * var(--side));
}

/* ---------- Foot ---------- */

.foot {
  margin-top: 3.5rem;
  padding: 1.5rem var(--side) calc(2rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--hairline);
  font-size: 0.9375rem;
  color: var(--muted);
}
.foot nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
}
.foot nav a {
  display: inline-block;
  padding: 10px 0;           /* 44 px to press */
  color: var(--navy);
  text-decoration: none;
}
.foot nav a:hover { text-decoration: underline; text-decoration-color: rgba(4, 38, 61, 0.35); }
.foot nav a[aria-current="page"] { color: var(--muted); }
.foot p {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* ---------- Wider screens ---------- */

@media (min-width: 900px) {
  :root { --side: 56px; }

  .home {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100svh;
  }
  .water {
    height: 100vh;
    height: 100svh;
    position: sticky;
    top: 0;
    box-shadow: inset -14px 0 22px -16px rgba(4, 31, 51, 0.45);
  }
  .home-words {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
  }
  .intro { padding-top: 4rem; }
  .home .foot { margin-top: 4rem; border-top: 0; padding-top: 0; }

  .masthead { padding-top: 36px; }
  .page { padding-top: 4rem; margin-left: 0; }
}

@media (min-width: 1280px) {
  .home { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
}

@media (forced-colors: active) {
  .water::before,
  .water::after { display: none; }
  .pill-live,
  .pill-soon { border: 1px solid CanvasText; }
}

@media print {
  .water, .foot nav { display: none; }
  body { background: #fff; }
}
