/*
 * solsafe.app. Colours are the app's own (src/design/tokens.ts): the
 * D1 text inks, the apply accent and the sun field gradient. One font,
 * Varela Round, served from this site so no visitor is sent to a
 * third party.
 */

@font-face {
  font-family: 'Varela Round';
  src: url('/assets/varela-round.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #3a2438;
  --ink-body: #574255;
  --ink-muted: #524055;
  --accent: #ff8a4c;
  --accent-soft: #ffb37e;
  --cream: #fff7ec;
  --card: #ffffff;
  --line: rgba(58, 36, 56, 0.12);
  --field: linear-gradient(180deg, #ffe6c4 0%, #ffd4a0 20%, #e8d0c8 42%, #b8d8e8 62%, #8ec8e0 82%, #6ec1e8 100%);
  --lilac: linear-gradient(180deg, #f0b8e8 0%, #d8a8f0 55%, #d0c0ff 100%);
  --radius: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink-body);
  font-family: 'Varela Round', ui-rounded, system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { text-decoration-color: var(--ink); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { color: var(--ink); font-weight: 400; line-height: 1.25; }
h1 { font-size: 2.1rem; margin: 0 0 0.4rem; }
h2 { font-size: 1.35rem; margin: 2.2rem 0 0.6rem; }
h3 { font-size: 1.1rem; margin: 1.4rem 0 0.4rem; }
p, ul { margin: 0 0 1rem; }
ul { padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }
strong { color: var(--ink); font-weight: 400; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--card); padding: 8px 12px; z-index: 2; }

/* Home: one screen on the sun field. */
.home {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--field);
  display: flex;
  flex-direction: column;
}
.home main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 48px 20px 24px;
  max-width: 560px;
  margin: 0 auto;
}
.home .icon {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  box-shadow: 0 12px 32px rgba(58, 36, 56, 0.18);
  margin-bottom: 24px;
}
.home h1 { font-size: 3rem; margin-bottom: 0.2rem; }
.home .lead { color: var(--ink); font-size: 1.3rem; line-height: 1.4; margin-bottom: 1rem; }
.home .soon {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}
.home footer { background: transparent; border: 0; }

/* Policy and support pages. */
.page header {
  background: var(--field);
  padding: 20px 20px 36px;
}
.page header .bar, .page main, footer .bar { max-width: 680px; margin: 0 auto; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 1.2rem;
  margin-bottom: 28px;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.page .dated { color: var(--ink-muted); margin: 0; }
.page main { padding: 8px 20px 48px; }

.summary {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 22px 8px;
  margin: -20px 0 8px;
  box-shadow: 0 6px 24px rgba(58, 36, 56, 0.08);
}
.summary h2 { margin-top: 0; }

.contact {
  background: var(--lilac);
  border-radius: var(--radius);
  padding: 20px 22px;
  color: var(--ink);
  margin: -20px 0 8px;
}
.contact p { margin: 0; }
.contact a { font-size: 1.2rem; }

details {
  background: var(--card);
  border-radius: 16px;
  margin: 0 0 12px;
  box-shadow: 0 2px 10px rgba(58, 36, 56, 0.06);
}
summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 48px 16px 20px;
  color: var(--ink);
  font-size: 1.1rem;
  position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.5rem;
}
details[open] summary::after { content: '\2212'; }
details > div { padding: 0 20px 8px; }

footer { border-top: 1px solid var(--line); padding: 20px; }
footer .bar { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; color: var(--ink-muted); font-size: 0.95rem; }
footer a { color: var(--ink-muted); }

@media (min-width: 720px) {
  body { font-size: 18px; }
  .home h1 { font-size: 3.6rem; }
  .page header { padding: 28px 20px 48px; }
}

@media (prefers-reduced-motion: no-preference) {
  details[open] > div { animation: open 180ms ease-out; }
  @keyframes open { from { opacity: 0; } to { opacity: 1; } }
}
