/* Waves by oobab – site styles. Plain CSS, no build step, no web fonts (fast, private, works anywhere). */

:root {
  color-scheme: light dark;
  --abyss: #0b2e3f;          /* text, deep band */
  --sea: #0a6f92;            /* links, buttons */
  --sea-strong: #08597a;     /* button hover */
  --lagoon: #e4f3f7;         /* soft panels */
  --surface: #ffffff;        /* page */
  --line: #c9e2ea;           /* rules, borders */
  --muted: #4a6573;          /* secondary text */
  --deep-text: #e8f5f9;      /* text on the deep band */
  --caution: #9a4a06;        /* safety notes */
  --caution-bg: #fdf1e3;
  --round: "SF Pro Rounded", ui-rounded, "Hiragino Maru Gothic ProN", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --abyss: #e3f1f5;
    --sea: #6cc9e6;
    --sea-strong: #9adcf0;
    --lagoon: #0f2f3e;
    --surface: #071c27;
    --line: #1d4556;
    --muted: #9ab8c4;
    --deep-text: #e3f1f5;
    --caution: #f3b26b;
    --caution-bg: #2c1d0d;
  }
}

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--abyss);
  font: 1.0625rem/1.6 var(--body);
}

a { color: var(--sea); text-underline-offset: 0.15em; }
a:hover { color: var(--sea-strong); }
:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--round); line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 700; margin: 0 0 1rem; max-width: 18ch; }
h2 { font-size: clamp(1.45rem, 3.4vw, 1.9rem); font-weight: 650; margin: 2.75rem 0 0.75rem; }
h3 { font-size: 1.2rem; font-weight: 650; margin: 1.75rem 0 0.4rem; }
p, ul, ol, dl, table { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.35rem; }

.wrap { width: min(100% - 2.5rem, 64rem); margin-inline: auto; }
.prose { max-width: var(--measure); }
.wrap.prose { max-width: none; }
.wrap.prose > * { max-width: var(--measure); }

/* Header */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; padding-block: 0.9rem; }
.brand { font-family: var(--round); font-weight: 700; font-size: 1.35rem; color: var(--abyss); text-decoration: none; }
.brand small { font-weight: 500; font-size: 0.8rem; color: var(--muted); margin-left: 0.3rem; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-left: auto; font-size: 0.97rem; }
.site-nav a { color: var(--abyss); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--sea); text-decoration: underline; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 0; }
.btn {
  display: inline-block; padding: 0.7rem 1.2rem; border-radius: 0.5rem;
  font-weight: 600; text-decoration: none; border: 2px solid var(--sea);
}
.btn-main { background: var(--sea); color: var(--surface); }
.btn-main:hover { background: var(--sea-strong); border-color: var(--sea-strong); color: var(--surface); }
.btn-quiet { color: var(--sea); }

/* Hero: above the surface */
.hero { padding-block: clamp(2.5rem, 8vw, 5rem) 0; }
.hero .lead { font-size: 1.2rem; max-width: 52ch; color: var(--muted); }

/* The waterline: the one bold element. Everything below it is "underwater". */
.waterline { display: block; width: 100%; height: 48px; margin-top: clamp(2rem, 6vw, 3.5rem); color: #0b2e3f; }
.deep { background: #0b2e3f; color: #e8f5f9; padding-block: 1rem 3rem; }
.deep a { color: #9adcf0; }
.deep h2 { color: #ffffff; margin-top: 1.5rem; }
@media (prefers-color-scheme: dark) {
  .waterline { color: #0e3a4f; }
  .deep { background: #0e3a4f; }
}

/* What Waves does: rows, not cards */
.does { display: grid; gap: 0; margin: 1.5rem 0 0; border-top: 1px solid rgba(232, 245, 249, 0.25); }
.does > div { display: grid; grid-template-columns: minmax(10rem, 16rem) 1fr; gap: 0.5rem 2rem; padding: 1rem 0; border-bottom: 1px solid rgba(232, 245, 249, 0.25); }
.does dt { font-family: var(--round); font-weight: 650; font-size: 1.1rem; color: #ffffff; }
.does dd { margin: 0; color: #cfe6ee; }
@media (max-width: 40rem) { .does > div { grid-template-columns: 1fr; } }

/* Sections */
main section { padding-block: 0.5rem; }
.panel { background: var(--lagoon); border-radius: 0.75rem; padding: 1.25rem 1.5rem; margin: 1.5rem 0; max-width: var(--measure); }
.panel > :last-child { margin-bottom: 0; }
.note { background: var(--caution-bg); color: var(--caution); border-left: 4px solid currentColor; padding: 0.9rem 1.1rem; border-radius: 0 0.5rem 0.5rem 0; max-width: var(--measure); }
.note p { margin: 0; color: var(--abyss); }
.meta { color: var(--muted); font-size: 0.92rem; }

/* FAQ */
.faq h3 { margin-top: 1.5rem; }

/* Tables */
.table-scroll { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; min-width: 22rem; }
th, td { text-align: left; padding: 0.5rem 1rem 0.5rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--round); font-weight: 650; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Calculator */
.calc { display: grid; grid-template-columns: 1fr minmax(7rem, 9rem); gap: 1.5rem; align-items: start; max-width: 44rem; margin: 1.5rem 0; }
.calc form { display: grid; gap: 1rem; }
.calc label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.calc input[type="number"], .calc select {
  font: inherit; width: 100%; max-width: 20rem; padding: 0.55rem 0.7rem;
  border: 2px solid var(--line); border-radius: 0.5rem; background: var(--surface); color: var(--abyss);
}
.mixes { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.mixes button {
  font: inherit; font-size: 0.95rem; padding: 0.35rem 0.75rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: transparent; color: var(--abyss); cursor: pointer;
}
.mixes button[aria-pressed="true"] { background: var(--sea); border-color: var(--sea); color: var(--surface); }
.result { font-family: var(--round); }
.result .big { font-size: clamp(2.4rem, 8vw, 3.4rem); font-weight: 700; line-height: 1; }
.result .small { color: var(--muted); margin-top: 0.35rem; }
.result .warn { color: var(--caution); font-weight: 600; margin-top: 0.75rem; font-family: var(--body); font-size: 0.95rem; }

/* Depth gauge beside the result: shows the MOD against the 40 m recreational limit */
.gauge { position: relative; height: 22rem; border-left: 2px solid var(--line); margin-left: 2.5rem; }
.gauge .tick { position: absolute; left: -2.5rem; width: 2.5rem; font-size: 0.78rem; color: var(--muted); text-align: right; padding-right: 0.5rem; transform: translateY(-50%); }
.gauge .tick::after { content: ""; position: absolute; right: -0.4rem; top: 50%; width: 0.4rem; border-top: 1px solid var(--line); }
.gauge .limit { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--caution); }
.gauge .limit span { position: absolute; left: 0.4rem; top: 0.15rem; font-size: 0.75rem; color: var(--caution); white-space: nowrap; }
.gauge .water { position: absolute; left: 0; top: 0; width: 1.25rem; background: var(--sea); border-radius: 0 0 0.4rem 0; transition: height 0.25s ease; }
.gauge .mark { position: absolute; left: 1.5rem; font-weight: 700; font-size: 0.85rem; transform: translateY(-50%); white-space: nowrap; transition: top 0.25s ease; }
@media (max-width: 34rem) { .calc { grid-template-columns: 1fr; } .gauge { height: 14rem; } }
@media (prefers-reduced-motion: reduce) { .gauge .water, .gauge .mark { transition: none; } }

/* Footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 3rem; padding-block: 1.5rem 2.5rem; color: var(--muted); font-size: 0.92rem; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-bottom: 0.5rem; }
