:root {
  /* Lighter blue than the regatta subsite (which keeps its own navy/gold
     palette in regatta/assets/css/style.css) — same variable names so
     every component below still just works. */
  --navy: #2563a3;
  --navy-dark: #1a4a7a;
  --sea: #3d84c0;
  --foam: #eef6fb;
  --gold: #c9982f;
  --gold-dark: #a87c22;
  --flag-red: #b3392c;
  --ink: #1c2b34;
  --muted: #5a6b76;
  --border: #dceaf3;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--foam);
  line-height: 1.55;
}

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

a { color: var(--sea); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--navy-dark); margin-top: 0; }

/* ---------- Header / nav ---------- */

.site-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--sea) 100%);
  color: #fff;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  position: relative;
  z-index: 100;
}

.site-header .inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  white-space: nowrap;
}
.brand img { display: block; border-radius: 6px; }
.brand .flag { color: var(--gold); }
.brand:hover { text-decoration: none; opacity: .92; }

.nav-toggle {
  display: none;
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle:hover { background: rgba(255,255,255,.2); }

.site-nav { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.site-nav > ul { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; list-style: none; margin: 0; padding: 0; }
.site-nav li { position: relative; }
.site-nav a {
  display: block;
  color: #eaf3f8;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 500;
  font-size: .93rem;
  white-space: nowrap;
}
.site-nav a:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.site-nav a.active { background: rgba(255,255,255,.18); }
.site-nav a.cta {
  background: var(--gold);
  color: var(--navy-dark);
  font-weight: 700;
}
.site-nav a.cta:hover { background: var(--gold-dark); }

.site-nav .sub-menu {
  list-style: none;
  margin: 0;
  padding: 6px;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(8,36,56,.18);
  display: none;
  z-index: 200;
}
.site-nav .sub-menu a { color: var(--ink); padding: 8px 10px; font-size: .9rem; white-space: normal; }
.site-nav .sub-menu a:hover { background: var(--foam); }
.site-nav li.has-children:hover > .sub-menu,
.site-nav li.has-children.open > .sub-menu { display: block; }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    width: 100%;
    order: 3;
    flex-direction: column;
    align-items: stretch;
    background: var(--navy-dark);
    border-radius: 8px;
    padding: 8px;
    margin-top: 10px;
  }
  .site-nav.open { display: flex; }
  .site-nav > ul { flex-direction: column; align-items: stretch; width: 100%; }
  .site-nav .sub-menu { position: static; display: none; box-shadow: none; border: none; background: rgba(255,255,255,.05); margin-left: 10px; }
  .site-nav li.open > .sub-menu { display: block; }
  .site-nav li.has-children:hover > .sub-menu { display: none; }
  .site-nav li.has-children.open > .sub-menu { display: block; }
}

/* ---------- Layout ---------- */

main { max-width: 1200px; margin: 0 auto; padding: 32px 20px 60px; }
main.narrow { max-width: 860px; }

.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px 0;
  font-size: .85rem;
  color: var(--muted);
}
.breadcrumb a { color: var(--sea); }
.breadcrumb .sep { margin: 0 6px; opacity: .6; }

.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--sea) 65%, #1a6d92 100%);
  color: #fff;
  padding: 64px 20px;
  text-align: center;
}
.hero .inner { max-width: 780px; margin: 0 auto; }
.hero h1 { color: #fff; font-size: 2.4rem; margin-bottom: 12px; }
.hero p { font-size: 1.15rem; color: #dcecf4; margin-bottom: 26px; }

.hero.compact { padding: 40px 20px; text-align: left; }
.hero.compact .inner { max-width: 1160px; margin: 0; }
.hero.compact h1 { font-size: 1.9rem; margin-bottom: 6px; }
.hero.compact p { font-size: 1rem; margin-bottom: 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--navy-dark);
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { background: var(--gold-dark); text-decoration: none; }
.btn.secondary { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.6); }
.btn.secondary:hover { background: rgba(255,255,255,.12); }
.btn.outline { background: transparent; color: var(--sea); border: 2px solid var(--sea); }
.btn.outline:hover { background: rgba(16,84,124,.08); }
.btn.small { padding: 6px 14px; font-size: .85rem; border-radius: 6px; }

/* ---------- Cards / grids ---------- */

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(11,51,80,.06);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 28px 0;
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.model-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  font-weight: 700;
  color: var(--navy-dark);
  box-shadow: 0 1px 3px rgba(11,51,80,.06);
  transition: transform .12s ease, box-shadow .12s ease;
}
.model-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(11,51,80,.14);
  border-color: var(--sea);
}
.model-card .tag { display: block; font-weight: 500; color: var(--muted); font-size: .82rem; margin-top: 4px; }

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.link-grid a {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  font-weight: 600;
  color: var(--navy-dark);
}
.link-grid a:hover { border-color: var(--sea); text-decoration: none; background: var(--foam); }

/* Legacy photo galleries, normalized from old absolute-positioned markup */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.gallery-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(11,51,80,.06);
}
.gallery-item img { display: block; width: 100%; height: 190px; object-fit: cover; }
.gallery-item .cap { padding: 10px 12px; font-size: .88rem; color: var(--muted); }

.notice {
  background: #fff8e8;
  border: 1px solid #eddca4;
  color: #6b5417;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 22px;
  font-size: .92rem;
}
.notice.info { background: #e3f0f7; border-color: #bcdcec; color: var(--sea); }

/* ---------- Prose content (WP-exported / legacy text pages) ---------- */

.content { max-width: 860px; }
.content h1 { font-size: 2rem; margin-bottom: .5em; }
.content h2 { font-size: 1.5rem; margin-top: 1.6em; }
.content h3 { font-size: 1.2rem; margin-top: 1.4em; }
.content p { margin: 0 0 1.1em; }
.content ul, .content ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.content blockquote {
  margin: 1.4em 0;
  padding: 4px 20px;
  border-left: 4px solid var(--gold);
  background: #fff;
  color: var(--muted);
  border-radius: 0 8px 8px 0;
}
.content img { border-radius: 8px; margin: 1em 0; }
.content figure { margin: 1.4em 0; }
.content figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; }
.content hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }

/* ---------- Tables (owners registries etc) ---------- */

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: .95rem; }
th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: .78rem; letter-spacing: .04em; background: var(--foam); }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.table-wrap table { margin: 0; }
.table-wrap th, .table-wrap td { padding: 12px 14px; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.badge.sailor { background: #e3f0f7; color: var(--sea); }
.badge.volunteer { background: #fbeee0; color: var(--gold-dark); }

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

/* ---------- Forms ---------- */

form .field { margin-bottom: 16px; }
form label { display: block; font-weight: 600; margin-bottom: 5px; font-size: .92rem; }
form input[type=text], form input[type=email], form input[type=tel], form input[type=password],
form input[type=date], form input[type=time], form input[type=number], form select, form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
form textarea { resize: vertical; min-height: 90px; }
form .hint { font-size: .85rem; color: var(--muted); margin-top: 4px; }
form fieldset { border: none; padding: 0; margin: 0 0 18px; }

.alert { padding: 14px 16px; border-radius: 8px; margin-bottom: 20px; font-weight: 500; }
.alert.success { background: #e5f6e9; color: #1e6b34; border: 1px solid #b9e3c4; }
.alert.error { background: #fbe7e4; color: #8a2c1f; border: 1px solid #f0bdb4; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-dark);
  color: #b9cbd6;
  margin-top: 40px;
}
.site-footer .inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}
.site-footer h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.site-footer .col { min-width: 160px; }
.site-footer a { color: #b9cbd6; }
.site-footer a:hover { color: #fff; }
.site-footer .bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  padding: 16px 20px;
  font-size: .82rem;
  color: #8098a6;
}

@media (max-width: 560px) {
  .hero h1 { font-size: 1.7rem; }
  main { padding: 24px 14px 44px; }
}
