/* PepperSails — Delta Voiles Marseille
   Design system: Apple-inspired restraint, one accent, system type. */

:root {
  --ink: #0c1116;
  --ink-soft: #22303d;
  --paper: #fbfbfa;
  --paper-dim: #f1efec;
  --line: rgba(12, 17, 22, 0.09);
  --line-on-dark: rgba(255, 255, 255, 0.14);
  --accent: #c8382a;
  --navy: #0b2338;
  --navy-deep: #071726;
  --white-70: rgba(255, 255, 255, 0.7);
  --white-50: rgba(255, 255, 255, 0.5);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  font: 100%/1.5 -apple-system, "SF Pro Text", system-ui, "Helvetica Neue", Arial, sans-serif;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

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

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

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Typography ---------- */

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

h1, h2, h3 { margin: 0; font-weight: 600; }

.display {
  font-size: clamp(2.75rem, 6vw, 5.25rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.title {
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.subtitle {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--ink-soft);
  font-weight: 400;
  max-width: 40em;
}

p.lede {
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 34em;
}

.on-dark .subtitle,
.on-dark p.lede { color: var(--white-70); }

.on-dark .eyebrow { color: #ff8a70; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 251, 250, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-mark {
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-mark .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  transition: color 150ms var(--ease);
}

.nav-links a:hover { color: var(--ink); }

.nav-links a.current { color: var(--ink); font-weight: 600; }

.nav-cta {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 980px;
  background: var(--ink);
  color: var(--paper);
  transition: transform 120ms var(--ease), background 150ms var(--ease);
}

.nav-cta:active { transform: scale(0.96); }

.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: block;
    border: 0;
    background: none;
    font-size: 0.9375rem;
    font-weight: 600;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 980px;
  transition: transform 120ms var(--ease), opacity 150ms var(--ease);
  border: 1px solid transparent;
}

.btn:active { transform: scale(0.96); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { opacity: 0.88; }

.btn-ghost { border-color: currentColor; }
.btn-ghost:hover { opacity: 0.7; }

.on-dark .btn-ghost { border-color: var(--white-50); color: #fff; }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Sections ---------- */

section { position: relative; }

.section {
  padding: 96px 0;
  display: flow-root; /* contain child margins so the tone-merge rules below don't leak a gap */
}

@media (max-width: 760px) {
  .section { padding: 68px 0; }
}

.section.tight { padding: 64px 0; }

/* Rhythm — collapse the boundary between two sections that share a background
   tone, so text-light blocks don't stack into oceans of whitespace. */
.on-dim + .on-dim,
.on-dark + .on-dark,
.section:not(.on-dim):not(.on-dark) + .section:not(.on-dim):not(.on-dark) {
  padding-top: 0;
}

/* First section right under a page's title banner sits close to it. */
.subhero + .section { padding-top: 52px; }
.subhero + .on-dark { padding-top: 0; }

.on-dark {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
}

.on-dim { background: var(--paper-dim); }

/* Hero */

.hero {
  position: relative;
  min-height: clamp(560px, 88vh, 820px);
  display: flex;
  align-items: flex-end;
  padding-bottom: 96px;
  color: #fff;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,23,38,0.08) 0%, rgba(7,23,38,0.40) 58%, rgba(7,23,38,0.78) 100%);
}

.hero-content { position: relative; z-index: 1; }

.hero .eyebrow { color: #ffb199; }

.hero p.lede { color: var(--white-70); }

/* Split feature */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.split.reverse .split-media { order: 2; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse .split-media { order: 0; }
}

.split-media img {
  border-radius: 20px;
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
}

.split-media.tall img { aspect-ratio: 3/4; }

/* Product grid */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

/* Card grid — 1 to 6 cards. Column count comes from --cards-cols (set inline
   per block). Grids of 1-3 cards behave exactly like .grid-3 (full count on
   desktop, single column below 860px); only 4-6 card grids get a 2-up step. */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(var(--cards-cols, 3), 1fr);
  gap: 20px;
}

@media (max-width: 860px) {
  .cards-grid { grid-template-columns: 1fr; }
  .cards-grid[data-count="4"],
  .cards-grid[data-count="5"],
  .cards-grid[data-count="6"] { grid-template-columns: repeat(2, 1fr); }
}

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

.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-on-dark);
  border-radius: 18px;
  padding: 28px;
  transition: transform 220ms var(--ease), background 220ms var(--ease), box-shadow 220ms var(--ease);
}

.on-dark .card:hover { background: rgba(255,255,255,0.07); transform: translateY(-3px); }

/* Light-context cards get their own feedback (no translucent bg to lean on). */
.section:not(.on-dark) .card { box-shadow: 0 1px 2px rgba(12,17,22,0.04); }
.section:not(.on-dark) .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(12,17,22,0.10);
}

.card img {
  border-radius: 12px;
  aspect-ratio: 16/10;
  object-fit: cover;
  margin-bottom: 18px;
}

.card h3 { font-size: 1.25rem; letter-spacing: -0.01em; margin-bottom: 8px; }

.card p { margin: 0; color: var(--white-70); font-size: 0.9375rem; line-height: 1.5; }

/* Stat row */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}

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

.stat-num {
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-top: 4px;
}

/* Team */

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

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

.team-card { display: flex; gap: 20px; align-items: flex-start; }

.team-photo {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.team-name { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 2px; }

.team-role { font-size: 0.875rem; color: var(--accent); font-weight: 600; margin-bottom: 10px; }

.team-bio { font-size: 0.9375rem; color: var(--ink-soft); line-height: 1.55; }

.on-dark .team-bio { color: var(--white-70); }

.team-mail { display: inline-block; margin-top: 10px; font-size: 0.875rem; font-weight: 600; }

/* Gallery strip */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

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

.gallery img {
  border-radius: 14px;
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
}

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

.info-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 18px; }

.info-list li { display: flex; flex-direction: column; gap: 2px; }

.info-label { font-size: 0.8125rem; color: var(--white-50); text-transform: uppercase; letter-spacing: 0.06em; }

.info-value { font-size: 1.0625rem; font-weight: 500; }

.map-frame {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line-on-dark);
  aspect-ratio: 4/3;
}

.section:not(.on-dark) .map-frame { border-color: var(--line); }

.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Footer */

.footer {
  padding: 64px 0 36px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--ink-soft);
  background: var(--paper-dim);
}

.footer-cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .nav-mark { color: var(--ink); margin-bottom: 14px; }

.footer-tagline { margin: 0; max-width: 32em; color: var(--ink-soft); line-height: 1.55; }

.footer h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 14px;
}

.footer-col a,
.footer-col p { display: block; margin: 0 0 9px; color: var(--ink-soft); }

.footer-col a { transition: color 150ms var(--ease); }
.footer-col a:hover { color: var(--ink); }

.footer-links { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }

.footer-bottom {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8125rem;
}

@media (max-width: 760px) {
  .footer-cols { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- Imagery: unified monochrome treatment ---------- */
/* Keeps the site coherent while photos are a mix of stock and real, and when
   colour photos land later via the admin. */

.hero-media img,
.subhero-media img,
.split-media img,
.card img,
.gallery img,
.team-photo {
  filter: grayscale(1) contrast(1.02);
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-group > * { transition-delay: calc(var(--i, 0) * 90ms); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-visible {
    transition: opacity 300ms ease;
    transform: none;
  }
}

/* Page subhero (multipage) */

.subhero {
  position: relative;
  overflow: hidden;
  padding: 116px 0 64px;
  background: linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 100%);
  color: #fff;
}

.subhero .wrap { position: relative; z-index: 1; }

.subhero-media { position: absolute; inset: 0; z-index: 0; }

.subhero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.subhero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,23,38,0.44) 0%, rgba(7,23,38,0.62) 58%, rgba(7,23,38,0.82) 100%);
}

.subhero.has-media { padding-top: 140px; padding-bottom: 88px; }

@media (max-width: 760px) {
  .subhero { padding: 84px 0 52px; }
  .subhero.has-media { padding-top: 104px; padding-bottom: 64px; }
}

.subhero .eyebrow { color: #ff8a70; }

.subhero .subtitle { color: var(--white-70); }
