/* =========================================================================
   ON3 — shared site styles (gallery home page)
   Warm espresso and parchment, squared display type. Mobile-first.
   The booking pages keep css/styles.css + css/booking-skin.css.
   Cut down from the old Resonance homepage's home.css on 2026-10-30; the
   full original is in _private/site-before-gallery-only-2026-10-30/.
   ========================================================================= */

:root {
  /* Colour — taken from the room: mahogany, tobacco, oxblood, lamp amber. */
  --espresso: #1b1310;
  --espresso-2: #241915;
  --mahogany: #3a2119;
  --tobacco: #8a5a3b;
  --oxblood: #6e2a26;
  --amber: #e0a458;
  --amber-soft: #f0c48a;
  --parchment: #ece2cf;
  --parchment-2: #e3d6be;
  --ivory: #f6efe2;
  --metal: #9a8f7f;

  --on-dark: #f3ead9;
  --on-dark-dim: rgba(243, 234, 217, 0.72);
  --on-dark-faint: rgba(243, 234, 217, 0.18);
  --on-light: #1b1310;
  --on-light-dim: rgba(27, 19, 16, 0.74);
  --on-light-faint: rgba(27, 19, 16, 0.16);

  /* Type */
  --f-display: 'Michroma', 'Eurostile', 'Microgramma', 'Arial Narrow', sans-serif;
  --f-body: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Space */
  --gutter: 16px;
  --s1: 0.5rem; --s2: 0.75rem; --s3: 1rem; --s4: 1.5rem; --s5: 2rem; --s6: 3rem; --s7: 4.5rem; --s8: 7rem;
  --wrap: 1240px;

  /* Shape */
  --r-s: 3px;
  --r-m: 10px;
  --r-pill: 999px;
  --hair: 1px solid var(--on-dark-faint);

  /* Motion — one easing family, short durations. */
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 280ms;
  --t-mid: 600ms;
  --t-slow: 900ms;

  /* Layers */
  --z-header: 20;
  --z-dialog: 40;

  --focus: 0 0 0 2px var(--espresso), 0 0 0 4px var(--amber);

  color-scheme: dark;
}

@media (min-width: 640px) { :root { --gutter: 28px; } }
@media (min-width: 1100px) { :root { --gutter: 48px; } }

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--espresso);
  color: var(--on-dark);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3, p, figure, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:where(a, button, summary, [tabindex]):focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-s); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -60px; z-index: 100; background: var(--amber); color: var(--espresso); padding: 10px 14px; border-radius: var(--r-s); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* Film grain — a single static texture laid over dark sections. */
.grain { position: relative; isolation: isolate; }
.foot::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------- type */

.kicker {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--f-display);
  font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--on-dark-dim);
}
h2 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(1.35rem, 1rem + 1.6vw, 2.1rem);
  line-height: 1.28; letter-spacing: 0.005em;
  text-wrap: balance;
}
h3 { font-family: var(--f-display); font-weight: 400; font-size: 0.875rem; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.4; }

/* ------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  font-family: var(--f-display); font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  border-radius: var(--r-pill); border: 1px solid transparent;
  cursor: pointer; background: none;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.btn--solid { background: var(--on-dark); color: var(--espresso); }
.btn--solid:hover { background: var(--amber-soft); }
.btn--ghost { border-color: rgba(243, 234, 217, 0.55); color: var(--on-dark); }
.btn--ghost:hover { background: rgba(243, 234, 217, 0.12); }
.btn--ghost-dark { border-color: var(--on-dark-faint); color: var(--on-dark); }
.btn--ghost-dark:hover { border-color: var(--on-dark-dim); }
.btn--solid-dark { background: var(--espresso); color: var(--on-dark); }
.btn--solid-dark:hover { background: var(--oxblood); }
.btn--line { border-color: rgba(27, 19, 16, 0.4); color: var(--on-light); }
.btn--line:hover { background: rgba(27, 19, 16, 0.06); }
.btn--wide { width: 100%; }


/* ------------------------------------------------------------- header */

.hdr {
  position: fixed; inset: 0 0 auto; z-index: var(--z-header);
  padding-top: env(safe-area-inset-top);
  background: rgba(27, 19, 16, 0.92); box-shadow: 0 1px 0 var(--on-dark-faint);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
/* Edge to edge, on the same lines as the gallery wall below it. */
.hdr__in { display: flex; align-items: center; gap: var(--s3); height: 64px; padding-inline: max(14px, 1.2vw); }
.hdr__logo { flex: none; padding: 4px; margin-left: -4px; }
.hdr__logo img { width: 176px; height: auto; display: block; }
.hdr__link {
  margin-left: auto; padding: 10px 4px;
  font-family: var(--f-display); font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; color: var(--on-dark-dim);
}
.hdr__link:hover { color: var(--on-dark); }
.hdr__book { min-height: 40px; padding: 0 16px; }

html.is-locked { overflow: hidden; }

/* ------------------------------------------------------------- footer */

.foot { position: relative; isolation: isolate; background: var(--espresso); padding-block: var(--s7) var(--s4); padding-bottom: calc(var(--s4) + env(safe-area-inset-bottom)); }
.foot__grid { display: grid; gap: var(--s5); }
.foot__grid img { width: 200px; height: auto; }
.foot__where { margin-top: var(--s2); color: var(--on-dark-dim); font-size: 0.9375rem; }
.foot__h { font-family: var(--f-display); font-size: 0.625rem; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark-dim); margin-bottom: 6px; }
.foot__links { display: grid; justify-items: start; gap: 2px; }
.foot__links a { display: inline-block; padding: 8px 0; text-decoration: none; }
.foot__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot__fine { margin-top: var(--s6); padding-top: var(--s3); border-top: var(--hair); font-size: 0.8125rem; color: var(--on-dark-dim); }
@media (min-width: 900px) { .foot__grid { grid-template-columns: 1.4fr 1fr 1fr auto; align-items: start; } }


/* ------------------------------------------------------------- review flags
   Anything not yet cleared for publishing carries data-verify (rights) or
   data-standin (placeholder photo). The badge stays visible until the
   attribute is removed from the markup — see drafts/resonance/HANDOVER.md. */
[data-verify], [data-standin] { position: relative; }
[data-verify]::before, [data-standin]::before {
  position: absolute; z-index: 3; right: 8px; top: 8px; pointer-events: none;
  padding: 3px 7px; border-radius: 3px;
  font: 500 0.625rem/1.3 var(--f-mono); letter-spacing: 0.04em; text-transform: uppercase;
  background: rgba(224, 164, 88, 0.95); color: var(--espresso);
}
[data-verify]::before { content: "To clear: " attr(data-verify); }
[data-standin]::before { content: "Stand-in · " attr(data-standin); }


/* ------------------------------------------------------------- ripple entry
   js/ripple-entry.js: once per visit the first screen is the lounge photo seen
   through water, with the ON3 mark over it. Tapping the mark drops in one slow
   swell; as it passes, the water and the photo wash away and the gallery
   underneath is simply there. The <head> script decides before first paint. */

.entry { display: none; }
html.ripple-on { overflow: hidden; }
/* From the tap on, the water is only a picture: scrolling and clicks go straight to the gallery. */
html.ripple-on.ripple-go { overflow: auto; }
html.ripple-free .entry { pointer-events: none; }   /* set once the entering tap's own click is spent */
html.ripple-on .entry { display: block; position: fixed; inset: 0 0 auto; height: 100lvh; min-height: 100%; z-index: 60; overflow: hidden; background: var(--espresso); }
/* Until the tap, the page behind is hidden: iOS Safari leaves a strip under its toolbar that a fixed
   layer doesn't cover, and the gallery showed through it. 100lvh above reaches under the toolbar too. */
html.ripple-on:not(.ripple-go) body > :not(.entry) { visibility: hidden; }
html.ripple-on body { background: var(--espresso); }
.entry picture, .entry img { position: absolute; inset: 0; width: 100%; height: 100%; }
.entry img { object-fit: cover; object-position: 55% 60%; filter: brightness(0.8); transition: opacity 0.9s var(--ease); }
@media (max-width: 479px) { .entry img { object-position: 30% 70%; } }
/* With the water running, the canvas draws the photo; without WebGL the blurred photo just fades. */
.ripple-gl-on .entry img { opacity: 0; }
.ripple-go:not(.ripple-gl-on) .entry img { opacity: 0; }
.ripple-go:not(.ripple-gl-on) .entry { background: transparent; transition: background-color 0.9s var(--ease); }
html.ripple-gl-on .entry { background: transparent; }

.ripple-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: opacity 0.45s; }
.ripple-mark {
  position: absolute; left: 50%; top: min(50%, 50svh); z-index: 5;   /* centre of the visible screen, not of the taller layer */
  width: clamp(240px, 34vw, 440px); padding: 28px 0; transform: translate(-50%, -50%);
  display: block; border: 0; background: none; color: var(--on-dark);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  animation: ripple-breathe 3.2s ease-in-out infinite;
  transition: transform 0.5s cubic-bezier(0.45, 0, 0.75, 0.4), opacity 0.35s 0.2s;
}
/* The wordmark is the logo file used as a mask, so its colour is just background-color here. */
.ripple-mark b {
  display: block; aspect-ratio: 3924 / 254; background-color: currentColor; transition: background-color 0.55s var(--ease);
  -webkit-mask: url(../assets/brand/logo.svg) center / contain no-repeat; mask: url(../assets/brand/logo.svg) center / contain no-repeat;
}
.ripple-mark::after {   /* a still waterline under the wordmark */
  content: ""; display: block; height: 1px; margin: 18px auto 0; width: 72%;
  background: linear-gradient(90deg, transparent, rgba(243, 234, 217, 0.5), transparent);
  animation: ripple-line 3.2s ease-in-out infinite;
}
.ripple-mark__hint {
  position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%);
  font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase;
  white-space: nowrap; color: rgba(243, 234, 217, 0.9); pointer-events: none; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8), 0 0 2px rgba(0, 0, 0, 0.6);
}
.ripple-mark:hover b { background-color: var(--amber-soft); }
.ripple-mark:focus-visible { outline: none; }
.ripple-mark:focus-visible b { background-color: var(--amber-soft); }
.ripple-mark:focus-visible::after { background: var(--amber-soft); }
.ripple-go .ripple-mark { opacity: 0; transform: translate(-50%, -50%) scale(0.7); pointer-events: none; animation: none; }
@keyframes ripple-breathe { 0%, 100% { filter: drop-shadow(0 0 6px rgba(240, 196, 138, 0.25)); } 50% { filter: drop-shadow(0 0 16px rgba(240, 196, 138, 0.55)); } }
@keyframes ripple-line { 0%, 100% { transform: scaleX(0.6); opacity: 0.5; } 50% { transform: scaleX(1); opacity: 1; } }

/* ------------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
}

/* ------------------------------------------------------------- small screens */

@media (max-width: 479px) {
  .hdr__in { gap: var(--s2); }
  .hdr__logo img { width: 136px; }
  .hdr__link { display: none; }
  .hdr__book { padding: 0 14px; font-size: 0.625rem; }
}
@media (max-width: 359px) {
  .hdr__logo img { width: 108px; }
}
