/* ===================================================================
   LumaBook.ai — Landing Page Stylesheet
   Pure Minimalist Parchment Aesthetic — Exactly Matching Book Reader
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700;900&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&family=Inter:wght@400;500;600&family=MedievalSharp&family=Pirata+One&family=UnifrakturMaguntia&display=swap');

@font-face {
  font-family: 'Bookerly';
  src: local('Bookerly'),
    url('../fonts/Bookerly-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-primary: #F2EBDD;
  --bg-surface: rgba(242, 235, 221, 0.95);
  --border-color: rgba(42, 32, 24, 0.08);
  /* Walnut ink #2A2018 at 95% on #F2EBDD paper = #342A22, identical to the illustration ink */
  --text-primary: #342A22;
  --text-secondary: #5C5852;
  --accent-green: #1A382B;
  --accent-green-hover: #244C3B;
  --accent-gold: #DFBA73;
  --accent-gold-light: #F4E2B8;
  --accent-gold-dark: #B8934A;
  --btn-bg: #E9E0CE;
  --btn-hover: #DFD5C1;
  --header-height: 136px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-reading: 'Bookerly', 'EB Garamond', Georgia, serif;
  --ink-color: #342A22;
  /* Illustrations use walnut ink #2a2018 at 95% baked into the canvas LUT; no softening filter */
  --ink-filter: none;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  user-select: none !important;
}

html, body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  overscroll-behavior-x: none;
  overscroll-behavior-y: none;
  touch-action: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Soft spotlight behind the carousel + warm vignette at the edges */
body {
  background:
    radial-gradient(ellipse 48% 52% at 50% 50%, rgba(250, 245, 235, 0.95) 0%, rgba(250, 245, 235, 0) 72%),
    radial-gradient(ellipse 120% 105% at 50% 48%, rgba(45, 35, 25, 0) 55%, rgba(45, 35, 25, 0.09) 100%),
    var(--bg-primary);
}

/* Paper grain (static SVG noise, multiplied onto the parchment) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

/* ===== APP HEADER (IDENTICAL TO BOOK READER) ===== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  z-index: 100;
  /* Transparent so the spotlight / grain read as one continuous sheet of paper
     (the page never scrolls, so nothing passes underneath the header). */
  background: transparent;
  border-bottom: none;
}

.header-left {
  flex: 1;
  display: flex;
  align-items: center;
}

.header-logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  margin-top: 8px; /* sit slightly below the header's vertical centre */
  animation: lb-fade-up 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.05s backwards;
}

.header-logo-img {
  height: 76px; /* large centred brand mark (logo is ~3:1, so ~228px wide) */
  width: auto;
  object-fit: contain;
  display: block;
}

.header-center {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.header-tagline {
  margin-top: 6px;
  font-family: 'EB Garamond', Georgia, serif;
  font-style: normal;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--text-primary);
  white-space: nowrap;
  animation: lb-fade-up 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s backwards;
}

.header-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  :root {
    --header-height: 108px;
  }
  .header-logo-img {
    height: 56px;
  }
  .header-tagline {
    margin-top: 4px;
    font-size: 15px;
  }
}

/* ===== MAIN LANDING STAGE (3D COVER FLOW PERSPECTIVE) ===== */
.landing-stage {
  position: relative;
  z-index: 1; /* above the grain layer */
  padding-top: calc(var(--header-height) + clamp(8px, 2vh, 28px));
  padding-bottom: clamp(16px, 3vh, 40px);
  max-width: 1440px;
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 64px);
  padding-right: clamp(20px, 4vw, 64px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
  overscroll-behavior-x: none;
}

/* ===== 3D COVER FLOW STAGE TRACK ===== */
/* Square title-animation cards (1:1 Seedance renders). the script reads
   --card-size to scale the cover-flow spacing. */
:root {
  --card-size: 240px;
  --card-top: 10px; /* card offset from the top of .titles-row */
}

.titles-row {
  position: relative;
  width: 100%;
  max-width: 1100px;
  height: calc(var(--card-size) + 230px);
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 40em;
  /* Eye level = vertical centre of the cards (not of the whole row, which
     also holds the title text below), so the titles are seen head-on. */
  perspective-origin: 50% calc(var(--card-top) + var(--card-size) / 2);
  transform-style: preserve-3d;
  margin: clamp(4px, 1.5vh, 20px) auto 0;
  padding: 0;
  touch-action: none;
  overscroll-behavior: none;
  overscroll-behavior-x: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

/* ===== READING LAMP BEHIND THE FOCUSED BOOK =====
   The lamp precedes the carousel in the DOM, so it paints behind the books
   and their titles, and it stays fixed at the centre: books slide into the
   light as they come into focus. It only brightens the page behind them; the
   rest of the page keeps its parchment colour. */
.lamp-stage {
  position: relative;
  width: 100%;
  max-width: 1100px;
}

.lamp {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Cone of light from above plus a pool of light around the centre book, in a
   brighter tint of the parchment (same hue). The blur sits on the parent so
   the clipped trapezoid gets soft edges. */
.lamp-beam {
  position: absolute;
  top: -110px;
  left: 50%;
  width: 460px;
  height: 700px;
  transform: translateX(-50%);
  filter: blur(18px);
  animation: lamp-on 1.2s ease-out 0.6s backwards;
}

.lamp-beam::before {
  content: '';
  position: absolute;
  inset: 0 0 34% 0;
  clip-path: polygon(39% 0, 61% 0, 100% 100%, 0 100%);
  background: linear-gradient(to bottom,
    rgba(255, 249, 240, 0) 0%,
    rgba(255, 249, 240, 0.95) 32%,
    rgba(255, 249, 240, 0.8) 75%,
    rgba(255, 249, 240, 0) 100%);
}

.lamp-beam::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 42% at 50% 54%,
    rgba(255, 249, 240, 0.9) 0%,
    rgba(255, 249, 240, 0.55) 55%,
    rgba(255, 249, 240, 0) 100%);
}

@keyframes lamp-on {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Grab / Grabbing swipe state */
.landing-stage.is-swiping,
.titles-row.is-swiping {
  cursor: grabbing !important;
}

.landing-stage.is-swiping .title-column,
.titles-row.is-swiping .title-column {
  cursor: grabbing !important;
}

.landing-stage.is-moving .title-column:hover .video-container,
.titles-row.is-moving .title-column:hover .video-container,
.landing-stage.is-swiping .title-column:hover .video-container,
.titles-row.is-swiping .title-column:hover .video-container {
  transform: none !important;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.08),
    0 10px 24px -4px rgba(15, 23, 42, 0.12),
    0 3px 8px -1px rgba(15, 23, 42, 0.06) !important;
}

.landing-stage.is-moving .video-container,
.titles-row.is-moving .video-container,
.landing-stage.is-swiping .video-container,
.titles-row.is-swiping .video-container {
  transition: none !important;
}

.landing-stage.is-moving .title-info-block,
.titles-row.is-moving .title-info-block,
.landing-stage.is-swiping .title-info-block,
.titles-row.is-swiping .title-info-block {
  transform: none !important;
  transition: none !important;
}

/* ===== COVER FLOW ITEM (BOOK CARD) ===== */
.title-column {
  position: absolute;
  top: var(--card-top);
  left: calc(50% - var(--card-size) / 2); /* Centre the card exactly */
  width: var(--card-size);
  height: calc(var(--card-size) + 106px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  outline: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform-origin: center center;
  transform-style: preserve-3d;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
  touch-action: none;
  overscroll-behavior: none;
  overscroll-behavior-x: none;
  -webkit-user-drag: none;
  /* No entrance fade: the poster (first frame) must be visible immediately. */
}

/* Hidden only until the script has placed the cards (one synchronous pass on
   DOMContentLoaded), so the unpositioned stack never flashes at centre. */
.titles-row:not(.cf-ready) .title-column {
  visibility: hidden;
}

/* Deep "hero" shadow under the centre card; opacity is driven from JS */
.cf-hero-shadow {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--card-size);
  height: var(--card-size);
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
  box-shadow:
    0 30px 50px -18px rgba(36, 30, 25, 0.42),
    0 14px 22px -10px rgba(36, 30, 25, 0.22);
}

/* Video Container — square card holding the 1:1 title animation */
.video-container {
  width: var(--card-size);
  height: var(--card-size);
  flex-shrink: 0; /* never let the taller title block squeeze the card */
  max-width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  background-color: #161616 !important;
  border-radius: 4px;
  border: none !important;
  box-shadow:
    inset 0 0 0 1px rgba(223, 186, 115, 0.24),
    0 1px 3px rgba(35, 25, 18, 0.08),
    0 12px 28px -6px rgba(35, 25, 18, 0.22),
    0 4px 10px -2px rgba(35, 25, 18, 0.1);
  overflow: hidden;
  will-change: transform, filter, box-shadow;
  /* Floor reflection. --refl (0..~0.25) is set per card from JS: 0 for the
     centre card (its title block sits there), rising for the side stacks.
     Chrome / Safari only; other browsers simply show no reflection. */
  -webkit-box-reflect: below 6px linear-gradient(to bottom, transparent 0%, transparent 74%, rgba(0, 0, 0, var(--refl, 0)) 100%);
  touch-action: none;
  overscroll-behavior: none;
  overscroll-behavior-x: none;
  -webkit-user-drag: none;
  transform: none;
  transition: box-shadow 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.title-scene-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
  border: none !important;
  outline: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  image-rendering: auto; /* smooth scaling, same as the reader */
  /* Optional ink-tone filter hook (currently none; ink colour #2a2018 is set in the JS LUT) */
  filter: var(--ink-filter);
}

/* Poster layer: the clip's exact first frame as a plain <img> (preloaded in
   <head>), painted immediately, underneath the video. */
.title-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

/* White-on-black title animation, painted from decoded frames.
   Transparent until it paints frame 0 (identical to the poster), so the
   poster layer beneath shows whenever frames are not loaded. */
.title-anim-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: transparent;
  border: none !important;
  outline: none !important;
  image-rendering: auto; /* smooth downscale, as the <video> was */
  pointer-events: none; /* clicks / drags go to the card link */
  -webkit-user-drag: none;
}

/* Dynamic Text: Book title and author directly below video */
.title-info-block,
.title-header-block {
  text-align: center;
  margin-top: 26px;
  /* Wider than the 180px column; align-items:center on the column makes it
     overhang evenly on both sides. */
  width: 280px;
  max-width: none;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: opacity;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.title-heading {
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 0;
  white-space: normal;
  text-align: center;
  transition: color 0.2s ease;
}

/* Author in spaced small caps */
.title-author {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 15px;
  font-weight: 500;
  font-style: normal;
  font-variant-caps: all-small-caps;
  color: var(--text-secondary);
  margin-top: 6px;
  letter-spacing: 0.16em;
  white-space: normal;
  text-align: center;
}

/* Thin ornamental rule with a centred diamond */
.title-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: var(--accent-gold);
  opacity: 0.75;
}

.title-rule::before,
.title-rule::after {
  content: '';
  width: 34px;
  height: 1px;
  background: currentColor;
}

.title-rule span {
  font-size: 7px;
  line-height: 1;
}

.title-hook {
  margin-top: 8px;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 15px;
  font-style: normal;
  line-height: 1.35;
  max-width: 250px;
  text-wrap: balance;
  color: #5b5048;
  letter-spacing: 0.02em;
}

/* "Begin reading" cue (a span inside the card's <a>, which handles the click).
   A pill in the send button's green with its pale-gold content colour for the
   small caps and the drawn arrow; no border, no shadow, no underline. On hover /
   keyboard focus a thick diagonal band of lighter green sweeps through it from
   left to right (::after, painted under the text). */
.read-cta {
  position: relative;
  isolation: isolate; /* keeps the z-index:-1 shine above the pill's background */
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  /* left padding adds the letter-spacing trailing the last letter, so the
     label sits optically centred */
  padding: 9px 18px 9px calc(18px + 0.22em);
  border: 0;
  border-radius: 999px;
  background: var(--accent-green);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.22em;
  line-height: 1;
  color: var(--accent-gold-light);
}

.read-cta::after {
  content: '';
  position: absolute;
  z-index: -1;
  top: -50%;
  /* parked just off the left edge; the hover rule carries it past the right */
  left: -60px;
  width: 34px;
  height: 200%;
  background: #3A6651; /* lighter shade of --accent-green */
  transform: skewX(-24deg);
  transition: none; /* snaps back unseen, so the sweep only ever runs left -> right */
}

/* Drawn arrow: a hairline shaft with a fine chevron head, in the label colour.
   The "→" glyph in the (aria-hidden) markup is collapsed with font-size: 0. */
.read-cta-arrow {
  position: relative;
  top: 1px; /* centre on the small caps, which sit low in the em box */
  display: inline-block;
  width: 14px;
  height: 7px;
  font-size: 0;
  color: inherit;
}

.read-cta-arrow::before {
  content: '';
  position: absolute;
  left: 0;
  right: 1px;
  top: 50%;
  height: 1px;
  background: currentColor;
  transform: translateY(-50%);
}

.read-cta-arrow::after {
  content: '';
  position: absolute;
  right: 1px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

/* Shine sweep: hovering the pill itself (mouse/trackpad only, so a tap on a
   phone doesn't leave it stuck) or keyboard focus on the card. */
@media (hover: hover) {
  .title-column.cf-active .read-cta:hover::after {
    left: calc(100% + 30px);
    transition: left 0.7s cubic-bezier(0.45, 0, 0.25, 1);
  }
}

.title-column.cf-active:focus-visible .read-cta::after {
  left: calc(100% + 30px);
  transition: left 0.7s cubic-bezier(0.45, 0, 0.25, 1);
}

/* State-based styling for active center vs background stacks */
.title-column.cf-active {
  pointer-events: auto;
}

.title-column.cf-active .video-container {
  filter: brightness(1);
}

.title-column.cf-left .video-container,
.title-column.cf-right .video-container {
  filter: brightness(0.85);
}

.title-column.cf-active .title-info-block {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.title-column.cf-left .title-info-block,
.title-column.cf-right .title-info-block {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ===== INTERACTIVE HOVER FEEDBACK ===== */
.landing-stage:not(.is-moving):not(.is-swiping) .title-column.cf-active:hover .video-container {
  transform: none;
  box-shadow:
    inset 0 0 0 1px rgba(223, 186, 115, 0.38),
    0 2px 6px rgba(35, 25, 18, 0.1),
    0 16px 32px -4px rgba(35, 25, 18, 0.25),
    0 4px 12px -2px rgba(35, 25, 18, 0.12) !important;
}

.title-column.cf-left:hover .video-container,
.title-column.cf-right:hover .video-container {
  filter: brightness(0.92);
}

.landing-stage:not(.is-moving):not(.is-swiping) .title-column.cf-active:hover .title-info-block {
  transform: none;
}

.title-column:hover .title-heading {
  color: #000;
}

.font-sherlock {
  font-family: 'Pirata One', 'UnifrakturMaguntia', Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.font-alice {
  font-family: 'MedievalSharp', cursive;
  font-size: 18px;
  font-weight: 400;
}

.font-odyssey {
  font-family: 'Cinzel Decorative', Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.font-usher {
  font-family: 'IM Fell English SC', Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.font-ramayana {
  font-family: 'Cinzel Decorative', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.font-junglebook {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ===== PREV / NEXT ARROWS ===== */
.cf-arrow {
  position: absolute;
  top: calc(10px + var(--card-size) / 2); /* vertical centre of the card (column top 10px) */
  transform: translateY(-50%);
  z-index: 300;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(36, 30, 25, 0.32);
  background: rgba(247, 241, 231, 0.6);
  color: var(--ink-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.25s ease;
  animation: lb-fade-in 0.8s ease 0.9s backwards;
}

.cf-arrow-prev { left: max(8px, calc(50% - 470px)); }
.cf-arrow-next { right: max(8px, calc(50% - 470px)); }

.cf-arrow:hover {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: var(--accent-gold);
}

.cf-arrow:focus-visible,
.cf-dot:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 3px;
}

.cf-arrow:disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}

/* ===== DOT INDICATORS ===== */
.cf-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  animation: lb-fade-in 0.8s ease 1s backwards;
}

.cf-dot {
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cf-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(43, 43, 43, 0.28);
  transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.25s ease;
}

.cf-dot:hover::before {
  background: var(--accent-green);
}

.cf-dot.is-active::before {
  width: 18px;
  background: var(--accent-green);
  box-shadow: 0 0 6px rgba(26, 56, 43, 0.35);
}

/* ===== READER MESSAGE BAR (book requests + feedback) ===== */
.lb-feedback {
  position: relative;
  width: min(100%, 440px);
  margin-top: 22px;
  animation: lb-fade-in 0.8s ease 1.1s backwards;
}

/* The paper, a few shades deeper: flat, no border or shadow */
.lb-feedback-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 6px 0 22px;
  border-radius: 999px;
  background: #E6DCC8;
  border: 0;
  box-shadow: none;
  transition: background-color 0.25s ease;
}

/* Borderless focus: the paper deepens a shade, no outline */
.lb-feedback-bar:focus-within {
  background: #E1D6BF;
}

.lb-feedback-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 17px; /* >= 16px so iOS does not zoom in on focus */
  letter-spacing: 0.01em;
  color: var(--text-primary);
  /* The page disables selection globally; a text field needs it back */
  -webkit-user-select: text !important;
  user-select: text !important;
  touch-action: manipulation;
  text-overflow: ellipsis;
}

.lb-feedback-input::placeholder {
  color: #776A5E;
  font-style: italic;
  /* Shrinks a touch on narrow phones so the whole prompt fits on one line.
     Only the prompt scales; typed text stays 17px (no iOS focus zoom). */
  font-size: clamp(13px, calc((100vw - 112px) / 17.3), 17px);
  opacity: 1;
  transition: color 0.35s ease;
}

.lb-feedback-send {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-green);
  color: var(--accent-gold-light);
  cursor: pointer;
  touch-action: manipulation;
  box-shadow:
    inset 0 0 0 1px rgba(223, 186, 115, 0.35),
    0 2px 6px -2px rgba(18, 40, 30, 0.4);
  transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.lb-feedback-send:hover {
  background: var(--accent-green-hover);
}

.lb-feedback-send:active {
  transform: scale(0.94);
}

.lb-feedback-send:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 3px;
}

.lb-feedback-send:disabled {
  cursor: default;
  opacity: 0.7;
}

.lb-feedback.is-sending .lb-feedback-send svg {
  animation: lb-pulse 1s ease-in-out infinite;
}

/* Thank-you / error line: absolutely placed so it adds no height to the page */
.lb-feedback-status {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 8px;
  text-align: center;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 15px;
  font-style: italic;
  color: var(--accent-green);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.lb-feedback-status.is-visible {
  opacity: 1;
}

.lb-feedback-status.is-error {
  color: #8A3B2E;
}

/* Short screens (no room below the bar): the script adds .is-inline-status and
   the note is shown inside the bar, over the empty field, instead of beneath it */
.lb-feedback.is-inline-status .lb-feedback-status {
  top: 0;
  bottom: 0;
  left: 0;
  right: 50px;
  margin-top: 0;
  display: flex;
  align-items: center;
  padding: 0 8px 0 22px;
  text-align: left;
  font-size: 14px;
  line-height: 1.2;
}

.lb-feedback.is-inline-status.has-status .lb-feedback-input,
.lb-feedback.is-inline-status.has-status .lb-feedback-input::placeholder {
  color: transparent;
}

.lb-feedback-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

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

@keyframes lb-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ===== ENTRANCE KEYFRAMES ===== */
@keyframes lb-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes lb-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 900px) {
  :root {
    --card-size: 220px;
  }
  .landing-stage {
    padding-top: calc(var(--header-height) + 20px);
    padding-bottom: 24px;
  }
  .titles-row {
    perspective: 40em;
    height: calc(var(--card-size) + 230px);
  }
  .title-column {
    top: var(--card-top);
  }
}

@media (max-width: 640px) {
  :root {
    --card-size: 210px;
    --card-top: 5px;
  }
  .landing-stage {
    padding-top: calc(var(--header-height) + 8px);
    padding-bottom: 16px;
  }
  .titles-row {
    perspective: 40em;
    height: calc(var(--card-size) + 220px);
    margin: 8px auto 0;
  }
  .title-column {
    top: var(--card-top);
  }
  .title-info-block {
    margin-top: 20px;
  }
  /* Cards fill the width on phones; swipe + dots replace the arrows */
  .cf-arrow {
    display: none;
  }
  /* Neighbours sit closer on phones, so the pool of light is narrower */
  .lamp-beam {
    width: 340px;
  }
  .lb-feedback {
    width: min(100%, 350px);
    margin-top: 16px;
  }
  .lb-feedback-bar {
    height: 46px;
    padding-left: 18px;
  }
  .lb-feedback.is-inline-status .lb-feedback-status {
    padding-left: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header-logo-link,
  .header-tagline,
  .title-column,
  .cf-arrow,
  .cf-dots,
  .lb-feedback,
  .lb-feedback.is-sending .lb-feedback-send svg,
  .lamp-beam {
    animation: none !important;
  }
  .read-cta,
  .read-cta::after,
  .read-cta-arrow,
  .lb-feedback-input::placeholder,
  .lb-feedback-status,
  .cf-dot::before {
    transition: none;
  }
}
