/* ============================================================
   Curious Embers — styles
   Palette: sand #e1d1a7 · charcoal #332e20
   Embers (warm→hot): #fdb715 · #faa21e · #df5a28 · #d14827 · #b83f26
   Type: Newake (display, all caps) · PP Frama (secondary) · PP Kyoto (body)
   ============================================================ */

/* ---------- Fonts ---------- */

@font-face {
  font-family: 'Newake';
  src: url('../fonts/Newake.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PP Kyoto';
  src: url('../fonts/PPKyoto-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PP Kyoto';
  src: url('../fonts/PPKyoto-MediumItalic.otf') format('opentype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'PP Frama';
  src: url('../fonts/PPFramaText-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PP Frama';
  src: url('../fonts/PPFramaText-RegularItalic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Heavy fallback for glyphs the Newake demo lacks (punctuation) —
   keeps ?/./: at display weight until the full Newake license lands */
@font-face {
  font-family: 'PP Frama Black';
  src: url('../fonts/PPFrama-Black.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  --sand: #e1d1a7;
  --charcoal: #332e20;
  --amber: #fdb715;
  --gold: #faa21e;
  --orange: #df5a28;
  --red-orange: #d14827;
  --deep-red: #b83f26;
  --white: #fdfaf2;

  --font-display: 'Newake', 'PP Frama Black', 'PP Frama', 'Arial Black', sans-serif;
  /* Body was PP Kyoto ('PP Kyoto', Georgia, serif + weight 500 on body) —
     switched to PP Frama for designer review; Kyoto faces remain loaded above */
  --font-body: 'PP Frama', 'Helvetica Neue', Arial, sans-serif;
  --font-secondary: 'PP Frama', 'Helvetica Neue', sans-serif;

  --measure: 62ch;
  --space-section: clamp(4rem, 10vw, 8rem);
}

/* ---------- Reset / base ---------- */

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

html {
  scroll-behavior: smooth;
}

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--charcoal);
  background-color: var(--sand);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

::selection {
  background: var(--orange);
  color: var(--white);
}

/* ---------- Utilities ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--charcoal);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  font-family: var(--font-secondary);
}

.skip-link:focus {
  left: 0;
}

.container {
  width: min(100% - 3rem, 68rem);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 50;
  background-color: var(--sand);
  padding-block: clamp(1rem, 2.5vw, 1.5rem);
  transition: box-shadow 240ms ease;
}

.site-header {
  position: sticky;
  top: 0;
}


.site-header.is-scrolled {
  box-shadow: 0 2px 18px rgba(51, 46, 32, 0.14);
}

/* keep anchored sections clear of the sticky bar */
section[id] {
  scroll-margin-top: 5.5rem;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-logo img {
  height: clamp(1.5rem, 3.5vw, 1.9rem);
  width: auto;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
}

.site-nav a {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 160ms ease;
}

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

/* Compact two-row header on small screens */
@media (max-width: 44.99rem) {
  .site-header {
    padding-block: 0.6rem;
  }

  .site-header .container {
    gap: 0.35rem 1rem;
  }

  .site-logo img {
    height: 1.25rem;
  }

  .site-nav ul {
    gap: 0.55rem;
  }

  .site-nav a {
    font-size: 0.68rem;
    letter-spacing: 0.09em;
  }
}

/* ---------- Hero ---------- */

.hero {
  background-color: var(--sand);
  text-align: center;
  /* clip the parallax-translated content at the section edge */
  overflow: hidden;
  padding-top: clamp(4.5rem, 12vh, 8.5rem);
  /* room for the curve below the content */
  padding-bottom: clamp(3rem, 8vh, 5rem);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.75rem, 4vw, 2.5rem);
}

.ember-ticks {
  width: clamp(3.25rem, 8vw, 4.5rem);
  height: auto;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.75rem, 9.5vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: 0.015em;
  max-width: 12ch;
}

/* One warm word inside a display line */
.ember-word {
  color: var(--deep-red);
  background: linear-gradient(100deg, var(--deep-red) 20%, var(--orange) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: clamp(1.3rem, 3.2vw, 1.75rem);
  line-height: 1.55;
  max-width: 40ch;
  text-wrap: balance;
}

.hero-scroll {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: clamp(0.5rem, 2vh, 1.5rem);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 160ms ease;
}

.hero-scroll:hover,
.hero-scroll:focus-visible {
  opacity: 1;
}

.hero-scroll svg {
  width: 1rem;
  height: auto;
}

/* Gentle entrance */
@media (prefers-reduced-motion: no-preference) {
  .hero-inner > * {
    animation: rise-in 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .hero-inner > *:nth-child(2) { animation-delay: 120ms; }
  .hero-inner > *:nth-child(3) { animation-delay: 260ms; }
  .hero-inner > *:nth-child(4) { animation-delay: 420ms; }

  @keyframes rise-in {
    from {
      opacity: 0;
      transform: translateY(1.25rem);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ---------- Curved section transitions ----------
   The divider lives at the bottom of the section above it,
   filled with the color of the section below. */

.curve {
  display: block;
  width: 100%;
  height: clamp(3.5rem, 9vw, 7.5rem);
  /* overlap the next section a hair to avoid antialiasing seams */
  margin-bottom: -1px;
}

.curve path {
  fill: var(--white);
}

.curve--from-sand {
  background-color: var(--sand);
}

.curve--from-white {
  background-color: var(--white);
}

.curve--from-white path {
  fill: var(--sand);
}

/* ---------- Sections ---------- */

.section-white {
  background-color: var(--white);
  padding-block: var(--space-section);
}

.section-sand {
  background-color: var(--sand);
  padding-block: var(--space-section);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1rem, 2vw, 1.2rem);
  letter-spacing: 0.22em;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.label-ticks {
  width: 1.6em;
  height: auto;
  flex-shrink: 0;
}

/* ---------- Prose ---------- */

.prose {
  max-width: 46rem;
}

.prose p {
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  line-height: 1.7;
  max-width: 58ch;
}

.prose p + p {
  margin-top: 1.5em;
}

/* A short line set apart from the prose around it */
.breath-line {
  font-style: italic;
  margin-block: clamp(2rem, 4.5vw, 3rem) !important;
}

/* A line given air */
.aired-line {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.9rem, 5.5vw, 3.2rem) !important;
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin-top: clamp(2.5rem, 6vw, 4rem) !important;
  max-width: 22ch !important;
}

/* ---------- Coaching ---------- */

.coaching-lede {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.9rem, 5.5vw, 3.2rem) !important;
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.form-card {
  background-color: var(--white);
  border-radius: 1.5rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  margin-top: clamp(2.5rem, 6vw, 4rem);
  margin-inline: auto;
  max-width: 46rem;
  box-shadow: 0 1px 2px rgba(51, 46, 32, 0.06), 0 12px 32px rgba(51, 46, 32, 0.08);
}

.form-card iframe {
  border: 0;
  display: block;
}

.form-fallback {
  margin-top: 1rem;
  font-size: 0.95rem;
  opacity: 0.75;
}

.form-fallback a {
  color: var(--deep-red);
}

/* ---------- Writing ---------- */

.writing-intro {
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  line-height: 1.7;
  max-width: 58ch;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.writing-intro a {
  color: var(--deep-red);
  text-underline-offset: 3px;
}

.post-grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
}

@media (min-width: 50rem) {
  .post-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background-color: #efe5c9; /* lighter sand tint */
  border-radius: 1.25rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.post-card:hover,
.post-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(51, 46, 32, 0.12);
}

.post-date {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.7;
}

.post-title {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.35rem, 2.6vw, 1.6rem);
  line-height: 1.08;
  letter-spacing: 0.01em;
}

.post-excerpt {
  font-size: 1.05rem;
  line-height: 1.55;
}

.post-read {
  margin-top: auto;
  padding-top: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--deep-red);
}

.post-card:hover .post-read,
.post-card:focus-visible .post-read {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.writing-more {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  text-align: center;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.2rem, 2vw, 1.3rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  background-color: var(--orange);
  padding: 0.75em 1.5em;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(223, 90, 40, 0.28);
  transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  background-color: var(--deep-red);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(184, 63, 38, 0.32);
}

.lede-emoji {
  font-size: 0.85em;
}

/* ---------- Contact ---------- */

/* The contact section reads as a centered composition… */
.contact .contact-text {
  text-align: center;
}

/* …except the bio, which reads as prose */
.contact-bio {
  text-align: left;
  margin-bottom: clamp(2.5rem, 6vw, 3.5rem);
}

.contact .section-label {
  justify-content: center;
}

.contact-photo {
  width: 100%;
  max-width: 22rem;
  height: auto;
  border-radius: 1.5rem;
  margin-inline: auto;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  box-shadow: 0 1px 2px rgba(51, 46, 32, 0.08), 0 14px 36px rgba(51, 46, 32, 0.14);
}

.contact-body {
  margin-inline: auto;
}

/* Say-hello form (Netlify Forms) */
.contact-form {
  background-color: var(--white);
  border-radius: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-top: clamp(2rem, 5vw, 3rem);
  max-width: 34rem;
  margin-inline: auto;
  text-align: left;
  box-shadow: 0 1px 2px rgba(51, 46, 32, 0.06), 0 12px 32px rgba(51, 46, 32, 0.08);
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.field input,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--charcoal);
  background-color: var(--white);
  border: 2px solid rgba(51, 46, 32, 0.25);
  border-radius: 0.75rem;
  padding: 0.7em 0.9em;
  transition: border-color 160ms ease;
}

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

.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--orange);
}

.contact-form .btn {
  border: 0;
  cursor: pointer;
  width: 100%;
  text-align: center;
}

.contact-form .btn:disabled {
  opacity: 0.6;
  transform: none;
  cursor: default;
}

.form-status {
  margin-top: 1rem;
  font-size: 1.05rem;
}

.form-status:empty {
  display: none;
}

.form-status--ok {
  color: var(--charcoal);
}

.form-status--error {
  color: var(--deep-red);
}

.contact .btn-row {
  justify-content: center;
}

.contact-body {
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  line-height: 1.7;
  max-width: 46ch;
}

.contact-email {
  overflow-wrap: anywhere;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: clamp(1.5rem, 3.5vw, 2.25rem);
}

/* Stack the contact buttons full-width on small screens */
@media (max-width: 44.99rem) {
  .btn-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .btn-row .btn {
    text-align: center;
    font-size: 1.05rem;
    padding: 0.85em 1em;
    white-space: nowrap;
  }
}

/* Rise-in reveal (only when JS + IntersectionObserver are available) */
.reveal-on [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-on [data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* Display lines that also drift (parallax owns their transform):
   they fade in while the letterforms settle into place */
.reveal-on [data-reveal][data-parallax] {
  opacity: 0;
  letter-spacing: 0.07em;
  transition: opacity 900ms ease, letter-spacing 1100ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-on [data-reveal][data-parallax].revealed {
  opacity: 1;
  letter-spacing: 0.01em;
}

#intake {
  scroll-margin-top: 6rem;
}

/* ---------- Footer ---------- */

.site-footer {
  background-color: var(--sand);
  text-align: center;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.site-footer .container {
  border-top: 1px solid rgba(51, 46, 32, 0.18);
  padding-top: clamp(2.5rem, 6vw, 4rem);
}

.footer-tagline {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.footer-legal {
  margin-top: 1.25rem;
  font-family: var(--font-secondary);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  opacity: 0.7;
}
