/* Sunreef guide (guide.html). Loaded after site.css and pages.css.
   One memorable thing: the milestone timeline in the sea block, with a pinned year that changes as you scroll
   and every yacht on this site as a dot above its build year. Everything around it stays calm. */

/* ---------- photo intro ---------- */

.g-hero > img { object-position: 50% 46%; }
/* the yacht sits on the right of this photo; a little more shade on the left keeps the text clear of the rocks */
.g-hero::after {
  background:
    linear-gradient(180deg, rgb(6 16 25 / .55) 0%, rgb(6 16 25 / 0) 24%),
    linear-gradient(0deg, rgb(6 16 25 / .82) 0%, rgb(6 16 25 / .25) 45%, rgb(6 16 25 / 0) 70%),
    linear-gradient(90deg, rgb(6 16 25 / .5) 0%, rgb(6 16 25 / .2) 38%, rgb(6 16 25 / 0) 58%);
}
.g-hero .p-hero-inner { position: relative; }
.g-hero-photo {
  justify-self: start; margin-top: 6px; font-size: 0.8125rem; color: rgb(255 255 255 / .78);
  text-decoration: underline; text-decoration-color: rgb(255 255 255 / .35); text-underline-offset: 4px;
}
.g-hero-photo:hover { color: #fff; text-decoration-color: #fff; }
@media (min-width: 761px) {
  .g-hero-photo { position: absolute; right: var(--gutter); bottom: 60px; margin: 0; }
}
@media (max-width: 760px) {
  .g-hero > img { object-position: 72% 50%; }
  .g-hero::after { background: linear-gradient(180deg, rgb(6 16 25 / .55) 0%, rgb(6 16 25 / 0) 30%); }
}

/* ---------- a catamaran yard from Gdańsk ---------- */

.g-brand-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.g-brand-copy { display: grid; gap: 28px; }
.g-brand-copy h2 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3.3rem); line-height: 1.04; max-width: 14ch; }
.g-brand-copy .read p:first-child { font-size: 1.2rem; line-height: 1.62; color: var(--ink); }

.g-facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; padding-top: 10px; }
.g-fact { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 8px; padding: 22px 0 24px; border-top: 1px solid var(--line); }
.g-fact dt { font-size: 0.875rem; color: var(--muted); max-width: 22ch; }
.g-fact dd { margin: 0; font-family: var(--serif); font-size: clamp(2.6rem, 1.8rem + 2.2vw, 3.8rem); line-height: 1; font-variant-numeric: tabular-nums; }
/* the place carries the section: set far larger, across the full width */
.g-fact-place { grid-column: 1 / -1; border-top: 0; padding-top: 0; padding-bottom: 30px; }
.g-fact-place dd { font-size: clamp(4.4rem, 2.4rem + 7vw, 9.5rem); line-height: .9; letter-spacing: -0.01em; color: var(--ink); }
.g-fact-place dt { font-size: 1rem; color: var(--ink-2); }
.g-fact-wide { grid-column: 1 / -1; flex-direction: row-reverse; justify-content: space-between; align-items: baseline; }
@media (max-width: 900px) {
  /* phones: headline, then the figures, then the story */
  .g-brand-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .g-brand-copy { display: contents; }
  .g-brand-copy h2 { order: 0; }
  .g-facts { order: 1; padding-top: 0; }
  .g-brand-copy .read { order: 2; }
}
@media (max-width: 420px) {
  .g-fact-wide { flex-direction: column-reverse; align-items: start; }
}

/* ---------- 2002 to today (sea block) ---------- */

.g-tl { padding: clamp(80px, 9vw, 128px) 0; margin-top: clamp(80px, 9vw, 128px); }
.g-tl-head { display: grid; gap: 14px; max-width: 60ch; margin-bottom: clamp(36px, 5vw, 64px); }
.g-tl-head h2 { font-size: clamp(2.4rem, 1.6rem + 3vw, 4.2rem); line-height: 1; }
.g-tl-head .lede { color: var(--ink-2); }
.g-tl-note { margin-top: 48px; font-size: 0.8125rem; color: var(--muted); max-width: 70ch; }

/* default: a readable vertical timeline (phones, reduced motion) */
.g-stage { display: none; }
.g-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-left: 1px solid var(--line-strong); }
.g-step { position: relative; display: grid; gap: 12px; padding: 0 0 44px 28px; }
.g-step::before { content: ""; position: absolute; left: -5px; top: 0.55em; width: 9px; height: 9px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 0 4px var(--paper); }
.g-step:last-child { padding-bottom: 0; }
.g-step-year { font-family: var(--serif); font-size: clamp(2.2rem, 1.6rem + 2vw, 3.2rem); line-height: 1; color: var(--ink); }
.g-step-text { color: var(--ink-2); font-size: 1.05rem; line-height: 1.65; max-width: 58ch; }
.is-today .g-step-text { color: var(--ink); font-size: 1.2rem; }
.g-step-count { display: grid; gap: 8px; font-size: 0.9rem; color: var(--ink); max-width: 46ch; }
.g-bar { display: block; height: 3px; background: var(--faded); border-radius: 2px; overflow: hidden; max-width: 280px; }
.g-bar i { display: block; height: 100%; background: var(--sky); transform-origin: left center; }
.g-step-fig { margin: 6px 0 0; display: grid; gap: 10px; max-width: 620px; }
.g-step-pic { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 2; background: var(--paper-raised); }
.g-step-pic img { width: 100%; height: 100%; object-fit: cover; }
.g-step-fig figcaption { font-size: 0.875rem; color: var(--ink-2); line-height: 1.5; }
.g-step-fig figcaption a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.g-step-fig figcaption a:hover { text-decoration-color: var(--sky); }
.g-step-fig .g-more { color: var(--sky-ink); font-weight: 600; white-space: nowrap; }
.g-step-chart { margin: 8px 0 6px; max-width: 640px; }
.g-step-chart .g-cursor { display: none; }
.g-fleet-cap { display: grid; gap: 6px; margin-top: 10px; }

@media (min-width: 761px) and (prefers-reduced-motion: reduce), (min-width: 761px) and (max-width: 960px) {
  /* wider screens without the pinned stage: year, text and photo side by side */
  .g-steps { border-left: 0; gap: 0; }
  .g-step { grid-template-columns: 170px minmax(0, 1fr) minmax(0, 0.9fr); column-gap: 32px; padding: 32px 0; border-top: 1px solid var(--line); }
  .g-step::before { display: none; }
  .g-step > * { grid-column: 2; }
  .g-step-year { grid-column: 1; grid-row: 1 / span 3; }
  .g-step-fig { grid-column: 3; grid-row: 1 / span 3; margin: 0; }
  .g-step-chart, .is-today > p:last-child { grid-column: 2 / -1; }
}

/* the fleet: one dot per yacht above its build year */
.g-fleet-svg { display: block; width: 100%; height: auto; overflow: visible; }
.g-axis { stroke: var(--line-strong); stroke-width: 1; }
.g-tick { fill: var(--muted); font: 500 11px var(--sans); font-variant-numeric: tabular-nums; }
.g-dot-off { fill: var(--faded); }
.g-dot-none { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 2 2; }
.g-dot { opacity: 0; transition: opacity .45s ease; }
.g-dot.on { opacity: 1; }
.g-dot.sl { fill: var(--sail); }
.g-dot.pw { fill: var(--power); }
.g-dot.eco { fill: var(--paper); stroke-width: 1.8; }
.g-dot.sl.eco { stroke: var(--sail); }
.g-dot.pw.eco { stroke: var(--power); }
.g-cursor { stroke: var(--sky); stroke-width: 1.5; transition: transform .9s cubic-bezier(.65, 0, .35, 1); }
.g-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.8125rem; color: var(--ink-2); }
.g-legend li { display: inline-flex; align-items: center; gap: 7px; }
.g-legend svg { overflow: visible; }
.g-fleet-note { font-size: 0.8125rem; color: var(--muted); }

/* desktop with motion: the stage is pinned on the left, the milestones scroll past on the right */
@media (min-width: 961px) and (prefers-reduced-motion: no-preference) {
  .g-tl-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: clamp(40px, 6vw, 104px); align-items: start; }
  .g-stage {
    display: grid; gap: clamp(16px, 2.6vh, 28px); align-content: center;
    position: sticky; top: var(--header-h); height: calc(100dvh - var(--header-h)); padding: 3vh 0;
  }
  .g-reel {
    font-family: var(--serif); font-size: clamp(6rem, min(14vw, 27vh), 15rem); line-height: 1;
    height: 1.02em; overflow: hidden; color: var(--ink); letter-spacing: -0.015em;
  }
  .g-reel-track { transform: translateY(calc(var(--i, 0) * -1.02em)); transition: transform 1s cubic-bezier(.65, 0, .35, 1); will-change: transform; }
  .g-reel-track > span { display: block; height: 1.02em; white-space: nowrap; }
  .g-reel small { font-family: var(--sans); font-size: 0.15em; font-weight: 600; letter-spacing: 0; color: var(--muted); margin-left: 0.5em; vertical-align: 0.2em; }
  .g-count { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 18px; align-items: center; max-width: 34em; }
  .g-count-n { font-family: var(--serif); font-size: clamp(3rem, 2rem + 2.4vw, 4.4rem); line-height: .95; color: var(--sky); font-variant-numeric: tabular-nums; min-width: 1.2em; }
  .g-count-t { font-size: 1.05rem; color: var(--ink-2); line-height: 1.45; max-width: 26ch; }
  .g-fleet { margin: 4px 0 0; }
  .g-fleet figcaption { display: grid; gap: 6px; margin-top: 12px; }

  .g-steps { border-left: 0; padding-top: 4vh; }
  .g-step { min-height: 64vh; align-content: center; padding: 4vh 0; opacity: .28; transition: opacity .5s ease; }
  .g-step.is-active { opacity: 1; }
  .g-step::before { display: none; }
  .g-step-year { font-family: var(--sans); font-size: 0.95rem; font-weight: 700; color: var(--sky); letter-spacing: 0; }
  .g-step-text { font-size: 1.2rem; line-height: 1.6; color: var(--ink); }
  .is-today .g-step-text { font-family: var(--serif); font-size: clamp(1.6rem, 1.2rem + 1vw, 2.1rem); line-height: 1.25; }
  /* the stage shows the count; the sentence stays for screen readers */
  .g-step-count { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .g-step-chart { display: none; }
  .g-step-fig { margin-top: 10px; }
  .g-step:last-child { min-height: 80vh; }
}

/* ---------- five families ---------- */

.g-fam-tabs {
  position: relative; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line);
}
.g-fam-tabs::-webkit-scrollbar { display: none; }
.g-fam-tabs button {
  flex: 1 0 auto; padding: 6px 14px 16px 0; margin-bottom: -1px; border: 0; border-bottom: 3px solid transparent; background: none;
  font-family: var(--serif); font-size: clamp(1.5rem, 1rem + 1.6vw, 2.5rem); line-height: 1; text-align: left; color: var(--muted);
  cursor: pointer; transition: color .2s ease, border-color .2s ease;
}
.g-fam-tabs button small { display: block; margin-top: 8px; font-family: var(--sans); font-size: 0.75rem; color: var(--muted); }
.g-fam-tabs button:hover { color: var(--ink); }
.g-fam-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--sky); }
.g-fam-tabs button[aria-selected="true"] small { color: var(--ink-2); }

.g-fam-panel { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(28px, 4.5vw, 64px); padding-top: 36px; align-items: center; }
.g-fam-media { position: relative; margin: 0; aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden; background: var(--line); isolation: isolate; }
.g-fam-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.035); transition: opacity .8s ease, transform 1.6s cubic-bezier(.16, 1, .3, 1); }
.g-fam-media img.is-on { opacity: 1; transform: none; }
.g-fam-media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(0deg, rgb(6 16 25 / .6), rgb(6 16 25 / 0)); pointer-events: none; }
.g-fam-cap { position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 1; font-size: 0.8125rem; color: rgb(255 255 255 / .86); }
.g-fam-cap a { color: #fff; text-underline-offset: 3px; }
.g-fam-body { display: grid; gap: 18px; align-content: center; }
.g-fam-body:focus-visible { outline-offset: 8px; }
.g-fam-body h3 { font-size: clamp(2.2rem, 1.6rem + 2vw, 3.4rem); line-height: 1; }
.g-fam-text { color: var(--ink-2); font-size: 1.075rem; line-height: 1.65; max-width: 46ch; }
@media (prefers-reduced-motion: no-preference) {
  .g-fam-body.is-in > * { animation: gIn .6s cubic-bezier(.16, 1, .3, 1) both; }
  .g-fam-body.is-in > :nth-child(2) { animation-delay: 60ms; }
  .g-fam-body.is-in > :nth-child(n + 3) { animation-delay: 120ms; }
}
@keyframes gIn { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 860px) {
  .g-fam-panel { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 24px; }
  .g-fam-tabs button { font-size: 1.45rem; padding-right: 10px; }
}

/* shared figures: count, asking prices, build years */
.g-figs { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: end; }
.g-figs div { display: flex; flex-direction: column-reverse; gap: 4px; }
.g-figs dt { font-size: 0.8125rem; color: var(--muted); }
.g-figs dd { margin: 0; font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.g-figs .g-fig-n dd { font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 2rem + 1.6vw, 3.6rem); line-height: .95; }

/* ---------- model by model ---------- */

.g-index { position: relative; display: flex; flex-wrap: wrap; gap: 4px 22px; margin: -8px 0 22px; }
.g-index button {
  padding: 8px 0; border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer;
  font-size: 0.9rem; font-weight: 600; color: var(--muted); transition: color .2s ease, border-color .2s ease;
}
.g-index button:hover { color: var(--ink); }
.g-index button[aria-current="true"] { color: var(--ink); border-bottom-color: var(--sky); }

.g-rail {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 89%; gap: 24px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.g-rail::-webkit-scrollbar { display: none; }
.g-rail:focus-visible { outline-offset: 6px; }
.g-model { scroll-snap-align: start; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 3.5vw, 52px); align-items: center; }
.g-model-media { position: relative; margin: 0; height: clamp(380px, 62vh, 600px); border-radius: var(--radius); overflow: hidden; background: var(--line); }
.g-model-media img { width: 100%; height: 100%; object-fit: cover; }
.g-model-media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 28%; background: linear-gradient(0deg, rgb(6 16 25 / .55), rgb(6 16 25 / 0)); pointer-events: none; }
.g-model-media figcaption { position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 1; font-size: 0.8125rem; color: rgb(255 255 255 / .86); }
.g-model-media figcaption a { color: #fff; text-underline-offset: 3px; }
.g-model-body { display: grid; gap: 18px; align-content: center; padding-right: 8px; }
.g-model-body h3 { font-size: clamp(2.2rem, 1.6rem + 2vw, 3.3rem); line-height: 1; }
.g-model-text { color: var(--ink-2); line-height: 1.65; max-width: 44ch; }
.g-points { list-style: none; margin: 0; padding: 0; display: grid; }
.g-points li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.95rem; color: var(--ink); }
.g-points li.is-check strong { color: var(--sky-ink); font-weight: 700; }
.g-foot { margin-top: 18px; font-size: 0.8125rem; color: var(--muted); max-width: 80ch; }
@media (max-width: 860px) {
  .g-rail { grid-auto-columns: 92%; gap: 16px; }
  .g-model { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 20px; }
  .g-model-media { height: auto; aspect-ratio: 4 / 3; }
  .g-index { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 18px; margin-top: 0; }
  .g-index::-webkit-scrollbar { display: none; }
  .g-index button { flex: none; }
}

/* ---------- buyer guides ---------- */

.g-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.g-guide { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; color: #fff; text-decoration: none; isolation: isolate; background: #0b1a24; }
.g-guide.is-lead { grid-column: 1 / -1; aspect-ratio: 21 / 8; }
.g-guide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .9s cubic-bezier(.16, 1, .3, 1); }
.g-guide:hover img { transform: scale(1.035); }
.g-guide::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgb(6 16 25 / .78) 0%, rgb(6 16 25 / .2) 48%, rgb(6 16 25 / 0) 72%); }
.g-guide-body { position: absolute; left: 28px; right: 28px; bottom: 24px; display: grid; gap: 6px; }
.g-guide-title { font-family: var(--serif); font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.8rem); line-height: 1.02; }
.g-guide.is-lead .g-guide-title { font-size: clamp(2.2rem, 1.4rem + 2.6vw, 4rem); }
.g-guide-desc { color: rgb(255 255 255 / .86); max-width: 44ch; }
.g-nowrap { white-space: nowrap; }
/* the lead guide reads from the left, where the photo is darkened a little more */
.g-guide.is-lead::after { background: linear-gradient(0deg, rgb(6 16 25 / .7) 0%, rgb(6 16 25 / 0) 55%), linear-gradient(90deg, rgb(6 16 25 / .55) 0%, rgb(6 16 25 / .15) 45%, rgb(6 16 25 / 0) 65%); }
.g-guide:hover .g-guide-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
@media (max-width: 760px) {
  .g-guide-grid { grid-template-columns: minmax(0, 1fr); }
  .g-guide, .g-guide.is-lead { aspect-ratio: 4 / 3; }
  .g-guide-body { left: 20px; right: 20px; bottom: 18px; }
}

