/* ============================================
   FONTS
   ============================================ */
@font-face {
  font-family: 'Nordic Alternative';
  src: url('fonts/Nordic Alternative Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Avenir and Leitura Display are licensed fonts with no files bundled here —
   these stacks fall back to the closest available serif/sans faces so the
   site still renders correctly wherever the licensed font isn't installed. */
:root {
  --font-avenir: 'Avenir', 'Avenir Next', 'Nunito Sans', 'Segoe UI', -apple-system,
    BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  --font-nordic: 'Nordic Alternative', var(--font-avenir);
  --font-leitura: 'Leitura Display', Georgia, 'Times New Roman', serif;

  --color-dark: #16211D;
  --color-rust: #9F3011;
  --color-cream: #F4EFE8;
}

/* Leitura Display is the secondary display face, used for h2/h3 headings
   site-wide; page-specific rules below may still override per element. */
h2,
h3 {
  font-family: var(--font-leitura);
}

/* ============================================
   RESET
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-avenir);
  background: var(--color-cream);
  color: var(--color-dark);
  overflow-x: hidden;
}

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

/* ============================================
   HERO — scroll-driven frame sequence
   ============================================ */
.hero-scroll {
  position: relative;
  /* total scroll distance: 100vh sticky hero + scroll room for the frame
     sequence and reveal to play out underneath it */
  height: 400vh;
}

.hero {
  position: sticky;
  /* Sticks directly below the sticky site nav (see header-content.php,
     ~88px tall) instead of at the very top — otherwise this and the nav
     would both settle at top:0 and fight for the same space, with this
     sliding in behind/under the nav as you scroll. */
  top: 88px;
  height: calc(100vh - 88px);
  width: 100%;
  overflow: hidden;
  background: var(--color-dark);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-reveal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}

.hero-name {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  font-family: var(--font-nordic);
  font-weight: 700;
  color: #ffffff;
  /* Sized off the portrait's own width (22vh half-width) so the word sits
     on top of the portrait without overrunning it or getting clipped by
     .hero's overflow:hidden. */
  font-size: clamp(1rem, calc((44vh - 1.5rem) / 4), 6rem);
  letter-spacing: 0.04em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 1);
}

.hero-name-part {
  line-height: 1;
  white-space: nowrap;
}

.hero-portrait {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  height: 90vh;
  width: auto;
  object-fit: cover;
}

/* Below this width — or on any tall/narrow window where the portrait's
   22vh half-width eats most of the available gutter regardless of raw
   width — stack the two halves centered instead, sized independently of
   the portrait's height, rather than relying on the gutter-fit formula
   above to hold at every possible aspect ratio. */
@media (max-width: 700px), (max-aspect-ratio: 4/5) {
  .hero-name {
    flex-direction: column;
    justify-content: center;
    gap: 0.15em;
  }

  .hero-name-part {
    max-width: 100%;
    text-align: center;
    font-size: clamp(2.5rem, 13vw, 4rem);
  }
}

.scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-cream);
  font-family: var(--font-avenir);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.75;
  transition: opacity 0.4s ease;
}

.scroll-cue-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-cream), transparent);
  animation: scroll-cue-move 1.8s ease-in-out infinite;
}

@keyframes scroll-cue-move {
  0% { transform: scaleY(0.3); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(0.3); opacity: 0.3; }
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.about-inner [data-reveal]:nth-child(1) { transition-delay: 0s; }
.about-inner [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
.about-inner [data-reveal]:nth-child(3) { transition-delay: 0.16s; }
.about-inner [data-reveal]:nth-child(4) { transition-delay: 0.24s; }

.cards-inner .card[data-reveal] {
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.cards-inner .card[data-reveal].is-visible:hover {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.cards-inner .card:nth-child(1) { transition-delay: 0s; }
.cards-inner .card:nth-child(2) { transition-delay: 0.12s; }
.cards-inner .card:nth-child(3) { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================
   ABOUT ME
   ============================================ */
.about {
  position: relative;
  z-index: 2;
  background: var(--color-cream);
  padding: clamp(5rem, 12vw, 9rem) 1.5rem;
}

.about-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-avenir);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-rust);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.about h2 {
  font-family: var(--font-leitura);
  font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  color: var(--color-dark);
  margin-bottom: 1.75rem;
}

.about p {
  font-family: var(--font-avenir);
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(22, 33, 29, 0.8);
  margin-bottom: 1.25rem;
}

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

/* ============================================
   CARDS
   ============================================ */
.cards {
  position: relative;
  background: var(--color-dark);
  padding: clamp(4rem, 10vw, 7rem) 1.5rem;
  overflow: hidden;
}

.cards-vanta {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cards-inner {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.card {
  background: #1c2a24;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.card-media {
  aspect-ratio: 1;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-media img {
  transform: scale(1.06);
}

.card-body {
  padding: 1.75rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body h3 {
  font-family: var(--font-leitura);
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--color-cream);
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.card-body p {
  font-family: var(--font-avenir);
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(244, 239, 232, 0.7);
  margin-bottom: 1.5rem;
  flex: 1;
}

.read-more {
  align-self: flex-start;
  font-family: var(--font-avenir);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-cream);
  background: transparent;
  border: 1.5px solid var(--color-rust);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.read-more:hover {
  /* !important: the parent Seedlet theme has its own generic
     button/link hover styling (blue, var(--global--color-secondary))
     that otherwise wins on the background-color sub-property even
     though this rule is more specific, because it's declared on the
     shorthand `background` rather than `background-color` directly. */
  background: var(--color-rust) !important;
  color: #ffffff !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .cards-inner {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
}

@media (max-width: 640px) {
  .hero-scroll {
    height: 350vh;
  }
}
