/* Reset, type, the frame, header and footer. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head) + 16px); }
body {
  margin: 0; background: var(--wall); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--dusk); color: #fff; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.06; letter-spacing: -.012em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.4vw, 5.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3.4rem); }
h3 { font-size: 1.35rem; line-height: 1.2; }
p { text-wrap: pretty; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: var(--leaf); }
.skip-link:focus { top: 12px; }
.quiet { color: var(--ink-3); font-size: .92rem; }

/* the frame: edge to edge by default, or "framed" like a mounted print */
.frame { position: relative; background: var(--wall); min-height: 100vh; }
[data-layout="boxed"] body { background: #05060d; }
[data-theme="day"][data-layout="boxed"] body { background: #cfc5b0; }
[data-layout="boxed"] .frame { max-width: 1560px; margin: clamp(10px, 1.6vw, 26px) auto; border-radius: 4px 34px 4px 34px; overflow: clip; box-shadow: 0 0 0 1px var(--line), var(--shadow); }

/* header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--head);
  display: flex; align-items: center; gap: 24px; padding-inline: var(--gutter);
  transition: background .4s var(--ease), transform .45s var(--ease), box-shadow .4s;
}
[data-layout="boxed"] .site-header { position: sticky; top: 0; margin-bottom: calc(var(--head) * -1); }
.site-header.is-stuck { background: rgba(var(--scrim), .86); backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 1px 0 var(--line); }
.site-header.is-away { transform: translateY(-110%); }
.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; }
.mark { width: 40px; height: 40px; color: var(--water); flex: none; }
.mark .mark-heart { color: var(--sun); }
[data-theme="day"] .mark .mark-heart { color: #e0a800; }
.mark .mark-w2 { color: var(--dusk); opacity: 1; }
.brand-name { font-family: var(--serif); font-size: 1.22rem; letter-spacing: .005em; white-space: nowrap; }
.brand-name em { font-style: italic; color: var(--ink-2); }
.site-nav { display: flex; gap: clamp(14px, 2.2vw, 34px); font-size: .93rem; letter-spacing: .02em; }
.site-nav a { position: relative; padding: 8px 0; color: var(--ink-2); transition: color .25s; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px; opacity: 0; transform: translateY(4px);
  background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 7' preserveAspectRatio='none'%3E%3Cpath d='M0 4c5-4 10-4 15 0s10 4 15 0 10-4 15 0 10 4 15 0' fill='none' stroke='%232f7bff' stroke-width='1.6'/%3E%3C/svg%3E");
  transition: opacity .25s, transform .25s var(--ease);
}
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); }
.site-nav a:hover::after, .site-nav a[aria-current]::after { opacity: 1; transform: none; }
.header-tools { display: flex; gap: 8px; }
.site-header .menu-btn { display: none; }
@media (max-width: 940px) {
  .site-nav { display: none; }
  .site-header .menu-btn { display: inline-grid; }
}
@media (max-width: 420px) { .brand-name { font-size: 1.05rem; } .mark { width: 34px; height: 34px; } }

/* footer */
.site-footer { margin-top: clamp(80px, 12vw, 180px); padding-bottom: 34px; background: linear-gradient(180deg, transparent, var(--wall-2) 26%); }
.tide-line { width: 100%; height: 34px; color: var(--water); opacity: .7; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .7fr 1.2fr; gap: clamp(28px, 5vw, 80px); padding-top: clamp(40px, 6vw, 80px); }
.footer-tag { font-family: var(--serif); font-style: italic; font-size: 1.5rem; margin-top: 18px; color: var(--ink-2); }
.footer-contact { display: grid; gap: 8px; margin-top: 22px; }
.footer-contact a, .sheet-foot a { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); }
.footer-contact a:hover { color: var(--ink); }
.footer-contact .ico, .sheet-foot .ico { width: 20px; height: 20px; color: var(--water); }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: var(--leaf); color: var(--ink-2); transition: color .25s, border-color .25s, transform .3s var(--ease); }
.footer-social a:hover { color: var(--accent); border-color: currentColor; transform: translateY(-3px) rotate(-3deg); }
.footer-nav { display: grid; gap: 10px; align-content: start; font-family: var(--serif); font-size: 1.3rem; }
.footer-nav a { color: var(--ink-2); width: fit-content; }
.footer-nav a:hover { color: var(--ink); text-decoration: underline wavy var(--blue) 1.5px; text-underline-offset: 6px; }
.footer-subscribe h2 { font-size: 1.7rem; margin-bottom: 8px; }
.footer-subscribe form > p:first-child { color: var(--ink-2); margin-bottom: 16px; }
.footer-legal { margin-top: clamp(40px, 6vw, 70px); padding-top: 22px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--ink-3); }
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-subscribe { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
