:root {
  color-scheme: light dark;
  --bg: #f3f9ff;
  --surface: #ffffff;
  --surface-soft: #e6f4ff;
  --text: #102f4e;
  --muted: #5b7690;
  --line: #d2e6f6;
  --sea: #249fda;
  --sea-deep: #1268b3;
  --sun: #ffd45c;
  --coral: #e55b50;
  --safe: #16865b;
  --warning: #b77905;
  --danger: #c84343;
  --unknown: #72817f;
  --shadow: 0 18px 50px rgba(20, 102, 170, .13);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071a2c;
    --surface: #0d2942;
    --surface-soft: #123b5e;
    --text: #edf7ff;
    --muted: #a7c4dc;
    --line: #294e6d;
    --sea: #49bced;
    --sea-deep: #208bd4;
    --sun: #ffda67;
    --coral: #ee6d62;
    --safe: #55c891;
    --warning: #efbd58;
    --danger: #ff8585;
    --unknown: #a7b4b2;
    --shadow: 0 18px 50px rgba(0, 0, 0, .22);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}
button, a { font: inherit; }
a { color: inherit; }

.site-header, main, .site-footer {
  width: min(1120px, calc(100% - 36px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
}
.brand-mark svg { width: 48px; height: 48px; overflow: visible; }
.logo-disc { fill: var(--surface-soft); stroke: var(--line); stroke-width: 1; }
.logo-canopy { fill: var(--coral); }
.logo-canopy-seam { fill: none; stroke: var(--surface-soft); stroke-width: 2; stroke-linecap: round; }
.logo-pole { fill: none; stroke: var(--sun); stroke-width: 5; stroke-linecap: round; }
.logo-sand { fill: var(--sun); }
.logo-wave { fill: none; stroke: var(--sea); stroke-width: 5; stroke-linecap: round; }
.languages { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.language {
  min-width: 42px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.language:hover { color: var(--text); background: var(--surface-soft); }
.language.is-active { color: #fff; background: var(--sea-deep); }
.language:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--sea) 45%, transparent); outline-offset: 3px; }

.hero {
  position: relative;
  min-height: 290px;
  overflow: hidden;
  padding: clamp(30px, 6vw, 68px);
  border-radius: 32px;
  background:
    linear-gradient(145deg,
      color-mix(in srgb, var(--sea) 12%, var(--surface)),
      color-mix(in srgb, var(--sea) 34%, var(--surface-soft)));
  box-shadow: var(--shadow);
  isolation: isolate;
}
.hero-copy { position: relative; z-index: 3; max-width: 680px; }
.location, .section-kicker {
  margin: 0 0 7px;
  color: var(--sea-deep);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
h1, h2, p { margin-top: 0; }
h1 { max-width: 650px; margin-bottom: 13px; font-size: clamp(2.2rem, 6vw, 4.7rem); line-height: .98; letter-spacing: -.055em; }
h2 { margin-bottom: 0; font-size: clamp(1.65rem, 3vw, 2.45rem); line-height: 1.08; letter-spacing: -.035em; }
.updated { color: var(--muted); }
.mode-notice { display: inline-flex; padding: 7px 11px; border-radius: 999px; color: var(--text); background: color-mix(in srgb, var(--warning) 20%, var(--surface)); font-size: .88rem; }
.beach-picker { margin-top: 22px; }
.beach-picker-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.beach-options { display: flex; flex-wrap: wrap; gap: 7px; }
.beach-option { padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--sea-deep) 24%, var(--line)); border-radius: 999px; color: var(--text); background: color-mix(in srgb, var(--surface) 84%, transparent); cursor: pointer; }
.beach-option:hover { background: var(--surface); }
.beach-option.is-active { border-color: var(--sea-deep); color: #fff; background: var(--sea-deep); }
.beach-option:focus-visible { outline: 3px solid color-mix(in srgb, var(--sea) 45%, transparent); outline-offset: 3px; }
.sun {
  position: absolute;
  z-index: 1;
  top: 40px;
  right: 8%;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--sun) 65%, white), var(--sun) 58%, color-mix(in srgb, var(--sun) 82%, var(--sea)));
  box-shadow:
    0 0 0 22px color-mix(in srgb, var(--sun) 22%, transparent),
    0 0 54px color-mix(in srgb, var(--sun) 55%, transparent);
}
.sun::before {
  content: "";
  position: absolute;
  inset: -42px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 4deg, color-mix(in srgb, var(--sun) 48%, transparent) 0 4deg, transparent 4deg 18deg);
  -webkit-mask: radial-gradient(circle, transparent 0 58%, #000 59% 64%, transparent 65%);
  mask: radial-gradient(circle, transparent 0 58%, #000 59% 64%, transparent 65%);
}
.wave { position: absolute; z-index: 2; right: -8%; bottom: -85px; width: 72%; height: 210px; border-radius: 50%; background: color-mix(in srgb, var(--sea) 72%, #bfe9ff); transform: rotate(-5deg); }
.wave-two { right: -20%; bottom: -115px; width: 92%; background: var(--sea-deep); transform: rotate(4deg); opacity: .92; }

.warning-panel { --alert-color: var(--warning); display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 18px 0; padding: 17px 20px; border: 1px solid color-mix(in srgb, var(--alert-color) 42%, var(--line)); border-radius: 18px; background: color-mix(in srgb, var(--alert-color) 11%, var(--surface)); }
.warning-panel.is-clear { border-color: var(--line); background: var(--surface); }
.warning-panel.is-yellow { --alert-color: var(--warning); }
.warning-panel.is-orange { --alert-color: #df741b; }
.warning-panel.is-red { --alert-color: var(--danger); }
.warning-panel p { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
.warning-source { display: inline-block; margin-right: 8px; color: var(--alert-color); font-size: .72rem; font-weight: 850; letter-spacing: .08em; }
.warning-panel a { flex: 0 0 auto; color: var(--sea-deep); font-size: .83rem; font-weight: 750; text-underline-offset: 4px; }

.current-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 14px; margin: 18px 0 72px; }
.metric { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.metric-icon { grid-column: 2; grid-row: 1 / span 2; color: var(--sun); font-size: 1.8rem; }
.metric-label, .metric-context { color: var(--muted); }
.metric-value { font-size: clamp(2rem, 4vw, 3rem); line-height: 1; }
.metric-context { grid-column: 1 / -1; margin-top: 5px; font-size: .88rem; }

.planning-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 14px; margin-bottom: 76px; }
.planning-card { padding: 26px; border: 1px solid var(--line); border-radius: 26px; background: var(--surface); }
.best-time-card { background: linear-gradient(145deg, color-mix(in srgb, var(--sea) 13%, var(--surface)), var(--surface)); }
.best-time-card h2 { max-width: 520px; }
.best-time-value { display: block; margin: 24px 0 5px; color: var(--sea-deep); font-size: clamp(2.15rem, 6vw, 4.5rem); line-height: .95; letter-spacing: -.05em; }
.best-time-summary { margin-bottom: 20px; color: var(--muted); }
.comfort-note { margin-bottom: 0; color: var(--muted); font-size: .78rem; }
.sun-times-card { display: grid; align-content: center; gap: 6px; }
.sun-event { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; padding: 17px 0; border-bottom: 1px solid var(--line); }
.sun-event:last-child { border-bottom: 0; }
.sun-event-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: var(--text); background: color-mix(in srgb, var(--sun) 35%, var(--surface)); font-weight: 800; }
.sunset-icon { color: var(--surface); background: var(--sea-deep); }

.section { margin-bottom: 76px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 22px; }
.small-note { color: var(--muted); font-size: .88rem; }

.hourly-strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 9px; }
.hour-card { min-width: 0; padding: 16px 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); text-align: center; }
.hour-time { display: block; color: var(--muted); font-size: .78rem; font-weight: 750; }
.hour-icon { display: block; margin: 10px 0 3px; color: var(--sun); font-size: 1.6rem; }
.hour-temp { display: block; margin-bottom: 9px; font-size: 1.25rem; }
.hour-detail { display: block; margin-top: 4px; color: var(--muted); font-size: .72rem; white-space: nowrap; }

.forecast { border-top: 1px solid var(--line); }
.forecast-row { display: grid; grid-template-columns: 1.35fr repeat(5, 1fr); gap: 14px; align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--line); }
.forecast-row:first-child { color: var(--muted); padding-block: 10px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.forecast-day { display: flex; align-items: center; gap: 9px; font-weight: 750; }
.forecast-day-icon { color: var(--sun); font-size: 1.3rem; }
.forecast-cell { white-space: nowrap; }
.mobile-label { display: none; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

.sea-details { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 12px; }
.sea-visual { min-width: 0; padding: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.sea-wave-card { background: linear-gradient(160deg, color-mix(in srgb, var(--sea) 11%, var(--surface)), var(--surface)); }
.sea-visual-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.sea-visual-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: .8rem; }
.sea-primary-value { display: block; color: var(--sea-deep); font-size: clamp(1.7rem, 4vw, 2.7rem); line-height: 1; letter-spacing: -.035em; }
.sea-direction-value { flex: 0 0 auto; color: var(--text); font-weight: 750; }
.sea-wave-chart { display: block; width: calc(100% + 44px); height: 118px; margin: 4px -22px 0; }
.sea-water-area { fill: color-mix(in srgb, var(--sea) 23%, transparent); }
.sea-wave-line, .sea-swell-line { fill: none; stroke: var(--sea-deep); stroke-width: 3; stroke-linecap: round; }
.sea-level-line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 6; }
.sea-visual-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; color: var(--muted); font-size: .78rem; }
.sea-visual-meta strong { color: var(--text); }
.sea-swell-card { display: grid; align-content: start; }
.sea-swell-chart { display: block; width: calc(100% + 20px); height: 92px; margin: 8px -10px 10px; }
.sea-swell-line { stroke: var(--sea); stroke-width: 4; }
.sea-visual-meta-stacked { display: grid; justify-content: stretch; }
.sea-current-card { display: grid; justify-items: center; align-content: start; text-align: center; }
.sea-current-card .sea-visual-label { justify-self: start; }
.sea-compass { width: min(132px, 100%); margin: 3px auto 8px; }
.sea-compass-ring { fill: color-mix(in srgb, var(--sea) 9%, var(--surface)); stroke: var(--line); stroke-width: 2; }
.sea-compass-center { fill: var(--sea-deep); }
.sea-compass-arrow { fill: var(--sea-deep); }
.sea-compass-ticks { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.sea-current-value { font-size: 1.55rem; }
.sea-current-degrees { margin-top: 4px; color: var(--muted); font-size: .78rem; }
.direction-arrow { display: inline-block; margin-right: 5px; color: var(--sea); }

.noscript-note { margin: 18px 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--muted); }
.about-section { margin-bottom: 76px; padding: clamp(26px, 5vw, 48px); border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(145deg, color-mix(in srgb, var(--sea) 9%, var(--surface)), var(--surface)); }
.about-section h2 { max-width: 760px; }
.about-copy { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; color: var(--muted); }
.about-copy p { margin-bottom: 0; }

.site-footer { display: grid; grid-template-columns: .8fr 1.7fr; gap: 32px; padding: 28px 0 42px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.footer-identity, .footer-sources { display: grid; align-content: start; gap: 7px; }
.footer-identity strong, .footer-sources strong { color: var(--text); }
.footer-sources a { color: var(--sea-deep); text-underline-offset: 3px; }

@media (max-width: 720px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .languages { justify-content: flex-start; }
  .hero { min-height: 390px; border-radius: 24px; }
  .sun { top: auto; right: 16%; bottom: 92px; width: 76px; height: 76px; }
  .wave { width: 110%; }
  .current-grid { grid-template-columns: 1fr 1fr; margin-bottom: 56px; }
  .metric-main { grid-column: 1 / -1; }
  .planning-grid { grid-template-columns: 1fr; margin-bottom: 58px; }
  .hourly-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sea-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sea-wave-card { grid-column: 1 / -1; }
  .section { margin-bottom: 58px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .forecast-row:first-child { display: none; }
  .forecast-row { grid-template-columns: repeat(3, 1fr); gap: 14px 8px; padding: 18px 4px; }
  .forecast-day { grid-column: 1 / -1; }
  .forecast-cell { display: flex; flex-direction: column; gap: 2px; }
  .mobile-label { display: block; }
  .site-footer { grid-template-columns: 1fr; }
  .about-copy { grid-template-columns: 1fr; }
}

@media (max-width: 440px) {
  .site-header, main, .site-footer { width: min(100% - 24px, 1120px); }
  .hero { padding: 28px 22px; }
  .current-grid { grid-template-columns: 1fr; }
  .metric-main { grid-column: auto; }
  .hourly-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .warning-panel { align-items: flex-start; flex-direction: column; }
  .sea-details { grid-template-columns: 1fr; }
  .sea-wave-card { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
