:root {
  --paper:       oklch(0.95 0.015 88);
  --paper-soft:  oklch(0.972 0.012 88);
  --paper-deep:  oklch(0.91 0.020 86);
  --ink:         oklch(0.26 0.035 275);
  --muted:       oklch(0.44 0.030 275);
  --faint:       oklch(0.57 0.026 278);
  --gold:        oklch(0.595 0.115 68);
  --gold-mid:    oklch(0.555 0.115 66);
  --gold-deep:   oklch(0.515 0.115 64);
  --line:        oklch(0.30 0.030 278 / 0.20);

  --font-display: "Cormorant", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-deva: "Tiro Devanagari Sanskrit", serif;

  --measure: 36rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  position: relative;
  background-color: var(--paper);
  background-image:
    radial-gradient(120% 80% at 50% -10%, var(--paper-soft) 0%, var(--paper) 45%, var(--paper-deep) 100%);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.deva { font-family: var(--font-deva); font-weight: 400; }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* The continuous spine thread behind content */
.spine {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.strand {
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  opacity: 0.82;
}
.strand-1 { stroke: var(--gold); }
.strand-2 { stroke: var(--gold-mid); }
.strand-3 { stroke: var(--gold-deep); }
.cord {
  fill: none;
  stroke: var(--gold-deep);
  stroke-width: 1.4;
  stroke-linecap: round;
  opacity: 0.72;
}

/* Header */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.4rem clamp(1.25rem, 5vw, 4rem);
  background: linear-gradient(to bottom, var(--paper) 40%, transparent);
  backdrop-filter: blur(2px);
}
.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.anchors {
  display: flex;
  gap: clamp(1rem, 3vw, 2.4rem);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.anchors a {
  color: var(--muted);
  text-decoration: none;
  position: relative;
  padding-bottom: 0.3rem;
  transition: color 0.4s ease;
}
.anchors a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.anchors a:hover { color: var(--ink); }
.anchors a:hover::after { width: 100%; }

/* Layout container */
main {
  position: relative;
  z-index: 1;
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

/* Hero */
.hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 0 2rem;
}
/* A clearing in the weave so the threads pass above and below the words, not through them */
.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 51%;
  transform: translate(-50%, -50%);
  width: min(840px, 96%);
  height: 58%;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, var(--paper) 46%, oklch(0.95 0.015 88 / 0) 80%);
  z-index: 0;
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.6rem;
}
.eyebrow .deva { font-size: 1.05rem; letter-spacing: 0; vertical-align: -0.05em; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: 0.005em;
  margin: 0;
  text-shadow: 0 0 22px var(--paper), 0 0 22px var(--paper);
}
.lede {
  max-width: 34rem;
  margin: 1.8rem auto 0;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  font-style: italic;
  font-family: var(--font-display);
  line-height: 1.55;
}
.hero-knot {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
}
.knot-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px oklch(0.595 0.115 68 / 0.14);
}

/* Movements / sections */
.movement {
  position: relative;
  padding: 6.5rem 0;
  border-top: 1px solid var(--line);
}
.movement:first-of-type { border-top: none; }

.knot { display: none; }

.section-tag {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold-deep);
  margin: 0 0 0.4rem;
  text-align: center;
}
.movement h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  text-align: center;
  margin: 0 0 1.5rem;
  letter-spacing: 0.01em;
}
.standfirst {
  max-width: var(--measure);
  margin: 0 auto 3.5rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
}

/* The three movements */
.movements {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}
.movements article { text-align: left; }
.movements h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  margin: 0 0 0.7rem;
  color: var(--ink);
}
.movements h3::before {
  content: "";
  display: block;
  width: 26px; height: 1px;
  background: var(--gold);
  margin-bottom: 0.9rem;
}
.movements p {
  margin: 0;
  font-size: 0.97rem;
  color: var(--muted);
}

/* The Mark */
.emblem-row {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}
.emblem { display: flex; justify-content: center; }
.emblem-svg { width: min(260px, 60vw); height: auto; }
.emblem-ring {
  fill: none;
  stroke: var(--line);
  stroke-width: 0.8;
}
.emblem-strand, .emblem-tail {
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  filter: drop-shadow(0 1px 1px oklch(0.40 0.10 60 / 0.28));
}
.es-1 { stroke: var(--gold); }
.es-2 { stroke: var(--gold-mid); }
.es-3 { stroke: var(--gold-deep); }
.emblem-tail { stroke: var(--gold-deep); }
.emblem-bead {
  fill: var(--gold-deep);
  opacity: 0;
}
.emblem.drawn .es-1 { animation: draw-emblem 2.3s cubic-bezier(0.22, 1, 0.36, 1) 0s forwards; }
.emblem.drawn .es-2 { animation: draw-emblem 2.3s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards; }
.emblem.drawn .es-3 { animation: draw-emblem 2.3s cubic-bezier(0.22, 1, 0.36, 1) 0.6s forwards; }
.emblem.drawn .emblem-tail { animation: draw-emblem 1.5s cubic-bezier(0.22, 1, 0.36, 1) 1.7s forwards; }
.emblem.drawn .emblem-bead { animation: bead-in 0.7s ease 2.1s forwards; }
@keyframes draw-emblem { to { stroke-dashoffset: 0; } }
@keyframes bead-in { to { opacity: 1; } }

.emblem-text .standfirst {
  text-align: left;
  margin: 0 0 2rem;
}
.emblem-text em { font-style: italic; color: var(--gold-deep); }

.gloss { margin: 0; display: grid; gap: 1.5rem; }
.gloss dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.gloss dd { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* Joining */
.joining { text-align: center; }
.decree {
  max-width: 40rem;
  margin: 0 auto 2rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.2vw, 2.1rem);
  line-height: 1.4;
  color: var(--ink);
}
.aside {
  max-width: 32rem;
  margin: 0 auto 3.5rem;
  color: var(--faint);
  font-size: 0.95rem;
  font-style: italic;
  font-family: var(--font-display);
}

/* Enquiry form */
.enquiry {
  max-width: 26rem;
  margin: 0 auto;
  text-align: left;
  border: 1px solid var(--line);
  padding: 2.4rem 2rem 2rem;
  background: oklch(1 0 0 / 0.42);
}
.enquiry-note {
  margin: 0 0 1.8rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--faint);
  font-style: italic;
  text-align: center;
}
.field { margin-bottom: 1.4rem; }
.field label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.55rem;
}
.field .optional { text-transform: none; letter-spacing: 0; color: var(--faint); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.4rem 0;
  transition: border-color 0.4s ease;
}
.field input:focus {
  outline: none;
  border-bottom-color: var(--gold);
}
.enquiry button {
  width: 100%;
  margin-top: 0.6rem;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-deep);
  font-family: var(--font-body);
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 0.95rem;
  cursor: pointer;
  transition: background 0.45s ease, color 0.45s ease;
}
.enquiry button:hover {
  background: var(--gold);
  color: var(--paper);
}
.form-status {
  min-height: 1.2rem;
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.86rem;
  font-style: italic;
  font-family: var(--font-display);
  color: var(--gold-deep);
}

/* Footer */
.site-foot {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 4rem 1.5rem 3.5rem;
  border-top: 1px solid var(--line);
}
.foot-deva {
  display: block;
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: 0.8rem;
}
.site-foot p {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.reveal[data-delay="1"] { animation-delay: 0.5s; }
.reveal[data-delay="2"] { animation-delay: 1s; }
@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

/* In-view sections */
.in-view-target {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1), transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.in-view-target.seen {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .movements { grid-template-columns: 1fr; gap: 2.5rem; }
  .emblem-row { grid-template-columns: 1fr; gap: 2.5rem; }
  .emblem-text .standfirst { text-align: center; }
  .anchors { gap: 1rem; font-size: 0.66rem; }
  .brand { font-size: 1.25rem; }
}

/* Phones: stack the header so the wordmark and nav never collide */
@media (max-width: 520px) {
  .site-head {
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem 1.25rem 0.9rem;
  }
  .brand { font-size: 1.45rem; letter-spacing: 0.2em; }
  .anchors { gap: 1.4rem; font-size: 0.64rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .in-view-target, .strand, .cord, .emblem-strand, .emblem-tail, .emblem-bead {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
}
