/* Seaview Marina, Cockburn Harbour, South Caicos. Unofficial concept by Alex Fernandez.
   Colours from the fuel house: pink stucco wall, salmon base band, the sign's blue letters,
   the red GASOLINE on the pump, the harbour water and the code flags. */

:root {
  --wall: #f2d8d3;
  --band: #e8949c;
  --sign: #1d3c9c;
  --pump: #c5282d;
  --pump-dk: #a01f24;
  --sea: #0b7389;
  --paper: #f5f6f8;
  --ink: #141a2c;
  --soft: #454c62;
  --fy: #f5c518;

  --s-small: .9375rem;
  --s-body: 1.0625rem;
  --s-lead: clamp(1.25rem, 1.1rem + .45vw, 1.5rem);
  --s-head: clamp(2.5rem, 1.5rem + 3.4vw, 5rem);
  --s-display: clamp(4.5rem, 1rem + 15vw, 11rem);

  --g: clamp(16px, 3vw, 40px);
  --nav: 60px;
  --pad: clamp(72px, 12vh, 140px);
  --fh: clamp(40px, 8.2svh, 90px);

  --f-st: "Big Shoulders Stencil", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-di: "Big Shoulders", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-tx: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (max-width: 640px) {
  :root { --nav: 56px; --fh: min(46px, 5.2svh); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 400 var(--s-body)/1.55 var(--f-tx);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
figure { margin: 0; }
:focus-visible { outline: 3px solid var(--sign); outline-offset: 3px; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; } /* taste-skill-ignore */
.skip { position: absolute; left: var(--g); top: -80px; z-index: 100; background: var(--ink); color: #fff; padding: 12px 16px; text-decoration: none; }
.skip:focus { top: 8px; }

.head {
  font-family: var(--f-di);
  font-weight: 800;
  font-size: var(--s-head);
  line-height: .95;
  letter-spacing: .01em;
  text-transform: uppercase;
  font-variation-settings: "opsz" 72;
}

/* buttons: one shape for the page, square like the pump housing */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  background: var(--pump);
  color: #fff;
  font: 600 var(--s-body)/1.1 var(--f-tx);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform .16s ease-out, color .2s ease-out;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--pump-dk);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform .28s cubic-bezier(.2, .7, .2, 1);
}
.btn:hover::before, .btn:focus-visible::before { transform: scaleY(1); }
.btn:active { transform: scale(.97); }
.btn-ink { background: var(--ink); }
.btn-ink::before { background: var(--sign); }

/* nav */
.nav {
  position: fixed;
  z-index: 40;
  top: 0; left: 0; right: 0;
  height: var(--nav);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 var(--g);
  background: var(--wall);
}
.wm {
  justify-self: start;
  font: 900 var(--s-lead)/1 var(--f-di);
  font-variation-settings: "opsz" 72;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--sign);
  text-decoration: none;
}
.links { display: flex; gap: 28px; }
.links a { position: relative; padding: 12px 0; font-weight: 600; text-decoration: none; }
.links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 6px;
  height: 3px;
  background: var(--pump);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .25s ease-out;
}
.links a:hover::after, .links a:focus-visible::after { transform: scaleX(1); }
.btn-nav { justify-self: end; min-height: 44px; padding: 0 16px; }
@media (max-width: 820px) {
  .nav { grid-template-columns: 1fr auto; }
  .links { display: none; }
}

/* hero: shouted name, rising photograph that opens to the whole harbour */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  background: var(--wall);
}
.rise {
  position: absolute;
  inset: 0;
  z-index: 1;
  clip-path: inset(47% 36.5% 0% 36.5%);
}
.rise img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 64%; }
.hero-title {
  position: absolute;
  z-index: 2;
  left: var(--g); right: var(--g);
  top: calc(var(--nav) + 3svh);
  text-align: center;
  font-family: var(--f-st);
  font-weight: 900;
  font-size: var(--s-display);
  line-height: 1;
  letter-spacing: .005em;
  text-transform: uppercase;
  font-variation-settings: "opsz" 72;
  color: var(--sign);
}
.hero-title .ln { display: block; }
.anim .hero-title { visibility: hidden; }

.plate { background: var(--wall); color: var(--ink); padding: 14px 18px; }
.plates {
  position: absolute;
  z-index: 3;
  left: var(--g); right: var(--g);
  bottom: clamp(16px, 4svh, 40px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  pointer-events: none;
}
.plates .plate { pointer-events: auto; }
.plate-lead { max-width: min(380px, 32vw); font-size: var(--s-lead); line-height: 1.3; }
.plate-fact {
  font: 800 var(--s-lead)/1.2 var(--f-di);
  font-variation-settings: "opsz" 72;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--sign);
}

.hoist, .hoist-cap { display: none; }
.anim .hoist {
  display: block;
  position: absolute;
  z-index: 2;
  top: calc(var(--nav) + 20px);
  left: 66vw;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.rope { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #f7f3ea; }
.hoist-flags { position: relative; margin-left: 4px; display: flex; flex-direction: column; gap: 4px; }
.hoist .flag { display: block; width: calc(var(--fh) * 1.15); height: calc(var(--fh) * 1.3); }
.anim .hoist-cap {
  display: block;
  position: absolute;
  z-index: 3;
  top: calc(var(--nav) + 20px);
  left: var(--g);
  max-width: min(340px, calc(66vw - 2 * var(--g)));
  font-size: var(--s-small);
  line-height: 1.45;
  opacity: 0;
}

@media (max-width: 640px) {
  .rise { clip-path: inset(30% 16% 0% 16%); }
  .plates { flex-direction: column; align-items: stretch; gap: 8px; }
  .plate-lead { max-width: none; }
  .anim .hoist { left: 64vw; }
}

/* at the pumps */
.pumps {
  position: relative;
  background: var(--paper);
  padding: var(--pad) var(--g);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .72fr);
  grid-template-areas: "stack object" "house text";
  gap: clamp(40px, 7vh, 80px) clamp(24px, 4vw, 64px);
  align-items: start;
  overflow: hidden;
}
.stack {
  grid-area: stack;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--f-st);
  font-weight: 900;
  font-size: var(--s-display);
  line-height: 1;
  text-transform: uppercase;
  font-variation-settings: "opsz" 72;
}
.stack li { width: max-content; max-width: 100%; }
.stack li:nth-child(1) { color: var(--pump); }
.stack li:nth-child(2) { color: var(--sign); }
.stack li:nth-child(3) { color: var(--sea); }
.stack li:nth-child(4) { color: var(--ink); }
.object { grid-area: object; align-self: center; transform: rotate(4deg); }
.object img { width: 100%; }
.pumps-text { grid-area: text; display: grid; gap: 18px; align-content: start; }
.pumps-text h2 { color: var(--sign); }
.lead-p { font-size: var(--s-lead); line-height: 1.4; }
.house { grid-area: house; }
.house img { width: 100%; }
.house figcaption { margin-top: 10px; font-size: var(--s-small); color: var(--soft); }
@media (max-width: 1180px) {
  .pumps { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stack" "object" "text" "house"; }
  .object { width: min(78vw, 560px); justify-self: center; }
  .pumps-text { max-width: 720px; }
}

/* coming in: the passage pans past while each leg of the way in shows its number */
.passage {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: var(--sea);
  padding: calc(var(--nav) + 20px) var(--g) clamp(16px, 5svh, 48px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}
.pan { position: absolute; inset: 0; z-index: 0; }
.pan img { width: 100%; height: 100%; object-fit: cover; }
.in-head { position: relative; z-index: 1; max-width: min(640px, 100%); display: grid; gap: 10px; }
.in-head h2 { color: var(--sign); }
.legs {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 1100px;
}
.leg { background: var(--paper); padding: 16px 22px 20px; }
.big {
  display: block;
  font-family: var(--f-st);
  font-weight: 900;
  font-size: var(--s-display);
  line-height: 1;
  text-transform: uppercase;
  font-variation-settings: "opsz" 72;
  color: var(--sign);
  white-space: nowrap;
}
.leg p { margin-top: 6px; font-size: var(--s-lead); line-height: 1.35; }
.passage.is-pinned { height: 100svh; }
.passage.is-pinned .pan { right: auto; width: auto; }
.passage.is-pinned .pan img { width: auto; max-width: none; height: 100%; }
.passage.is-pinned .legs { grid-template-columns: minmax(0, 1fr); width: max-content; max-width: 100%; }
.passage.is-pinned .leg p { max-width: 30ch; }
.passage.is-pinned .leg { grid-area: 1 / 1; align-self: end; }
@media (max-width: 760px) {
  .legs { grid-template-columns: minmax(0, 1fr); }
}

/* rolling number wheels, like the counters on the pump */
.roll-vis { display: inline-flex; align-items: flex-start; }
.wheel { display: inline-block; height: 1em; overflow: hidden; }
.strip { display: block; }
.strip::before {
  content: "0\A 1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9\A 0\A 1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9\A 0\A 1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9";
  display: block;
  white-space: pre;
  line-height: 1;
  text-align: center;
}
.ch { display: inline-block; height: 1em; line-height: 1; white-space: pre; }

/* ashore */
.ashore {
  position: relative;
  background: var(--sign);
  color: #fff;
  padding: var(--pad) var(--g);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px clamp(24px, 4vw, 72px);
  align-items: start;
  overflow: hidden;
}
.shape {
  --notch: 76%;
  margin-left: calc(-1 * var(--g) - 4vw);
  height: 78svh;
  min-height: 420px;
  max-height: 860px;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, var(--notch) 50%, 100% 100%, 0 100%);
}
.shape img { width: 100%; height: 112%; object-fit: cover; object-position: 26% 50%; }
.ashore-body { display: grid; align-content: start; }
.sub { margin-top: 20px; max-width: 44ch; font-size: var(--s-lead); line-height: 1.4; }
.points {
  list-style: none;
  margin: clamp(32px, 6vh, 56px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 36px;
}
.points li { position: relative; padding-left: 30px; }
.points h3 { font: 600 var(--s-body)/1.3 var(--f-tx); }
.points li::before {
  content: "";
  position: absolute;
  left: 0; top: .28em;
  width: 20px; height: 15px;
  background: var(--mk, #fff);
  clip-path: polygon(0 0, 100% 0, 70% 50%, 100% 100%, 0 100%);
  transform-origin: 0 50%;
  animation: flap 1.7s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -.21s);
}
.points li:nth-child(3n+1) { --mk: var(--fy); }
.points li:nth-child(3n+2) { --mk: #fff; }
.points li:nth-child(3n) { --mk: var(--band); }
.points p { margin-top: 6px; font-size: var(--s-small); line-height: 1.45; color: #e3e8ff; }
@keyframes flap {
  0%, 100% { transform: skewY(0deg) scaleX(1); }
  50% { transform: skewY(-8deg) scaleX(.86); }
}
@media (max-width: 1100px) { .points { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .ashore { grid-template-columns: minmax(0, 1fr); }
  .shape { width: 86vw; height: 58svh; min-height: 320px; margin-left: calc(-1 * var(--g)); }
  .points { grid-template-columns: minmax(0, 1fr); gap: 26px; }
}

/* stay the night */
.stay {
  position: relative;
  min-height: 105svh;
  padding: var(--pad) var(--g) clamp(24px, 6vh, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  grid-template-areas: ". side" "main .";
  align-content: space-between;
  gap: 32px;
  overflow: hidden;
}
.stay-bg { position: absolute; inset: 0; }
.stay-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 60%; }
.stay .plate { position: relative; z-index: 1; }
.stay-main { grid-area: main; max-width: 640px; display: grid; gap: 14px; padding: 22px 26px 26px; }
.stay-main h2 { color: var(--sign); }
.stay-main p { font-size: var(--s-lead); line-height: 1.4; }
.stay-main .note { font-size: var(--s-body); color: var(--soft); }
.stay-side { grid-area: side; display: grid; gap: 10px; align-content: start; }
.stay-side img { width: 100%; margin-bottom: 4px; }
.stay-side h3 { font: 800 var(--s-lead)/1.1 var(--f-di); text-transform: uppercase; letter-spacing: .02em; color: var(--sign); }
@media (max-width: 960px) {
  .stay { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side"; min-height: 0; padding-top: 50svh; background: var(--sea); }
  .stay-side { max-width: 520px; }
  .stay-bg { bottom: auto; height: 62svh; }
  .stay-bg img { object-position: 59% 62%; }
}

/* tell the dock: the pump is the form */
.tell {
  background: var(--band);
  padding: var(--pad) var(--g);
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  grid-template-areas: "head pump" "contact pump" "reviews pump";
  grid-template-rows: auto auto 1fr;
  gap: 32px clamp(24px, 4vw, 64px);
  align-items: start;
}
.tell-head { grid-area: head; display: grid; gap: 16px; }
.tell-head h2 { color: var(--ink); }
.tell-head p { font-size: var(--s-lead); line-height: 1.4; }
.pump {
  grid-area: pump;
  background: var(--paper);
  padding: clamp(16px, 2.4vw, 32px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "face face" "also boat" "out out";
  gap: 28px;
}
.face { grid-area: face; display: grid; gap: 12px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.grades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.grade, .chip { position: relative; display: block; }
.grade input, .chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.grade span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 8px;
  background: var(--wall);
  font: 800 var(--s-lead)/1 var(--f-di);
  font-variation-settings: "opsz" 72;
  letter-spacing: .02em;
  text-transform: uppercase;
  transition: background-color .2s ease-out, color .2s ease-out;
}
.grade input:checked + span { color: #fff; }
.g-diesel input:checked + span { background: var(--sign); }
.g-gas input:checked + span { background: var(--pump); }
.g-none input:checked + span { background: var(--ink); }
.grade input:focus-visible + span, .chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.reading {
  background: var(--ink);
  color: #fff;
  padding: 16px 18px 12px;
  display: grid;
  justify-items: center;
  gap: 4px;
}
.wheels {
  display: flex;
  gap: .08em;
  font-family: var(--f-st);
  font-weight: 900;
  font-size: var(--s-display);
  line-height: 1;
  font-variation-settings: "opsz" 72;
  font-variant-numeric: tabular-nums;
}
.wheels .wheel { width: .62em; background: #0a0d18; }
.reading-label { font-size: var(--s-small); font-weight: 600; letter-spacing: .04em; color: #d9dcea; }
.gal-ctl { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.step {
  min-width: 64px;
  min-height: 48px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font: 700 var(--s-body)/1 var(--f-tx);
  cursor: pointer;
  transition: transform .14s ease-out, background-color .2s ease-out;
}
.step:hover { background: var(--sign); }
.step:active { transform: scale(.95); }
.step:disabled { opacity: .4; cursor: not-allowed; }
#gal { width: 100%; height: 44px; margin: 0; accent-color: var(--pump); cursor: pointer; }
#gal:disabled { cursor: not-allowed; }
.price { font-size: var(--s-small); color: var(--soft); }

.also { grid-area: also; display: flex; flex-wrap: wrap; gap: 8px; align-content: start; }
.also legend, .out-label {
  margin-bottom: 10px;
  padding: 0;
  font: 800 var(--s-lead)/1 var(--f-di);
  font-variation-settings: "opsz" 72;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  background: var(--wall);
  font-weight: 600;
  transition: background-color .2s ease-out, color .2s ease-out, transform .14s ease-out;
}
.chip input:checked + span { background: var(--sea); color: #fff; }
.chip:active span { transform: scale(.96); }

.boat { grid-area: boat; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; }
.field { display: grid; gap: 6px; font-size: var(--s-small); font-weight: 600; }
.field input, .field select {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: 400 var(--s-body)/1.2 var(--f-tx);
}
.f-name, .f-when, .boat-flags, .flags-hint, .warn { grid-column: 1 / -1; }
.boat-flags { display: flex; flex-wrap: wrap; gap: 0 3px; }
.boat-flags:empty { display: none; }
.boat-flags .flag { display: block; width: 40px; height: 45px; }
.boat-flags .gap { width: 14px; }
.flags-hint { font-size: var(--s-small); color: var(--soft); }
.warn { background: var(--fy); padding: 10px 12px; font-weight: 600; }

.out { grid-area: out; display: grid; gap: 12px; }
.msg { background: var(--wall); padding: 16px 18px; min-height: 6.2em; line-height: 1.5; }
.btn-send { width: 100%; min-height: 56px; font-size: var(--s-lead); }
.vhf { font-size: var(--s-small); color: var(--soft); }
.vhf q { color: var(--ink); font-weight: 600; }

.contact { grid-area: contact; display: grid; }
.c-row {
  display: grid;
  grid-template-columns: 5.6em minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  font-size: var(--s-lead);
  line-height: 1.3;
  text-decoration: none;
}
.c-row span { font-size: var(--s-small); font-weight: 600; }
a.c-row { transition: color .2s ease-out; }
a.c-row:hover { color: var(--sign); }
.reviews { grid-area: reviews; background: var(--paper); padding: 20px 22px 22px; display: grid; gap: 12px; justify-items: start; }
.reviews h3 { font: 800 var(--s-lead)/1 var(--f-di); letter-spacing: .02em; text-transform: uppercase; color: var(--sign); }

@media (max-width: 960px) {
  .tell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "pump" "contact" "reviews"; grid-template-rows: none; }
}
@media (max-width: 640px) {
  .pump { grid-template-columns: minmax(0, 1fr); grid-template-areas: "face" "also" "boat" "out"; }
  .step { min-width: 56px; }
}

/* footer: the name flies in flags */
.foot { background: var(--ink); color: #fff; padding: clamp(56px, 10vh, 120px) var(--g) 28px; }
.code {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 24px 16px;
}
.code li { display: grid; justify-items: start; gap: 2px; }
.code .flag { display: block; width: 100%; aspect-ratio: 1.2 / 1.3; height: auto; margin-bottom: 6px; }
.code b { font: 900 var(--s-lead)/1 var(--f-st); font-variation-settings: "opsz" 72; }
.code span { font-size: var(--s-small); color: #c9cede; }
.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(48px, 8vh, 96px);
}
.fh { font-weight: 600; margin-bottom: 6px; }
.foot-cols p:not(.fh) { color: #c9cede; line-height: 1.7; }
.foot-cols a { color: #fff; text-underline-offset: 3px; }
.legal { margin-top: 48px; max-width: 30em; font-size: var(--s-small); color: #c9cede; }
.msg, .vhf, .price, .flags-hint, .in-head p, .tell-head p, .reviews p, .stay-main p { max-width: 30em; }
@media (max-width: 760px) {
  .code { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .foot-cols { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .points li::before { animation: none; }
  .btn, .btn::before, .step, .chip span { transition: none; }
}
