/* Tight Ship site: the parts every page shares. From probe B (serif and plain talk).
   Reset, type, widths, the skip link, header, footer, buttons, icons and the shared entrance motion.
   Phone first (390), holds at 360, widens to 1440. Settings come from tokens.css. */

/* Settings this file adds to tokens.css (see site/notes/home.md). */
:root {
  --ink-soft: #26323f;                    /* long reading text under a heading; 12 to 1 on paper */
  --green-dark: #0f2620;                  /* the button, pressed or hovered */
  --line-strong: rgba(12, 22, 37, .2);    /* a rule that closes a group */
  --flash: rgba(255, 116, 25, .35);       /* the one-time orange flash behind a price */
  --t-settle: .6s;                        /* a screen settling into its frame */
}

/* reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--fs-body)/1.6 var(--text);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--orange-text); outline-offset: 3px; border-radius: 4px; }

/* the skip link */
.skip { position: absolute; left: -999px; top: 0; background: var(--green); color: var(--paper); padding: 12px 16px; z-index: 5; }
.skip:focus { left: 8px; top: 8px; }

/* widths: a centered column with the gutter on both sides */
.col, .narrow, .mid, .wide { margin-inline: auto; padding-inline: var(--gutter); width: 100%; }
.narrow { max-width: 552px; }
.col { max-width: 712px; }
.mid { max-width: 872px; }
.wide { max-width: 1152px; }
.center { text-align: center; }
.band { background: var(--bone); }

/* type */
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; text-wrap: balance; }
/* no heading ends on a lone word, and no paragraph or list line leaves its last word alone on a line
   (the final review, Nov 17, 2026); browsers without text-wrap simply wrap as before */
h3, summary { text-wrap: balance; }
p, li, dd, figcaption { text-wrap: pretty; }
h1 { font-size: var(--fs-h1); line-height: 1.12; }
h2 { font-size: var(--fs-h2); line-height: 1.18; }
.label {
  font-family: var(--cond);
  font-stretch: condensed;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 15px;
  line-height: 1.3;
  color: var(--steel);
}
.sub { color: var(--steel); margin-top: 12px; }

/* icons: drawn in the page with a 2.1 px line */
.ico { fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.chev, .check { color: var(--green); }

/* header: the mark, centered, linking home, and a small menu of plain links.
   On the phone the menu sits under the mark in one row (it fits 360 px with room to spare);
   from 640 px up the mark stays in the middle and the menu sits to its right; from 1000 px the mark
   sits at the left (below). */
.site-head__in { display: flex; flex-direction: column; align-items: center; padding-top: 6px; }
.site-head__mark { display: inline-flex; align-items: center; min-height: var(--tap); }
.site-head__nav ul { display: flex; justify-content: center; gap: 0 4px; }
.site-head__nav a {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 10px;
  color: var(--steel); font: 600 16px/1 var(--text); white-space: nowrap;
  text-decoration: none; text-underline-offset: 4px;
  transition: color var(--t-tap) ease;
}
.site-head__nav a:hover, .site-head__nav a[aria-current="page"] { color: var(--green); text-decoration: underline; }
@media (min-width: 640px) {
  .site-head__in { display: grid; grid-template-columns: 1fr auto 1fr; padding-top: 20px; }
  .site-head__mark { grid-column: 2; }
  .site-head__nav { grid-column: 3; justify-self: end; }
  .site-head__nav ul { gap: 0 10px; }
}
/* from 1000 px the pages are laid out left to right (Hank, Nov 14: the desktop should "stand alone"),
   so the mark moves to the left edge of the page, in line with the headline, and the menu stays right. */
@media (min-width: 1000px) {
  .site-head__in { grid-template-columns: auto 1fr; }
  .site-head__mark { grid-column: 1; }
  .site-head__nav { grid-column: 2; }
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 30px;
  background: var(--green); color: var(--paper);
  font: 600 18px/1 var(--text); text-decoration: none; text-align: center;
  border: 2px solid var(--green); border-radius: 10px;
  cursor: pointer;
  transition: background-color var(--t-tap) ease, color var(--t-tap) ease;
}
.btn:hover, .btn:active { background: var(--green-dark); }
.btn.ghost { background: transparent; color: var(--green); min-height: 46px; padding: 0 24px; font-size: 17px; }
.btn.ghost:hover, .btn.ghost:active { background: var(--green); color: var(--paper); }
.btn.full { display: flex; width: 100%; }

/* footer */
.site-foot { background: var(--paper); padding: 48px 0 40px; border-top: 1px solid var(--line); text-align: center; }
.site-foot__mark { margin: 0 auto 22px; }
.site-foot p { color: var(--steel); font-size: var(--fs-small); line-height: 1.5; margin-top: 6px; }
.site-foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 22px; margin-top: 18px; }
.site-foot__links a {
  display: inline-flex; align-items: center; min-height: var(--tap);
  color: var(--green); font-weight: 600; text-underline-offset: 3px;
}
.site-foot .site-foot__copy { margin-top: 10px; }
/* the shop's social accounts: plain word buttons, no brand logos */
.site-foot__social { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 24px; }
.site-foot__social a {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 18px;
  border: 1.5px solid var(--green); border-radius: 999px;
  color: var(--green); font-weight: 600; text-decoration: none;
  transition: background-color var(--t-tap) var(--out), color var(--t-tap) var(--out);
}
.site-foot__social a:hover { background: var(--green); color: var(--paper); }

@media (min-width: 1000px) {
  body { font-size: 18px; }
}

/* The shared entrance motion. motion.js puts "motion" on <html> before anything here starts hidden,
   so with JavaScript off, or with reduced motion asked for, every piece simply shows.
     data-rise            rises --rise and fades in as it scrolls into view
     data-delay="1".."6"  waits its turn, 0.06 s apart (for pieces that arrive together)
     data-settle          a picture settling into its frame: a longer rise from 96.5% size
     data-flash           one orange flash behind the piece when it comes into view */
.motion [data-rise] {
  opacity: 0; transform: translateY(var(--rise));
  transition: opacity var(--t-enter) var(--out) var(--d, 0s), transform var(--t-enter) var(--out) var(--d, 0s);
}
.motion [data-settle] {
  opacity: 0; transform: translateY(28px) scale(.965);
  transition: opacity var(--t-enter) var(--out), transform var(--t-settle) var(--out);
}
.motion [data-rise].in, .motion [data-settle].in { opacity: 1; transform: none; }
.motion [data-rise].done, .motion [data-settle].done { opacity: 1; transform: none; transition: none; }
[data-delay="1"] { --d: .06s; }
[data-delay="2"] { --d: .12s; }
[data-delay="3"] { --d: .18s; }
[data-delay="4"] { --d: .24s; }
[data-delay="5"] { --d: .30s; }
[data-delay="6"] { --d: .36s; }
[data-flash] { border-radius: 6px; }
.motion [data-flash].in { animation: flash var(--t-enter) var(--out) .3s both; }
@keyframes flash {
  from { background-color: var(--flash); box-shadow: 0 0 0 5px var(--flash); }
  to { background-color: transparent; box-shadow: 0 0 0 5px transparent; }
}

/* Reduced motion means no movement, on every page. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .motion [data-rise], .motion [data-settle] { opacity: 1 !important; transform: none !important; }
}
@media print {
  .motion [data-rise], .motion [data-settle] { opacity: 1 !important; transform: none !important; }
}
