/* ============================================
   THE CROWN OF DUST — design tokens
   ============================================ */
:root {
  --ink: #1c1815;
  --ink-raised: #241e19;
  --ink-line: rgba(237, 230, 214, 0.12);
  --bone: #ede6d6;
  --bone-dim: #b3a891;
  --gold: #c9a24b;
  --gold-bright: #e8c876;
  --clay: #8b6f4e;
  --ember: #a5482f;

  --font-display: "Fraunces", serif;
  --font-headline: "Cinzel", serif;
  --font-body: "Source Serif 4", serif;
  --font-ui: "Public Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --max: 1120px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

/* subtle grain overlay, ties to "dust" motif */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 500;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 5vw;
  background: rgba(28, 24, 21, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink-line);
}

.nav__mark {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--bone);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--font-ui);
  font-size: 14px;
}

.nav__links a {
  text-decoration: none;
  color: var(--bone-dim);
  transition: color 0.2s ease;
}
.nav__links a:hover { color: var(--gold-bright); }

.nav__cta {
  color: var(--ink) !important;
  background: var(--gold);
  padding: 9px 18px;
  border-radius: 3px;
  font-weight: 600;
}
.nav__cta:hover { background: var(--gold-bright) !important; }

@media (max-width: 720px) {
  .nav__links { gap: 14px; font-size: 12.5px; }
  .nav__links a:not(.nav__cta) { display: none; }
}

/* ============================================
   EYEBROW / SHARED
   ============================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin: 0 0 18px;
}
.eyebrow--center { text-align: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 3px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn--primary {
  background: var(--gold);
  color: #1c1815;
}
.btn--primary:hover { background: var(--gold-bright); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--bone);
  border-color: var(--ink-line);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-bright); }
.btn--small { padding: 10px 20px; font-size: 14px; }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 76px 5vw 60px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 20%, rgba(201,162,75,0.10), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 70%, rgba(139,111,78,0.10), transparent 60%);
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 955px;
}

.hero__headline {
  font-family: var(--font-headline);
  font-weight: 400;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.22;
  letter-spacing: 0.01em;
  max-width: 955px;
  margin: 0 0 28px;
}
.hero__headline em {
  font-style: normal;
  font-weight: 700;
  color: var(--gold-bright);
}

.hero__sub {
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.65;
  color: var(--bone-dim);
  max-width: 855px;
  margin: 0 0 40px;
}
.hero__sub-strong {
  color: var(--bone);
  font-style: italic;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__diagram {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  max-width: 720px;
}

.blueprint-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.glyph {
  fill: none;
  stroke: var(--bone-dim);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.glyph--body { stroke-dasharray: 240; stroke-dashoffset: 240; animation: draw 1.6s ease forwards 0.2s; }
.glyph--soul { stroke-dasharray: 200; stroke-dashoffset: 200; animation: draw 1.6s ease forwards 0.6s; }
.glyph--temple { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1.6s ease forwards 1.0s; }

.converge {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1;
  stroke-dasharray: 4 6;
  opacity: 0;
  animation: fadeIn 1s ease forwards 1.8s;
}

.crown {
  fill: var(--gold);
  opacity: 0;
  transform-origin: center;
  animation: crownRise 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards 2.2s;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}
@keyframes fadeIn {
  to { opacity: 0.6; }
}
@keyframes crownRise {
  from { opacity: 0; transform: translateY(14px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .glyph { stroke-dashoffset: 0; }
  .converge { opacity: 0.6; }
  .crown { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .hero { padding-top: 96px; }
  .hero__diagram { display: none; }
}

/* ============================================
   PREMISE
   ============================================ */
.premise {
  padding: 130px 5vw;
  border-top: 1px solid var(--ink-line);
  background: var(--ink-raised);
}
.premise__inner {
  max-width: 700px;
  margin: 0 auto;
}
.premise__lead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  line-height: 1.4;
  margin: 0 0 20px;
  color: var(--bone-dim);
}
.premise__lead--emphasis {
  color: var(--gold-bright);
  font-style: italic;
}
.premise__body p {
  font-size: 18px;
  line-height: 1.75;
  color: var(--bone);
  margin: 0 0 20px;
}
.premise__citation {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--bone-dim);
  margin-top: 30px;
}
.premise__citation cite { font-style: italic; }

/* ============================================
   DIMENSIONS
   ============================================ */
.dimensions {
  padding: 130px 5vw;
}
.dimensions__inner {
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}
.dimensions__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 60px;
}
.dimensions__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  text-align: left;
}
.dim-card {
  background: var(--ink-raised);
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  padding: 38px 32px;
}
.dim-card__icon {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 22px;
}
.dim-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 12px;
}
.dim-card p {
  font-size: 16px;
  color: var(--bone-dim);
  line-height: 1.65;
  margin: 0;
}
.dimensions__footnote {
  max-width: 620px;
  margin: 50px auto 0;
  font-size: 15px;
  color: var(--bone-dim);
  font-style: italic;
  line-height: 1.7;
}

@media (max-width: 860px) {
  .dimensions__grid { grid-template-columns: 1fr; }
}

/* ============================================
   AGENT / CHAT
   ============================================ */
.agent {
  padding: 130px 5vw;
  background: var(--ink-raised);
  border-top: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
}
.agent__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.agent__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 18px;
}
.agent__sub {
  color: var(--bone-dim);
  font-size: 17px;
  margin: 0 0 46px;
}

.chat {
  text-align: left;
  background: var(--ink);
  border: 1px solid var(--ink-line);
  border-radius: 10px;
  overflow: hidden;
}
.chat__messages {
  max-height: 360px;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat__msg {
  max-width: 88%;
  padding: 13px 17px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.55;
}
.chat__msg p { margin: 0; }
.chat__msg--agent {
  background: var(--ink-raised);
  border: 1px solid var(--ink-line);
  align-self: flex-start;
}
.chat__msg--user {
  background: var(--gold);
  color: var(--ink);
  align-self: flex-end;
}
.chat__msg--error {
  background: rgba(165, 72, 47, 0.15);
  border: 1px solid var(--ember);
  align-self: flex-start;
  color: var(--bone);
}
.chat__msg--agent.is-typing p::after {
  content: "\2009\2022\2009\2022\2009\2022";
  animation: typing 1.2s infinite;
  opacity: 0.6;
}
@keyframes typing { 50% { opacity: 0.2; } }

.chat__form {
  display: flex;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--ink-line);
}
.chat__form input {
  flex: 1;
  background: var(--ink-raised);
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  padding: 12px 16px;
  color: var(--bone);
  font-family: var(--font-ui);
  font-size: 15px;
}
.chat__form input::placeholder { color: var(--bone-dim); }
.chat__form input:focus { border-color: var(--gold); outline: none; }

.chat__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 16px 18px;
}
.chip {
  font-family: var(--font-ui);
  font-size: 13.5px;
  color: var(--bone-dim);
  background: transparent;
  border: 1px solid var(--ink-line);
  border-radius: 20px;
  padding: 7px 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.chip:hover { border-color: var(--gold); color: var(--gold-bright); }

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials {
  padding: 130px 5vw;
}
.testimonials__inner {
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}
.testimonials__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 60px;
}
.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-bottom: 90px;
}
.quote-card {
  text-align: left;
  margin: 0;
  background: var(--ink-raised);
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  padding: 32px 28px;
}
.quote-card p {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  margin: 0 0 20px;
  color: var(--bone);
}
.quote-card p em { color: var(--gold-bright); font-style: italic; }
.quote-card footer {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--bone-dim);
}

@media (max-width: 860px) {
  .testimonials__grid { grid-template-columns: 1fr; }
}

.testimonial-form-wrap {
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
  background: var(--ink-raised);
  border: 1px solid var(--ink-line);
  border-radius: 10px;
  padding: 40px;
}
.testimonial-form-wrap h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 24px;
  text-align: center;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field { margin-bottom: 18px; }
.field label, .testimonial-form label {
  display: block;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--bone-dim);
  margin-bottom: 7px;
}
.field input, .field textarea,
.testimonial-form input, .testimonial-form textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  padding: 11px 14px;
  color: var(--bone);
  font-family: var(--font-ui);
  font-size: 15px;
  resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--gold); outline: none; }

.form-note {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--gold-bright);
  margin-top: 14px;
  min-height: 1.4em;
}

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .testimonial-form-wrap { padding: 28px 22px; }
}

/* ============================================
   RESERVE
   ============================================ */
.reserve {
  padding: 130px 5vw;
  background: var(--ink-raised);
  border-top: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
}
.reserve__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 80px;
  align-items: center;
}

.reserve__cover {
  display: flex;
  justify-content: center;
}
.reserve__cover img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 4px;
  transform: rotate(-3deg);
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(201, 162, 75, 0.18),
    0 0 40px rgba(201, 162, 75, 0.08);
  transition: transform 0.35s ease;
}
.reserve__cover img:hover {
  transform: rotate(-1deg) scale(1.02);
}

.reserve__content { text-align: left; }
.reserve__content .eyebrow { text-align: left; }

.reserve__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  margin: 0 0 20px;
  color: var(--gold-bright);
}
.reserve__sub {
  color: var(--bone-dim);
  font-size: 17px;
  margin: 0 0 34px;
  max-width: 480px;
}
.reserve-form {
  display: flex;
  gap: 12px;
  max-width: 460px;
  margin: 0;
}
.reserve-form input {
  flex: 1;
  background: var(--ink);
  border: 1px solid var(--ink-line);
  border-radius: 4px;
  padding: 14px 16px;
  color: var(--bone);
  font-family: var(--font-ui);
  font-size: 15px;
}
.reserve-form input:focus { border-color: var(--gold); outline: none; }
.reserve__privacy {
  margin-top: 16px;
  font-size: 13px;
  color: var(--bone-dim);
}

@media (max-width: 780px) {
  .reserve__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .reserve__content, .reserve__content .eyebrow { text-align: center; }
  .reserve__sub { margin-left: auto; margin-right: auto; }
  .reserve-form { margin: 0 auto; }
  .reserve__cover img { max-width: 220px; }
}

@media (max-width: 560px) {
  .reserve-form { flex-direction: column; }
}

/* ============================================
   AUTHOR
   ============================================ */
.author {
  padding: 120px 5vw;
}
.author__inner {
  max-width: 660px;
  margin: 0 auto;
}
.author__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin: 0 0 26px;
}
.author__bio {
  font-size: 17px;
  line-height: 1.75;
  color: var(--bone-dim);
  margin: 0 0 20px;
}
.author__bio em { color: var(--bone); font-style: italic; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 40px 5vw;
  border-top: 1px solid var(--ink-line);
  text-align: center;
}
.footer p {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--bone-dim);
  margin: 0;
}
