/* ============================================================
   Julien Smith, shared styles
   Palette, type scale and layout tokens live here.
   ============================================================ */

:root {
  --ink:        #14201b;
  --ink-soft:   #46564d;
  --ink-faint:  #7c8a81;
  --paper:      #e7e5dd;
  --paper-lift: #f4f2ec;
  --signal:     #e3b505;
  --rule:       #c7c4b9;

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body:    "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --measure: 34rem;
  --gutter: clamp(1.5rem, 5vw, 5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-synthesis-weight: none;
}

/* ---------- shell ---------- */

.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 2rem 0 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 1.75rem;
  font-size: 0.9375rem;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 0.15rem;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.nav a:hover,
.nav a:focus-visible { color: var(--ink); border-bottom-color: var(--signal); }

.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- the script markup: page signature ---------- */

.script {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.25rem, 6.2vw, 4.25rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 20ch;
  text-wrap: balance;
}

/* emphasis stroke: the pencil underline on a stressed word.
   Drawn as a background gradient rather than a pseudo-element so that a
   multi-word phrase can break across lines and keep its stroke on each. */
.stress {
  background-image: linear-gradient(var(--signal), var(--signal));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 0.1em;
  padding-bottom: 0.02em;
  border-radius: 1px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* breath mark between phrases */
.breath {
  display: inline-block;
  color: var(--ink-faint);
  font-family: var(--body);
  font-size: 0.32em;
  vertical-align: 0.55em;
  margin: 0 0.28em;
  user-select: none;
}

@media (prefers-reduced-motion: no-preference) {
  .stress {
    animation: stroke 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }
  .stress:nth-of-type(2) { animation-delay: 0.34s; }
  .stress:nth-of-type(3) { animation-delay: 0.66s; }

  .breath { animation: fade 0.4s ease 0.9s both; }

  @keyframes stroke {
    from { background-size: 0% 0.1em; }
    to   { background-size: 100% 0.1em; }
  }
  @keyframes fade {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}

/* ---------- page furniture ---------- */

.hero { padding: clamp(4rem, 11vw, 8.5rem) 0 clamp(3rem, 7vw, 5rem); }

.standfirst {
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: var(--measure);
  margin: 2.25rem 0 0;
}

/* the turn: the line that lands after the setup */
.standfirst.turn {
  margin-top: 1.5rem;
  color: var(--ink);
}

.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  margin: 0 0 1.25rem;
}

.block { padding: clamp(3rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--rule); }

.block h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
}

.block h3 {
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.0625rem;
  margin: 2rem 0 0.5rem;
}

.block p { max-width: var(--measure); margin: 0 0 1.15rem; }

.block a:not(.button) { color: var(--ink); text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------- the three doors on the home page ---------- */

.doors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.door {
  display: block;
  background: var(--paper);
  padding: 2rem 1.75rem 2.25rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.18s ease;
}

.door:hover, .door:focus-visible { background: var(--paper-lift); }

.door .num {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}

.door h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
  margin: 0.9rem 0 0.6rem;
}

.door p { font-size: 0.9375rem; color: var(--ink-soft); margin: 0; max-width: none; }

.door .go { display: inline-block; margin-top: 1.25rem; font-size: 0.875rem; color: var(--ink); }
.door:hover .go { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------- list of plain facts ---------- */

.facts { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }

.facts li {
  display: flex;
  gap: 1.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
}

.facts .key { flex: 0 0 8rem; color: var(--ink-faint); }

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

.button {
  display: inline-block;
  background: var(--ink);
  color: var(--paper-lift);
  font-family: var(--body);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.button:hover, .button:focus-visible { background: var(--signal); border-color: var(--signal); color: var(--ink); }

/* ---------- form ---------- */

.form { max-width: var(--measure); margin-top: 2rem; }

.field { margin-bottom: 1.5rem; }

.field label {
  display: block;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.5rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper-lift);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.75rem 0.9rem;
  transition: border-color 0.18s ease;
}

.field textarea { min-height: 9rem; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(227, 181, 5, 0.35);
}

.hp { position: absolute; left: -9999px; }

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

.footer {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0 3.5rem;
  font-size: 0.875rem;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer a { color: var(--ink-soft); text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ---------- accessibility floor ---------- */

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

/* ---------- long-form reading ---------- */

.piece { padding: clamp(3rem, 8vw, 6rem) 0 0; }

.piece-head { max-width: 42rem; border-bottom: 1px solid var(--rule); padding-bottom: 2.5rem; }

.piece-head h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0.75rem 0 0;
  text-wrap: balance;
}

.piece-meta {
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 1.5rem 0 0;
}

.piece-meta span + span::before { content: "\00a0\00a0/\00a0\00a0"; color: var(--rule); }

.prose {
  max-width: 36rem;
  padding: 3rem 0 4rem;
  font-size: 1.125rem;
  line-height: 1.72;
}

.prose p { margin: 0 0 1.5rem; }

.prose h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 3.5rem 0 1.25rem;
  scroll-margin-top: 1.5rem;
}

.prose h2:first-child { margin-top: 0; }

/* headings the author set in capitals: caps need air between letters
   and can sit a step smaller without losing weight */
.prose h2.caps {
  font-size: 1.3rem;
  letter-spacing: 0.045em;
  line-height: 1.3;
}

.prose blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--paper-lift);
  border-left: 3px solid var(--signal);
  font-size: 1.0625rem;
}

.prose blockquote p:last-child { margin-bottom: 0; }

.prose hr {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 3rem 0;
  width: 4rem;
}

.prose strong { font-weight: 600; }

.prose ol { padding-left: 1.25rem; margin: 0 0 1.5rem; }
.prose ol li { margin-bottom: 1rem; padding-left: 0.35rem; }

/* testimonials */

.quotes {
  display: grid;
  gap: 1.5rem;
  max-width: var(--measure);
}

.quote {
  margin: 0;
  padding: 1.5rem 1.75rem;
  background: var(--paper-lift);
  border-left: 3px solid var(--signal);
  border-radius: 2px;
}

.quote p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
}

.quote cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* the short one reads as a message received, set a touch tighter */
.quote-note p { font-size: 1rem; }

/* booking embed */

.booking-frame {
  border: 1px solid var(--rule);
  background: var(--paper-lift);
  padding: clamp(0.5rem, 2vw, 1rem);
  border-radius: 2px;
}

.booking-fallback {
  font-size: 0.9375rem;
  color: var(--ink-faint);
  margin: 1.25rem 0 0;
}

.booking-fallback a { color: var(--ink-soft); }

/* newsletter, compact link in the hero */

.signup-inline {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  max-width: var(--measure);
  margin: 2.75rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.signup-inline a {
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  background-image: linear-gradient(var(--signal), var(--signal));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 0.14em;
  padding-bottom: 0.1em;
  transition: background-size 0.18s ease;
}

.signup-inline a:hover,
.signup-inline a:focus-visible { background-size: 100% 100%; }

.signup-inline span {
  font-size: 0.9375rem;
  color: var(--ink-faint);
  flex: 1 1 16rem;
}

/* introductory note above a piece */

.lede {
  max-width: 36rem;
  margin: 3rem 0 0;
  padding: 0 0 0 1.5rem;
  border-left: 2px solid var(--signal);
  font-size: 1.0625rem;
  line-height: 1.68;
  color: var(--ink-soft);
}

.lede p { margin: 0 0 1.1rem; }
.lede p:last-child { margin-bottom: 0; }
.lede .sig {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 1.4rem;
}

/* download link in the piece header */

.download { margin: 1.25rem 0 0; }

.download a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--signal);
  padding-bottom: 0.15rem;
}

.download a::before {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 2px 2px;
  box-shadow: inset 0 -2px 0 -1px currentColor;
}

.download a:hover, .download a:focus-visible { background: var(--paper-lift); }

/* index of pieces */

.shelf { list-style: none; padding: 0; margin: 0; }

.shelf li { border-bottom: 1px solid var(--rule); }

.shelf a {
  display: block;
  padding: 1.75rem 0;
  text-decoration: none;
  color: inherit;
}

.shelf a:hover h3, .shelf a:focus-visible h3 { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 4px; }

.shelf .kind {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.shelf h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0.6rem 0 0.5rem;
}

.shelf p { font-size: 0.9375rem; color: var(--ink-soft); margin: 0; max-width: 40rem; }

.shelf .stat { font-size: 0.8125rem; color: var(--ink-faint); margin-top: 0.75rem; }

.backlink {
  display: inline-block;
  margin: 3rem 0 0;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.backlink:hover { color: var(--ink); }

/* ---------- editorial note (delete before launch) ---------- */

.todo {
  background: rgba(227, 181, 5, 0.16);
  border-left: 3px solid var(--signal);
  padding: 0.9rem 1.1rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
  max-width: var(--measure);
  margin: 0 0 1.5rem;
}
