/* ==========================================================================
   Surf Blue — styles
   Mobile first. Palette + type scale live in :root custom properties.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand palette (exact) */
  --steel: #3D6F97;
  --sand: #E7DFD2;
  --white: #FFFFFF;
  --navy: #1E2A38;

  /* Derived tones */
  --steel-deep: #335E80;
  --ink-soft: rgba(30, 42, 56, 0.74);
  --ink-faint: rgba(30, 42, 56, 0.5);
  --on-dark-soft: rgba(255, 255, 255, 0.76);
  --on-dark-faint: rgba(255, 255, 255, 0.56);
  --rule-dark: rgba(30, 42, 56, 0.16);
  --rule-light: rgba(255, 255, 255, 0.18);

  /* Type: two families only. Montserrat (closest match to the logo wordmark)
     for everything; Newsreader italic as a sparing accent. */
  --font-sans: "Montserrat", system-ui, sans-serif;
  --font-serif: "Newsreader", serif;

  --step--2: 0.6875rem;
  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
  --step-4: clamp(2.6rem, 1.7rem + 3.8vw, 4.75rem);

  --track-wide: 0.22em;
  --track-xwide: 0.3em;

  /* Layout */
  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --header-h: 64px;
  --catbar-h: 50px;
  --radius: 2px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --focus: var(--steel);
}

@media (min-width: 900px) {
  :root { --header-h: 80px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

a { color: inherit; }

[id] { scroll-margin-top: var(--header-h); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

::selection { background: var(--steel); color: var(--white); }

main:focus { outline: none; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--white);
  color: var(--navy);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

/* Section themes */
.theme-navy { background: var(--navy); color: var(--white); --focus: var(--sand); }

/* ---------- Icons ---------- */
.icon {
  width: 48px;
  height: 48px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm { width: 18px; height: 18px; stroke-width: 1.6; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 400;
  font-size: var(--step--2);
  letter-spacing: var(--track-xwide);
  text-transform: uppercase;
}
.eyebrow--rule::before {
  content: "";
  width: 2.25rem;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3.125rem;
  padding: 0.95rem 1.6rem;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--step--2);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  color: var(--white);
  background: var(--steel);
  border: 1px solid var(--steel);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.btn:hover { background: var(--steel-deep); border-color: var(--steel-deep); }

/* Light outline, for dark backgrounds */
.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}
.btn--ghost:hover { background: var(--white); border-color: var(--white); color: var(--navy); }

/* Solid white, for dark backgrounds */
.btn--light {
  background: var(--white);
  border-color: var(--white);
  color: var(--navy);
}
.btn--light:hover { background: var(--sand); border-color: var(--sand); color: var(--navy); }

.btn--sm { min-height: 2.5rem; padding: 0.7rem 1.1rem; }

/* ==========================================================================
   Header
   ========================================================================== */
.announcement {
  background: var(--steel);
  color: var(--white);
  font-size: var(--step--1);
  letter-spacing: 0.03em;
  text-align: center;
  padding: 0.55rem var(--gutter);
  line-height: 1.4;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  color: var(--white);
  --focus: var(--sand);
  transition: box-shadow 0.3s;
}
.site-header.is-stuck { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.6); }

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--rule-light);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius);
}
/* Official logo: size by height only so it always keeps its proportions */
.brand svg { height: 36px; width: auto; }

/* "Download menu (PDF)": on narrow screens the word "Download" is visually
   hidden (the icon stands in for it) but still read out by screen readers */
.header-cta { flex: none; }

@media (max-width: 479px) {
  .header-cta { padding-inline: 0.85rem; letter-spacing: 0.14em; }
  .header-cta__verb {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (min-width: 900px) {
  .brand svg { height: 44px; }
}

/* ==========================================================================
   Our Story — sky-to-sea gradient, soft sun, drifting wave bands
   ========================================================================== */
.story {
  --wave-h: clamp(110px, 14vw, 200px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(4rem, 10vw, 7.5rem) calc(var(--wave-h) + clamp(2.5rem, 5vw, 4rem));
  color: var(--white);
  --focus: var(--sand);
  /* The pale horizon tones only start at the wave line, so the copy above
     always sits on navy → steel blue */
  background: linear-gradient(180deg,
    var(--navy) 0%,
    #22354A 30%,
    #2C5070 60%,
    var(--steel) calc(100% - var(--wave-h)),
    #7FA6BF calc(100% - var(--wave-h) * 0.45),
    #C8DAE0 100%);
}

.story .eyebrow { color: var(--sand); }
.story__title {
  margin-top: clamp(1rem, 2.5vw, 1.5rem);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: var(--step-4);
  line-height: 1.02;
  letter-spacing: -0.015em;
}
.story__text {
  max-width: 34rem;
  margin-top: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 300;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
}
.story__actions { margin-top: clamp(1.75rem, 4vw, 2.5rem); }
.story__facts {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  font-size: var(--step--1);
  color: rgba(255, 255, 255, 0.85);
}

/* Faint low sun sitting on the horizon; JS sinks it slightly as you scroll */
.story__sun {
  position: absolute;
  z-index: -1;
  right: 6%;
  bottom: calc(var(--wave-h) * 0.35);
  width: clamp(150px, 24vw, 340px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(231, 223, 210, 0.5) 0,
    rgba(231, 223, 210, 0.38) 28%,
    rgba(231, 223, 210, 0.12) 44%,
    rgba(231, 223, 210, 0) 70%);
  transform: translate3d(0, calc(var(--story-shift, 0px) * 0.3), 0);
  pointer-events: none;
}

.story__waves {
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--wave-h);
  pointer-events: none;
}
.story__wave {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  max-width: none;
  animation: story-drift 40s linear infinite;
}
/* Back to front: open sea → mid sea → foam → sand shoreline → white (the menu) */
.story__wave--1 { height: 100%; fill: rgba(255, 255, 255, 0.1); animation-duration: 56s; }
.story__wave--2 { height: 84%; fill: rgba(61, 111, 151, 0.6); animation-duration: 42s; animation-direction: reverse; }
.story__wave--3 { height: 64%; fill: rgba(255, 255, 255, 0.22); animation-duration: 32s; animation-delay: -12s; }
.story__wave--4 { height: 42%; fill: var(--sand); animation-duration: 48s; animation-delay: -20s; }
.story__wave--5 { height: 22%; fill: var(--white); animation-duration: 64s; animation-direction: reverse; }

@keyframes story-drift {
  to { transform: translate3d(-50%, 0, 0); }
}

@media (min-width: 900px) {
  .story__sun { right: 12%; }
}

/* ==========================================================================
   Menu
   ========================================================================== */
.catbar {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--rule-dark);
}
@supports (backdrop-filter: blur(8px)) {
  .catbar { background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(10px); }
}
.catbar ul {
  position: relative;
  display: flex;
  gap: 0.25rem;
  height: var(--catbar-h);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.catbar ul::-webkit-scrollbar { display: none; }
.catbar li { flex: none; display: flex; }
.catbar a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 0.85rem;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.25s;
}
.catbar li:first-child a { padding-left: 0; }
.catbar a::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: -1px;
  height: 2px;
  background: var(--steel);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.catbar li:first-child a::after { left: 0; }
.catbar a:hover { color: var(--navy); }
.catbar a[aria-current="true"] { color: var(--steel); }
.catbar a[aria-current="true"]::after { transform: scaleX(1); }
.catbar a:focus-visible { outline-offset: -4px; }

@media (min-width: 900px) {
  /* auto margins centre the links but stay scrollable if they overflow */
  .catbar ul { gap: 0.5rem; }
  .catbar li:first-child { margin-left: auto; }
  .catbar li:last-child { margin-right: auto; }
  .catbar li:first-child a { padding-left: 0.85rem; }
  .catbar li:first-child a::after { left: 0.85rem; }
}

.menu-cat {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  scroll-margin-top: calc(var(--header-h) + var(--catbar-h) - 1px);
}
.menu-cat:nth-of-type(even) { background: var(--sand); }

.menu-cat__grid {
  display: grid;
  gap: 2rem;
}
/* The one rule per category: under the heading block */
.menu-cat__head {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule-dark);
}
.menu-cat__head .icon { color: var(--steel); margin-bottom: 1.5rem; }
.menu-cat__title {
  font-weight: 300;
  font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: var(--track-xwide);
  text-transform: uppercase;
}
.menu-cat__intro {
  margin-top: 0.75rem;
  max-width: 24rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ink-faint);
}

.menu-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu-item { padding-block: 0.7rem; }
.menu-item__row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.menu-item__name {
  font-weight: 400;
  font-size: var(--step-1);
  line-height: 1.35;
  letter-spacing: 0.02em;
}
.menu-item__price {
  flex: none;
  margin-left: auto;
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}
.menu-item__price small {
  margin-right: 0.3em;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}
.menu-item__desc {
  margin-top: 0.2rem;
  max-width: 40rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ink-faint);
}

/* Small variant note beside a name, e.g. "hot / iced" */
.menu-item__variant {
  flex: none;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

/* Sub-groups (Smoothies, Pizza, Crepes, Pudding): Steel Blue label, items indented */
.menu-group { padding-block: 1.5rem 0.5rem; }
.menu-group__title {
  font-weight: 500;
  font-size: var(--step--1);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--steel);
}
.menu-group .menu-list {
  margin-top: 0.35rem;
  padding-left: clamp(1rem, 3vw, 2rem);
}
.menu-group .menu-item { padding-block: 0.5rem; }
.menu-group .menu-item__name { font-size: var(--step-0); }
.menu-group__note {
  padding: 0.25rem 0 0.5rem clamp(1rem, 3vw, 2rem);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

@media (min-width: 900px) {
  .menu-cat__grid { grid-template-columns: 0.75fr 1.25fr; gap: 5rem; }
  .menu-cat__head {
    position: sticky;
    top: calc(var(--header-h) + var(--catbar-h) + 2.5rem);
    align-self: start;
  }
}

/* Quiet closing line under the last category */
.menu-fineprint {
  padding-block: 2.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--ink-faint);
}
.menu-fineprint a {
  margin-left: 0.5rem;
  color: var(--steel);
  white-space: nowrap;
  text-underline-offset: 0.25em;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding-top: clamp(2.75rem, 6vw, 4rem);
  padding-bottom: 1.5rem;
}
.footer__top {
  display: grid;
  gap: 2.25rem;
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--rule-light);
}
/* Official logo: size by height only so it always keeps its proportions */
.footer__brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-self: start;
  width: max-content;
}
.footer__brand svg { height: 96px; width: auto; display: block; }
.footer__tagline {
  margin-top: 1rem;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: var(--step-2);
  color: var(--sand);
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem 1.5rem;
}
.footer__col h2 {
  margin-bottom: 0.75rem;
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--on-dark-faint);
}
.footer__col p,
.footer__col address { font-style: normal; font-size: 0.95rem; color: var(--on-dark-soft); }
.footer__col ul { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.footer__col a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--white);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 100% 100%;
  background-size: 0% 1px;
  transition: background-size 0.4s var(--ease);
}
.footer__col a:hover { background-size: 100% 1px; background-position: 0 100%; }

.footer__bottom {
  padding-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--on-dark-faint);
}

@media (min-width: 900px) {
  .footer__top { grid-template-columns: 1fr 1.4fr; gap: 4rem; align-items: center; }
  .footer__cols { grid-template-columns: repeat(3, 1fr); }
  .footer__brand svg { height: 128px; }
}

/* ==========================================================================
   Motion
   ========================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .story__wave { animation: none; }
  .story__sun { transform: none; }
}
