/* ==========================================================================
   Portfolio — single stylesheet, no framework, no build step for CSS.
   Type-led and flowery: poster-style section headlines and illustrations,
   but poem text is still laid out for reading, never for decoration.
   ========================================================================== */

:root {
  --ink: #3d2a33;
  --ink-soft: #6e5a63;
  --paper: #fffaf3;
  --paper-2: #fbefe9;
  --line: #efdcd6;
  --accent: #b04a67;

  /* Flower palette: backgrounds and decoration only, never body text. */
  --blush: #f4c6c9;
  --rose: #e79aa3;
  --sage: #a8c3a0;
  --leaf: #7fa37a;
  --apricot: #f6c9a0;
  --butter: #f6d77a;
  --wash-blush: #fdf0ee;
  --wash-sage: #f0f6ec;
  --wash-apricot: #fef3e8;

  --gutter: clamp(1.25rem, 5vw, 3rem);

  --measure: 34rem; /* line length for poem text */
  --wrap: 46rem; /* line length for prose */

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --step: 1.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Soft deep plum rather than black. */
    --ink: #f6ece9;
    --ink-soft: #cdbcc2;
    --paper: #241b26;
    --paper-2: #2e2431;
    --line: #463a49;
    --accent: #f2a7b5;
    --wash-blush: #2c1f2c;
    --wash-sage: #1f2623;
    --wash-apricot: #2c2322;
  }
}

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

html {
  scroll-behavior: smooth;
  /* Anchor targets clear the sticky header. */
  scroll-padding-top: 5.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    /* Without this, looping animations would flicker at 0.01ms. */
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--step);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Wide scenes break out of the text column; never scroll sideways. */
  overflow-x: clip;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--paper);
  border: 1px solid var(--accent);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.9rem clamp(1.25rem, 5vw, 3rem);
  /* Fallback first for browsers without color-mix(); keep the header opaque
     so anchor links never show through the text. */
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.site-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.nav-strong {
  color: var(--accent) !important;
  font-weight: 600;
}

.back {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
}

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

/* ----------------------------------------------------------------- hero */

.hero {
  padding: clamp(3.5rem, 12vw, 7rem) max(var(--gutter), calc((100% - var(--wrap)) / 2)) 2rem;
  text-align: center;
  background:
    radial-gradient(40rem 26rem at 12% 8%, color-mix(in srgb, var(--blush) 45%, transparent), transparent 70%),
    radial-gradient(36rem 24rem at 92% 30%, color-mix(in srgb, var(--sage) 35%, transparent), transparent 70%),
    var(--paper);
}

/* The opening fades up once on load; no JS needed. */
.hero > * {
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero > :nth-child(2) { animation-delay: 0.08s; }
.hero > :nth-child(3) { animation-delay: 0.16s; }
.hero > :nth-child(n + 4) { animation-delay: 0.24s; }

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 1.25rem;
  }
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 11vw, 6.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 1.1rem auto 0;
  max-width: 28rem;
  font-size: 1.15em;
  color: var(--ink-soft);
  font-style: italic;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

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

.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: translate 0.2s ease;
}

.btn:hover {
  filter: brightness(1.08);
  translate: 0 -1px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

.btn-quiet {
  background: transparent;
  color: var(--accent);
}

.btn-quiet:hover {
  background: var(--paper-2);
  filter: none;
}

/* -------------------------------------------------------------- sections */

/* Sections run full width so each can carry its own colour wash; the
   padding keeps the content in a centred reading column. */
.section {
  padding: clamp(3rem, 8vw, 5.5rem) max(var(--gutter), calc((100% - var(--wrap)) / 2));
}

.wash-blush {
  background: var(--wash-blush);
}

.wash-sage {
  background: var(--wash-sage);
}

.wash-apricot {
  background: var(--wash-apricot);
}

/* A little vine opens each section instead of a rule. */
.section::before {
  content: "";
  display: block;
  width: 9rem;
  height: 1.5rem;
  margin: 0 auto clamp(2rem, 5vw, 3rem);
  background: url("scenes/divider.svg") center / contain no-repeat;
}

.intro {
  margin: 1.5rem auto 0;
  max-width: 34rem;
}

/* ------------------------------------------------------ section headlines */

.section-head {
  margin: 0 auto clamp(2rem, 5vw, 3rem);
  text-align: center;
  font-weight: inherit;
}

.section-title {
  display: block;
  margin-bottom: 0.9rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title .count {
  margin-left: 0.4rem;
  font-weight: 400;
  opacity: 0.7;
}

.display {
  display: block;
  font-size: clamp(2.2rem, 7vw, 4.25rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

.display em {
  color: var(--accent);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sprig {
  display: inline-block;
  width: 0.55em;
  height: 0.9em;
  margin-left: 0.1em;
  vertical-align: -0.05em;
  transform-origin: 50% 100%;
  animation: sway 4.5s ease-in-out infinite;
}

.sprig-stem {
  fill: none;
  stroke: var(--leaf);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.sprig-leaf {
  fill: var(--leaf);
}

.sprig-bloom {
  fill: var(--rose);
}

.sprig-heart {
  fill: var(--butter);
}

@keyframes sway {
  0%,
  100% {
    rotate: -6deg;
  }
  50% {
    rotate: 6deg;
  }
}

/* ---------------------------------------------------------------- scenes */

/* Illustrations (later: photos) run wider than the text column. */
.scene {
  --scene-width: min(60rem, 100vw - 2 * var(--gutter));
  width: var(--scene-width);
  margin: 0 0 clamp(2rem, 5vw, 3.5rem) calc((100% - var(--scene-width)) / 2);
}

.scene img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2rem;
}

.scene-intro {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 0;
}

/* Scroll reveal. Hidden only once main.js has marked the page ready, and
   only for visitors who have not asked for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .reveal {
    opacity: 0;
    translate: 0 2rem;
    scale: 0.97;
    transition:
      opacity 0.8s ease,
      translate 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
      scale 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .reveal-ready .reveal.is-visible {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }
}

.prose p {
  max-width: var(--wrap);
}

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

/* ------------------------------------------------------------ highlights */

/* Highlights get more room than the reading-width sections. */
.section-wide {
  padding-inline: max(var(--gutter), calc((100% - 64rem) / 2));
}

.highlight-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 2rem 1.5rem;
}

.highlight h3 {
  margin: 0.8rem 0 0.2rem;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.3;
}

.highlight h3 a {
  color: var(--ink);
  text-decoration: none;
}

.highlight h3 a:hover {
  color: var(--accent);
}

/* A highlight without a still (e.g. a poem with no reel) is a text card. */
.highlight:not(:has(.reel-card)) {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-2);
}

.highlight:not(:has(.reel-card)) h3 {
  margin-top: 0;
}

.highlight-meta {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------- hosting */

.hosting-list {
  list-style: none;
  margin: 2rem 0 2.5rem;
  padding: 0;
  display: grid;
  gap: 2.5rem;
}

.hosting-item {
  display: grid;
  gap: 1rem 1.5rem;
}

@media (min-width: 40rem) {
  .hosting-item:has(.reel-card) {
    grid-template-columns: 11rem 1fr;
    align-items: start;
  }
}

.hosting-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 500;
}

.hosting-meta {
  margin: 0 0 0.6rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hosting-note {
  margin: 0 0 0.6rem;
  color: var(--ink-soft);
}

/* A self-hosted still that links out to Instagram. Nothing is embedded. */
.reel-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  aspect-ratio: 4 / 5;
}

.reel-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel-cue {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  padding: 0.3rem 0.7rem 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.62);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reel-cue::before {
  content: "\25B6";
  margin-right: 0.4rem;
  font-size: 0.6rem;
}

a.reel-card:hover .reel-cue {
  background: var(--accent);
}

.reel-link::after {
  content: " \2197";
}

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

.contact-form {
  margin-top: 2rem;
  display: grid;
  gap: 1.15rem;
  max-width: 32rem;
}

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

.field label {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-2);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

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

/* Hosting-booking fields. main.js hides them unless the topic is hosting;
   display:grid would override [hidden], so restate it. */
.field-group {
  display: grid;
  gap: 1.15rem;
  margin: 0;
  padding: 1rem 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.field-group[hidden] {
  display: none;
}

.field-group legend {
  padding: 0 0.4rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Honeypot: removed from the accessibility tree and from view, but bots
   which fill every field still submit it. Do not use display:none — some
   bots skip hidden inputs entirely. */
.field-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 0;
  min-height: 1.5em;
  font-family: var(--sans);
  font-size: 0.9rem;
}

.form-status.is-ok {
  color: #2f6b3d;
}

.form-status.is-error {
  color: #a32c2c;
}

@media (prefers-color-scheme: dark) {
  .form-status.is-ok {
    color: #7fc894;
  }
  .form-status.is-error {
    color: #e08585;
  }
}

/* ------------------------------------------------------------ poem lists */

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1.25rem, 5vw, 3rem);
}

.wrap-narrow {
  max-width: calc(var(--measure) + 4rem);
}

.poem-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.poem-card {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}

.poem-card h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 500;
}

.poem-card h3 a {
  text-decoration: none;
  color: var(--ink);
}

.poem-card h3 a:hover {
  color: var(--accent);
}

.poem-subtitle {
  margin: 0.3rem 0 0;
  color: var(--ink-soft);
  font-style: italic;
}

.poem-year,
.poem-meta {
  margin: 0.4rem 0 0;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.poem-year {
  color: var(--ink-soft);
  opacity: 0.7;
}

.empty {
  color: var(--ink-soft);
  font-style: italic;
}

/* ------------------------------------------------------------ poem pages */

.poem h1 {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.poem-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.25rem 0 0;
}

.tag {
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.poem-body {
  margin-top: 2.5rem;
  max-width: var(--measure);
}

/* Stanzas and lines are the content — never let the browser reflow them.
   pre-wrap lives on the stanza, not .poem-body, so template whitespace
   between stanzas is not rendered as extra gaps. */
.poem-stanza {
  margin: 0 0 1.4em;
  white-space: pre-wrap;
}

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

.site-footer {
  padding: 2.5rem clamp(1.25rem, 5vw, 3rem);
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.socials {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin: 0 0 1rem;
  padding: 0;
}

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

.socials a:hover {
  color: var(--accent);
}

.site-footer p {
  margin: 0;
}
