/* ==========================================================================
   Components
   Square corners throughout. The one exception in the system is the driver
   avatar, which is deliberately circular — see .driver__avatar.
   ========================================================================== */

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: var(--s-3) var(--s-5);
  font-family: var(--font-sans);
  font-size: var(--t-small);
  font-weight: 700;
  letter-spacing: var(--ls-button);
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}

.btn--primary { background: var(--indigo); color: var(--salt-paper); }
.btn--primary:hover { background: var(--indigo-deep); color: var(--salt-paper); }

.btn--secondary {
  background: transparent;
  color: var(--indigo);
  border: 1px solid var(--indigo);
}
.btn--secondary:hover { background: var(--indigo); color: var(--salt-paper); }

/* Brass carries white text at 3.6:1 — large/bold UI text only, which this is. */
.btn--whatsapp { background: var(--brass); color: #FFFFFF; }
.btn--whatsapp:hover { background: #8E672F; color: #FFFFFF; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* --- Header / nav -------------------------------------------------------- */

.site-header {
  background: var(--indigo);
  padding-top: var(--safe-top);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  min-height: 68px;
  padding-block: var(--s-3);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 21px;
  color: var(--salt);
  text-decoration: none;
  letter-spacing: var(--ls-display);
  line-height: 1;
}
.wordmark:hover { color: var(--salt); }

/* The owners' logo, drawn in their own gold. The brass rule is about fills; this is a
   mark, and it is the only place the logo's gold appears. Sized by height so the
   tagline stays a readable line rather than a smudge. */
.wordmark { display: inline-flex; align-items: center; }
.wordmark img { display: block; height: 44px; width: auto; }
@media (max-width: 420px) {
  .wordmark img { height: 36px; }
}

.site-menu { display: flex; align-items: center; gap: var(--s-5); }

.site-nav { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); align-items: center; }
.site-nav a {
  color: #B9C7D5;
  text-decoration: none;
  font-size: var(--t-body);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--brass-light); }

/* The languages sit apart from the pages: they are a different kind of choice, and running
   them together made a ten-item row where seven were pages and three were not. */
.site-langs { display: flex; gap: var(--s-3); align-items: center; }
.site-langs a {
  color: #8FA3B6;
  text-decoration: none;
  font-size: var(--t-small);
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
}
.site-langs a:hover { color: var(--brass-light); }

/* --- The menu button ----------------------------------------------------- */

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--tap-min);
  padding: var(--s-2) var(--s-3);
  margin-inline-start: auto;
  background: transparent;
  border: 1px solid rgba(185, 199, 213, 0.35);
  color: var(--salt);
  font: inherit;
  font-size: var(--t-small);
  letter-spacing: 0.04em;
  cursor: pointer;
}
.menu-toggle[hidden] { display: none; }
.menu-toggle:hover { border-color: var(--brass-light); color: var(--brass-light); }

/* Three bars drawn from one element: a border pair plus the box's own edge. Cheaper than
   an SVG and it inherits the button's colour on hover without a second rule. */
.menu-toggle__bars {
  width: 18px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  position: relative;
}
.menu-toggle__bars::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: currentColor;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { border-color: var(--brass-light); }

/* --- Narrow layout ------------------------------------------------------- */

/* 860px, not 720: seven nav items plus three languages ran out of room well before the
   old breakpoint and wrapped into a three-line header that pushed the page down. */
@media (max-width: 860px) {
  .site-header__inner { flex-wrap: wrap; gap: var(--s-3); }

  /* Collapsed by default on narrow screens — but only once nav.js has confirmed the button
     is there to reopen it. Until then the panel stays laid out below, which is what a
     reader without JavaScript keeps. */
  .site-menu {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-bottom: var(--s-3);
  }
  .site-menu.is-open { display: flex; }

  /* JS absent: the button never un-hides, so the panel is shown instead of hidden. */
  .menu-toggle[hidden]:not([data-replaced]) ~ .site-menu { display: flex; }

  .site-nav,
  .site-langs { flex-direction: column; align-items: stretch; gap: 0; }

  /* Full-width rows with a rule between them: a tap target the width of the screen, rather
     than a word floating in a line of other words. */
  .site-nav a,
  .site-langs a {
    padding-block: var(--s-3);
    border-top: 1px solid rgba(185, 199, 213, 0.16);
    font-size: var(--t-body);
  }

  .site-langs { margin-top: var(--s-2); }
  .site-langs a { color: var(--brass-light); }
}

/* --- Phone tab bar ------------------------------------------------------ */

/* Request, chat, WhatsApp and the menu, fixed to the bottom of a phone screen where a thumb
   reaches them. Wide screens never see it: the header menu and the chat bubble do the job. */
:root { --tabbar-h: 60px; }

.tabbar { display: none; }

@media (max-width: 860px) {
  .tabbar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 44;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    min-height: var(--tabbar-h);
    padding-bottom: var(--safe-bottom);
    background: var(--indigo);
    border-top: 2px solid var(--brass);
  }

  .tabbar__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: var(--tabbar-h);
    padding: 6px 4px;
    background: none;
    border: 0;
    color: #B9C7D5;
    font: 600 11.5px/1.1 var(--font-sans);
    letter-spacing: 0.04em;
    text-decoration: none;
    cursor: pointer;
  }
  .tabbar__item[hidden] { display: none; }
  .tabbar__item svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
  .tabbar__item:hover,
  .tabbar__item[aria-current="page"],
  .tabbar__item[aria-expanded="true"] { color: var(--brass-light); }

  .tabbar__dot { position: absolute; top: 8px; left: calc(50% + 8px); width: 10px; height: 10px; background: var(--brass-light); border: 2px solid var(--indigo); }
  .tabbar__dot[hidden] { display: none; }

  /* Room at the end of every page, so the bar never sits over the footer's last line. */
  body.has-tabbar { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom)); }

  /* The menu moves to the bar: the header keeps only the logo, and the menu opens as a
     panel rising from just above the bar. */
  body.has-tabbar .site-menu.is-open {
    position: fixed;
    inset: auto 0 calc(var(--tabbar-h) + var(--safe-bottom)) 0;
    z-index: 43;
    max-height: calc(100dvh - var(--tabbar-h) - var(--safe-bottom) - 56px);
    overflow-y: auto;
    padding: var(--s-2) var(--s-4) var(--s-4);
    background: var(--indigo);
    border-top: 2px solid var(--brass);
    box-shadow: 0 -12px 32px rgba(13, 25, 41, 0.35);
  }
  /* Full-width rows like the pages above them; the header's later .site-langs rule would
     otherwise centre them. */
  body.has-tabbar .site-langs { align-items: stretch; }

  /* The cookie question sits above the bar rather than over it. */
  body.has-tabbar .consent { bottom: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: var(--s-4); }
}

@media print { .tabbar { display: none; } }

/* --- Hero ---------------------------------------------------------------- */

.hero {
  background: var(--indigo);
  color: var(--on-indigo);
  padding-block: clamp(var(--s-7), 9vw, var(--s-9));
  position: relative;
}
/* The brass rule stops at 22% — a hairline accent, never a band. */
.hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--brass) 0%, var(--brass) 22%, transparent 22%);
}
.hero h1 { color: var(--salt); }
.hero .lede { color: #C4D0DC; }

/* --- Cards --------------------------------------------------------------- */

.card {
  background: var(--salt-paper);
  border: 1px solid var(--line);
  padding: var(--s-5);
}

.price-card {
  background: var(--indigo);
  color: var(--on-indigo);
  padding: var(--s-5) var(--s-5) var(--s-6);
}
.price-card__name {
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1.12;
  margin: var(--s-2) 0 var(--s-1);
  color: var(--salt);
}
.price-card__sub { font-size: 12.5px; color: var(--on-indigo-muted); margin-bottom: var(--s-4); }
.price-card__price {
  font-family: var(--font-display);
  font-size: 34px;
  color: var(--brass-light);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.price-card__note { font-size: 11.5px; color: var(--on-indigo-muted); margin-top: var(--s-1); }

/* --- Driver -------------------------------------------------------------- */

.driver { display: flex; gap: var(--s-4); align-items: flex-start; }

/* The single sanctioned exception to the square-corner rule. Driver portraits
   are circular by explicit brand decision; nothing else in the system rounds. */
.driver__avatar {
  width: 60px; height: 60px; flex: 0 0 60px;
  border-radius: 50%; /* sanctioned: the one rounded element in the system */
  object-fit: cover;
  background: var(--indigo-mid);
  color: var(--brass-light);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 23px;
}

.driver__name { font-family: var(--font-display); font-size: 21px; color: var(--indigo); line-height: 1.15; }
.driver__role { font-size: 12.5px; color: var(--brass); font-weight: 600; margin-top: 2px; }
.driver__bio  { font-size: var(--t-small); color: var(--ink-muted); margin-top: var(--s-2); }

/* --- WhatsApp panel — the only place sage appears ------------------------ */

.wa-panel {
  background: #F2F6EE;
  border: 1px solid #D3DECB;
  padding: var(--s-4);
  font-size: 13.5px;
  line-height: 1.55;
  color: #26331F;
}
.wa-panel__label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--sage); margin-bottom: var(--s-2);
}

/* --- Forms --------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field label { font-size: var(--t-small); font-weight: 600; color: var(--ink); }

.field input, .field select, .field textarea {
  /* 16px minimum or Safari zooms the viewport on focus. */
  font-size: 16px;
  font-family: var(--font-sans);
  min-height: var(--tap-min);
  padding: var(--s-3);
  border: 1px solid var(--line);
  background: var(--salt-paper);
  color: var(--ink);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--indigo);
  outline: 2px solid var(--brass);
  outline-offset: 1px;
}

/* --- Footer -------------------------------------------------------------- */

.site-footer {
  background: var(--indigo-deep);
  color: #7E93A8;
  padding-block: var(--s-6);
  padding-bottom: calc(var(--s-6) + var(--safe-bottom));
  font-size: 12px;
  letter-spacing: 0.04em;
  margin-top: var(--s-8);
}
.site-footer a { color: #B9C7D5; text-decoration: none; }
.site-footer a:hover { color: var(--brass-light); }
.site-footer strong { color: var(--brass-light); font-weight: 600; }

/* Sixty pages need somewhere to live. auto-fit rather than a fixed column count so the
   groups reflow on a phone instead of being squeezed into unreadable columns. */
.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--s-5) var(--s-6);
  margin-bottom: var(--s-6);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid rgba(185, 199, 213, 0.18);
}

.site-footer__heading {
  color: var(--brass-light);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 var(--s-2);
  max-width: none;
}

.site-footer__group ul { list-style: none; margin: 0; padding: 0; }

/* Generous tap targets: this is the navigation on a phone, on a ship's wifi, in a hurry. */
.site-footer__group a {
  display: block;
  padding-block: 7px;
  line-height: 1.3;
}

/* The six port routes on the homepage. A list rather than cards: the reader is scanning
   for a destination and a drive time, and cards would make six of them into a wall. */
.portlist { list-style: none; margin: var(--s-5) 0 0; padding: 0; max-width: var(--measure-sans); }

.portlist__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--s-3);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line);
}

.portlist__link {
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
  color: var(--indigo);
  font-weight: 600;
  text-decoration: none;
}

.portlist__link:hover { color: var(--brass); }

.portlist__meta { color: var(--ink-muted); font-size: var(--fs-sm); }

/* Language links in the header. Deliberately quieter than the primary nav — a reader who
   wants them is looking for them; everyone else should not have three extra shouts. */
.site-langs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-3);
  align-items: center;
}

.site-langs a {
  color: #8FA3B6;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
}

.site-langs a:hover { color: var(--brass-light); }

@media (max-width: 720px) {
  .site-langs { gap: 0 var(--s-3); }
}

/* --- Cookie banner ------------------------------------------------------- */

/* Fixed to the foot of the screen and never over the page's own call to action for long:
   one sentence, two buttons. Accept and Decline carry the same weight on purpose — a no
   has to be as easy to give as a yes. */
.consent {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 50;
  background: var(--salt-paper);
  border-top: 2px solid var(--brass);
  box-shadow: 0 -6px 24px rgba(13, 25, 41, 0.14);
  padding-block: var(--s-4);
  padding-bottom: calc(var(--s-4) + var(--safe-bottom));
}
.consent[hidden] { display: none; }

.consent__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3) var(--s-5);
}

.consent__text {
  margin: 0;
  flex: 1 1 36ch;
  font-size: var(--t-small);
  color: var(--ink);
}
.consent__text a { color: var(--indigo); }

.consent__actions { flex: 0 0 auto; }

/* Looks like the footer's links, behaves like the button it is. */
.site-footer__link-button {
  background: none;
  border: none;
  padding: 7px 0;
  font: inherit;
  letter-spacing: inherit;
  color: #B9C7D5;
  cursor: pointer;
}
.site-footer__link-button:hover { color: var(--brass-light); }

/* --- Local copy running on the live database ------------------------------ */

/* Deliberately loud and outside the palette: it must never be mistaken for part of the
   design, or ignored as the site's own colour. Only ever rendered on a developer's
   machine in LocalLive mode. */
.local-live {
  position: sticky; top: 0; z-index: 90;
  padding: calc(6px + var(--safe-top)) var(--s-4) 6px;
  background: #B3261E; color: #fff;
  font-size: 13px; line-height: 1.4; text-align: center;
}
.local-live strong { text-transform: uppercase; letter-spacing: 0.08em; }
