/* ==========================================================================
   Gonio Yachts & Marina, landing page
   Palette comes from the brochure: Gonio teal (logo ground) and warm paper.
   ========================================================================== */

@font-face {
  font-family: "Forum";
  src: url("../fonts/forum-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --teal: #01384c;
  --teal-deep: #012230;
  --paper: #f8f7f2;
  --ink: #1d1d1b;
  --glass: #a9c7cc;              /* sea-glass, for focus and quiet detail */
  --line-light: #638690;
  --line-dark: #b7b9b2;
  --muted-light: #dce6e5;
  --muted-dark: #454b49;

  --f-display: "Forum", "Times New Roman", serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --surface: #034258;
  --surface-input: #06384b;
  --placeholder: #b7ccd1;
  --error: #ffd0be;
  --overlay-rgb: 1, 26, 38;
  --overlay-strong: rgba(var(--overlay-rgb), .82);
  --overlay-medium: rgba(var(--overlay-rgb), .56);
  --overlay-soft: rgba(var(--overlay-rgb), .24);
  --overlay-clear: rgba(var(--overlay-rgb), 0);
  --gallery-surface: rgba(1, 34, 48, .94);
  --surface-shadow: 0 16px 44px rgba(var(--overlay-rgb), .18);

  --gutter: max(clamp(1.25rem, 5vw, 5rem), calc((100vw - 1600px) / 2));
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  background: var(--teal-deep);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
figure, blockquote, dl, dd, ul { margin: 0; padding: 0; }
p { margin: 0; }
button { font: inherit; }
[hidden] { display: none !important; }
a, button, input, textarea { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--glass); color: var(--teal-deep); }

:focus-visible {
  outline: 2px solid var(--glass);
  outline-offset: 3px;
}
.sheet--paper :focus-visible { outline-color: var(--teal); }

.skip {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .75rem 1.25rem;
  background: var(--paper);
  color: var(--teal);
  text-decoration: none;
  transition: top .2s;
}
.skip:focus { top: 1rem; }

/* --------------------------------------------------------------------------
   Film stage
   -------------------------------------------------------------------------- */
.film {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--teal-deep) url('../img/poster.jpg') center / cover no-repeat;
  overflow: hidden;
}
.film video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--teal-deep);
}
.film.has-error video { visibility: hidden; }
.film::after {                       /* even tint so type stays legible on bright scenes */
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(var(--overlay-rgb), .16);
  pointer-events: none;
}

main { position: relative; z-index: 1; }

/* Film position indicator (scroll progress) */
.rail {
  position: fixed;
  right: clamp(.75rem, 1.6vw, 1.6rem);
  top: 50%;
  z-index: 40;
  width: 2px;
  height: 26vh;
  transform: translateY(-50%);
  background: var(--line-light);
  mix-blend-mode: difference;
  pointer-events: none;
}
.rail span {
  position: absolute;
  inset: 0;
  background: #fff;
  transform-origin: top center;
  transform: scaleY(0);
}

.eyebrow { font-size: .75rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */
.display {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.03;
  letter-spacing: .01em;
  text-wrap: balance;
}
.display--xl { font-size: clamp(2.5rem, 7vw, 6.4rem); }
.display--l  { font-size: clamp(2.1rem, 5vw, 4.6rem); }
.display--m  { font-size: clamp(1.6rem, 3vw, 2.7rem); }
.display--s  { font-size: clamp(1.2rem, 1.7vw, 1.55rem); line-height: 1.15; }

.lede {
  font-size: clamp(1.08rem, 1.5vw, 1.3rem);
  line-height: 1.65;
  max-width: 34rem;
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0 2rem;
  border: 1px solid var(--paper);
  background: var(--paper);
  color: var(--teal);
  font: 500 1rem/1 var(--f-body);
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { background: var(--glass); border-color: var(--glass); color: var(--teal-deep); }
.btn--small { min-height: 2.75rem; padding: 0 1.25rem; font-size: .95rem; }
.btn--ghost { background: transparent; color: var(--paper); border-color: var(--line-light); }
.btn--ghost:hover { background: var(--paper); color: var(--teal); border-color: var(--paper); }
.btn--block { width: 100%; }
.btn[disabled] { background: #d5e0df; border-color: #d5e0df; color: var(--teal); cursor: progress; }
form[data-submitted="true"] .btn { cursor: default; }

/* --------------------------------------------------------------------------
   Windows: sections that let the film show through
   -------------------------------------------------------------------------- */
.win {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  padding: 2rem var(--gutter) 4.5rem;
}
.win::before {                       /* reading scrim, fades at top and bottom so windows join softly */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--scrim);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
}
.win--left  { --scrim: linear-gradient(90deg, var(--overlay-strong), var(--overlay-medium) 50%, var(--overlay-clear) 80%); }
.win--right { --scrim: linear-gradient(270deg, var(--overlay-strong), var(--overlay-medium) 50%, var(--overlay-clear) 80%); }
.win--bottom { --scrim: linear-gradient(0deg, rgba(var(--overlay-rgb), .92), var(--overlay-medium) 55%, var(--overlay-clear)); align-content: end; }
.win--center { align-content: center; }
.win--right { justify-items: end; text-align: right; }

/* Hero */
.hero {
  align-content: start;
  padding-top: clamp(2rem, 9vh, 6rem);
  --scrim: linear-gradient(180deg, var(--overlay-medium), var(--overlay-soft) 50%, var(--overlay-clear)),
           linear-gradient(90deg, var(--overlay-medium), var(--overlay-clear) 62%);
}
.hero::before { -webkit-mask-image: none; mask-image: none; }
.hero__copy {
  display: grid;
  justify-items: start;
  gap: 1.5rem;
  max-width: 46rem;
}
.hero__copy.is-gone { visibility: hidden; }
.hero__cue {
  position: absolute;
  left: var(--gutter);
  bottom: 2rem;
  font-size: .9rem;
  letter-spacing: .06em;
  color: var(--muted-light);
  display: flex;
  align-items: center;
  gap: .9rem;
  text-decoration: none;
  min-height: 44px;
}
.hero__cue::after {
  content: "";
  width: 3.5rem;
  height: 1px;
  background: currentColor;
  opacity: 1;
}

.stmt__body { display: grid; gap: 1.6rem; max-width: 36rem; }
.win--right .stmt__body { justify-items: end; }

/* --------------------------------------------------------------------------
   Sheets: opaque sections that cover the film
   -------------------------------------------------------------------------- */
.sheet {
  position: relative;
  padding: clamp(4rem, 10vw, 9rem) var(--gutter);
}
.sheet--paper { background: var(--paper); color: var(--ink); }
.sheet--teal  { background: var(--teal);  color: var(--paper); }

/* Location */
.location {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: start;
}
.location__intro { display: grid; gap: 1.75rem; }
.location__intro .lede { color: var(--muted-dark); }
.times__title {
  margin: 1.25rem 0 -.75rem;
  font: 600 .95rem/1.3 var(--f-body);
  letter-spacing: .02em;
}
.times { max-width: 32rem; }
.times__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line-dark);
}
.times__row:first-child { border-top: 1px solid var(--line-dark); }
.times dd { font-family: var(--f-display); font-size: 1.5rem; line-height: 1; white-space: nowrap; }
.location__map { align-self: center; }
.location__map img { width: 100%; }

/* Waterfront index (pinned) */
.index {
  --step: 30vh;
  position: relative;
  height: calc(100svh + var(--n) * var(--step));
  background: var(--gallery-surface);
}
.index__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "head media" "list media";
  column-gap: clamp(2rem, 6vw, 7rem);
  row-gap: 1.5rem;
  align-content: center;
  padding: 2.25rem var(--gutter) 2.5rem;
}
.index__head { grid-area: head; display: grid; gap: .9rem; align-self: end; }
.index__sub { max-width: 30rem; color: var(--muted-light); font-size: 1rem; line-height: 1.6; }
.index__list { grid-area: list; list-style: none; align-self: start; display: grid; align-content: start; }
.index__list button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: .06em 0;
  border: 0;
  background: none;
  color: var(--muted-light);
  font-family: var(--f-display);
  font-size: clamp(1.15rem, min(2.5vw, 4.4vh), 2.5rem);
  line-height: 1.22;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: color .35s ease;
}
.index__list button::before {        /* marks the item currently shown */
  content: "";
  flex: none;
  width: 0;
  height: 1px;
  margin-right: 0;
  background: currentColor;
  transition: width .35s ease, margin-right .35s ease;
}
.index__list button:hover { color: var(--paper); }
.index__list button[aria-current="true"] { color: var(--paper); }
.index__list button[aria-current="true"]::before { width: 2.4rem; margin-right: 1rem; }

.index__media {
  grid-area: media;
  position: relative;
  align-self: center;
  justify-self: end;
  width: min(100%, 34rem);
  height: min(74vh, 44rem);
  background: var(--teal);
}
.index__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .7s ease;
}
.index__media img.is-active { opacity: 1; }
.index__caption {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 3rem 1.25rem 1rem;
  background: linear-gradient(transparent, rgba(var(--overlay-rgb), .9));
  font-size: .75rem;
  letter-spacing: .04em;
}
.index__caption span:first-child { white-space: nowrap; }

/* Nature */
.nature {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2.5vw, 2.5rem);
  row-gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}
.nature__copy { grid-column: 1 / span 6; grid-row: 1; display: grid; gap: 1.75rem; }
.nature__copy .lede { color: var(--muted-dark); }
.nature__a { grid-column: 1 / span 5; grid-row: 2; }
.nature__b { grid-column: 7 / span 3; grid-row: 2; margin-top: clamp(2rem, 7vw, 7rem); }
.nature__c { grid-column: 10 / span 3; grid-row: 1 / span 2; align-self: start; }
.nature figure img { width: 100%; }
.nature figcaption {
  margin-top: .9rem;
  font-family: var(--f-display);
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  text-transform: uppercase;
  letter-spacing: .01em;
}

/* Vision */
.vision {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  column-gap: clamp(2rem, 6vw, 7rem);
  row-gap: clamp(4rem, 8vw, 8rem);
  align-items: start;
}
.vision__quote { display: grid; gap: 2.25rem; align-content: start; }
.quote { display: grid; gap: 1.5rem; max-width: 40rem; }
.quote p {
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  line-height: 1.6;
  text-wrap: pretty;
}
.quote cite { font-style: normal; font-weight: 600; letter-spacing: .02em; }
.vision__portrait { align-self: stretch; }
.vision__portrait img { width: 100%; height: 100%; max-height: 40rem; object-fit: cover; object-position: 50% 20%; }

.developer {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  column-gap: clamp(2rem, 6vw, 7rem);
  row-gap: 3rem;
  padding-top: clamp(3rem, 6vw, 6rem);
  border-top: 1px solid var(--line-light);
}
.developer__text { display: grid; gap: 1.5rem; align-content: start; }
.developer .lede { color: var(--muted-light); }
.stats { align-self: start; }
.stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  align-items: baseline;
}
.stat dd {
  grid-column: 1;
  grid-row: 1;
  padding: .55rem 1.5rem .55rem 0;
  text-align: right;
  border-right: 1px solid var(--line-light);
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  line-height: 1.1;
}
.stat dt {
  grid-column: 2;
  grid-row: 1;
  padding: .55rem 0 .55rem 1.5rem;
  color: var(--muted-light);
  font-size: 1rem;
}
.developer__pics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.75rem, 1.5vw, 1.5rem);
  max-width: 62rem;
}
.developer__pics img { width: 100%; aspect-ratio: 1 / 1.05; object-fit: cover; }

/* Values */
.values__list {
  list-style: none;
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: clamp(1.25rem, 3vw, 3rem);
}
.values__list li {
  display: grid;
  gap: .8rem;
  align-content: start;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-light);
}
.values__list p { font-size: .98rem; line-height: 1.6; color: var(--muted-light); max-width: 22rem; }

/* Register */
.register {
  grid-template-columns: minmax(0, 1fr) minmax(0, 27rem);
  column-gap: clamp(2rem, 8vw, 9rem);
  align-content: center;
  align-items: center;
}
.register { --scrim: linear-gradient(90deg, var(--overlay-medium), var(--overlay-soft) 55%, var(--overlay-clear) 80%); }
.register::before { -webkit-mask-image: none; mask-image: none; }
.register__copy { display: grid; gap: 1.5rem; justify-items: start; max-width: 36rem; }
.panel {
  background: var(--surface);
  box-shadow: var(--surface-shadow);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid var(--line-light);
}
.panel form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: .3rem; }
.field label { font-size: .92rem; font-weight: 500; color: var(--paper); }
.optional { font-weight: 400; color: var(--muted-light); }
.field input, .field textarea {
  width: 100%;
  padding: .6rem .65rem;
  border: 0;
  border-bottom: 1px solid var(--line-light);
  border-radius: 0;
  background: var(--surface-input);
  color: var(--paper);
  font: 400 1.05rem/1.4 var(--f-body);
  transition: border-color .2s ease;
}
.field textarea { resize: vertical; min-height: 3.4rem; }
.field input::placeholder { color: var(--placeholder); }
.field input:focus, .field textarea:focus { outline: 0; border-bottom-color: var(--paper); }
.field input:focus-visible, .field textarea:focus-visible { outline: 0; }
.field input:user-invalid, .field textarea:user-invalid { border-bottom-color: var(--error); }
.field [aria-invalid="true"] { border-bottom-color: var(--error); }
.field__hint { font-size: .75rem; color: var(--muted-light); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--glass); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__note { font-size: .85rem; line-height: 1.5; color: var(--muted-light); }
.form__status { min-height: 1.4em; font-size: .95rem; line-height: 1.5; }
.form__status.is-error { color: var(--error); }
form[data-submitted="true"] .form__status { color: var(--paper); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1020px) {
  .values__list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
  .nature__copy { grid-column: 1 / -1; }
  .nature__a { grid-column: 1 / span 6; grid-row: 2; }
  .nature__b { grid-column: 8 / span 5; grid-row: 2; margin-top: 3rem; }
  .nature__c { grid-column: 3 / span 8; grid-row: 3; }
}

@media (max-width: 820px) {
  .film video { object-position: 45% 50%; }   /* keeps the logo in the film inside a portrait crop */
  .rail { display: none; }
  .hero__cue { bottom: 1.25rem; }

  .win { padding-bottom: 3rem; }
  .win--left, .win--right { --scrim: linear-gradient(180deg, var(--overlay-strong), var(--overlay-medium)); }
  .win--right { justify-items: start; text-align: left; }
  .win--right .stmt__body { justify-items: start; }
  .hero { --scrim: linear-gradient(180deg, var(--overlay-strong), var(--overlay-soft) 60%, var(--overlay-clear)); }

  .location { grid-template-columns: minmax(0, 1fr); }
  .location__map { order: -1; }

  .index__pin {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "head" "media" "list";
    row-gap: 1rem;
    padding-top: 2rem;
    padding-bottom: 1.25rem;
  }
  .index__sub { display: none; }
  .index__media { width: 100%; height: 100%; justify-self: stretch; min-height: 0; }
  .index__list button { font-size: clamp(.95rem, 3.9vw, 1.15rem); padding: .16em 0; line-height: 1.2; white-space: nowrap; }
  .index__list button[aria-current="true"]::before { width: 1.1rem; margin-right: .5rem; }

  .nature { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .nature__copy { grid-column: 1 / -1; }
  .nature__a { grid-column: 1 / span 6; grid-row: 2; }
  .nature__b { grid-column: 3 / span 4; grid-row: 3; margin-top: 0; }
  .nature__c { grid-column: 1 / span 5; grid-row: 4; }

  .vision { grid-template-columns: minmax(0, 1fr); }
  .developer { order: 3; }
  .vision__portrait img { max-height: 32rem; }
  .developer { grid-template-columns: minmax(0, 1fr); }

  .register { grid-template-columns: minmax(0, 1fr); row-gap: 2rem; align-content: end; }
}

/* Touch and short screens use a compact selector: no long pinned list or tiny targets. */
@media (max-width: 820px), (max-height: 680px) {
  .index { height: auto; }
  .index__pin {
    position: relative; height: auto; min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas: "head" "media" "list";
    gap: 1.5rem;
    padding: clamp(3rem, 8vw, 5rem) var(--gutter);
  }
  .index__sub { display: block; max-width: 38rem; }
  .index__media { width: 100%; height: clamp(19rem, 52svh, 34rem); max-width: none; justify-self: stretch; }
  .index__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.25rem; }
  .index__list button { min-height: 48px; height: 100%; padding: .6rem 0; font-size: clamp(.9rem, 2.5vw, 1.2rem); white-space: normal; line-height: 1.3; border-bottom: 1px solid var(--line-light); }
  .index__list button[aria-current="true"]::before { width: .6rem; margin-right: .5rem; }
}

@media (min-width: 821px) and (max-height: 680px) {
  .index__pin { grid-template-columns: 1fr 1fr; grid-template-areas: "head media" "list media"; }
  .index__media { height: 32rem; }
}

@media (max-width: 560px) {
  .hero__copy { gap: 1.25rem; }
  .hero .display--xl { font-size: clamp(2.5rem, 10.8vw, 3.75rem); }
  .hero .lede { font-size: 1.05rem; max-width: 28ch; }
  .hero { padding-top: 4rem; }
  .win--center { min-height: 85svh; }
  .values { padding-top: 5rem; padding-bottom: 4rem; }
  .values::before { mask-image: none; -webkit-mask-image: none; }
  .register { padding-top: 5rem; }
}

/* All content remains reachable with scripts disabled or reduced motion. */
html:not(.js) .index { height: auto; }
html:not(.js) .index__pin { position: relative; height: auto; }
html:not(.js) .index__media { display: grid; height: auto; gap: 1rem; }
html:not(.js) .index__media img { position: static; opacity: 1; height: auto; }
html:not(.js) .index__caption { display: none; }
@media (prefers-reduced-motion: reduce) {
  .film video { visibility: hidden; }
  .index { height: auto; }
  .index__pin { position: relative; height: auto; }
}

@media (max-width: 560px) {
  .values__list { grid-template-columns: minmax(0, 1fr); }
  .developer__pics { grid-template-columns: minmax(0, 1fr); }
  .stat { grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); }
}

@media (max-height: 720px) and (min-width: 821px) {
  .index__sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
