/* Shared across every page. Page-specific layout stays inline in each page. */

/* Fonts, self-hosted: Fraunces (display), Inter (UI), JetBrains Mono (labels).
   WOFF2 subsets, latin plus latin-ext (the latter only downloads if a page needs it).
   Fraunces and Inter are variable, so one file covers every weight in use. */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 600; font-display: swap; src: url(/assets/fonts/fraunces-normal-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 600; font-display: swap; src: url(/assets/fonts/fraunces-normal-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/fraunces-italic-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/fraunces-italic-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/inter-normal-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/inter-normal-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/jetbrainsmono-normal-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/jetbrainsmono-normal-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Hover: every control answers the pointer with more than a color swap.
   Text links carry a drawn underline (background-image, so it can grow);
   buttons lift or fill. Motion is dropped under reduced motion, the state
   change itself stays. */
main a:not(.btn), footer a, .consent a, .linklike {
  --ul: 0px; /* distance from the box bottom to the line, i.e. bottom padding */
  color: #D4A537;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 calc(100% - var(--ul));
  background-size: 100% 1px;
  transition: background-size .2s ease, color .2s ease;
}
main a:not(.btn):hover, footer a:hover, .consent a:hover, .linklike:hover {
  color: #EAE4D6;
  background-size: 100% 2px;
}

/* nav links and the wordmark: no line at rest, it draws in from the left */
.nav-links a, .brand {
  background-image: linear-gradient(#D4A537, #D4A537);
  background-repeat: no-repeat;
  background-position: 0 calc(100% - var(--ul, 0px));
  background-size: 0% 2px;
  transition: background-size .25s ease, color .2s ease;
}
.nav-links a { --ul: 8px; }
footer nav a { --ul: 4px; }
.actions a:not(.btn) { --ul: 14px; }
.linklike { --ul: 11px; }
.brand { --ul: 4px; }
.consent a { --ul: 4px; }
.nav-links a:hover, .nav-links a[aria-current="page"], .brand:hover { background-size: 100% 2px; }
.nav-links a:hover { color: #D4A537; }

/* primary: lifts and shows a brass lip, like a key that can be pressed */
.btn { transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-size .25s ease; }
.btn-primary:hover, button.primary:hover {
  background-color: #E6BD52;
  transform: translateY(-2px);
  box-shadow: 0 3px 0 #9A7420;
}
.btn-primary:active, button.primary:active { transform: translateY(0); box-shadow: none; }
button.primary { transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease; }

/* quiet: fills a step lighter, border turns brass, label gets an underline */
.btn-quiet {
  background-image: linear-gradient(#D4A537, #D4A537);
  background-repeat: no-repeat;
  background-position: 50% calc(100% - 12px);
  background-size: 0 1.5px;
}
.btn-quiet:hover {
  background-color: #173B40;
  border-color: #D4A537;
  background-size: calc(100% - 44px) 1.5px;
}

@media (prefers-reduced-motion: reduce) {
  .btn, button.primary, main a, footer a, .consent a, .linklike, .nav-links a, .brand { transition: none; }
  .btn-primary:hover, button.primary:hover { transform: none; }
}

/* Page transitions: a short crossfade between pages instead of a hard cut;
   the wordmark is a shared element so it stays put while the page changes.
   Same-origin navigations only, and none at all under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  /* the @view-transition opt-in itself is inline in each page's head */
  ::view-transition-old(root), ::view-transition-new(root) {
    animation-duration: .32s;
    animation-timing-function: cubic-bezier(.4, 0, .2, 1);
  }
  ::view-transition-group(site-header), ::view-transition-group(kicker) {
    animation-duration: .32s;
    animation-timing-function: cubic-bezier(.4, 0, .2, 1);
  }
  /* the header is identical on every page, so it holds still while the page
     under it changes; the "For her, to send to him" kicker that opens both
     the home page and the article slides from one spot to the other */
  header.nav { view-transition-name: site-header; }
  .vt-kicker { view-transition-name: kicker; }
}

/* One header on every page: wordmark home, the same section links, and the
   share action. Sticky so the action stays reachable on long pages. */
html { scroll-padding-top: 80px; scroll-padding-bottom: 88px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: #D4A537; color: #0E272B; padding: 10px 14px; z-index: 30; border-radius: 8px; }
.nav { position: sticky; top: 0; z-index: 5; background: #0E272B; border-bottom: 1px solid #2C585E; }
.nav .wrap { display: flex; align-items: center; gap: 28px; min-height: 64px; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.brand { font: 300 26px/1 "Fraunces", Georgia, serif; color: #EAE4D6; text-decoration: none; margin-right: auto; padding: 6px 0; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: #EAE4D6; text-decoration: none; font: 500 15px/1 "Inter", -apple-system, system-ui, sans-serif; padding: 12px 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 10px;
  font: 600 16px/1 "Inter", -apple-system, system-ui, sans-serif; text-decoration: none; cursor: pointer; border: 0;
}
.btn-primary { background-color: #D4A537; color: #0E272B; }
.btn-quiet { background-color: transparent; color: #EAE4D6; border: 1px solid #2C585E; }
.nav .btn { min-height: 44px; padding: 0 16px; font-size: 15px; }
.nav-status { min-height: 0; margin: 16px 0 0; }
/* Tablet and phone: the section links drop to a second row under the wordmark
   and the share button, and scroll sideways if they don't fit. No menu button
   to open first, and every link stays one tap away on every page. */
@media (max-width: 900px) {
  html { scroll-padding-top: 124px; }
  .nav .wrap { flex-wrap: wrap; row-gap: 10px; min-height: 0; padding-top: 10px; }
  .nav-links {
    order: 3; flex: 1 0 100%; gap: 22px;
    margin: 0 -24px; padding: 0 24px 2px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    border-top: 1px solid #1D454B;
    /* fade at the right edge says there is more to scroll to */
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { flex: none; white-space: nowrap; padding: 13px 0 12px; font-size: 14.5px; }
  .nav-links a:last-child { margin-right: 24px; }
}
@media (max-width: 560px) {
  .nav .wrap { padding: 10px 20px 0; }
  .nav-links { margin: 0 -20px; padding: 0 20px 2px; gap: 20px; }
}

/* Links inside running text get a 24px-tall hit area without moving the line */
main p a:not(.btn), footer p a { padding-block: 4px; --ul: 4px; }
/* anchor targets receive focus for keyboard users; they are not controls */
[tabindex="-1"]:focus { outline: none; }
