/* SeaHome II design system: base
   Version 1.0, 2026-11-26. Load order: tokens.css, base.css, components.css.
   Fonts: the site's own woff2 files, served from this site (../assets/fonts/).
   Cormorant Garamond and Instrument Sans are both under the SIL Open Font License. */

@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-300.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300; font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-300-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-400.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-500.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/instrument-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/instrument-sans-500.woff2") format("woff2"); }

/* ---- Reset (as the site has it) ---- */
*, ::before, ::after { box-sizing: border-box; margin: 0; padding: 0; font-variant-numeric: lining-nums !important; }
html {
  background: var(--surface-night);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--bar-pin) + var(--s-4));
}
html:not(:has(.hero)) { background: var(--surface); }
body {
  background: var(--surface);
  color: var(--text);
  font: var(--w-regular) var(--t-body)/var(--lh-text) var(--sans);
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-weight: var(--w-light); }
strong, b { font-weight: var(--w-medium); }
em, i { font-style: italic; }

/* ---- Links in running text: underlined in teak, ink on hover ---- */
:where(p, li, dd, td, figcaption, .note) > a:not([class]) {
  text-decoration: underline 1px var(--accent);
  text-underline-offset: 5px;
}
:where(p, dd, td, figcaption, .note, main li) > a:not([class]) { margin: 0 -4px; padding: 13px 4px; }
:where(p, li, dd, td, figcaption, .note) > a:not([class]):hover { text-decoration-color: var(--text); }

/* ---- Focus: one ring, ink on paper, teak on night. The site drew it 1 px;
   the floor asks for 2 px, so it is 2 px here (invisible until a keyboard is used). ---- */
:focus-visible { outline: var(--focus-ring) solid var(--focus); outline-offset: 4px; }
[data-tone=night] :focus-visible { outline-color: var(--focus-on-night); }
:focus:not(:focus-visible) { outline: none; }

/* ---- Page shell ---- */
.skip {
  position: absolute; top: -100px; left: var(--s-4); z-index: 30;
  display: inline-flex; align-items: center;
  min-height: var(--target); padding: 0 var(--s-4);
  background: var(--surface); color: var(--text);
  font: var(--w-medium) var(--t-note)/1.2 var(--sans);
}
.skip:focus { top: var(--s-4); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.wrap { max-width: var(--wrap); margin: 0 auto; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* ---- Type roles ---- */
.label { font: var(--w-regular) var(--t-label)/1.4 var(--sans); color: var(--text-label); }
.heading { font: var(--w-light) var(--t-display)/var(--lh-serif) var(--serif); text-wrap: balance; }
.title { font: var(--w-light) var(--t-title)/1.15 var(--serif); }
.lead { font: var(--w-regular) var(--t-body)/var(--lh-text) var(--sans); color: var(--text-quiet); max-width: var(--measure); }
.note { font: var(--w-regular) var(--t-note)/1.5 var(--sans); color: var(--text-label); max-width: var(--measure); }
[data-tone=night] .label, [data-tone=night] .note, [data-tone=night] .lead { color: var(--text-on-night); }

/* ---- Motion: the keyframes every component shares. They only run when the page
   script has put class "motion" on <html>, which it does only when the visitor
   has not asked for reduced motion. ---- */
@keyframes fade { 0% { opacity: 0; } }
@keyframes settle-in { 0% { transform: scale(1.06); } }
@keyframes line { 0% { transform: translateY(105%); } }
@keyframes rise { 0% { opacity: 0; transform: translateY(10px); } }
@keyframes up { 0% { opacity: 0; transform: translateY(14px); } }
@keyframes draw-x { 0% { transform: scaleX(0); } }
@keyframes draw { 0% { transform: scaleX(0); } }
@keyframes wipe { 0% { clip-path: inset(0 0 100%); } to { clip-path: inset(0); } }
@keyframes cue { 0% { clip-path: inset(0 0 100%); } 45%, 55% { clip-path: inset(0); } to { clip-path: inset(100% 0 0); } }
@keyframes drift-up { to { transform: translateY(-6%); } }
@keyframes dim { 0% { opacity: var(--scrim-o); } to { opacity: calc(var(--scrim-o) + .25); } }
@keyframes hull { 0% { transform: scale(1.35); } to { transform: scale(1); } }
@keyframes drift { 0% { transform: translateY(-4%); } to { transform: translateY(4%); } }

html.motion [data-reveal][data-in] { animation: up var(--t-reveal) var(--ease) var(--d, 0s) backwards; }
html.motion [data-rules][data-in]::before, html.motion [data-rules][data-in]::after,
html.motion [data-rules][data-in] > li::before, html.motion [data-rules][data-in] > li::after { animation: draw-x .9s var(--ease) backwards; }
@media (width <= 900px) {
  html.motion [data-reveal][data-in], html.motion [data-rules][data-in]::before, html.motion [data-rules][data-in]::after,
  html.motion [data-rules][data-in] > li::before, html.motion [data-rules][data-in] > li::after { animation-duration: .3s; }
}
