/* ===================================================================
   Sevra Design Studio — Notes (writing) section
   --------------------------------------------------------------------
   Patterns for /notes/<post-slug>/ pages. Loaded after style-v2.css
   so it inherits the site's tokens and chrome.

   This file ships only the .note-* layer — the article-page shell,
   typographic moves (drop cap, sub-heads, divider), inline editorial
   patterns (pullquote, aside, figure, inset), sign-off, and dark
   closing band. Site header, footer, container, body grain, and all
   tokens come from style-v2.css.
   =================================================================== */


/* -------------------------------------------------------------------
   Article wrapper
   ------------------------------------------------------------------- */

.note-page {
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}


/* -------------------------------------------------------------------
   Hero — type only (cream-quiet)

   The .meta-row pattern (number + line + label) lives in style-v2.css
   and is reused as-is. No overrides needed for the cream-bg context.
   ------------------------------------------------------------------- */

.note-hero {
  max-width: 64ch;
  margin: 0 auto;
  text-align: left;
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.note-title {
  font-family: var(--serif);
  font-size: var(--step-4);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 1.5rem;
  /* Pull-back so an italic glyph at the start sits flush with the
     body left edge optically. */
  text-indent: -0.04em;
}

.note-title em {
  font-style: italic;
  color: var(--coral);
}

.note-dek {
  font-family: var(--sans);
  font-size: var(--step-1-up);
  line-height: 1.55;
  color: var(--text);
  max-width: 52ch;
  margin: 0 0 2rem;
}

.note-hairline {
  border: none;
  height: 0.5px;
  background: var(--rule);
  width: 100%;
  margin: 0 0 1rem;
}

.note-byline {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
}

.note-byline span + span::before {
  content: " · ";
  color: var(--text-faint);
  margin: 0 0.25rem;
}


/* -------------------------------------------------------------------
   Hero image — full content-width, sits below hero text.
   Optional per post; some posts go directly into the body without one.
   ------------------------------------------------------------------- */

.note-hero-image {
  margin: 0 auto clamp(3rem, 6vw, 5rem);
  max-width: 1080px;
}

.note-hero-image__media {
  background: var(--bg-alt);
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: inset 0 0 0 0.5px var(--rule);
}

.note-hero-image__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.note-hero-image figcaption {
  margin-top: 0.85rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.note-hero-image figcaption::before {
  content: "— ";
  color: var(--coral);
  margin-right: 0.15rem;
}


/* -------------------------------------------------------------------
   Body — single 60ch column, generous breath
   ------------------------------------------------------------------- */

.note-body {
  max-width: 60ch;
  margin: 0 auto;
  font-family: var(--sans);
  font-size: var(--step-1-up);
  line-height: 1.7;
  color: var(--text);
}

.note-body p {
  margin: 0 0 1.5rem;
}

.note-body p strong {
  color: var(--ink);
  font-weight: 500;
}

.note-body p em {
  font-style: italic;
}

/* High-emphasis utility — italic + coral. Use sparingly: the punctum
   word of a sentence, no more than once or twice per post. Peers with
   .note-title em and .note-pullquote em. */
.note-body em.accent {
  color: var(--coral);
}

.note-body a {
  color: var(--coral);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(216, 90, 48, 0.4);
  transition: text-decoration-color 0.2s var(--ease);
}

.note-body a:hover {
  text-decoration-color: var(--coral);
}


/* -------------------------------------------------------------------
   Drop cap — locked variant: coral + small caps opener.

   First letter of the first paragraph after the hero. The first three
   words of that paragraph are wrapped in <span class="opening-caps">
   and rendered in Inter small caps; the very first letter receives
   the coral lettrine treatment via ::first-letter.
   ------------------------------------------------------------------- */

.note-body > p:first-of-type::first-letter {
  font-family: var(--serif);
  font-feature-settings: "ss01";
  font-weight: 500;
  font-size: 5.5em;
  line-height: 0.82;
  float: left;
  padding: 0.06em 0.12em 0 0;
  color: var(--coral);
  /* Optical-size axis at 144 — Fraunces becomes more refined at large
     sizes. Falls back gracefully on browsers without variable-font
     support. */
  font-variation-settings: "opsz" 144;
}

.note-body > p:first-of-type .opening-caps {
  font-family: var(--sans);
  font-variant: small-caps;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
}


/* -------------------------------------------------------------------
   H2 sub-heads — Fraunces italic, coral em-dash prefix

   The em-dash is part of the heading content (wrapped in <span
   class="emdash">), not a pseudo-element, so screen readers read
   "dash, then heading."
   ------------------------------------------------------------------- */

.note-body h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: var(--step-3);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 3rem 0 1.25rem;
}

.note-body h2 .emdash {
  color: var(--coral);
  font-style: normal;
  margin-right: 0.35em;
}


/* -------------------------------------------------------------------
   Section divider — three coral dots, generous breath
   ------------------------------------------------------------------- */

.note-divider {
  display: block;
  text-align: center;
  margin: 3.5rem 0;
  color: var(--coral);
  font-family: var(--serif);
  font-size: 1.4rem;
  letter-spacing: 0.6em;
  /* Trailing letter-spacing pushes the last dot rightward;
     offset to keep the cluster optically centered. */
  text-indent: 0.6em;
  user-select: none;
}


/* -------------------------------------------------------------------
   Inline pullquote — smaller cousin of the homepage .pullquote.

   Sits inside the body column rather than full-bleed; lighter weight
   so it reads as a moment rather than a section break.
   ------------------------------------------------------------------- */

.note-pullquote {
  margin: 3rem auto;
  max-width: 44ch;
  padding: 0;
  text-align: center;
  border: none;
}

.note-pullquote::before {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--coral);
  margin: 0 auto 1.75rem;
}

.note-pullquote blockquote {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.note-pullquote blockquote em {
  color: var(--coral);
}


/* -------------------------------------------------------------------
   Aside / marginalia — italic Fraunces, coral border-left.
   For tangents, footnotes, side-thoughts.
   ------------------------------------------------------------------- */

.note-aside {
  margin: 2.5rem 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 2px solid var(--coral);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 52ch;
}

.note-aside p {
  margin: 0;
}


/* -------------------------------------------------------------------
   Figure — full column-width, captioned.
   For diagrams, screenshots, full-bleed photographs.
   ------------------------------------------------------------------- */

.note-figure {
  margin: 3rem 0;
  padding: 0;
}

.note-figure__media {
  background: var(--bg-alt);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 0 0.5px var(--rule);
}

.note-figure__media svg,
.note-figure__media img {
  display: block;
  width: 100%;
  height: auto;
}

.note-figure figcaption {
  margin-top: 0.85rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.note-figure figcaption::before {
  content: "— ";
  color: var(--coral);
  margin-right: 0.15rem;
}


/* -------------------------------------------------------------------
   Inset image — smaller, breaks the column rhythm without demanding
   full attention. For detail shots, single-subject photographs.
   ------------------------------------------------------------------- */

.note-inset {
  margin: 3rem auto;
  max-width: 100%;
  padding: 0;
}

.note-inset__media {
  background: var(--bg-alt);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 0 0.5px var(--rule);
}

.note-inset__media img {
  display: block;
  width: 100%;
  height: auto;
}

.note-inset figcaption {
  margin-top: 0.75rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
}

.note-inset figcaption::before {
  content: "— ";
  color: var(--coral);
  margin-right: 0.15rem;
}


/* -------------------------------------------------------------------
   Sign-off — locked variant: italic name + studio underneath
   ------------------------------------------------------------------- */

.note-signoff {
  margin: 4rem auto 0;
  max-width: 60ch;
  padding-top: 2rem;
  border-top: 0.5px solid var(--rule);
  text-align: center;
}

.signoff--with-studio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.signoff--with-studio__name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.signoff--with-studio__role {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}


/* -------------------------------------------------------------------
   Closing band — "Read all notes →"

   A tonal-shift section on bg-alt (slightly darker cream than the
   page bg). Coral seam, italic Fraunces line, CTA. Drops the dark
   treatment used on earlier iterations: the dark band stacked too
   heavily with the dark site footer below. The bg-alt cream gives
   the moment presence without doubling the page's wind-down.
   ------------------------------------------------------------------- */

.note-more {
  background: var(--bg-alt);
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  text-align: center;
  margin-top: clamp(3rem, 6vw, 5rem);
}

.note-more::before {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--coral);
  margin: 0 auto 1.75rem;
}

.note-more__sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--step-2);
  line-height: 1.4;
  color: var(--ink);
  max-width: 36ch;
  margin: 0 auto 1.75rem;
  font-weight: 400;
}

.note-more__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--coral);
  letter-spacing: 0.02em;
  transition: gap 0.25s var(--ease);
  text-decoration: none;
}

.note-more__cta:hover {
  gap: 0.85rem;
}


/* -------------------------------------------------------------------
   Mobile
   ------------------------------------------------------------------- */

@media (max-width: 720px) {
  .note-title {
    font-size: clamp(2rem, 7vw, 2.75rem);
  }

  .note-inset {
    max-width: 100%;
  }

  /* Drop-cap a touch smaller on phones so it doesn't dominate
     the column. */
  .note-body > p:first-of-type::first-letter {
    font-size: 4.4em;
  }
}


/* -------------------------------------------------------------------
   Reduced motion — strip the .note-more__cta gap-shift
   ------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .note-more__cta,
  .note-more__cta:hover {
    transition: none;
  }
}

/* -------------------------------------------------------------------
   Archive index — /notes/

   The Notes section's landing page. Lists all posts as typographic
   cards. Reuses .note-page, .note-hero, .meta-row, and .note-byline
   from the existing layers — only the card grid is new here.
   ------------------------------------------------------------------- */

.note-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3rem);
  max-width: 1080px;
  margin: 0 auto;
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

.note-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 0.5px solid var(--rule);
  text-decoration: none;
  color: inherit;
}

.note-card .meta-row {
  margin-bottom: 0;
}

.note-card__title {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 1.2rem + 0.5vw, 1.65rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  transition: color 0.2s var(--ease);
}

.note-card__title em {
  font-style: italic;
  color: var(--coral);
}

.note-card:hover .note-card__title {
  color: var(--coral);
}

.note-card__dek {
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
  margin: 0;
}

.note-card__meta {
  margin-top: auto;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  padding-top: 0.5rem;
}

.note-card__meta span + span::before {
  content: " · ";
  color: var(--text-faint);
  margin: 0 0.25rem;
}

@media (max-width: 720px) {
  .note-archive-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .note-card {
    padding-top: 1.75rem;
    padding-bottom: 0.5rem;
  }
}