/* ============ TOKENS ============ */
:root {
  --paper: #efeae0;
  --paper-dim: #e6e0d3;
  --ink: #22261f;
  --ink-soft: #4b5045;
  --moss: #7a987f;
  --moss-deep: #333d2f;
  --highlight: #405849;
  --ember: #9c5236;
  --ochre: #b08239;
  --line: rgba(34, 38, 31, 0.14);
  --line-soft: rgba(34, 38, 31, 0.08);
  --paper-rgb: 239, 234, 224;

  --display: "Fraunces", serif;
  --body: "Source Serif 4", serif;
  --mono: "IBM Plex Mono", monospace;

  --container: 1180px;
  --edge: clamp(24px, 6vw, 96px);
  --measure: 64ch;
  --ease-manuscript: cubic-bezier(0.2, 0.65, 0.2, 1);
  --shadow-soft: 0 18px 40px rgba(34, 38, 31, 0.06);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  opacity: 0.28;
  background-image: radial-gradient(
    rgba(34, 38, 31, 0.08) 0.55px,
    transparent 0.55px
  );
  background-size: 7px 7px;
  mix-blend-mode: multiply;
}
img,
canvas,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
::selection {
  background: var(--moss);
  color: var(--paper);
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
  text-align: justify;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}
section {
  position: relative;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px var(--edge);
  transition:
    background 0.4s ease,
    padding 0.4s ease,
    border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(var(--paper-rgb), 0.86);
  backdrop-filter: blur(10px);
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 3px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: width 0.3s ease;
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  width: 100%;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 0 0 auto 0;
    top: 0;
    height: 100vh;
    width: 100%;
    background: var(--paper);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 34px;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.7, 0, 0.2, 1);
  }
  .nav-links.open {
    transform: translateY(0);
  }
  .nav-links a {
    font-size: 15px;
  }
  .nav-toggle {
    display: block;
    z-index: 110;
    position: absolute;
    right: var(--edge);
  }
}

/* ============ AMBIENT CANVAS ============ */
.ambient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 120px;
  padding-bottom: 80px;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 2;
}
.hero .eyebrow {
  margin-bottom: 26px;
}
.hero-mark {
  font-size: clamp(64px, 13vw, 168px);
  line-height: 0.92;
  margin-bottom: 34px;
  color: var(--highlight);
}
.hero-tagline {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(24px, 3.4vw, 40px);
  max-width: 780px;
  margin-bottom: 30px;
  color: var(--ink);
}
.hero-def {
  font-size: clamp(16px, 1.6vw, 19px);
  max-width: 560px;
  color: var(--ink-soft);
  margin-bottom: 36px;
}
.hero-attrib {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  margin-bottom: 48px;
}
.cta-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.btn {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 15px 28px;
  border-radius: 2px;
  text-decoration: none;
  display: inline-block;
  border: 1px solid var(--ink);
  transition:
    background 0.3s ease,
    color 0.3s ease;
}
.btn-solid {
  background: var(--ink);
  color: var(--paper);
}
.btn-solid:hover {
  background: var(--moss-deep);
  border-color: var(--moss-deep);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ============ WORLD SECTIONS (shared) ============ */
.world {
  padding: 150px 0;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 76px;
}
.world-inner {
  position: relative;
  z-index: 2;
}
.world-head {
  max-width: 760px;
  margin-bottom: 90px;
}
.world-head .eyebrow {
  margin-bottom: 22px;
}
.world-title {
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1;
  margin-bottom: 26px;
}
.world-lede {
  font-size: clamp(17px, 1.9vw, 21px);
  color: var(--ink-soft);
  max-width: 620px;
  text-wrap: pretty;
}

.big-quote {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 4.6vw, 58px);
  line-height: 1.18;
  max-width: 920px;
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease-manuscript),
    transform 0.9s var(--ease-manuscript);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* -------- EXISTENCE theme -------- */
#existence {
  background: var(--paper);
}
#existence .world-title {
  color: var(--highlight);
}
#principles .world-title,
#living .world-title {
  color: var(--highlight);
}
#principles::before,
#existence::before,
#understanding::before,
#living::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--edge);
  width: 42px;
  height: 2px;
  background: var(--highlight);
  opacity: 0.7;
}
#existence::before {
  background: var(--moss);
}
#understanding::before {
  background: var(--ember);
}
#living::before {
  background: var(--ochre);
}

/* -------- UNDERSTANDING theme -------- */
#understanding {
  background: var(--paper-dim);
}
/* -------- Suffering / attachment cycle -------- */
.cycle-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 80px;
}
@media (max-width: 900px) {
  .cycle-wrap {
    grid-template-columns: 1fr;
    gap: 44px;
  }
}
.cycle-svg-holder {
  position: relative;
  aspect-ratio: 1/1;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
  filter: drop-shadow(0 16px 26px rgba(34, 38, 31, 0.06));
}
.cycle-svg-holder svg {
  overflow: visible;
}
.cycle-node {
  cursor: default;
}
.cycle-node text {
  transition: fill 0.3s ease;
}
.cycle-node circle {
  transition:
    r 0.3s ease,
    fill 0.3s ease;
}
.cycle-node text {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  fill: var(--ink);
  pointer-events: none;
}
.cycle-node.active circle {
  fill: var(--ember);
}
.cycle-node:hover circle {
  fill: var(--ochre);
}
.cycle-node:hover text {
  fill: var(--ember);
}
.cycle-path {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.4;
}
.cycle-detail {
  min-height: 220px;
  padding: 28px 0 28px 34px;
  border-left: 2px solid var(--ember);
}
.cycle-detail .stage-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 16px;
}
.cycle-detail h3 {
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: 18px;
}
.cycle-detail p {
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 480px;
}
/* -------- TREAT YOURSELF (warm contrast) -------- */
.principles-practice {
  margin-top: 80px;
  padding: 70px 0 0;
  border-top: 1px solid var(--line);
}
.principles-practice .eyebrow {
  color: rgba(239, 234, 224, 0.65);
}
.principles-practice .big-quote {
  color: var(--paper);
  max-width: 820px;
  margin-top: 24px;
}
.treat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 42px;
  margin-top: 56px;
  list-style: none;
  padding: 0;
}
.treat-list li {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(18px, 2vw, 23px);
  color: rgba(239, 234, 224, 0.9);
  position: relative;
  padding-left: 22px;
}
.treat-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--ochre);
}

/* -------- GRATITUDE -------- */
.principles-practice {
  background: var(--moss-deep);
  color: var(--paper);
  padding: 70px var(--edge);
  margin-left: calc(var(--edge) * -1);
  margin-right: calc(var(--edge) * -1);
}
.principles-practice .practice-note {
  margin-top: 46px;
  max-width: 600px;
  color: rgba(239, 234, 224, 0.75);
  font-size: 16.5px;
}
.principles-gratitude {
  margin: 90px auto 0;
  max-width: 900px;
  text-align: center;
}
.principles-gratitude .big-quote {
  font-size: clamp(34px, 7vw, 84px);
  max-width: 1000px;
  color: var(--ink);
}
.principles-gratitude .gratitude-note {
  margin: 40px auto 0;
  max-width: 600px;
  color: var(--ink-soft);
  font-size: 17px;
}

/* -------- LIVING (warmer, purpose/love/faith) -------- */
#living {
  background: linear-gradient(180deg, var(--paper) 0%, #e9dfc9 100%);
  padding: 150px 0;
}
.reflection {
  margin-top: 130px;
  padding: 100px var(--edge);
  text-align: center;
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px;
}
.reflection .eyebrow {
  color: rgba(239, 234, 224, 0.55);
  display: block;
  margin-bottom: 26px;
}
.reflection h3 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(26px, 4.4vw, 46px);
  max-width: 780px;
  margin: 0 auto;
  line-height: 1.3;
}

/* -------- LOVE -------- */
.living-love {
  max-width: 880px;
  margin: 130px auto 0;
  padding-top: 80px;
  border-top: 1px solid var(--line);
}
.living-love .big-quote {
  margin-bottom: 40px;
}
.living-love p.support {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 600px;
}

/* -------- FAQ -------- */
.faq {
  background: var(--paper);
}
.faq-list {
  max-width: 920px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 28px 48px 28px 0;
  position: relative;
  font-family: var(--display);
  font-size: clamp(21px, 2.5vw, 30px);
  line-height: 1.25;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 25px;
  color: var(--ember);
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 400;
  transition: transform 0.3s ease;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-item summary:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: -2px;
}
.faq-answer {
  max-width: 700px;
  padding: 0 48px 30px 0;
  color: var(--ink-soft);
  font-size: 17px;
}

@media (max-width: 760px) {
  .faq-list {
    margin-top: 0;
  }
  .faq-item summary {
    padding: 22px 38px 22px 0;
    font-size: 22px;
  }
  .faq-item summary::after {
    top: 19px;
    right: 0;
  }
  .faq-answer {
    padding: 0 0 24px;
    font-size: 16px;
  }
}

@media (max-width: 760px) {
  .world {
    padding: 104px 0;
  }
  .world-head {
    margin-bottom: 58px;
  }
  .world-title {
    font-size: clamp(36px, 12vw, 58px);
  }
  .world-lede,
  .cycle-detail p,
  .founder-grid p {
    font-size: 16px;
  }
  .principles-practice {
    margin-top: 56px;
    padding-top: 52px;
    padding-bottom: 52px;
  }
  .principles-gratitude,
  .living-love {
    margin-top: 76px;
    padding-top: 56px;
  }
  .principles-practice {
    margin-left: calc(var(--edge) * -1);
    margin-right: calc(var(--edge) * -1);
  }
  .cycle-detail {
    min-height: 0;
    padding: 26px 0 0;
    border-left: 0;
    border-top: 2px solid var(--ember);
  }
  .reflection {
    margin-top: 88px;
    padding-top: 72px;
    padding-bottom: 72px;
  }
}

/* -------- FOUNDER / SAFEGUARDS -------- */
#founder {
  background: var(--paper-dim);
  padding: 150px 0;
}
.founder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  margin-top: 70px;
}
@media (max-width: 900px) {
  .founder-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }
}
.founder-grid h3 {
  font-size: 22px;
  margin-bottom: 16px;
}
.founder-safeguards {
  padding: 30px 32px 34px;
  background: rgba(239, 234, 224, 0.56);
  box-shadow: 0 14px 32px rgba(34, 38, 31, 0.04);
}
.founder-safeguards h3 {
  color: var(--highlight);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.founder-grid p {
  color: var(--ink-soft);
  font-size: 16.5px;
}
.safeguard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.safeguard-list li {
  font-size: 15.5px;
  color: var(--ink-soft);
  padding-left: 20px;
  position: relative;
}
.safeguard-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ember);
}

/* ============ CONTACT ============ */
#contact {
  background: var(--ink);
  color: var(--paper);
  padding: 160px 0 130px;
}
#contact .eyebrow {
  color: rgba(239, 234, 224, 0.55);
}
#contact .world-title {
  color: var(--paper);
  margin-bottom: 20px;
}
#contact .world-lede {
  color: rgba(239, 234, 224, 0.72);
  margin-bottom: 70px;
}
form {
  max-width: 680px;
}
.field {
  margin-bottom: 30px;
}
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(239, 234, 224, 0.6);
  margin-bottom: 10px;
}
.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(239, 234, 224, 0.32);
  color: var(--paper);
  font-family: var(--body);
  font-size: 17px;
  padding: 10px 2px;
  outline: none;
  transition: border-color 0.3s ease;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--ochre);
}
.field textarea {
  resize: vertical;
  min-height: 110px;
}
.field .err {
  color: #d98866;
  font-family: var(--mono);
  font-size: 12px;
  margin-top: 8px;
  display: none;
}
.field.invalid .err {
  display: block;
}
.field.invalid input,
.field.invalid textarea {
  border-color: #d98866;
}
.form-status {
  font-family: var(--mono);
  font-size: 13px;
  margin-top: 22px;
  color: var(--ochre);
  min-height: 20px;
}
.submit-btn {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--paper);
  padding: 16px 32px;
  cursor: pointer;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}
.submit-btn:hover {
  background: transparent;
  color: var(--paper);
}

/* ============ FOOTER ============ */
footer {
  background: var(--ink);
  color: rgba(239, 234, 224, 0.7);
  padding: 70px var(--edge) 46px;
  border-top: 1px solid rgba(239, 234, 224, 0.1);
}
.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  /* border-top: 1px solid rgba(239, 234, 224, 0.1); */
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(239, 234, 224, 0.4);
  flex-wrap: wrap;
  gap: 10px;
}
.back-top {
  color: var(--paper);
  text-decoration: none;
  transition: color 0.3s ease;
}
.back-top:hover,
.back-top:focus-visible {
  color: var(--ochre);
}

/* ============ EDITORIAL COMPOSITION ============ */
@media (min-width: 901px) {
  #founder .world-head {
    max-width: 700px;
    margin-left: 4%;
  }
  #founder .founder-grid {
    max-width: 1020px;
    margin-left: auto;
    margin-right: 2%;
  }

  #contact .world-head,
  #contact .world-lede,
  #contact form {
    margin-left: 5%;
  }
}

/* ============ FINAL COMPOSITION LAYER ============ */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(64, 88, 73, 0.18);
  border-radius: 50%;
  transform: translate(16%, -8%);
}
.hero::before {
  width: min(70vw, 760px);
  height: min(70vw, 760px);
  right: -12vw;
  top: 12vh;
}
.hero::after {
  width: min(48vw, 520px);
  height: min(48vw, 520px);
  right: 1vw;
  top: 25vh;
  border-color: rgba(156, 82, 54, 0.16);
}
.hero-mark {
  position: relative;
  z-index: 1;
  text-shadow: 14px 18px 0 rgba(64, 88, 73, 0.08);
}
.hero-tagline {
  max-width: 650px;
}

#principles {
  background:
    linear-gradient(135deg, rgba(230, 224, 211, 0.72), transparent 48%),
    var(--paper-dim);
}
.principles-practice {
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.cycle-path {
  stroke-dasharray: 9 15;
  animation: cycle-drift 18s linear infinite;
}
@keyframes cycle-drift {
  to {
    stroke-dashoffset: -240;
  }
}
.cycle-node circle {
  r: 7;
}
.cycle-node:hover circle,
.cycle-node:focus-visible circle {
  r: 10;
}
#living {
  background:
    radial-gradient(
      circle at 18% 72%,
      rgba(180, 130, 57, 0.11),
      transparent 25%
    ),
    linear-gradient(180deg, var(--paper) 0%, #e9dfc9 100%);
}
.living-love {
  position: relative;
}
.living-love::before {
  content: "";
  position: absolute;
  right: 4%;
  top: 44px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(180, 130, 57, 0.22);
  border-radius: 50%;
}

#founder {
  background:
    linear-gradient(
      110deg,
      rgba(230, 224, 211, 0.88),
      rgba(216, 208, 194, 0.5)
    ),
    var(--paper-dim);
}
.founder-note {
  padding-top: 18px;
  border-top: 2px solid var(--highlight);
}
.founder-safeguards {
  border-left: 2px solid var(--ember);
}

#contact {
  background:
    radial-gradient(
      circle at 82% 20%,
      rgba(122, 152, 127, 0.17),
      transparent 25%
    ),
    var(--ink);
}
#contact::before {
  content: "QUESTION EVERYTHING.";
  position: absolute;
  right: var(--edge);
  top: 13%;
  max-width: 260px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  line-height: 1.8;
  color: rgba(239, 234, 224, 0.32);
}
.field input,
.field textarea {
  transition:
    border-color 0.35s ease,
    padding-left 0.35s ease;
}
.field input:focus,
.field textarea:focus {
  padding-left: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .cycle-path {
    animation: none;
  }
  .field input,
  .field textarea {
    transition: none;
  }
}

@media (max-width: 760px) {
  .hero::before,
  .hero::after {
    right: -38vw;
    top: 24vh;
  }
  .hero::after {
    right: -20vw;
  }
  .cycle-svg-holder {
    max-width: 430px;
  }
  .living-love::before {
    width: 100px;
    height: 100px;
    right: -16px;
    top: 86px;
  }
  #contact::before {
    position: static;
    display: block;
    margin-bottom: 34px;
  }
}
