/*
  Shared styles for the BeachPlease marketing site (site/*.html).
  Colours are copied from packages/shared/src/tokens.ts so this matches the app.
  If the app's tokens change, update the values below to match.
*/

:root {
  --color-background: #f7f2e8;
  --color-surface: #ffffff;
  --color-ink: #10263a;
  --color-muted: #5b6670;
  --color-brand: #0b6e78;
  --color-brand-dark: #08545c;
  --color-on-brand: #ffffff;
  --color-border: #e4dccb;
  --color-brand-tint: #dcecee;
  --color-divider: #efe8da;
  --max-width: 960px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--color-background);
  color: var(--color-ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--color-brand);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-ink);
}

.logo:hover {
  text-decoration: none;
}

.logo__mark {
  display: inline-flex;
  flex-shrink: 0;
}

nav.site-nav {
  display: flex;
  gap: 1.5rem;
  font-weight: 500;
}

nav.site-nav a {
  color: var(--color-muted);
}

nav.site-nav a[aria-current='page'] {
  color: var(--color-brand-dark);
  text-decoration: underline;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero__logo {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  margin: 0 auto 2rem;
  border-radius: 16px;
}

.hero h1 {
  font-size: 2.5rem;
  margin: 0 0 0.75rem;
  color: var(--color-ink);
}

.hero p.lede {
  font-size: 1.2rem;
  color: var(--color-muted);
  max-width: 640px;
  margin: 0 auto 1.75rem;
}

.button {
  display: inline-block;
  background: var(--color-brand);
  color: var(--color-on-brand);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
}

.button:hover,
.button:focus {
  background: var(--color-brand-dark);
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: var(--color-brand-dark);
  border: 1px solid var(--color-border);
}

.screenshots {
  margin: 0 0 3rem;
}

.screenshots__scroll {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 0.5rem calc((100vw - var(--max-width)) / 2 + 1.5rem) 1rem;
  margin: 0 calc((var(--max-width) - 100vw) / 2);
}

.screenshots__scroll img {
  height: 420px;
  width: auto;
  flex: 0 0 auto;
  border-radius: 20px;
  box-shadow: 0 12px 30px -12px rgb(16 38 58 / 0.35);
  scroll-snap-align: start;
}

@media (max-width: 720px) {
  .screenshots__scroll {
    padding: 0.5rem 1.5rem 1rem;
    margin: 0;
  }

  .screenshots__scroll img {
    height: 340px;
  }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 2.5rem 0;
}

.card-grid--two {
  grid-template-columns: repeat(2, 1fr);
}

.steps {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.steps li {
  margin-bottom: 0.4rem;
}

.card__note {
  margin: 0 0 1.25rem;
  color: var(--color-muted);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.5rem;
}

.card__icon {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--color-brand-tint);
  color: var(--color-brand-dark);
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

section {
  margin: 3rem 0;
}

section h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.section-lede {
  color: var(--color-muted);
  max-width: 640px;
}

.callout {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
}

.legal h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.legal .updated {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.legal h2 {
  font-size: 1.25rem;
  margin-top: 2.25rem;
}

.legal h3 {
  font-size: 1.05rem;
  margin-top: 1.5rem;
}

.legal ul {
  padding-left: 1.25rem;
}

.legal li {
  margin-bottom: 0.4rem;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.legal th,
.legal td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-divider);
  vertical-align: top;
}

.legal th {
  color: var(--color-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--color-muted);
}

.site-footer__links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero--compact {
  padding-bottom: 0;
}

.profile {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.profile__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  background: var(--color-brand);
  color: var(--color-on-brand);
  font-size: 2rem;
  font-weight: 700;
}

.profile h3 {
  margin: 0;
  font-size: 1.25rem;
}

.profile p {
  margin: 0.25rem 0 0;
  color: var(--color-muted);
}

.profile .profile__note {
  margin: 1rem 0 1.25rem;
  color: var(--color-ink);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-brand-tint);
  color: var(--color-brand-dark);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
}

.chip a {
  color: inherit;
  font-weight: 600;
}

.button.secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.card__icon .icon {
  width: 1.4rem;
  height: 1.4rem;
}

.card-grid--four {
  grid-template-columns: repeat(4, 1fr);
}

.step--brand {
  background: var(--color-brand);
  border-color: var(--color-brand);
}

.step--brand h3,
.step--brand p {
  color: var(--color-on-brand);
}

.step--brand .card__icon {
  background: rgb(255 255 255 / 0.18);
  color: var(--color-on-brand);
}

.audience {
  margin: 2rem 0 0;
  font-size: 1.1rem;
  color: var(--color-brand-dark);
}

.audience + .card-grid {
  margin-top: 1rem;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta p {
  margin: 0;
  font-weight: 600;
  font-size: 1.1rem;
}

.site-footer a[aria-current='page'] {
  color: var(--color-brand-dark);
  text-decoration: underline;
}

@media (max-width: 900px) {
  .card-grid--four {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .card-grid--four {
    grid-template-columns: 1fr;
  }

  .profile {
    flex-direction: column;
  }
}

/* ------------------------------------------------------------------------------------------
   Beach pages and the beaches hub (rendered by the Worker in packages/web).
   Crowd and parking colours are copied from packages/shared/src/tokens.ts. The level is always
   written as text too, so colour is never the only way to read it.
   ------------------------------------------------------------------------------------------ */

.muted {
  color: var(--color-muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.beach section,
.hub section {
  margin: 2.25rem 0;
}

.beach h1,
.hub h1 {
  font-size: 2.25rem;
  line-height: 1.2;
  margin: 0.5rem 0 0.5rem;
}

.beach__subtitle {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.breadcrumb li + li::before {
  content: '›';
  margin-right: 0.25rem;
}

.pill {
  display: inline-block;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.5;
}

.pill--crowd-quiet {
  background: #d8f0e6;
  color: #135c3e;
}
.pill--crowd-light {
  background: #e6f3d6;
  color: #3b5e14;
}
.pill--crowd-moderate {
  background: #fbebc4;
  color: #6e4a00;
}
.pill--crowd-busy {
  background: #fad6bf;
  color: #8a3409;
}
.pill--crowd-packed {
  background: #f3c4c0;
  color: #8e1b12;
}
.pill--parking-plenty {
  background: #d8f0e6;
  color: #135c3e;
}
.pill--parking-limited {
  background: #fbebc4;
  color: #6e4a00;
}
.pill--parking-full {
  background: #f3c4c0;
  color: #8e1b12;
}
.pill--parking-unknown {
  background: #e9ecef;
  color: #4a545c;
}

.pbadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.4rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  vertical-align: middle;
}
.pbadge--plenty {
  background: #1f7a55;
  color: #fff;
}
.pbadge--limited {
  background: #f0b947;
  color: #10263a;
}
.pbadge--full {
  background: #a8271c;
  color: #fff;
}
.pbadge--unknown {
  background: #c9cfd4;
  color: #10263a;
}

.status-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1.5rem 0 1rem;
}

.status-card h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0;
}

.status-grid dt {
  color: var(--color-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}

.status-grid dd {
  margin: 0;
}

.status-card__none,
.status-card__usual {
  margin: 0 0 0.5rem;
}

.status-card__time {
  margin: 1rem 0 0;
  font-size: 0.9rem;
}

.status-card__app {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
}

.cta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--color-brand-tint);
  border-radius: 16px;
  padding: 1rem 1.5rem;
}

.cta-strip p {
  margin: 0;
  font-weight: 600;
  color: var(--color-ink);
}

.pattern__summary {
  font-size: 1.1rem;
  font-weight: 600;
}

.pattern__radio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.pattern__tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.pattern__tabs label {
  cursor: pointer;
  padding: 0.4rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-muted);
  font-weight: 600;
}

#daykind-weekday:checked ~ .pattern__tabs label[for='daykind-weekday'],
#daykind-weekend:checked ~ .pattern__tabs label[for='daykind-weekend'] {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: var(--color-on-brand);
}

#daykind-weekday:focus-visible ~ .pattern__tabs label[for='daykind-weekday'],
#daykind-weekend:focus-visible ~ .pattern__tabs label[for='daykind-weekend'] {
  outline: 3px solid var(--color-brand-dark);
  outline-offset: 2px;
}

.pattern__panel {
  display: none;
}

#daykind-weekday:checked ~ .pattern__panel--weekday,
#daykind-weekend:checked ~ .pattern__panel--weekend {
  display: block;
}

.chart {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1rem 1rem 0.5rem;
}

.chart__bars,
.chart__labels {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 4px;
}

.chart__bars {
  align-items: end;
  height: 150px;
}

.chart__bar {
  border-radius: 4px 4px 0 0;
}
.chart__bar--quiet {
  background: #3fa37a;
}
.chart__bar--light {
  background: #9cc65a;
}
.chart__bar--moderate {
  background: #e3a72f;
}
.chart__bar--busy {
  background: #d9642a;
}
.chart__bar--packed {
  background: #a8271c;
}

.chart__labels {
  margin-top: 0.4rem;
  font-size: 0.7rem;
  color: var(--color-muted);
}

.chart__labels span {
  white-space: nowrap;
}

.chart__details {
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

.chart__details summary {
  cursor: pointer;
  color: var(--color-brand);
}

.chart__details table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.chart__details caption {
  text-align: left;
  color: var(--color-muted);
  padding-bottom: 0.25rem;
}

.chart__details th,
.chart__details td {
  text-align: left;
  padding: 0.25rem 0.5rem;
  border-bottom: 1px solid var(--color-divider);
  font-weight: 400;
}

.chart__legend {
  font-size: 0.85rem;
  margin: 0.5rem 0 1rem;
}

.beach ul {
  padding-left: 1.25rem;
}

.beach li {
  margin-bottom: 0.4rem;
}

.nearby {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.nearby__card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--color-ink);
}

a.nearby__card:hover,
a.nearby__card:focus {
  border-color: var(--color-brand);
  text-decoration: none;
}

.nearby__name {
  font-weight: 700;
  font-size: 1.1rem;
}

.nearby__dir {
  font-size: 0.85rem;
}

.nearby__status {
  font-size: 0.95rem;
  line-height: 1.9;
}

.faq__item h3 {
  margin: 1.25rem 0 0.25rem;
  font-size: 1.05rem;
}

.faq__item p {
  margin: 0;
  color: var(--color-muted);
}

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

.hub__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
}

.hub__name {
  font-weight: 700;
  font-size: 1.1rem;
}

.hub__name a {
  color: var(--color-ink);
}

@media (max-width: 720px) {
  .status-grid,
  .nearby {
    grid-template-columns: 1fr;
  }

  .beach h1,
  .hub h1 {
    font-size: 1.85rem;
  }

  .chart {
    padding: 0.75rem 0.75rem 0.4rem;
  }

  .chart__bars,
  .chart__labels {
    gap: 2px;
  }
}
