/* Harbor Test Cafe: standard design. Harbor teal + toasted crema on sea-fog paper. */
:root {
  --paper: #edf0ec;
  --surface: #f8f8f4;
  --ink: #221a16;
  --ink-soft: #544c46;
  --line: #c9cec8;
  --harbor: #1d4b50;
  --harbor-ink: #f6f4ef;
  --crema: #94561c;
  --band: #1d4b50;
  --band-ink: #eef2ef;
  --focus: #b4651f;

  --font-display: "Young Serif", Georgia, "Times New Roman", serif;
  --font-text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 74rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --space: clamp(4rem, 9vw, 7.5rem);
  --radius: 6px;

  --chatbot-color: var(--harbor);
  --chatbot-on-color: var(--harbor-ink);
  --chatbot-background: var(--paper);
  --chatbot-surface: var(--surface);
  --chatbot-text: var(--ink);
  --chatbot-font: var(--font-text);
  --chatbot-radius: 10px;

  color-scheme: light;
}

html[data-theme="dark"] {
  --paper: #131a1b;
  --surface: #1b2425;
  --ink: #ece6dd;
  --ink-soft: #b3aca3;
  --line: #34403f;
  --harbor: #8fc6c4;
  --harbor-ink: #0f1819;
  --crema: #e2a768;
  --band: #20393b;
  --band-ink: #ece6dd;
  --focus: #e2a768;
  color-scheme: dark;
}

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

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  scrollbar-color: var(--harbor) var(--paper);
  scrollbar-width: thin;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--harbor); border: 3px solid var(--paper); border-radius: 999px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; max-width: 62ch; }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
#main:focus { outline: none; }

.sr-only, .hp {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--harbor); color: var(--harbor-ink); padding: .75rem 1rem; border-radius: var(--radius);
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--space); }
.lead { font-size: clamp(1.15rem, 1.8vw, 1.3rem); line-height: 1.55; color: var(--ink); }

/* Buttons and links */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .7rem 1.4rem;
  font: 600 1rem/1.2 var(--font-text); text-decoration: none;
  border-radius: var(--radius); border: 2px solid var(--harbor);
  cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn--primary { background: var(--harbor); color: var(--harbor-ink); }
.btn--primary:hover { background: transparent; color: var(--harbor); }
.btn--ghost { background: transparent; color: var(--harbor); }
.btn--ghost:hover { background: var(--harbor); color: var(--harbor-ink); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:disabled:hover { background: var(--harbor); color: var(--harbor-ink); }

.text-link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 600; color: var(--harbor);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .3em;
  text-decoration-color: color-mix(in srgb, var(--harbor) 35%, transparent);
  transition: text-decoration-color .2s ease;
}
.text-link:hover { text-decoration-color: var(--harbor); }

/* Header */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background-color .25s ease;
}
@supports (backdrop-filter: blur(2px)) { .masthead { backdrop-filter: saturate(1.2) blur(8px); } }
.masthead.is-compact { border-bottom-color: var(--line); }
.masthead__inner {
  width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 5rem; transition: min-height .25s ease;
}
.masthead.is-compact .masthead__inner { min-height: 3.75rem; }

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; min-height: 44px; }
.brand__mark {
  width: 1.6rem; height: 1.6rem; border-radius: 50%; flex: none;
  background: linear-gradient(to bottom, var(--crema) 0 50%, var(--harbor) 50% 100%);
}
.brand__name { font-family: var(--font-display); font-size: 1.2rem; line-height: 1; }

.nav-desktop { display: none; }
.nav-desktop ul, .nav-mobile ul { list-style: none; margin: 0; padding: 0; }
.nav-desktop ul { display: flex; gap: .25rem; }
.nav-desktop a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 .85rem;
  text-decoration: none; font-weight: 500; border-radius: var(--radius); color: var(--ink-soft);
  transition: color .2s ease, background-color .2s ease;
}
.nav-desktop a:hover { color: var(--ink); background: color-mix(in srgb, var(--harbor) 9%, transparent); }
.nav-desktop a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--crema); border-radius: 0; }

.masthead__tools { display: flex; align-items: center; gap: .4rem; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
  transition: border-color .2s ease;
}
.icon-btn:hover { border-color: var(--ink-soft); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-moon { display: none; }
html[data-theme="dark"] .icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: block; }

.menu-btn__bars { display: grid; gap: 5px; width: 18px; }
.menu-btn__bars span { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s ease; }
.menu-btn[aria-expanded="true"] .menu-btn__bars span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.nav-mobile { border-top: 1px solid var(--line); background: var(--paper); }
.nav-mobile[hidden] { display: none; }
.nav-mobile ul { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; padding-block: .5rem 1.25rem; }
.nav-mobile a {
  display: flex; align-items: center; min-height: 52px; text-decoration: none;
  font-family: var(--font-display); font-size: 1.45rem; border-bottom: 1px solid var(--line);
}
.nav-mobile a[aria-current="page"] { color: var(--crema); }

@media (min-width: 52rem) {
  .nav-desktop { display: block; }
  .menu-btn { display: none; }
  .nav-mobile, .nav-mobile:not([hidden]) { display: none; }
}

/* Figures */
.photo, .hero__figure { margin: 0; position: relative; background: color-mix(in srgb, var(--harbor) 12%, var(--surface)); }
.photo img, .hero__figure img { width: 100%; height: 100%; object-fit: cover; }
.photo { aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden; }
.photo--tall { aspect-ratio: 4 / 5; }
.photo--portrait { aspect-ratio: 4 / 5; }
.photo--portrait img { object-position: 30% 50%; }
.photo--band { aspect-ratio: 21 / 9; }
figcaption {
  position: absolute; left: .75rem; bottom: .75rem;
  font-size: .8rem; font-weight: 500; line-height: 1;
  padding: .45rem .6rem; border-radius: 4px;
  background: rgba(20, 20, 18, .72); color: #f4f1ec;
}
.is-missing { display: none; }

/* Home hero */
.hero { padding-top: clamp(2rem, 6vw, 4.5rem); }
.hero__text { display: grid; gap: 2rem; align-items: end; padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.hero__title {
  font-size: clamp(2.7rem, 8.4vw, 6.6rem);
  line-height: .98; letter-spacing: -0.025em; color: var(--harbor);
  max-width: 13ch;
}
.hero__aside .lead { max-width: 34ch; }
.hero__figure { aspect-ratio: 16 / 9; width: min(100% - 2 * var(--gutter), 90rem); margin-inline: auto; border-radius: var(--radius); overflow: hidden; }
.hero__figure img { object-position: 50% 60%; }
@media (min-width: 60rem) {
  .hero__text { grid-template-columns: 1.55fr 1fr; gap: 4rem; }
  .hero__figure { aspect-ratio: 21 / 9; }
}

/* Home offer list */
.counter__grid { display: grid; gap: 2.5rem; }
.counter__head p { color: var(--ink-soft); margin-top: 1rem; }
.offer-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.offer a {
  display: grid; gap: .35rem; padding: 1.4rem 0; text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.offer__name { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; transition: color .2s ease; }
.offer__desc { color: var(--ink-soft); max-width: 52ch; }
.offer a:hover .offer__name { color: var(--crema); }
@media (min-width: 52rem) {
  .counter__grid { grid-template-columns: 1fr 2fr; gap: 4rem; }
  .counter__head { position: sticky; top: 6rem; align-self: start; }
  .offer a { grid-template-columns: 14rem 1fr; gap: 2rem; align-items: baseline; }
}

/* Split */
.split { padding-top: 0; }
.split__grid { display: grid; gap: 2.5rem; align-items: center; }
.split__text h2 { margin-bottom: 1.25rem; }
.split__text p { color: var(--ink-soft); }
.split__text .text-link { margin-top: .75rem; }
@media (min-width: 52rem) {
  .split__grid { grid-template-columns: 1fr 1fr; gap: clamp(3rem, 7vw, 6rem); }
  .split__grid--reverse > :first-child { order: 0; }
  .photo--tall { max-height: 42rem; }
}

/* Visit band */
.visit-band { background: var(--band); color: var(--band-ink); padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.visit-band__grid { display: grid; gap: 1.25rem; align-items: center; }
.visit-band p { color: var(--band-ink); opacity: .92; max-width: 46ch; }
.visit-band .btn--primary { background: var(--band-ink); color: var(--band); border-color: var(--band-ink); }
.visit-band .btn--primary:hover { background: transparent; color: var(--band-ink); }
.visit-band .btn { justify-self: start; }
@media (min-width: 60rem) {
  .visit-band__grid { grid-template-columns: auto 1fr auto; gap: 3rem; }
  .visit-band .btn { justify-self: end; }
}

/* Inner page openings */
.page-open { padding-top: clamp(2.5rem, 7vw, 5rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.page-open h1 { font-size: clamp(2.6rem, 6.6vw, 5rem); line-height: 1; letter-spacing: -0.02em; }

/* Menu */
.page-open--menu { border-bottom: 2px solid var(--ink); }
.menu-open__grid { display: grid; gap: 1.5rem; align-items: end; }
.menu-open__grid h1 { color: var(--harbor); }
.menu-open__grid .lead { color: var(--ink-soft); max-width: 44ch; }
.jump { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.jump a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem;
  border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 500;
  transition: border-color .2s ease, background-color .2s ease;
}
.jump a:hover { border-color: var(--harbor); background: color-mix(in srgb, var(--harbor) 8%, transparent); }
@media (min-width: 52rem) { .menu-open__grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }

.menu { padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--space); }
.menu-cat { display: grid; gap: 1rem; padding-block: clamp(2rem, 4vw, 3rem); }
.menu-cat + .menu-cat { border-top: 1px solid var(--line); }
.menu-cat h2 { color: var(--crema); font-size: clamp(1.6rem, 3vw, 2.2rem); }
.menu-items { list-style: none; margin: 0; padding: 0; display: grid; }
.item { padding: 1rem 0; border-bottom: 1px dashed var(--line); }
.item:last-child { border-bottom: 0; }
.item h3 { font-family: var(--font-text); font-weight: 700; font-size: 1.125rem; letter-spacing: 0; line-height: 1.3; margin-bottom: .2rem; }
.item p { color: var(--ink-soft); max-width: 48ch; }
@media (min-width: 52rem) {
  .menu-cat { grid-template-columns: 1fr 2fr; gap: 4rem; }
  .menu-cat h2 { position: sticky; top: 6rem; align-self: start; }
  .menu-items { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
  .item:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
}
.menu__photo { margin-block: clamp(1rem, 3vw, 2rem); }
.menu__photo img { object-position: 50% 55%; }
@media (max-width: 40rem) { .photo--band { aspect-ratio: 4 / 3; } }

.notice {
  margin-top: clamp(2rem, 4vw, 3rem); padding: 1.5rem 1.75rem;
  border-left: 4px solid var(--crema); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0;
}
.notice h2 { font-size: 1.35rem; margin-bottom: .5rem; }
.notice p { color: var(--ink-soft); }

/* About */
.about-open__grid { display: grid; gap: 2.5rem; align-items: center; }
.about-open__text h1 { margin-bottom: 1.5rem; }
.about-open__text p:not(.lead) { color: var(--ink-soft); }
@media (min-width: 52rem) {
  .about-open__grid { grid-template-columns: 1.1fr .9fr; gap: clamp(3rem, 7vw, 6rem); }
}
.prose-grid { display: grid; gap: 1.5rem; }
.prose p { color: var(--ink-soft); }
@media (min-width: 52rem) { .prose-grid { grid-template-columns: 1fr 2fr; gap: 4rem; } }
#about-approach { border-top: 1px solid var(--line); }
.audience { background: var(--surface); }
.audience__list { list-style: none; margin: 0; padding: 0; }
.audience__list li {
  font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.3;
  padding: 1rem 0; border-bottom: 1px solid var(--line);
}
.audience__list li:first-child { padding-top: 0; }
.audience__list li:last-child { border-bottom: 0; }

/* Visit */
.page-open--visit { background: var(--band); color: var(--band-ink); }
.page-open--visit .lead { color: var(--band-ink); max-width: 30ch; margin-top: 1.25rem; }
.visit-open__grid { display: grid; gap: 2.5rem; align-items: end; }
@media (min-width: 52rem) { .visit-open__grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.facts { margin: 0; border-top: 1px solid color-mix(in srgb, var(--band-ink) 40%, transparent); }
.facts__row {
  display: grid; grid-template-columns: minmax(7.5rem, 10rem) 1fr; gap: 1rem;
  padding: .95rem 0; border-bottom: 1px solid color-mix(in srgb, var(--band-ink) 40%, transparent);
}
.facts dt { font-weight: 600; }
.facts dd { margin: 0; }
#visit-how .split__grid { align-items: center; }
.faq { border-top: 1px solid var(--line); padding-top: var(--space); }
.faq__list { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 56px; padding: .9rem 0; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: .65rem; height: .65rem; margin-right: .3rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-3px); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details p { color: var(--ink-soft); padding-bottom: 1.2rem; }

/* Contact */
.contact__grid { display: grid; gap: 2.5rem; align-items: start; }
.contact__intro h1 { margin-bottom: 1.5rem; color: var(--harbor); }
.contact__intro p:not(.lead) { color: var(--ink-soft); }
.contact__fallback { font-size: .95rem; padding-top: 1rem; border-top: 1px solid var(--line); }
@media (min-width: 56rem) { .contact__grid { grid-template-columns: 1fr 1.15fr; gap: clamp(3rem, 7vw, 6rem); } .contact__intro { position: sticky; top: 7rem; } }
.page-open--contact { padding-bottom: var(--space); }

.form {
  display: grid; gap: 1.1rem; padding: clamp(1.25rem, 4vw, 2.25rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.field { display: grid; gap: .4rem; }
.field-row { display: grid; gap: 1.1rem; }
@media (min-width: 36rem) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: .7rem .85rem;
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent); border-radius: var(--radius);
  transition: border-color .2s ease;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:hover, .field textarea:hover { border-color: var(--ink-soft); }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 1px; border-color: var(--harbor); }
.field input:user-invalid, .field textarea:user-invalid { border-color: #b3261e; }
html[data-theme="dark"] .field input:user-invalid, html[data-theme="dark"] .field textarea:user-invalid { border-color: #f2a39c; }
.field__hint { font-size: .9rem; color: var(--ink-soft); margin-top: -.4rem; }
.form .btn { justify-self: start; }
.form__status { min-height: 1.5em; font-weight: 500; color: var(--ink); }
.form__status:empty { min-height: 0; }

/* Footer */
.footer { border-top: 2px solid var(--ink); padding-block: 3rem 2.5rem; }
.footer__inner { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; display: grid; gap: 1.75rem; }
.footer__name { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: .25rem; }
.footer__brand p:not(.footer__name) { color: var(--ink-soft); }
.footer__nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.footer__nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; text-underline-offset: .25em; }
.footer__note { font-size: .875rem; color: var(--ink-soft); max-width: 70ch; padding-top: 1.25rem; border-top: 1px solid var(--line); }
@media (min-width: 52rem) {
  .footer__inner { grid-template-columns: 1fr auto; align-items: start; }
  .footer__note { grid-column: 1 / -1; }
}

/* Entrances: only once motion.js reports ready, so content fails open. */
html[data-motion="ready"] [data-reveal] { transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1), clip-path .9s cubic-bezier(.2,.7,.2,1); }
html[data-motion="ready"] [data-reveal]:not(.is-visible) { opacity: 0; }
html[data-motion="ready"] [data-reveal-style="rise"]:not(.is-visible) { transform: translateY(18px); }
html[data-motion="ready"] [data-reveal-style="settle"]:not(.is-visible) { transform: scale(.975); }
html[data-motion="ready"] [data-reveal-style="wipe"] { clip-path: inset(0 0 0 0 round var(--radius)); }
html[data-motion="ready"] [data-reveal-style="wipe"]:not(.is-visible) { opacity: 1; clip-path: inset(0 100% 0 0 round var(--radius)); }
@media (max-width: 40rem) {
  html[data-motion="ready"] [data-reveal-style="rise"]:not(.is-visible) { transform: translateX(-14px); }
  html[data-motion="ready"] [data-reveal-style="wipe"]:not(.is-visible) { clip-path: inset(100% 0 0 0 round var(--radius)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
