/* ==========================================================================
   spirecs.com - Jennifer Dymond, CPA
   Hand-authored static site. No build step, no framework.
   Type: Geist (self-hosted variable woff2, latin + latin-ext).
   Accent: the Spire red, taken from the existing brand mark.
   ========================================================================== */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/geist-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: "Geist";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/geist-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- tokens ------------------------------------------------------------- */

:root {
  /* One accent, locked for the whole page. Values chosen so accent-on-paper
     text clears WCAG AA: #c92512 is 5.0:1 on --paper-2, 5.36:1 on --paper,
     and white on it is 5.59:1. */
  --accent: #c92512;
  --accent-ink: #a01b0b;
  --accent-wash: #fdefec;

  --paper: #fbfaf9;
  --paper-2: #f4f2ef;
  --ink: #17161a;
  --ink-2: #3f3d45;
  --ink-3: #6c6975;
  --rule: #e3dfdb;
  /* Form control boundaries need WCAG 2.2 SC 1.4.11 non-text contrast (3:1),
     which --rule does not meet. 3.25:1 on --paper, 3.03:1 on --paper-2. */
  --field-border: #8f8a90;

  --radius: 14px;
  --radius-sm: 10px;
  --shell: 1180px;
  --measure: 62ch;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 1px 2px rgb(23 22 26 / 0.04), 0 12px 32px -12px rgb(23 22 26 / 0.14);
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #ff6a4d;
    --accent-ink: #ff8a72;
    --accent-wash: #2a1a16;

    --paper: #121116;
    --paper-2: #1a191f;
    --ink: #f3f1ef;
    --ink-2: #c8c4cd;
    --ink-3: #96929e;
    --rule: #2b2933;
    --field-border: #6b6875;

    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -12px rgb(0 0 0 / 0.55);
  }
}

/* --- reset -------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
figure,
blockquote,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

/* Any explicit `display` beats the UA rule for [hidden], so restate it. */
[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  ::selection {
    color: #1a0d09;
  }
}

/* --- primitives --------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 20px;
}

.icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex: none;
}

section {
  padding-block: clamp(4.5rem, 9vw, 8rem);
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.85rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  max-width: 24ch;
}

h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.lede {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  color: var(--ink-2);
  max-width: var(--measure);
}

/* buttons: one radius system, pill for interactive */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  padding: 0.8125rem 1.375rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease),
    color 0.25s var(--ease), transform 0.12s var(--ease);
}

.btn .icon {
  font-size: 1.0625em;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-ink);
}

@media (prefers-color-scheme: dark) {
  .btn--primary {
    color: #1a0d09;
  }
}

.btn--ghost {
  border-color: var(--rule);
  color: var(--ink);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--ink-3);
  background: var(--paper-2);
}

/* text link with arrow */

.tlink {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.25s var(--ease);
}

.tlink .icon {
  font-size: 1.0625em;
}

.tlink:hover {
  gap: 0.75rem;
}

/* --- header ------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 68px;
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}

.masthead .shell {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.brand img {
  width: 26px;
  height: 26px;
}

/* Below this width the wordmark would wrap beside the CTA, and the name is
   already the H1 immediately below, so the mark carries the brand alone. */
.brand span {
  display: none;
  white-space: nowrap;
}

@media (min-width: 560px) {
  .brand span {
    display: inline;
  }
}

.navlinks {
  display: none;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.navlinks a:hover {
  color: var(--ink);
}

.masthead .btn {
  padding: 0.5625rem 1.0625rem;
  font-size: 0.875rem;
}

@media (min-width: 900px) {
  .navlinks {
    display: flex;
  }
}

/* --- hero: asymmetric split -------------------------------------------- */

.hero {
  padding-top: clamp(2.75rem, 5vw, 5.5rem);
  padding-bottom: clamp(3.5rem, 6vw, 6rem);
}

.hero__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero h1 {
  margin: 0 0 1.125rem;
  font-size: clamp(2.5rem, 6.4vw, 4.25rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero h1 .cred {
  color: var(--accent);
}

.nowrap {
  white-space: nowrap;
}

.hero .lede {
  max-width: 34ch;
  font-size: clamp(1.125rem, 1.8vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink-2);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero__portrait {
  position: relative;
}

.hero__portrait img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (min-width: 880px) {
  .hero__grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

/* --- appearances -------------------------------------------------------- */

.appearances {
  background: var(--paper-2);
  border-block: 1px solid var(--rule);
}

.appearances__head {
  display: grid;
  gap: 0.875rem;
  margin-bottom: 2.75rem;
}

.events {
  display: grid;
  gap: 1rem;
}

.event {
  display: grid;
  gap: 1.25rem;
  padding: 1.625rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.event__when {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.event__when .icon {
  font-size: 1rem;
  align-self: center;
}

.event h3 {
  margin-bottom: 0.4375rem;
}

.event__meta {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  font-size: 0.9375rem;
  color: var(--ink-3);
}

/* Must not match .event__when / .event__meta / .perk, which are also <p> and
   would lose their own color and margin to this rule's higher specificity. */
.event > div > p:not([class]) {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
  max-width: 56ch;
}

.event__side {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.event .perk {
  display: grid;
  gap: 0.375rem;
  margin-top: 0;
  max-width: none;
  padding: 0.875rem 1rem;
  background: var(--accent-wash);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--ink-2);
}

.perk__label {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  font-weight: 600;
  color: var(--accent-ink);
}

.perk code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9375em;
  color: var(--ink);
  user-select: all;
}

@media (min-width: 820px) {
  .event {
    grid-template-columns: 1fr minmax(240px, 0.48fr);
    align-items: center;
  }
}

.stages {
  margin-top: 3.25rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--rule);
}

.stages h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0;
  margin-bottom: 1.5rem;
}

.stages ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1.75rem, 5vw, 3.5rem);
}

.stages img {
  height: 30px;
  width: auto;
  opacity: 0.72;
  filter: grayscale(1);
  transition: opacity 0.25s var(--ease), filter 0.25s var(--ease);
}

.stages li:hover img {
  opacity: 1;
  filter: grayscale(0);
}

@media (prefers-color-scheme: dark) {
  .stages img {
    filter: grayscale(1) invert(1) brightness(1.6);
  }

  .stages li:hover img {
    filter: grayscale(1) invert(1) brightness(1.9);
  }
}

/* --- thread: editorial stack ------------------------------------------- */

.thread__inner {
  max-width: 44rem;
}

.thread h2 {
  margin-bottom: 1.5rem;
  max-width: 30ch;
}

.thread p + p {
  margin-top: 1.125rem;
}

.thread p {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  color: var(--ink-2);
}

/* --- services: asymmetric bento ---------------------------------------- */

.services__head {
  max-width: 46rem;
  margin-bottom: 3rem;
}

.services__head h2 {
  margin-bottom: 1rem;
}

.bento {
  display: grid;
  gap: 1.125rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.card__icon {
  display: grid;
  place-items: center;
  width: 2.625rem;
  height: 2.625rem;
  border-radius: var(--radius-sm);
  background: var(--accent-wash);
  color: var(--accent-ink);
  font-size: 1.3125rem;
}

.card p {
  color: var(--ink-2);
  font-size: 0.9375rem;
  max-width: 48ch;
}

.card__points {
  display: grid;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.card__points li {
  display: flex;
  gap: 0.5625rem;
}

.card__points .icon {
  margin-top: 0.3125rem;
  font-size: 0.875rem;
  color: var(--accent);
}

/* .card__body covers the media cell, whose link is nested one level deeper. */
.card > .btn,
.card__body > .tlink {
  margin-top: auto;
  align-self: start;
}

/* photo-led cell */
.card--media {
  padding: 0;
  overflow: hidden;
}

.card--media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--rule);
}

.card--media .card__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem;
  flex: 1;
}

/* tinted cell */
.card--tint {
  background: var(--accent-wash);
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
}

.card--tint .card__icon {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

/* Scoped above `.card p`, which would otherwise win on specificity. */
.card .waitlist-note {
  font-size: 0.875rem;
  color: var(--ink-3);
}

/* split cell: body plus a right rail, so a full-width card fills its width */
.card--split .card__body,
.card--split .card__aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card--split .card__aside {
  gap: 1.25rem;
}

.card--split .card__aside .btn {
  align-self: start;
}

@media (min-width: 760px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .card--wide {
    grid-column: span 2;
  }

  .card--media {
    flex-direction: row;
  }

  .card--media img {
    width: 42%;
    aspect-ratio: auto;
    border-bottom: 0;
    border-right: 1px solid var(--rule);
  }

  .card--split {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 0.62fr);
    gap: 2.5rem;
    align-items: start;
  }
}

/* --- about: split with stage photo ------------------------------------- */

/* Services and About are both on --paper, so mark the seam rather than
   leaving two stacked section paddings reading as an accidental void. */
.about {
  border-top: 1px solid var(--rule);
}

.about__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.about h2 {
  margin-bottom: 1.375rem;
}

.about p {
  color: var(--ink-2);
  max-width: 54ch;
}

.about p + p {
  margin-top: 1.0625rem;
}

.creds {
  display: grid;
  gap: 0.6875rem;
  margin-top: 1.875rem;
  font-size: 0.9375rem;
}

.creds li {
  display: flex;
  gap: 0.625rem;
  color: var(--ink-2);
}

.creds .icon {
  margin-top: 0.25rem;
  color: var(--accent);
  font-size: 1rem;
}

.about figure {
  margin: 0;
}

.about img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about figcaption {
  margin-top: 0.875rem;
  font-size: 0.875rem;
  color: var(--ink-3);
  max-width: 44ch;
}

@media (min-width: 880px) {
  .about__grid {
    grid-template-columns: 1fr 0.82fr;
  }
}

/* --- follow ------------------------------------------------------------- */

.follow {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
}

.follow__head {
  max-width: 44rem;
  margin-bottom: 3rem;
}

.follow__head h2 {
  margin-bottom: 1rem;
}

.follow__grid {
  display: grid;
  gap: 1.125rem;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.panel p {
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.panel > .btn {
  margin-top: auto;
  align-self: start;
}

.panel--form {
  margin-top: 1.125rem;
  gap: 0;
}

.panel--form header {
  max-width: 60ch;
  margin-bottom: 1.75rem;
}

.panel--form h3 {
  margin-bottom: 0.625rem;
}

/* --- forms -------------------------------------------------------------- */

.form {
  display: grid;
  gap: 1.125rem;
}

.form__row {
  display: grid;
  gap: 1.125rem;
}

.field {
  display: grid;
  gap: 0.4375rem;
}

.field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}

.field__opt {
  font-weight: 400;
  color: var(--ink-3);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.6875rem 0.875rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

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

/* Placeholder must clear AA against the input background, not sit at 3:1. */
.field ::placeholder {
  color: var(--ink-3);
  opacity: 1;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--ink-3);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.field__err {
  display: none;
  font-size: 0.8125rem;
  color: var(--accent-ink);
}

.field.is-invalid input,
.field.is-invalid select {
  border-color: var(--accent-ink);
}

.field.is-invalid .field__err {
  display: block;
}

.form__inline-row {
  display: grid;
  gap: 0.625rem;
}

.form__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem 1.25rem;
  margin-top: 0.25rem;
}

.form__fine {
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.btn.is-busy .btn__spin {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn.is-busy .btn__spin {
    animation: none;
  }
}

.form__status {
  display: none;
}

.form__status.is-shown {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.8125rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  line-height: 1.5;
}

.form__status .icon {
  margin-top: 0.1875rem;
  flex: none;
}

.form__status.is-ok {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--ink);
}

.form__status.is-bad {
  background: var(--accent-wash);
  color: var(--accent-ink);
}

.form__status a {
  color: inherit;
  text-decoration: underline;
}

.form__success {
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.form__success p {
  font-size: 0.9375rem;
  color: var(--ink-2);
  max-width: 56ch;
}

@media (min-width: 640px) {
  .form__row {
    grid-template-columns: repeat(2, 1fr);
  }

  .form__inline-row {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

@media (min-width: 860px) {
  .follow__grid {
    grid-template-columns: repeat(2, 1fr);
    align-items: stretch;
  }
}

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

.footer {
  border-top: 1px solid var(--rule);
  padding-block: 2.75rem;
  font-size: 0.875rem;
  color: var(--ink-3);
}

.footer .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-right: auto;
  color: var(--ink-2);
}

.footer__brand img {
  width: 22px;
  height: 22px;
}

.footer a:hover {
  color: var(--ink);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

/* WCAG 2.5.8: keep pointer targets at 24px minimum. */
.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

/* --- motion ------------------------------------------------------------- */

/* Reveal is gated on .has-js so the page is fully visible without JavaScript. */
@media (prefers-reduced-motion: no-preference) {
  .has-js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }

  .has-js .reveal.is-in {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
