:root {
  --pink: #C98F9B;
  --pink-deep: #A9545F;   /* deeper rose for text, from the logo lettering */
  --green: #34483D;
  --gold: #B18A4A;
  --cream: #F2EBDD;
  --ink: #34483D;

  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --body: "EB Garamond", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  /* cream paper; the watercolour wash lives on .paper below */
  background-color: #F4EEE0;
  -webkit-font-smoothing: antialiased;
}

/* thin double gold border, like the brand board */
.frame {
  position: fixed;
  inset: 14px;
  border: 1px solid rgba(177, 138, 74, .7);
  outline: 1px solid rgba(177, 138, 74, .35);
  outline-offset: 5px;
  pointer-events: none;
}

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 28px 24px;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.logo { margin: 0; line-height: 0; position: relative; }
.logo img {
  width: 560px;
  max-width: 100%;
  height: auto;
  animation: rise 1.2s ease-out both;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(320px, 70%);
  margin: 18px auto 22px;
  animation: rise 1.2s .2s ease-out both;
}
.divider span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.divider span:first-child { transform-origin: right; animation: draw 1.6s .5s cubic-bezier(.2,.7,.2,1) both; }
.divider span:last-child  { transform-origin: left;  animation: draw 1.6s .5s cubic-bezier(.2,.7,.2,1) both; }
.divider svg { width: 18px; height: 18px; fill: var(--gold); animation: twinkle 6s 2s ease-in-out infinite; }

.eyebrow {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--gold);
  animation: rise 1.2s .3s ease-out both;
}

.tagline {
  margin: 6px 0 10px;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.1rem, 6vw, 3.25rem);
  line-height: 1.15;
  color: var(--pink-deep);
  animation: rise 1.2s .4s ease-out both;
}

.promise {
  margin: 0 auto;
  max-width: 34em;
  font-style: italic;
  color: var(--green);
  animation: rise 1.2s .5s ease-out both;
}

.divisions {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--green);
  animation: rise 1.2s .6s ease-out both;
}
.divisions li { padding: 0 18px; position: relative; }
.divisions li + li::before {
  content: "✦";
  position: absolute;
  left: -.35em;
  color: var(--gold);
  font-size: .6em;
  top: .45em;
}

/* the signature gold ampersand */
i { font-family: var(--display); font-style: italic; font-weight: 500; color: var(--gold); font-size: 1.2em; line-height: 0; }

/* principles */
.principles {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 28px 24px;
  text-align: center;
}
.principles h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  color: var(--pink-deep);
}
.principles h2::before,
.principles h2::after {
  content: "✦";
  color: var(--gold);
  font-size: .4em;
  vertical-align: middle;
  margin: 0 .9em;
}
.principles-intro {
  max-width: 32em;
  margin: 8px auto 34px;
  font-style: italic;
}
.principles ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.principles li {
  padding: 22px 20px 20px;
  border: 1px solid rgba(177, 138, 74, .45);
  border-radius: 2px;
  background: rgba(250, 246, 236, .78);
}
.principles .num {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .3em;
  color: var(--gold);
}
.principles h3 {
  margin: 4px 0 6px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: .03em;
  color: var(--green);
}
.principles li p { margin: 0; font-size: 1rem; line-height: 1.5; }

@media (max-width: 820px) {
  .principles ol { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .principles ol { grid-template-columns: 1fr; }
}

.foot {
  padding: 16px 28px 34px;
  text-align: center;
  font-size: .9rem;
  color: rgba(52, 72, 61, .75);
}
.foot .sep { color: var(--gold); margin: 0 .7em; font-size: .7em; }

@media (max-width: 560px) {
  .frame { inset: 8px; }
  .page { padding-top: 36px; }
  .divisions { flex-direction: column; gap: 4px; }
  .divisions li + li::before { display: none; }
  .foot .sep { display: block; margin: 2px 0; }
}

/* ---------- delicate motion ---------- */

/* a few motes of gold dust drifting slowly upward */
.motes { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.motes i {
  position: absolute;
  bottom: -10px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 174, 102, .9), rgba(177, 138, 74, 0) 70%);
  opacity: 0;
  animation: drift 22s linear infinite;
}
.motes i:nth-child(1) { left: 8%;  animation-delay: 0s;   animation-duration: 24s; }
.motes i:nth-child(2) { left: 21%; animation-delay: 7s;   width: 3px; height: 3px; }
.motes i:nth-child(3) { left: 37%; animation-delay: 13s;  animation-duration: 26s; }
.motes i:nth-child(4) { left: 62%; animation-delay: 3s;   width: 5px; height: 5px; }
.motes i:nth-child(5) { left: 76%; animation-delay: 10s;  animation-duration: 20s; }
.motes i:nth-child(6) { left: 89%; animation-delay: 16s;  width: 3px; height: 3px; }
.motes i:nth-child(7) { left: 50%; animation-delay: 19s;  animation-duration: 28s; }
.page, .principles, .foot { position: relative; z-index: 1; }

/* "keep reading" cue at the bottom of the first screen */
.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 40px;
  font-family: var(--display);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold);
  animation: rise 1.2s 1s ease-out backwards;
  transition: opacity .6s ease;
}
.scroll-cue svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; animation: bob 2.8s 2.2s ease-in-out infinite; }
.scroll-cue:hover, .scroll-cue:focus-visible { color: var(--pink-deep); }
.scroll-cue.is-gone { opacity: 0; pointer-events: none; }
html { scroll-behavior: smooth; }

/* the stars beside the principles heading twinkle in turn */
.principles h2::before { display: inline-block; animation: twinkle 5s ease-in-out infinite; }
.principles h2::after  { display: inline-block; animation: twinkle 5s 2.5s ease-in-out infinite; }

/* principle cards: lift slightly and warm their gold edge on hover */
.principles li {
  transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s ease, border-color .5s ease, background-color .5s ease;
}
.principles li:hover {
  transform: translateY(-3px);
  border-color: rgba(177, 138, 74, .9);
  background-color: rgba(252, 249, 241, .92);
  box-shadow: 0 10px 24px -14px rgba(52, 72, 61, .35);
}
.principles h3 { position: relative; display: inline-block; }
.principles h3::after {
  content: "";
  position: absolute;
  left: 15%; right: 15%; bottom: -2px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0);
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.principles li:hover h3::after { transform: scaleX(1); }

/* reveal on scroll (only when JavaScript is running) */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1s ease var(--delay, 0s), transform 1s cubic-bezier(.2,.7,.2,1) var(--delay, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
/* cards keep their hover transition once revealed */
.js .principles li[data-reveal].is-in {
  transition: opacity 1s ease var(--delay, 0s), transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s ease, border-color .5s ease, background-color .5s ease;
}

@keyframes draw    { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.78); } }
@keyframes bob     { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes drift {
  0%   { transform: translate(0, 0);        opacity: 0; }
  12%  { opacity: .7; }
  50%  { transform: translate(18px, -50vh); }
  88%  { opacity: .5; }
  100% { transform: translate(-10px, -105vh); opacity: 0; }
}

/* ---------- watercolour paper (from the brand video) ---------- */
.paper {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #F4EEE0 url(/assets/paper-wide.webp) center / cover no-repeat;
  animation: wash-in 2.4s ease-out both;
}
/* a warm, clear pool of paper behind the words */
.paper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 62% 62% at 50% 48%, rgba(250, 246, 236, .6), rgba(250, 246, 236, 0) 75%);
}
@media (max-aspect-ratio: 4/5) {
  .paper { background-image: url(/assets/paper-tall.webp); }
}

/* soft prism light, like sun through a crystal, drifting at the corners */
.prism { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.prism b {
  position: absolute;
  width: 46vmax; height: 7vmax;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0;
  mix-blend-mode: screen;
  background: linear-gradient(90deg, rgba(255,120,150,0), rgba(255,160,120,.55), rgba(255,236,140,.55), rgba(150,240,190,.5), rgba(130,200,255,.5), rgba(190,150,255,.45), rgba(190,150,255,0));
  animation: prism 16s ease-in-out infinite;
}
.prism b:nth-child(1) { top: 4%;  right: -14vmax; transform: rotate(-32deg); animation-delay: 1.5s; }
.prism b:nth-child(2) { bottom: 6%; left: -16vmax; transform: rotate(-28deg); animation-delay: 7s; }
.prism b:nth-child(3) { bottom: 18%; right: -18vmax; transform: rotate(38deg); animation-delay: 12s; width: 36vmax; }

/* gold ink: the logo is "written" onto the page from left to right */
.logo img {
  -webkit-mask: linear-gradient(90deg, #000 45%, transparent 55%) 100% 0 / 260% 100% no-repeat;
          mask: linear-gradient(90deg, #000 45%, transparent 55%) 100% 0 / 260% 100% no-repeat;
  animation: ink 2.6s .2s cubic-bezier(.45, 0, .3, 1) both;
}

/* a ring of gold light that draws itself around the logo, a star at its head */
.halo {
  position: absolute;
  left: 50%; top: 50%;
  width: min(640px, 112%);
  transform: translate(-50%, -50%);
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}
.halo-ring {
  fill: none;
  stroke: url(#halo-gold);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 0 3px rgba(240, 210, 140, .9));
  animation: halo-draw 3.2s 1.4s cubic-bezier(.45, 0, .25, 1) forwards, halo-rest 2s 4.8s ease forwards;
}
.halo-star { opacity: 0; animation: halo-star 3.8s 1.4s ease forwards; filter: drop-shadow(0 0 4px #fff3cf); }

/* sparkles that wink on the lettering and the gold of the logo,
   one or two at a time; positions are measured from the artwork */
.sparkles { position: absolute; inset: 0; width: 560px; max-width: 100%; margin: 0 auto; pointer-events: none; z-index: 2; }
.sparkles i {
  --c: 255, 238, 196;
  position: absolute;
  left: var(--x); top: var(--y);
  width: 26px; height: 26px;
  margin: -13px 0 0 -13px;
  filter: drop-shadow(0 0 3px rgba(255, 240, 200, .9));
  background:
    radial-gradient(circle, rgba(255, 253, 245, 1) 0 12%, rgba(var(--c), .6) 22%, rgba(var(--c), 0) 50%),
    linear-gradient(90deg, rgba(var(--c), 0) 0, rgba(var(--c), .95) 50%, rgba(var(--c), 0) 100%) center / 100% 2px no-repeat,
    linear-gradient(0deg,  rgba(var(--c), 0) 0, rgba(var(--c), .95) 50%, rgba(var(--c), 0) 100%) center / 2px 100% no-repeat;
  opacity: 0;
  transform: scale(0);
  animation: sparkle 9.9s calc(var(--d) + 3s) ease-in-out infinite;
}
.sparkles i.l { --c: 255, 226, 226; }

@keyframes wash-in   { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
@keyframes prism     { 0%, 100% { opacity: 0; translate: 0 0; } 30%, 60% { opacity: .55; } 50% { translate: -4vmax 1.5vmax; } }
@keyframes ink       { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; } to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
@keyframes halo-draw { to { stroke-dashoffset: 0; } }
@keyframes halo-rest { to { opacity: .45; filter: none; } }
@keyframes halo-star { 0% { opacity: 0; } 10%, 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sparkle   { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 4% { transform: scale(1) rotate(25deg); opacity: 1; } 9% { transform: scale(.35) rotate(50deg); opacity: .5; } 12% { transform: scale(0) rotate(60deg); opacity: 0; } }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .motes, .prism, .sparkles, .halo-star { display: none; }
  .logo img { -webkit-mask: none; mask: none; }
  .halo-ring { stroke-dashoffset: 0; opacity: .45; filter: none; }
}
