/* KUUL Beach Club · Sun Ritual
   Every colour on this page is a function of the hour. kuul.js writes the
   palette to :root as the sun moves; these are only the dawn starting values. */
:root {
  --ground: #F3E4D6;
  --sky-top: #8DB7C9; --sky-mid: #E9C3B0; --sky-hz: #F6C79F;
  --sun-core: #FFE2B0; --sun-glow: #FFB98055;
  --sc-canvas: var(--ground);
  --sc-surface: #FBF4EA;
  --sc-ink: #12302F;
  --sc-ink-soft: #3E5A57;
  --sc-accent: #1E6763;          /* brand teal, deep stop for light grounds */
  --sc-accent-ink: #F7EFE3;
  --teal: #5DA7A4;               /* the logo */
  --sc-font-display: "Fraunces", "Cooper Black", Georgia, serif;
  --sc-font-text: "Jost", system-ui, sans-serif;
  --sc-r-sm: 999px;
  --bar-h: 4.75rem;
  --gold: 0;  --dusk: 0;         /* 0..1, written by kuul.js */
}
html { background: var(--ground); }
body { background: var(--ground); color: var(--sc-ink); }
body, .bar, .btn { transition: color 260ms var(--sc-ease-out); }

/* one language at a time */
html[lang="es"] body [lang="en"], html[lang="en"] body [lang="es"] { display: none !important; }

.skip { position: fixed; left: 1rem; top: -4rem; z-index: 100; background: var(--sc-ink); color: var(--ground);
  padding: .6rem 1rem; border-radius: 999px; text-decoration: none; }
.skip:focus-visible { top: 1rem; }

/* ------------------------------------------------------------ type -- */
.display, .hero__title, .close__title, .golden__shout, .signature__name {
  font-family: var(--sc-font-display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 0.98;
  text-wrap: balance;
  margin: 0;
}
.display--xl { font-size: clamp(2.6rem, 1.4rem + 4.6vw, 6rem); }
.display--lg { font-size: clamp(2.3rem, 1.5rem + 3vw, 4.4rem); }
.lede { font-size: var(--sc-t-lg); line-height: 1.5; max-width: 34ch; margin: 0; color: var(--sc-ink-soft); text-wrap: pretty; }
.kicker { font-family: var(--sc-font-display); font-style: italic; font-size: var(--sc-t-lg); color: var(--sc-ink-soft); margin: 0; }
.sc-stack > .kicker + h2 { margin-top: .5rem; }
.sc-stack > .display + .lede { margin-top: 1.25rem; }
.sc-stack > .lede + * { margin-top: 1.75rem; }
.note { font-size: var(--sc-t-sm); color: var(--sc-ink-soft); margin: 0; }
.note a { color: var(--sc-ink); font-weight: 500; margin-left: .35em; }

/* ------------------------------------------------------------ buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.9rem; padding: 0 1.5rem;
  border-radius: 999px;
  background: var(--sc-accent); color: var(--sc-accent-ink);
  font-weight: 500; font-size: var(--sc-t-sm); letter-spacing: .04em;
  text-decoration: none; white-space: nowrap;
  box-shadow: 0 6px 18px -8px color-mix(in oklab, var(--sc-accent) 70%, #000);
  transition: transform 140ms var(--sc-ease-out), background-color 160ms var(--sc-ease-out), box-shadow 160ms var(--sc-ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: color-mix(in oklab, var(--sc-accent) 86%, var(--sc-ink)); box-shadow: 0 10px 24px -10px color-mix(in oklab, var(--sc-accent) 80%, #000); }
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn--big { min-height: 3.4rem; padding: 0 2.2rem; font-size: var(--sc-t-base); }

/* ------------------------------------------------------------ the bar -- */
.bar {
  position: fixed; inset: 0 0 auto; z-index: var(--sc-z-chrome);
  height: var(--bar-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  padding: 0 var(--sc-gutter);
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.bar::before {
  content: ""; position: absolute; inset: 0 0 -1.5rem; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in oklab, var(--ground) 82%, transparent), transparent);
  opacity: var(--bar-veil, 0);
  transition: opacity 300ms var(--sc-ease-out);
}
.bar__mark { justify-self: start; display: block; width: clamp(4.6rem, 3.6rem + 2.4vw, 6.4rem); border-radius: 6px; }
.bar__mark img { width: 100%; height: auto; filter: drop-shadow(0 1px 1px rgb(10 30 30 / .18)); }
.bar__end { justify-self: end; display: flex; align-items: center; gap: .6rem; }
.lang {
  min-width: 2.9rem; min-height: 2.9rem; border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--sc-ink) 30%, transparent);
  background: color-mix(in oklab, var(--ground) 55%, transparent);
  font-size: var(--sc-t-xs); font-weight: 600; letter-spacing: .08em; cursor: pointer;
  transition: background-color 160ms var(--sc-ease-out), transform 140ms var(--sc-ease-out);
}
.lang:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .lang:hover { background: color-mix(in oklab, var(--ground) 90%, transparent); } }

/* the sun dial */
.dial { position: relative; width: clamp(9.5rem, 7rem + 9vw, 15rem); aspect-ratio: 240 / 72; margin-top: .6rem; touch-action: none; }
.dial__svg { width: 100%; height: auto; overflow: visible; }
.dial__path { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; }
.dial__sun { fill: var(--dial-sun, #F2B04B); stroke: color-mix(in oklab, var(--sc-ink) 18%, transparent); stroke-width: .8; }
.dial__palm { position: absolute; width: 17%; height: auto; top: 0; pointer-events: none; transform-origin: 50% 100%; }
.dial__thumb {
  position: absolute; left: 0; top: 0; width: 2.9rem; height: 2.9rem; margin: -1.45rem 0 0 -1.45rem;
  border-radius: 50%; cursor: grab; touch-action: none;
}
.dial__thumb:active { cursor: grabbing; }
.dial__thumb:focus-visible { outline: 2px solid var(--sc-ink); outline-offset: -8px; }
.dial__time {
  position: absolute; left: 50%; top: 100%; translate: -50% 0; margin: .1rem 0 0;
  font-size: var(--sc-t-xs); letter-spacing: .06em; white-space: nowrap; font-variant-numeric: tabular-nums;
  color: var(--sc-ink); font-weight: 500;
  padding: .1rem .6rem; border-radius: 999px;
  background: color-mix(in oklab, var(--ground) 72%, transparent);
}
.dial__label { color: var(--sc-ink-soft); font-weight: 400; }
@media (hover: hover) and (pointer: fine) { .dial:hover .dial__sun { stroke-width: 2; } }

/* ---------------------------------------------------- layered scenes -- */
.scene__stage { isolation: isolate; background: var(--sky-hz); }
.sky, .glow, .sun, .belt, .stars, .plane { position: absolute; pointer-events: none; }
.sky { inset: 0; background: linear-gradient(to bottom, var(--sky-top) 0%, var(--sky-mid) 52%, var(--sky-hz) 100%); z-index: 0; }
.glow {
  z-index: 1; width: 90vmax; height: 60vmax; left: 0; top: 0;
  background: radial-gradient(closest-side, var(--sun-glow), transparent 72%);
  will-change: transform;
}
.sun {
  z-index: 2; width: clamp(4rem, 9vmin, 8rem); aspect-ratio: 1; left: 0; top: 0; border-radius: 50%;
  background: radial-gradient(circle at 42% 40%, #FFFDF4, var(--sun-core) 62%, color-mix(in oklab, var(--sun-core) 80%, #F08A4B));
  box-shadow: 0 0 2.5rem 0.6rem color-mix(in oklab, var(--sun-core) 55%, transparent);
  will-change: transform;
}
.plane { left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.plane img { max-width: none; display: block; }
.plane--near { z-index: 6; }
.plane__grade { position: absolute; inset: 0; opacity: 0; }
.plane__grade img { width: 100%; height: 100%; }
.scene__ride { position: absolute; inset: 0; z-index: 5; pointer-events: none; will-change: transform; }
.scene__ride > * { pointer-events: auto; }
.scene__copy { position: absolute; z-index: 5; left: var(--sc-gutter); max-width: min(40rem, 84vw); }
.scene__copy--open { top: calc(var(--bar-h) + clamp(1rem, 4vh, 3rem)); }
.hero__title {
  font-size: clamp(3.4rem, 1.6rem + 7.2vw, 8.4rem);
  font-weight: 600; letter-spacing: -0.035em; line-height: .9;
  color: #10302F;
}
.hero__sub { font-family: var(--sc-font-display); font-style: italic; font-weight: 400;
  font-size: var(--sc-t-xl); line-height: 1.25; margin: .6rem 0 1.4rem; color: #1D3D3B; max-width: 24ch; }

/* dusk scene */
.belt { z-index: 1; inset: 0; background: linear-gradient(to top, transparent 22%, #F2A2A0 46%, transparent 70%); opacity: 0; mix-blend-mode: soft-light; }
.stars {
  z-index: 1; inset: 0 0 40% 0; opacity: 0;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 22%, #fff, transparent), radial-gradient(1px 1px at 27% 9%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 41% 31%, #fff, transparent), radial-gradient(1px 1px at 58% 14%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 66% 38%, #fff, transparent), radial-gradient(1px 1px at 79% 19%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 88% 7%, #fff, transparent), radial-gradient(1px 1px at 7% 44%, #fff, transparent),
    radial-gradient(1.1px 1.1px at 35% 52%, #fff, transparent), radial-gradient(1px 1px at 93% 41%, #fff, transparent);
}
.scene__copy--dusk { z-index: 7; top: calc(var(--bar-h) + clamp(1rem, 5vh, 3.5rem)); }
.scene--dusk .hero__sub { color: #F6E9DA; }
.close__title { font-size: clamp(3rem, 1.6rem + 6vw, 7.4rem); font-weight: 600; letter-spacing: -0.03em; line-height: .92; color: #FBEFE2; }
.scene--dusk .btn { background: #7CCBC6; color: #0E2626; box-shadow: 0 10px 30px -12px #000; }
@media (hover: hover) and (pointer: fine) { .scene--dusk .btn:hover { background: #9BDAD5; } }
.close__menus { margin: 1.2rem 0 0; font-size: var(--sc-t-sm); }
.close__menus a { color: #F6E9DA; }
.foot { position: absolute; z-index: 7; left: var(--sc-gutter); right: var(--sc-gutter); bottom: max(1rem, env(safe-area-inset-bottom));
  font-size: var(--sc-t-xs); letter-spacing: .06em; color: #D9CFC6; }
.foot p { margin: 0; }

/* --------------------------------------------------------- morning -- */
.morning { padding: clamp(3rem, 8vw, 7rem) 0 var(--sc-section); }
.morning__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.morning__photo { margin: 0; position: sticky; top: calc(var(--bar-h) + 2rem); }
.morning__frame { overflow: clip; border-radius: 46% 46% 1.5rem 1.5rem / 32% 32% 1.5rem 1.5rem; aspect-ratio: 4 / 5;
  box-shadow: 0 30px 60px -30px rgb(60 40 20 / .45); }
.morning__frame img { width: 100%; height: 118%; object-fit: cover; margin-top: -9%; }
.morning__text { padding-top: clamp(0rem, 4vw, 3rem); }
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid color-mix(in oklab, var(--sc-ink) 18%, transparent); max-width: 36rem; }
.ledger li { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; padding: .85rem 0; border-bottom: 1px solid color-mix(in oklab, var(--sc-ink) 12%, transparent); }
.ledger__name { font-family: var(--sc-font-display); font-variation-settings: "SOFT" 100; font-size: var(--sc-t-lg); font-weight: 520; }
.ledger__name i { font-family: var(--sc-font-text); font-style: normal; font-size: var(--sc-t-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--sc-ink-soft); margin-left: .3em; }
.ledger__price { font-variant-numeric: tabular-nums; font-weight: 500; }
.ledger__desc { grid-column: 1 / -1; font-size: var(--sc-t-sm); color: var(--sc-ink-soft); }

/* ------------------------------------------------------------ noon -- */
.noon__stage { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; }
.noon__copy { position: relative; z-index: 2; padding: calc(var(--bar-h) + 1rem) var(--sc-gutter) 2rem; }
.noon__copy .lede { margin-top: 1.4rem; }
.noon__photo { margin: 0; height: 100%; position: relative; overflow: clip; }
.noon__photo img { transform-origin: 50% 20%; will-change: transform; }
.noon__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }

/* ------------------------------------------------------- afternoon -- */
.afternoon__stage { display: flex; align-items: center; }
.rail { display: flex; align-items: center; gap: clamp(1.25rem, 3vw, 3rem); padding: calc(var(--bar-h) + 1rem) var(--sc-gutter) 1rem; width: max-content; }
.rail__lead, .rail__end { width: min(26rem, 78vw); flex: none; }
.rail__lead .lede { margin-top: 1.2rem; }
.rail__end .lede { margin-bottom: 1.4rem; color: var(--sc-ink); }
.rail__item { margin: 0; flex: none; height: min(64vh, 40rem); aspect-ratio: 9 / 14; display: flex; flex-direction: column; }
.rail__item--wide { aspect-ratio: 16 / 12; }
.rail__item img { flex: 1; min-height: 0; width: 100%; height: auto; object-fit: cover; border-radius: 1.25rem; box-shadow: 0 24px 50px -28px rgb(20 60 60 / .5); }
.rail__item figcaption { padding-top: .8rem; font-size: var(--sc-t-sm); color: var(--sc-ink-soft); display: flex; gap: .6rem; align-items: baseline; }
.rail__item figcaption b { font-family: var(--sc-font-display); font-size: var(--sc-t-lg); font-weight: 560; color: var(--sc-ink); }
@media (prefers-reduced-motion: no-preference) {
  .rail__item { opacity: calc(.55 + .45 * var(--settle, 1)); }
}

/* ---------------------------------------------------------- golden -- */
.golden__stage { overflow: clip; }
.golden__photo { position: absolute; margin: 0; right: var(--sc-gutter); top: 14vh; width: min(30vw, 26rem); aspect-ratio: 3 / 4.4; z-index: 1; }
.golden__photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 999px 999px 1.5rem 1.5rem; box-shadow: 0 30px 60px -30px rgb(80 40 10 / .6); }
.golden__copy { position: absolute; z-index: 2; left: var(--sc-gutter); top: calc(var(--bar-h) + 10vh); max-width: 34rem; }
.golden__copy .lede { margin-top: 1.2rem; }
.golden__shout { position: absolute; z-index: 3; left: var(--sc-gutter); bottom: 9vh; font-size: clamp(3rem, 1.4rem + 6.4vw, 8rem); line-height: .92; max-width: 12ch; }

/* ------------------------------------------------------------- bar -- */
.bar-menu { padding: clamp(3rem, 7vw, 6rem) 0 var(--sc-section); }
.bar-menu__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.bar-menu__pour { margin: 0; position: sticky; top: calc(var(--bar-h) + 2rem); }
.bar-menu__pour img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 1.5rem; box-shadow: 0 30px 60px -30px rgb(60 30 10 / .55); }
.signature { padding: 1.4rem 0 .4rem; }
.signature__name { font-size: clamp(1.9rem, 1.3rem + 2vw, 3rem); display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; max-width: 36rem; }
.signature__name .ledger__price { font-family: var(--sc-font-text); font-size: var(--sc-t-lg); }
.signature__desc { margin: .5rem 0 0; color: var(--sc-ink-soft); max-width: 36rem; }
.ledger--two { max-width: 36rem; }
.bar-menu__dish { margin: 1rem 0 0; display: flex; align-items: center; gap: 1.2rem; }
.bar-menu__dish img { width: clamp(7rem, 12vw, 10rem); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 18px 40px -20px rgb(60 30 10 / .6); }
.bar-menu__dish figcaption { font-family: var(--sc-font-display); font-style: italic; font-size: var(--sc-t-xl); }

/* ----------------------------------------------------------- phone -- */
@media (max-width: 860px) {
  :root { --bar-h: 6rem; }
  /* phones: the dial gets its own row so the mark and the actions never crowd it */
  .bar { height: var(--bar-h); gap: 0 .5rem; grid-template-columns: auto 1fr auto; grid-template-rows: 3.5rem 2.5rem; align-items: center; padding-top: .25rem; }
  .bar__mark { grid-area: 1 / 1; }
  .bar__end { grid-area: 1 / 3; }
  .dial { grid-area: 2 / 1 / 3 / -1; justify-self: center; width: 8.4rem; margin: -.9rem 0 0; }
  .dial__time { left: 100%; top: 62%; translate: .35rem -50%; margin: 0; }
  .dial__label { display: none; }
  .bar__end { gap: .35rem; }
  .btn--bar { padding: 0 1rem; }
  .hero__title { font-size: clamp(3rem, 15vw, 4.4rem); }
  .hero__sub { font-size: var(--sc-t-lg); margin-bottom: 1.1rem; }
  .scene__copy--open, .scene__copy--second, .scene__copy--dusk { right: var(--sc-gutter); }
  .close__title { font-size: clamp(2.8rem, 14vw, 4rem); }
  .morning__grid, .bar-menu__grid { grid-template-columns: 1fr; }
  .morning__photo, .bar-menu__pour { position: relative; top: 0; width: min(100%, 26rem); }
  .bar-menu__pour img { aspect-ratio: 4 / 3; }
  .noon__stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .noon__copy { padding-bottom: 1.25rem; }
  .noon__copy .lede { margin-top: .9rem; }
  .rail__item { height: min(52vh, 28rem); }
  .golden__photo { width: 48vw; top: auto; bottom: 30vh; right: var(--sc-gutter); }
  .golden__copy { top: calc(var(--bar-h) + 3vh); right: var(--sc-gutter); }
  .golden__shout { bottom: 6vh; font-size: clamp(2.6rem, 13vw, 4rem); }
}
@media (max-width: 380px) {
  .bar__mark { width: 3.9rem; }
  .lang { min-width: 2.6rem; }
  .btn--bar { padding: 0 .8rem; }
}
.bar__mark .mark--dark { display: none; }
html.is-night .bar__mark .mark--light { display: none; }
html.is-night .bar__mark .mark--dark { display: block; }
