/* H2Oracle website. The app's colours: navy and gold for the brand, sky blue for the pool, teal
   for the hot tub (src/constants/theme.ts). */
:root {
  --navy: #0b1e3f;
  --navy-2: #13305f;
  --gold: #fbbf24;
  --mist: #cbd5e1;
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #e0f2fe;
  --teal: #0d9488;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #475569;
  --code-bg: #f1f5f9;
  --radius: 14px;
  --wrap: 72rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1526;
    --card: #0f1d33;
    --border: #22344f;
    --text: #e2e8f0;
    --muted: #a3b2c7;
    --code-bg: #142640;
    --primary: #38bdf8;
    --primary-dark: #7dd3fc;
    --primary-light: #0c2a44;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.6 system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-dark);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 5px;
  overflow-wrap: anywhere;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  overflow-wrap: normal;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: 1.25rem;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--card);
  padding: 0.5rem 1rem;
}

/* Header */
.site-header {
  background: var(--navy);
  color: #fff;
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
}

.brand img {
  border-radius: 9px;
}

.brand:hover {
  color: var(--gold);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.site-nav a {
  color: var(--mist);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: #fff;
  border-bottom-color: var(--gold);
}

/* Content */
main {
  padding-block: 2rem 3rem;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.45rem;
  line-height: 1.3;
  margin: 2.25rem 0 0.75rem;
}

h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 44rem;
}

.prose {
  max-width: 46rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.note {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}

.toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  max-width: 46rem;
}

.toc ul {
  margin: 0.25rem 0 0;
  padding-left: 1.2rem;
}

/* FAQ: each question opens on its own */
details.faq {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.25rem 1rem;
  margin: 0.6rem 0;
  max-width: 46rem;
}

details.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.6rem 0;
}

details.faq[open] summary {
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

/* Home */
.hero {
  /* Edge to edge: the border image paints the background out to both sides of the window */
  border-image: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%) fill 0 / /0 100vw;
  color: #fff;
  margin-top: -2rem;
  padding-block: 3rem;
}

.hero-row {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 52rem) {
  .hero-row {
    grid-template-columns: 1.2fr 1fr;
  }
}

.hero h1 {
  color: #fff;
}

.hero h1 .accent {
  color: var(--gold);
}

.hero p {
  color: var(--mist);
  font-size: 1.15rem;
  max-width: 36rem;
}

.hero-clip {
  justify-self: center;
  width: min(100%, 20rem);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.3rem;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
}

.button-primary {
  background: var(--gold);
  color: var(--navy);
}

.button-primary:hover {
  background: #fcd34d;
  color: var(--navy);
}

.button-outline {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.button-outline:hover {
  border-color: #fff;
  color: #fff;
}

.button-soon {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  cursor: default;
}

.button-soon small {
  display: block;
  font-weight: 500;
  color: var(--mist);
}

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (min-width: 40rem) {
  .features {
    gap: 1.25rem;
  }
}

@media (min-width: 64rem) {
  .features {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.feature img {
  display: block;
  width: 100%;
  aspect-ratio: 390 / 640;
  background: var(--navy);
}

.feature div {
  padding: 0.75rem 0.8rem 1rem;
}

@media (min-width: 40rem) {
  .feature div {
    padding: 0.9rem 1rem 1.1rem;
  }
}

.feature h3 {
  margin: 0 0 0.35rem;
}

.feature h3 {
  font-size: 1rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.points {
  display: grid;
  gap: 1rem;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .points {
    grid-template-columns: repeat(3, 1fr);
  }
}

.points li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.points strong {
  display: block;
  margin-bottom: 0.25rem;
}

/* What's new */
.release {
  max-width: 46rem;
  border-top: 1px solid var(--border);
}

.release h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
}

.release-date {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}

.release h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-row {
  padding-block: 1.5rem;
}

.footer-row p {
  margin: 0 0 0.5rem;
}

.fine {
  font-size: 0.8rem;
}
