/* ==========================================================================
   Cuckmere Travel — single page, one file, no frameworks
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --sea-900: #0a2a35;
  --sea-700: #0f4c5c;
  --sea-500: #14707f;
  --sand-100: #faf7f2;
  --sand-200: #ece4d8;
  --ink: #16232a;
  --ink-soft: #4a5c66;
  --amber: #d98324;
  --white: #ffffff;

  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.1875rem, 1.1rem + 0.45vw, 1.4375rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3: clamp(2rem, 1.55rem + 2.2vw, 3.25rem);

  --wrap: 68rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-y: clamp(3rem, 9vw, 6rem);

  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(10, 42, 53, 0.05), 0 4px 14px rgba(10, 42, 53, 0.06);
  --shadow-md: 0 14px 38px rgba(10, 42, 53, 0.16);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Keeps anchor targets clear of the floating header. */
  scroll-padding-top: 7.5rem;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  margin: 0 0 0.5em;
  line-height: 1.15;
  color: var(--sea-900);
  text-wrap: balance;
}
h1 { font-size: var(--step-3); letter-spacing: -0.025em; }
h2 { font-size: var(--step-2); letter-spacing: -0.015em; }
h3 { font-size: var(--step-1); }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--sea-700); }
a:hover { color: var(--sea-500); }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.wrap {
  width: min(calc(100% - (2 * var(--gutter))), var(--wrap));
  margin-inline: auto;
}

.prose { max-width: 44rem; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: 0;
  left: -9999px;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--sea-900);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: var(--white); }

/* ==========================================================================
   FLOATING HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sand-200);
}

.header-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand call"
    "nav   nav";
  align-items: center;
  gap: 0.55rem 1rem;
  padding-block: 0.7rem;
}

/* --- Brand --- */
.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--sea-500), var(--sea-900));
  color: var(--white);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.05em;
}

.brand-text { display: flex; flex-direction: column; min-width: 0; }

.brand-name {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--sea-900);
}

.brand-tag {
  font-size: 0.8125rem;
  line-height: 1.3;
  color: var(--ink-soft);
}

/* --- Nav --- */
.site-nav {
  grid-area: nav;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }

.site-nav ul {
  display: flex;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  white-space: nowrap;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--sea-700);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  background: var(--sand-200);
  color: var(--sea-900);
}

.site-nav a[aria-current] {
  background: var(--sea-900);
  color: var(--white);
}

/* --- Call button --- */
.call-btn {
  grid-area: call;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--sea-900);
  color: var(--white);
  text-decoration: none;
  line-height: 1.15;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.call-btn:hover,
.call-btn:focus-visible { background: var(--sea-700); color: var(--white); }
.call-btn:active { transform: scale(0.97); }

.call-btn-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.75;
}
.call-btn-number { font-size: 0.9375rem; font-weight: 700; }

/* --- Header on wider screens: single row --- */
@media (min-width: 48rem) {
  html { scroll-padding-top: 5.5rem; }

  .header-bar {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav call";
    gap: 1.5rem;
  }

  .site-nav {
    margin-inline: 0;
    padding-inline: 0;
    justify-self: center;
    overflow: visible;
  }
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section { padding-block: var(--section-y); }

/* --- 1. Intro --- */
.intro {
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(20, 112, 127, 0.10), transparent 62%),
    linear-gradient(180deg, var(--white), var(--sand-100));
  border-bottom: 1px solid var(--sand-200);
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sea-500);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
}

/* DBS note */
.note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 2rem;
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-left: 4px solid var(--amber);
  box-shadow: var(--shadow-sm);
  font-weight: 500;
  color: var(--sea-900);
}

.note-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
}

/* ---------- Intro photo ---------- */
.intro-figure {
  margin: 2rem 0;
}

.intro-photo {
  display: block;
  width: 100%;
  height: auto;

  /* Shape: a wide rounded rectangle that crops rather than distorts. */
  aspect-ratio: 16 / 10;
  object-fit: cover;

  /* Scales with the text: 22em grows as the fluid font size grows. */
  max-height: 22em;

  /* Rounded corners that scale with the viewport. */
  border-radius: clamp(14px, 3vw, 28px);

  /* Soft fallback colour while the image loads. */
  background: linear-gradient(160deg, #cfe3ea, #ece4d8);
  box-shadow: var(--shadow-md);
}

/* --- 2. Tariffs --- */
.tariffs { background: var(--white); }

.section-intro {
  max-width: 42rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

.fares {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.fares thead th {
  padding: 0.75rem 1rem;
  background: var(--sea-900);
  color: var(--white);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: left;
}

.fares thead th:first-child { border-radius: var(--radius) 0 0 0; }
.fares thead th:not(:first-child) { text-align: right; }
.fares thead th:last-child { border-radius: 0 var(--radius) 0 0; }

.fares tbody tr { border-bottom: 1px solid var(--sand-200); }
.fares tbody tr:last-child { border-bottom: none; }

.fares td {
  padding: 0.95rem 1rem;
  vertical-align: baseline;
}

.fares tbody td:not(:first-child) {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--sea-900);
}

.fine-print {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

/* Stacked cards on narrow screens */
@media (max-width: 34rem) {
  .fares,
  .fares tbody,
  .fares tr,
  .fares td { display: block; width: 100%; }

  .fares thead {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .fares tbody tr {
    border: 1px solid var(--sand-200);
    border-radius: var(--radius);
    background: var(--sand-100);
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.75rem;
    padding: 0.35rem 0;
  }
  .fares tbody tr:last-child { margin-bottom: 0; }

  .fares td { padding: 0.35rem 1.1rem; }

  .fares td:first-child {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--sea-900);
    padding-top: 0.75rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--sand-200);
    margin-bottom: 0.4rem;
  }

  .fares td[data-label] {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    text-align: right;
    padding-bottom: 0.75rem;
  }

  .fares td[data-label]::before {
    content: attr(data-label);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-soft);
  }
}

/* --- 3. Contact --- */
.contact {
  background: var(--sea-900);
  color: var(--white);
}
.contact h2 { color: var(--white); }
.contact .section-intro { color: #a9c6d1; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.contact-card:hover,
.contact-card:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

.contact-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8fb8c6;
}

.contact-value {
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
}
.contact-value--email { overflow-wrap: anywhere; font-size: 1.0625rem; }

/* --- 4. Footer --- */
.site-footer {
  background: #061c24;
  color: #9db6c0;
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  padding-block: 1.5rem;
}

.copyright { margin: 0; }
.to-top { margin: 0; }

.to-top a { color: #9db6c0; text-decoration: none; }
.to-top a:hover { color: var(--white); text-decoration: underline; }

/* ==========================================================================
   SMALL SCREENS
   ========================================================================== */
@media (max-width: 30rem) {
  .brand-tag { display: none; }
  .call-btn-label { display: none; }
  .call-btn { padding: 0.65rem 1rem; }
}

/* ==========================================================================
   PRINT
   ========================================================================== */
@media print {
  .site-header,
  .site-footer,
  .skip-link { display: none; }

  html { scroll-padding-top: 0; }
  body { background: #fff; color: #000; font-size: 11pt; }

  .section { padding-block: 1rem; break-inside: avoid; }
  .intro { background: none; border: none; }
  .contact { background: none; color: #000; }
  .contact h2,
  .contact .section-intro,
  .contact-label,
  .contact-value { color: #000; }
  .contact-card { border: 1px solid #999; background: none; }
  .fares thead th { background: #eee; color: #000; }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .contact-card:hover { transform: none; }
}