:root {
  --navy: #0b2740;
  --navy-deep: #051019;
  --blue: #1d5fa3;
  --accent: #3b82c4;
  --sand: #eaf1f8;
  --white: #ffffff;
  --grey: #64758a;
  --max-width: 1140px;
  --radius: 10px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Bebas Neue', 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(11, 31, 51, 0.92);
  backdrop-filter: blur(6px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  font-family: var(--font-display);
  letter-spacing: 2px;
  font-size: 1.4rem;
  color: var(--white);
}

.main-nav {
  display: flex;
  gap: 32px;
}

.main-nav a {
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.main-nav a:hover { opacity: 1; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--white);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-media, .hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

/* Split hero: sailing / business */
.hero-half {
  position: absolute;
  top: 0;
  height: 100%;
  width: 56%;
  display: block;
  overflow: hidden;
}

.hero-half .hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

/* Vertical offsets tuned so the head lands at the same height in both
   photos — the business portrait has more headroom in the source image,
   so it needs a lower object-position to pull the head up to match. */
.hero-half-left .hero-img { object-position: center 5%; }
.hero-half-right .hero-img { object-position: center 27%; }

.hero-half:hover .hero-img {
  transform: scale(1.04);
}

.hero-half-left {
  left: 0;
  clip-path: polygon(0 0, 96% 0, 82% 100%, 0 100%);
  z-index: 1;
}

.hero-half-right {
  right: 0;
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 4% 100%);
  z-index: 1;
}

.hero-divider {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(100deg,
    transparent calc(50% - 3px),
    rgba(255,255,255,0.9) 50%,
    transparent calc(50% + 3px)
  );
}

.hero-half-label {
  position: absolute;
  bottom: 14%;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--white);
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
  z-index: 3;
}

.hero-half-left .hero-half-label { left: 8%; }
.hero-half-right .hero-half-label { right: 8%; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,22,38,0.35) 0%, rgba(7,22,38,0.55) 55%, rgba(7,22,38,0.92) 100%);
}

.hero-content {
  position: relative;
  color: var(--white);
  padding-bottom: 90px;
  padding-top: 140px;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.85rem;
  color: #a9c3dc;
  margin-bottom: 12px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 6.5rem);
  letter-spacing: 2px;
  line-height: 0.95;
  margin-bottom: 20px;
}

.hero-tagline {
  max-width: 560px;
  font-size: 1.15rem;
  color: #e3e9ef;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s, background 0.2s, color 0.2s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-ghost {
  border: 1px solid rgba(255,255,255,0.6);
  color: var(--white);
}

/* Chapter dividers */
.chapter {
  padding: 56px 24px;
  text-align: center;
  color: var(--white);
}

.chapter-sailing { background: var(--navy); }
.chapter-business { background: var(--navy-deep); }

.chapter-eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.8rem;
  color: #a9c3dc;
  margin-bottom: 6px;
}

.chapter-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: 2px;
}

/* Sections */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--sand);
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}

.section h2,
.section h3 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  letter-spacing: 1px;
  margin-bottom: 24px;
  font-weight: normal;
}

.section-intro {
  max-width: 640px;
  color: var(--grey);
  margin-bottom: 48px;
}

.section-intro em, .about-text em {
  color: #97a2ad;
  font-style: italic;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.about-text p {
  margin-bottom: 20px;
  color: #2b3947;
}

.about-media img {
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(11,31,51,0.18);
}

.stats-row {
  display: flex;
  gap: 40px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid #d3dde6;
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--navy);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Affiliations */
.affil-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  background: #d3dde6;
  border: 1px solid #d3dde6;
  border-radius: var(--radius);
  overflow: hidden;
}

.affil-item {
  background: var(--white);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.affil-role {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
}

.affil-org {
  font-size: 1.02rem;
  color: var(--navy);
  font-weight: 500;
}

/* Racing results */
.results-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.result-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(11,31,51,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.result-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(11,31,51,0.14);
}

.result-media { aspect-ratio: 4/3; overflow: hidden; }
.result-media img { width: 100%; height: 100%; object-fit: cover; }

.result-info { padding: 20px; }

.result-year {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 1px;
}

.result-info h4 { font-size: 1.2rem; margin: 4px 0 4px; font-weight: 600; }

.result-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--blue);
  margin-bottom: 10px;
}

.result-info p:last-child {
  color: var(--grey);
  font-size: 0.92rem;
}

/* Trophy cabinet */
.trophy-block {
  margin-top: 64px;
  padding-top: 56px;
  border-top: 1px solid #d3dde6;
}

.trophy-intro {
  margin-bottom: 28px;
}

.trophy-block h4 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.trophy-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
}

.trophy-media img {
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(11,31,51,0.18);
}

.trophy-list {
  list-style: none;
}

.trophy-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #d3dde6;
}

.trophy-list li:first-child { padding-top: 0; }

.trophy-year {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent);
  min-width: 44px;
}

.trophy-name {
  flex: 1;
  color: var(--navy);
  font-weight: 500;
}

.trophy-place {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--blue);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 56px;
}

.gallery-item {
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: 8px;
  display: block;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.gallery-item:hover img { transform: scale(1.06); }

/* Contact */
.contact-inner { text-align: left; }
.contact-inner p { color: var(--grey); margin-bottom: 28px; max-width: 480px; }

.contact-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-ghost-dark {
  border: 1px solid #b9c9d9;
  color: var(--navy);
}

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: #8fa2b3;
  padding: 32px 0;
  font-size: 0.85rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(7,22,38,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 40px;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 6px;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
}

/* Responsive */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .trophy-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 68px;
    left: 0; right: 0;
    background: var(--navy-deep);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav.open { max-height: 300px; }
  .main-nav a {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { gap: 24px; flex-wrap: wrap; }
  .section { padding: 64px 0; }
}
