/* =========================================================
   The Kings 2027 — shared styles
   Palette pulled from the current site + mood boards
   ========================================================= */
:root {
  --oxblood: #2a0202;
  --oxblood-2: #3d0907;
  --garnet: #8c0902;
  --chartreuse: #bfb950;
  --chartreuse-dk: #8f8a2e;
  --sand: #d3c3a7;
  --ivory: #f5efe4;
  --paper: #faf6ef;
  --ink: #0d0a09;
  --gold: #c9a24a;
  --gold-lt: #e6c879;

  --script: "Pinyon Script", cursive;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --caps: "Cormorant SC", "Cormorant Garamond", serif;

  --ease: cubic-bezier(.22, .8, .2, 1);
  --pad: clamp(1.25rem, 4vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; touch-action: manipulation; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 1rem + .3vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--chartreuse); color: var(--oxblood); }

/* film grain over everything — subtle */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 999; pointer-events: none;
  opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0) } 20% { transform: translate(-3%,2%) }
  40% { transform: translate(2%,-3%) } 60% { transform: translate(-2%,-1%) } 80% { transform: translate(3%,3%) }
}

/* ---------- type helpers ---------- */
.script { font-family: var(--script); font-weight: 400; line-height: 1.1; }
.caps   { font-family: var(--caps); text-transform: lowercase; letter-spacing: .22em; font-weight: 500; }
.eyebrow { font-family: var(--caps); text-transform: lowercase; letter-spacing: .3em; font-size: .85rem; font-weight: 600; }
.display { font-weight: 300; font-size: clamp(2.8rem, 8vw, 7.5rem); line-height: .95; letter-spacing: -.01em; margin: 0; }
.h2 { font-weight: 300; font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: 1; margin: .2em 0 .4em; }
.lede { font-size: clamp(1.2rem, 1rem + .8vw, 1.6rem); font-style: italic; font-weight: 300; }
.center { text-align: center; }
.wrap { width: min(1180px, 100% - var(--pad) * 2); margin-inline: auto; }
.narrow { width: min(720px, 100% - var(--pad) * 2); margin-inline: auto; }
.section { padding: clamp(5rem, 12vw, 10rem) 0; position: relative; }

/* ---------- navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--pad); color: var(--ivory);
  transition: background .5s var(--ease), padding .5s var(--ease), color .5s;
}
.nav.solid { background: rgba(42, 2, 2, .92); backdrop-filter: blur(8px); padding-block: .7rem; }
.nav.on-light:not(.solid) { color: var(--oxblood); }
.nav__mark { width: 34px; height: 46px; display: block; }
.nav__mark img { width: 100%; height: 100%; object-fit: contain; filter: invert(1); mix-blend-mode: screen; }
.nav.on-light:not(.solid) .nav__mark img { filter: none; mix-blend-mode: multiply; }
.nav__links { display: flex; gap: clamp(1.2rem, 3vw, 2.6rem); list-style: none; margin: 0; padding: 0; }
.nav__links a {
  text-decoration: none; font-family: var(--caps); text-transform: lowercase;
  letter-spacing: .24em; font-size: .92rem; font-weight: 600; position: relative; padding: .3em 0;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav__secret { display: none; color: var(--gold-lt) !important; }
.crown-found .nav__secret { display: inline-block; }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.nav__toggle span { display: block; width: 28px; height: 1.5px; background: currentColor; margin: 7px 0; transition: transform .4s var(--ease); }

@media (max-width: 760px) {
  .nav__toggle { display: block; z-index: 2; }
  .nav__links {
    position: fixed; inset: 0; flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
    background: var(--oxblood); color: var(--ivory);
    clip-path: circle(0 at calc(100% - 2.6rem) 2.4rem); transition: clip-path .8s var(--ease);
  }
  .nav__links a { font-size: 1.5rem; }
  .nav.open .nav__links { clip-path: circle(150% at calc(100% - 2.6rem) 2.4rem); }
  .nav.open { color: var(--ivory) !important; }
  .nav.open .nav__toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav.open .nav__toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
}

/* ---------- page curtain transition ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 900; background: var(--oxblood);
  display: grid; place-items: center; pointer-events: none;
  transform: translateY(0); transition: transform 1.1s var(--ease);
}
.curtain img { width: clamp(90px, 14vw, 150px); filter: invert(1); mix-blend-mode: screen; opacity: 0; animation: markIn 1.4s var(--ease) .1s forwards; }
.curtain.up { transform: translateY(-100%); }
.curtain.down { transform: translateY(0); transition-duration: .7s; }
.curtain.down img { animation: none; opacity: 1; }
@keyframes markIn { from { opacity: 0; transform: scale(.85); filter: invert(1) blur(6px); } to { opacity: 1; transform: none; filter: invert(1) blur(0); } }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .12s; }
.reveal[data-delay="2"] { transition-delay: .24s; }
.reveal[data-delay="3"] { transition-delay: .36s; }

/* ---------- monogram + hidden crown ---------- */
.monogram { position: relative; display: inline-block; }
.monogram img { width: 100%; }
.monogram--light img { filter: invert(1); mix-blend-mode: screen; }
.monogram--dark img { mix-blend-mode: multiply; }
/* the tiny crown above the "A" — this is the secret door */
.crown-spot {
  position: absolute; left: 55.5%; top: 55%; width: max(13%, 52px); height: max(11%, 52px);
  transform: translate(-50%, -50%);
  border: 0; background: transparent; padding: 0; cursor: default; border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; /* stops iPhone treating quick taps as double-tap zoom */
  -webkit-user-select: none; user-select: none;
}
.crown-spot::after {
  content: ""; position: absolute; inset: -30%; border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 200, 121, .85), rgba(230, 200, 121, 0) 65%);
  opacity: 0; transform: scale(.4); transition: opacity .5s, transform .5s var(--ease);
}
.crown-spot.glint::after { animation: glint .7s var(--ease); }
@keyframes glint { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.4); } }

/* the wax-seal reveal */
.seal-overlay {
  position: fixed; inset: 0; z-index: 800; display: grid; place-items: center; text-align: center;
  background: radial-gradient(ellipse at center, rgba(42, 2, 2, .9), rgba(10, 2, 2, .97));
  color: var(--ivory); opacity: 0; pointer-events: none; transition: opacity .8s var(--ease); padding: 2rem;
}
.seal-overlay.show { opacity: 1; pointer-events: auto; }
.seal {
  width: 150px; height: 150px; margin: 0 auto 1.8rem; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 35% 30%, #b3241b, var(--garnet) 45%, #4d0603 100%);
  box-shadow: inset 0 0 0 9px rgba(0, 0, 0, .18), inset 0 0 0 11px rgba(255, 255, 255, .06), 0 20px 40px rgba(0, 0, 0, .5);
  display: grid; place-items: center; transform: scale(.2) rotate(-40deg);
  transition: transform 1.1s cubic-bezier(.3, 1.6, .4, 1);
}
.seal::before { content: ""; position: absolute; inset: -7px; border-radius: 47% 53% 50% 48% / 52% 46% 54% 48%; background: inherit; z-index: -1; filter: brightness(.85); }
.seal img { width: 62%; filter: invert(1) sepia(1) saturate(.3) brightness(.85); mix-blend-mode: screen; opacity: .8; }
.seal-overlay.show .seal { transform: none; }
.seal-overlay h2 { font-family: var(--script); font-weight: 400; font-size: clamp(2.6rem, 7vw, 4.4rem); margin: 0; color: var(--gold-lt); }
.seal-overlay p { max-width: 30rem; margin: .6rem auto 1.8rem; font-style: italic; }
.seal-overlay .close-x { position: absolute; top: 1.2rem; right: 1.4rem; background: none; border: 0; font-size: 2rem; cursor: pointer; color: var(--sand); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .8em; text-decoration: none; cursor: pointer;
  font-family: var(--caps); text-transform: lowercase; letter-spacing: .24em; font-weight: 600; font-size: .95rem;
  padding: 1.05em 2.1em; border: 1px solid currentColor; background: transparent; position: relative; overflow: hidden;
  isolation: isolate; transition: color .5s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; background: currentColor; z-index: -1;
  transform: translateY(101%); transition: transform .5s var(--ease);
}
.btn:hover::before { transform: none; }
.btn:hover { color: var(--btn-hover, var(--ivory)); }
.btn:hover > * { mix-blend-mode: normal; }
.btn--gold { color: var(--gold-lt); --btn-hover: var(--oxblood); }
.btn--ox { color: var(--oxblood); --btn-hover: var(--ivory); }
.btn--ivory { color: var(--ivory); --btn-hover: var(--oxblood); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[disabled]::before { display: none; }

/* ---------- ornamental divider ---------- */
.flourish { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1.6rem auto; color: inherit; opacity: .8; }
.flourish::before, .flourish::after { content: ""; height: 1px; width: min(120px, 20vw); background: currentColor; opacity: .6; }
.flourish svg { width: 22px; height: 22px; }

/* ---------- countdown ---------- */
.countdown { display: flex; justify-content: center; gap: clamp(1rem, 4vw, 3.5rem); margin-top: 2.6rem; }
.countdown div { text-align: center; min-width: 4.2ch; }
.countdown b { display: block; font-weight: 300; font-size: clamp(2.2rem, 6vw, 4.2rem); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.countdown span { font-family: var(--caps); text-transform: lowercase; letter-spacing: .25em; font-size: .78rem; opacity: .75; }

/* ---------- dress code (shared by the ceremony + reception pages) ---------- */
.attire__code { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 300; margin: 0 !important; color: var(--oxblood) !important; }
.attire__code span { font-style: italic; font-size: .6em; color: #7a6a5a; }
.attire__skip { font-size: 1rem; margin: 0 !important; }
.attire__skip b { color: var(--garnet); }
.attire__sub { font-family: var(--caps); text-transform: lowercase; letter-spacing: .25em; font-weight: 600; font-size: .9rem; color: var(--garnet); margin: 2.4rem 0 .3rem; }
.attire__hint { font-size: 1rem; font-style: italic; }
.fams { display: flex; gap: .6rem; height: clamp(300px, 38vw, 400px); margin-top: 1rem; }
.fam { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; color: inherit; transition: flex .7s var(--ease); touch-action: manipulation; }
.fam[aria-pressed="true"] { flex: 2.6; }
.fam__bands { flex: 1; display: flex; flex-direction: column; border-radius: 999px 999px 0 0; overflow: hidden; box-shadow: 0 10px 30px rgba(42,2,2,.12); }
.fam__bands i { flex: 1; transition: flex .6s var(--ease); }
.fam:hover .fam__bands i:nth-child(3) { flex: 1.6; }
.fam__label { padding-top: .7rem; height: 4.4rem; flex: none; }
.fam__label b { display: block; font-weight: 500; font-size: 1.15rem; white-space: nowrap; }
.fam__label em { display: block; font-size: .9rem; color: #7a6a5a; line-height: 1.3; opacity: 0; max-height: 0; overflow: hidden; transition: opacity .5s, max-height .5s; }
.fam[aria-pressed="true"] .fam__label em { opacity: 1; max-height: 4em; }
.ideas { list-style: none; padding: 0 !important; margin: .8rem 0 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 2rem; }
.ideas li { padding: .9rem 0; border-top: 1px solid rgba(42,2,2,.15); margin: 0 !important; }
.ideas b { color: var(--oxblood); font-weight: 500; }
.attire__foot { margin-top: 1.8rem !important; }
@media (max-width: 860px) {
  .fams { height: 280px; gap: .4rem; }
  .fam__label b { font-size: .95rem; }
  .fam:not([aria-pressed="true"]) .fam__label { visibility: hidden; }
}

/* ---------- footer ---------- */
.footer { background: var(--ink); color: var(--sand); text-align: center; padding: 6rem var(--pad) 3rem; }
.footer .monogram { width: 120px; }
.footer .script { font-size: 2.4rem; color: var(--ivory); margin: 1.2rem 0 .2rem; }
.footer small { display: block; margin-top: 3rem; font-style: italic; opacity: .55; font-size: .95rem; }
.footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.6rem; margin-top: 1.6rem; }
.footer nav a { text-decoration: none; font-family: var(--caps); text-transform: lowercase; letter-spacing: .22em; font-size: .85rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
