/* Components: header, menu, buttons, links, light selector, tide transition, intro, footer */

/* ---------- Buttons and links ---------- */
.btn {
  --b-bg: var(--ink); --b-fg: #fff;
  position: relative; display: inline-flex; align-items: center; gap: 14px;
  min-height: 48px; padding: 0 22px; border: 1px solid var(--b-bg); border-radius: 999px;
  background: var(--b-bg); color: var(--b-fg); text-decoration: none;
  font: 500 var(--t-sm)/1 var(--f-sans); letter-spacing: .02em;
  overflow: hidden; isolation: isolate;
  transition: color .5s var(--ease), border-color .5s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--accent); transform: translateY(101%);
  transition: transform .6s var(--ease), background-color 1.2s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover, .btn:focus-visible { border-color: var(--accent); color: var(--accent-ink); }
.btn .arrow { width: 18px; height: 10px; transition: transform .5s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--ghost { --b-bg: transparent; --b-fg: var(--ink); border-color: var(--line-strong); }
.btn--light { --b-bg: #fff; --b-fg: var(--ink); border-color: #fff; }
.btn--glass { --b-bg: rgba(255, 255, 255, .12); --b-fg: #fff; border-color: rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

.link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  text-decoration: none; font-weight: 500; font-size: var(--t-sm); letter-spacing: .02em;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 10px) / 100% 1px no-repeat;
  transition: background-size .6s var(--ease);
}
.link .arrow { width: 18px; height: 10px; flex: none; transition: transform .5s var(--ease); }
.link:hover .arrow { transform: translateX(4px); }
.link { white-space: nowrap; }
.link:hover, .link:focus-visible { background-size: 0 1px; background-position: 100% calc(100% - 10px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 60; height: var(--header-h);
  color: #fff; transition: transform .7s var(--ease), background-color .6s var(--ease), color .6s var(--ease);
}
.site-header::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: currentColor; opacity: .18; }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 24px; }
.site-header.is-solid, .page--light .site-header { background: rgba(255, 255, 255, .92); color: var(--ink);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); }
.site-header.is-hidden { transform: translateY(-100%); }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; margin-right: auto; }
.turtle-mark { width: 30px; height: auto; flex: none; }
.site-header.is-solid .turtle-mark, .page--light .turtle-mark, .menu-open .site-header .turtle-mark { color: #2a9e9b; }
.brand-word { font: 600 1rem/1 "Montserrat", var(--f-sans); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.brand-word small { display: block; margin-top: 5px; font: 600 .5625rem/1 "Montserrat", var(--f-sans); letter-spacing: .2em; text-align: center; }

.nav { display: flex; gap: 4px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  text-decoration: none; font-size: var(--t-sm); letter-spacing: .02em; position: relative; }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 10px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav a:hover::after, .nav a[aria-current="page"]::after, .nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }

.clock { display: inline-flex; align-items: center; gap: 10px; font: var(--t-xs)/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.clock .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .5; }
.clock.is-open .dot { background: #49c26b; opacity: 1; box-shadow: 0 0 0 4px rgba(73, 194, 107, .22); }
.site-header .btn { min-height: 44px; padding: 0 18px; }
.site-header:not(.is-solid) .btn { --b-bg: transparent; --b-fg: #fff; border-color: rgba(255, 255, 255, .7); }
.page--light .site-header:not(.is-solid) .btn { --b-bg: var(--ink); --b-fg: #fff; border-color: var(--ink); }

.menu-toggle { display: none; align-items: center; justify-content: center; gap: 10px; min-width: 48px; min-height: 48px;
  padding: 0 4px; background: none; border: 0; font: 500 var(--t-sm)/1 var(--f-sans); }
.menu-toggle .bars { width: 22px; height: 10px; position: relative; }
.menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px;
  background: currentColor; transition: transform .5s var(--ease); }
.menu-toggle .bars::before { top: 0; }
.menu-toggle .bars::after { bottom: 0; }
.menu-open .menu-toggle .bars::before { transform: translateY(4.25px) rotate(45deg); }
.menu-open .menu-toggle .bars::after { transform: translateY(-4.25px) rotate(-45deg); }

.menu-panel {
  position: fixed; inset: 0; z-index: 55; background: var(--paper); color: var(--ink);
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px; display: flex; flex-direction: column; gap: 24px;
  overflow-y: auto; visibility: hidden; clip-path: inset(0 0 100% 0);
  transition: clip-path .8s var(--ease), visibility 0s .8s;
}
.menu-open .menu-panel { visibility: visible; clip-path: inset(0 0 0 0); transition: clip-path .8s var(--ease), visibility 0s; }
.menu-open .site-header { background: var(--paper); color: var(--ink); }
.menu-open body { overflow: hidden; }
.menu-panel ol { counter-reset: m; display: grid; gap: 2px; }
.menu-panel ol a { counter-increment: m; display: flex; align-items: baseline; gap: 16px; min-height: 52px; padding: 6px 0;
  text-decoration: none; font: 300 clamp(2rem, 7vw, 3.4rem)/1.05 var(--f-display); border-bottom: 1px solid var(--line); }
.menu-panel ol a::before { content: "0" counter(m); font: var(--t-xs)/1 var(--f-mono); color: var(--ink-3); }
.menu-panel .menu-foot { margin-top: auto; display: grid; gap: 12px; color: var(--ink-2); font-size: var(--t-sm); }

@media (max-width: 1180px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 720px) {
  :root { --header-h: 64px; }
  .site-header .clock, .site-header .btn { display: none; }
  .turtle-mark { width: 26px; }
  .menu-toggle .label { display: none; }
}

/* ---------- Light of the day selector ---------- */
.daylight {
  position: fixed; z-index: 50; right: var(--gutter); bottom: 20px;
  display: flex; align-items: center; gap: 4px; padding: 4px;
  background: rgba(255, 255, 255, .86); color: var(--ink); border: 1px solid var(--line); border-radius: 999px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px -12px rgba(13, 38, 43, .25);
}
.daylight .lbl { padding: 0 10px 0 12px; font: var(--t-xs)/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.daylight button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 0; border-radius: 999px; background: transparent; font-size: var(--t-sm);
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
.daylight button svg { width: 16px; height: 16px; }
.daylight button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.daylight button:hover:not([aria-pressed="true"]) { background: var(--paper-3); }
@media (max-width: 720px) {
  .daylight { right: auto; left: 50%; transform: translateX(-50%); bottom: 12px; }
  .daylight .lbl { display: none; }
  .daylight button { padding: 0 12px; font-size: .8125rem; }
}
.menu-open .daylight { opacity: 0; pointer-events: none; }

/* ---------- Tide page transition ---------- */
.tide { position: fixed; inset: 0; z-index: 90; pointer-events: none; display: none; }
.js .tide { display: block; }
.tide svg { position: absolute; left: 0; width: 100%; height: 120vh; top: 100%; }
.tide path { fill: var(--accent); transition: fill 1.2s var(--ease); }
.tide-in .tide svg { animation: tideIn .52s var(--ease) forwards; }
.tide-out .tide svg { animation: tideOut .8s var(--ease) both; }
@keyframes tideIn { from { transform: translateY(0); } to { transform: translateY(-110%); } }
@keyframes tideOut { from { transform: translateY(-110%); } to { transform: translateY(-230%); } }
@media (prefers-reduced-motion: reduce) { .tide { display: none !important; } }

/* ---------- Intro (home only, once per session) ---------- */
.intro { display: none; }
.intro-on .intro {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: var(--paper); color: var(--ink); overflow: hidden;
}
.intro-on, .intro-on body { overflow: hidden; }
.intro .horizon { position: absolute; left: 0; right: 0; top: 58%; height: 1px; background: var(--ink); transform-origin: 50% 50%; }
.intro .sun { position: absolute; left: 50%; top: 58%; width: 120px; height: 60px; margin-left: -60px; margin-top: -60px; overflow: hidden; }
.intro .sun i { position: absolute; inset: 0 0 -60px; border-radius: 50%; background: var(--sun); }
.intro .mark { position: relative; text-align: center; margin-top: -10vh; }
.intro .mark .intro-word { margin: 0 auto; font: 600 clamp(1.6rem, 4vw, 2.4rem)/1 "Montserrat", var(--f-sans); letter-spacing: .08em; text-transform: uppercase; color: #2a9e9b; }
.intro .mark p + p { margin: 12px auto 0; font: var(--t-xs)/1.4 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.intro .skip-intro { position: absolute; right: var(--gutter); bottom: 24px; min-height: 44px; padding: 0 16px;
  background: none; border: 1px solid var(--line-strong); border-radius: 999px; font: var(--t-xs)/1 var(--f-mono);
  letter-spacing: .1em; text-transform: uppercase; }
.intro .skip-intro:hover { background: var(--ink); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #dfe7e6; padding: var(--space-5) 0 32px; position: relative; overflow: hidden; }
.site-footer a { color: #fff; }
.site-footer .foot-top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px var(--col-gap); }
.site-footer .foot-claim { grid-column: 1 / span 6; font: 300 var(--t-2xl)/1 var(--f-display); color: #fff; }
.site-footer .foot-claim em { color: var(--brand); font-style: italic; }
.site-footer .foot-col { grid-column: span 2; display: grid; gap: 6px; align-content: start; font-size: var(--t-sm); }
.site-footer .foot-col h2 { font: var(--t-xs)/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: #9fb3b2; margin-bottom: 10px; }
.site-footer .foot-col a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; }
.site-footer .foot-col a:hover { text-decoration: underline; }
.site-footer .foot-coords { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 24px; margin-top: var(--space-4);
  font: var(--t-xs)/1.6 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: #9fb3b2; }
.site-footer .foot-coords a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer .wordmark { margin-top: var(--space-4); font: 600 clamp(3.2rem, 13.4vw, 13rem)/.8 "Montserrat", var(--f-sans); letter-spacing: .02em; text-transform: uppercase;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .22); white-space: nowrap; user-select: none; }
.site-footer .tbc { color: #f0a48f; }
@media (max-width: 900px) {
  .site-footer .foot-claim { grid-column: 1 / -1; }
  .site-footer .foot-col { grid-column: span 6; }
}

/* ---------- Preview notice (bookings, forms) ---------- */
.notice { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--coral);
  border-radius: var(--radius); background: #fff; color: var(--ink); font-size: var(--t-sm); }
.notice strong { color: var(--coral); font-weight: 600; }
html:not(.js) .daylight { display: none; }
