/* Honora — landing page styles
   Color tokens mirror the iOS app (DESIGN.md). */

:root {
  --honora-background: #0C1519;
  --honora-surface: #162127;
  --honora-surface-alt: #1B2A31;
  --honora-border: #2A3840;
  --honora-accent: #CF9D7B;
  --honora-accent-dark: #724B39;
  --honora-text-primary: #F3E7DC;
  --honora-text-secondary: #C7B6A8;
  --honora-text-faint: #8A7C70;

  --radius: 12px;
  --radius-pill: 999px;
  --transition: 200ms ease;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --page-max: 1120px;
  --page-gutter: 24px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--honora-background);
  color: var(--honora-text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

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

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

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

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Ambient orb ----------
   Single warm radial blob that drifts very slowly around the viewport. Heavy
   blur + low alpha + screen blend = ambient candlelight. Fixed so it persists
   across scroll. Sits behind all content. */

.ambient-orb {
  position: fixed;
  top: 0;
  left: 0;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(207, 157, 123, 0.22) 0%,
    rgba(207, 157, 123, 0.08) 45%,
    transparent 70%
  );
  filter: blur(90px);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  animation: orb-drift 52s ease-in-out infinite;
}

@keyframes orb-drift {
  0%   { transform: translate3d(-18vw, -22vh, 0); }
  20%  { transform: translate3d(45vw, -10vh, 0); }
  40%  { transform: translate3d(70vw, 40vh, 0); }
  60%  { transform: translate3d(35vw, 75vh, 0); }
  80%  { transform: translate3d(-12vw, 55vh, 0); }
  100% { transform: translate3d(-18vw, -22vh, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-orb {
    animation: none;
    transform: translate3d(40vw, 30vh, 0);
  }
}

/* Content sits ABOVE the orb. */
.page,
.site-footer,
.legal {
  position: relative;
  z-index: 1;
}

/* ============================ Header / nav ============================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color var(--transition), border-color var(--transition),
              backdrop-filter var(--transition);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background-color: rgba(12, 21, 25, 0.72);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
          backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--honora-border);
}

.site-header__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  height: 64px;
  padding: 0 var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
}

.site-header__brand img {
  height: 32px;
  width: auto;
  user-select: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3.4vw, 34px);
}

.site-nav__link {
  position: relative;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  color: var(--honora-text-secondary);
  padding: 6px 0;
}

.site-nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--honora-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 260ms var(--ease-out);
}

.site-nav__link:hover {
  color: var(--honora-text-primary);
}

.site-nav__link.is-active {
  color: var(--honora-text-primary);
}

.site-nav__link.is-active::after {
  transform: scaleX(1);
}

/* =============================== Hero ===============================
   Book Wall Hero (interim). Two-directional drift of the real library
   covers behind the headline. Replaced by the imported design later. */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  overflow: hidden;
  padding: 92px var(--page-gutter) 48px;
  margin-top: -64px; /* pull hero under the transparent sticky header */
}

/* Book wall: five rows of covers scrolling in alternating directions. */
.hero__wall {
  position: absolute;
  inset: -12px;
  z-index: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
  pointer-events: none;
}

.bw-row {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.bw-track {
  display: flex;
  gap: 0;
  width: max-content;
  height: 100%;
  align-items: center;
  will-change: transform;
  /* Nudge each track a hair off a whole-pixel start so sub-pixel rounding at
     the loop seam never leaves a visible sliver. */
  backface-visibility: hidden;
}

.bw-track--l { animation: bw-left var(--d, 46s) linear infinite; }
.bw-track--r { animation: bw-right var(--d, 54s) linear infinite; }

/* Uniform "cell" = cover + trailing margin. The track holds exactly two
   copies, so translateX(-50%) lands precisely on one copy: a seamless loop
   with no half-gap jump. */
.bw-track img {
  height: 100%;
  width: auto;
  flex: 0 0 auto;
  display: block;
  margin-right: 14px;
  border-radius: 14px;
  object-fit: cover;
  background-color: var(--honora-surface);
}

@keyframes bw-left  { from { transform: translateX(0); }    to { transform: translateX(-50%); } }
@keyframes bw-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }

@media (prefers-reduced-motion: reduce) {
  .bw-track { animation: none; }
}

/* Scrim: darken top (behind the headline) and bottom (behind the CTA);
   keep the middle only lightly veiled so the covers read behind the phone. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(150% 105% at 50% 50%,
      transparent 26%,
      rgba(12, 21, 25, 0.40) 100%),
    linear-gradient(180deg,
      rgba(12, 21, 25, 0.88) 0%,
      rgba(12, 21, 25, 0.28) 22%,
      rgba(12, 21, 25, 0.28) 64%,
      rgba(12, 21, 25, 0.92) 90%,
      var(--honora-background) 100%);
}

.hero__top,
.hero__bottom {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__headline {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: clamp(30px, 8.4vw, 40px);
  line-height: 1.14;
  letter-spacing: -0.015em;
  word-spacing: -0.04em;
  margin: 0 0 12px 0;
  color: var(--honora-text-primary);
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.55);
}

/* One-line headline only where it comfortably fits. */
@media (min-width: 600px) {
  .hero__headline {
    font-size: clamp(40px, 5.2vw, 54px);
    white-space: nowrap;
  }
}

/* The morphing word breathes as its width animates (shared with hero). */
.landing__morph-word {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: -0.22em;
  transition: width 380ms cubic-bezier(0.32, 0, 0.16, 1);
  will-change: width;
}

.landing__morph-word > span {
  display: inline-block;
  transition: color 200ms ease;
}

.landing__morph-word.is-morphing > span {
  color: var(--honora-accent);
}

.hero__subhead {
  font-size: 16px;
  line-height: 1.5;
  color: var(--honora-text-secondary);
  margin: 0;
  max-width: 440px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

/* Centred phone showing the app player. */
.hero__phone {
  position: relative;
  z-index: 2;
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__phone-frame {
  height: min(58vh, 560px);
  aspect-ratio: 398 / 862;
  padding: 12px;
  border-radius: 52px;
  background: #0b0d10;
  box-shadow:
    inset 0 2px 0 2px rgba(255, 255, 255, 0.06),
    0 40px 110px rgba(0, 0, 0, 0.55),
    0 8px 26px rgba(0, 0, 0, 0.4);
}

.hero__phone-screen {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 42px;
}

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

.waitlist {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.waitlist__input {
  flex: 1;
  min-width: 0;
  background-color: var(--honora-surface);
  border: 1px solid var(--honora-border);
  border-radius: var(--radius);
  color: var(--honora-text-primary);
  font-family: inherit;
  font-size: 16px;
  padding: 14px 16px;
  transition: border-color var(--transition),
              background-color var(--transition),
              box-shadow var(--transition);
  animation: input-breathe 3.5s ease-in-out infinite;
}

.waitlist__input::placeholder {
  color: var(--honora-text-secondary);
  opacity: 0.7;
}

.waitlist__input:hover,
.waitlist__input:focus,
.waitlist__input:not(:placeholder-shown) {
  animation: none;
}

.waitlist__input:hover {
  border-color: #364750;
}

.waitlist__input:focus {
  border-color: var(--honora-accent);
  background-color: var(--honora-surface-alt);
  box-shadow: 0 0 0 4px rgba(207, 157, 123, 0.08);
  outline: none;
}

@keyframes input-breathe {
  0%, 100% {
    border-color: var(--honora-border);
    box-shadow: 0 0 0 0 rgba(207, 157, 123, 0);
  }
  50% {
    border-color: rgba(207, 157, 123, 0.34);
    box-shadow: 0 0 20px -4px rgba(207, 157, 123, 0.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .waitlist__input { animation: none; }
}

.waitlist__button {
  background-color: var(--honora-accent);
  color: #2A1A11;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 14px 22px;
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition);
  white-space: nowrap;
}

.waitlist__button:hover {
  background-color: var(--honora-accent-dark);
  color: var(--honora-text-primary);
}

.waitlist__button:active { transform: scale(0.98); }

.waitlist__button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.waitlist__confirmation {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 22px;
  color: var(--honora-text-primary);
  margin: 0;
  opacity: 0;
  transition: opacity 400ms ease;
}

.waitlist__confirmation.is-visible { opacity: 1; }

.waitlist.is-submitted { display: none; }

.waitlist__error {
  font-size: 14px;
  color: var(--honora-text-secondary);
  margin: 18px 0 0 0;
  min-height: 1.4em;
  opacity: 0;
  transition: opacity 200ms ease;
}

.waitlist__error.is-visible { opacity: 1; }

/* ============================= Sections ============================= */

.section {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(72px, 12vh, 132px) var(--page-gutter);
}

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--honora-accent);
  margin: 0 0 18px 0;
}

.section__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--honora-text-primary);
  margin: 0 0 24px 0;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--honora-accent);
  margin-top: 4px;
}

.link-more svg {
  width: 18px;
  height: 18px;
  transition: transform 220ms var(--ease-out);
}

.link-more:hover { color: var(--honora-text-primary); }
.link-more:hover svg { transform: translateX(4px); }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

/* ---------- About ---------- */

.about { max-width: 680px; }

.about__lead {
  margin: 0 0 8px 0;
}

.about__lead p {
  font-size: 18px;
  line-height: 1.72;
  color: var(--honora-text-secondary);
  margin: 0 0 20px 0;
  max-width: 62ch;
}

/* ---------- App ---------- */

/* Split: copy on the left, a single iPhone mockup on the right. */
.app {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

.app__copy { max-width: 520px; }

.app__intro {
  font-size: 18px;
  line-height: 1.7;
  color: var(--honora-text-secondary);
  margin: 16px 0 28px;
  max-width: 48ch;
}

.app__cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.app__device {
  position: relative;
  display: flex;
  justify-content: center;
}

/* Warm glow behind the device. */
.app__device::before {
  content: '';
  position: absolute;
  width: 74%;
  height: 60%;
  top: 20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(207, 157, 123, 0.20), transparent 70%);
  filter: blur(64px);
  z-index: 0;
}

.app-phone {
  position: relative;
  z-index: 1;
  width: clamp(238px, 30vw, 300px);
  aspect-ratio: 1125 / 2436;
  padding: 11px;
  border-radius: 46px;
  background: #0a0f12;
  box-shadow:
    0 44px 90px -34px rgba(0, 0, 0, 0.78),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 0 0 2px #1b2429;
}

.app-phone__screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 36px;
  display: block;
}

@media (min-width: 820px) {
  .app {
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(40px, 6vw, 84px);
  }
  .app__copy { justify-self: start; }
}

.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border: 1px solid var(--honora-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  cursor: default;
}

.appstore-badge__mark {
  width: 22px;
  height: 22px;
  color: var(--honora-text-secondary);
  flex: 0 0 auto;
}

.appstore-badge__text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.1;
}

.appstore-badge__label {
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--honora-text-faint);
}

.appstore-badge__store {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  color: var(--honora-text-primary);
}

.app__note {
  font-size: 13px;
  color: var(--honora-text-faint);
}

/* ---------- Community ---------- */

.community {
  display: flex;
  justify-content: center;
}

.community__panel {
  max-width: 760px;
  text-align: center;
  padding: clamp(38px, 6vw, 68px);
  border: 1px solid var(--honora-border);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--honora-surface), rgba(22, 33, 39, 0.35));
}

.community__lead {
  font-size: 18px;
  line-height: 1.72;
  color: var(--honora-text-secondary);
  margin: 0 auto 26px;
  max-width: 58ch;
}

/* ============================== Footer ============================== */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 34px var(--page-gutter) 44px;
  border-top: 1px solid var(--honora-border);
  font-size: 13px;
  color: var(--honora-text-secondary);
  letter-spacing: 0.01em;
}

.site-footer a:hover { color: var(--honora-text-primary); }

.site-footer__links {
  display: flex;
  gap: 18px;
}

/* Year toggle: morphs MMXXVI <-> 2026 via staggered per-character scramble. */
.site-footer__year {
  display: inline-block;
  min-width: 4.5em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.site-footer__year > span {
  display: inline-block;
  min-width: 0.6em;
  text-align: center;
  transition: color 200ms ease;
}

/* ============================ Legal pages ============================ */

.legal {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.legal__back {
  font-size: 14px;
  color: var(--honora-text-secondary);
  display: inline-block;
  margin-bottom: 64px;
  max-width: 680px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.legal__back:hover { color: var(--honora-text-primary); }

.legal__content {
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  padding-bottom: 80px;
}

.legal__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 8px 0;
  color: var(--honora-text-primary);
}

.legal__updated {
  font-size: 14px;
  color: var(--honora-text-secondary);
  margin: 0 0 48px 0;
}

.legal__content h2 {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--honora-text-primary);
  margin: 48px 0 16px 0;
  letter-spacing: 0.005em;
}

.legal__content p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--honora-text-primary);
  margin: 0 0 18px 0;
}

.legal__content ul {
  padding-left: 22px;
  margin: 0 0 18px 0;
}

.legal__content li {
  font-size: 16px;
  line-height: 1.75;
  color: var(--honora-text-primary);
  margin-bottom: 8px;
}

.legal__content strong {
  font-weight: 600;
  color: var(--honora-text-primary);
}

.legal__content hr {
  border: none;
  border-top: 1px solid var(--honora-border);
  margin: 56px 0 24px 0;
}

.legal__content .legal__copyright {
  font-size: 13px;
  color: var(--honora-text-secondary);
  text-align: center;
  margin: 0;
}

.legal__content p a {
  color: var(--honora-accent);
  border-bottom: 1px solid rgba(207, 157, 123, 0.35);
  transition: color var(--transition), border-color var(--transition);
}

.legal__content p a:hover {
  color: var(--honora-text-primary);
  border-bottom-color: var(--honora-accent);
}

/* ============================ Reader pages ============================
   Long-form About / Community pages. Shares the legal typography but with
   a wider, editorial lead. */

.reader {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(56px, 9vh, 104px) var(--page-gutter) 96px;
}

.reader__eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--honora-accent);
  margin: 0 0 18px 0;
}

.reader__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 28px 0;
  color: var(--honora-text-primary);
}

.reader__intro {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(20px, 2.6vw, 24px);
  font-style: italic;
  line-height: 1.5;
  color: var(--honora-text-secondary);
  margin: 0 0 44px 0;
  max-width: 60ch;
}

.reader h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
  color: var(--honora-text-primary);
  margin: 52px 0 16px 0;
}

.reader p {
  font-size: 17px;
  line-height: 1.78;
  color: var(--honora-text-secondary);
  margin: 0 0 20px 0;
}

.reader strong { color: var(--honora-text-primary); font-weight: 600; }

.reader ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  display: grid;
  gap: 12px;
}

.reader li {
  position: relative;
  padding-left: 26px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--honora-text-secondary);
}

.reader li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 14px;
  height: 1px;
  background: var(--honora-accent);
}

.reader__divider {
  border: none;
  border-top: 1px solid var(--honora-border);
  margin: 56px 0;
}

.reader__cta {
  margin-top: 40px;
}

/* Founding Circle signup on the Community reader page */
.circle-signup {
  margin-top: 20px;
  padding: clamp(28px, 5vw, 40px);
  border: 1px solid var(--honora-border);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--honora-surface), rgba(22, 33, 39, 0.3));
}

.circle-signup__note {
  font-size: 13px;
  color: var(--honora-text-faint);
  margin: 16px 0 0 0;
  line-height: 1.55;
}

.circle-signup .waitlist { margin: 0; max-width: 480px; }

/* ============================ Responsive ============================ */

@media (max-width: 599px) {
  :root { --page-gutter: 20px; }

  .site-header__inner { height: 58px; }
  .site-header__brand img { height: 28px; }
  .site-nav { gap: 18px; }
  .site-nav__link { font-size: 14px; }

  .hero {
    margin-top: -58px;
    min-height: 100dvh;
    justify-content: space-between;
    padding: 86px 20px 40px;
    gap: 18px;
  }
  .hero__phone-frame {
    height: min(44vh, 400px);
    width: auto;
    border-radius: 38px;
    padding: 9px;
  }
  .hero__phone-screen { border-radius: 30px; }

  .waitlist {
    flex-direction: column;
    gap: 12px;
  }
  .waitlist__button { width: 100%; }

  .community__panel { text-align: left; }
  .community__lead { margin-left: 0; }

  .site-footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .legal__title { font-size: 32px; }
  .legal__back { margin-bottom: 40px; }
}

@media (min-width: 600px) {
  .legal { padding: 32px; }
}
