/* Base */
:root {
  --bg: #0a0a0a;
  --fg: #efeae3;
  --muted: #c1b9af;
  --accent: #c8ab6e; /* restrained gold */
  --hairline: rgba(255,255,255,0.08);
  --ring: rgba(200,171,110,0.35);

  --brand: "Cinzel", ui-serif, Georgia, serif;
  --serif: "Cormorant Garamond", ui-serif, Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";

  --maxw: 960px;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1400px 900px at 84% -12%, rgba(200,171,110,0.06), transparent 55%),
    var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(17px, 1.1vw + 12px, 21px);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* Accessibility */
.skip {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip:focus {
  position: fixed; left: 16px; top: 16px; width: auto; height: auto; padding: 8px 10px; background: var(--bg); color: var(--fg); border: 1px solid var(--hairline); border-radius: 8px;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--fg); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in lab, var(--bg) 80%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: grid; align-items: end; line-height: 1; text-transform: uppercase; position: relative; }
.brand::after { content: ""; position: absolute; left: 0; bottom: -10px; width: 48px; height: 1px; background: var(--hairline); }

/* Ornaments */
.section-head::after {
  content: "";
  display: block;
  flex: 1 1 100%;
  height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent), black 60%), transparent 60%);
  margin-top: 10px;
}
.hero::after { /* subtle crest watermark */
  content: "";
  position: absolute;
  right: 2vw;
  top: 6vh;
  width: min(22vw, 260px);
  height: min(22vw, 260px);
  background: url('/assets/favicon.svg') no-repeat center/contain;
  opacity: 0.05;
  pointer-events: none;
  filter: saturate(0.8);
}
.brand-top { font-family: var(--brand); font-weight: 600; font-size: 18px; letter-spacing: 0.14em; }
.brand-sub { font-family: var(--serif); font-size: 11px; color: var(--muted); letter-spacing: 0.24em; margin-top: 4px; }

/* minimal header; navigation lives in the hero index */

/* Hero */
.hero { padding: 16vh 0 12vh; border-bottom: 1px solid var(--hairline); position: relative; }
.hero h1 { margin: 0; font-family: var(--brand); font-weight: 600; letter-spacing: 0.02em; line-height: 0.9; font-size: clamp(56px, 8.5vw, 132px); text-wrap: balance; }
.hero .kicker { display: block; font-family: var(--serif); font-size: 12px; letter-spacing: 0.28em; color: var(--muted); margin-bottom: 14px; }
.hero .locale { display: block; font-family: var(--serif); font-size: clamp(13px, 1.2vw, 16px); letter-spacing: 0.28em; color: var(--muted); margin-top: 12px; }
.hero .lede { margin: 28px 0 10px; color: #eee9e1; max-width: 48ch; font-family: var(--serif); font-size: 22px; }
.toc { margin-top: 10px; font-family: var(--serif); font-size: 14px; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; }
.toc a { color: inherit; }
.toc a:hover { color: var(--fg); }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.note { margin-top: 18px; color: var(--muted); font-size: 14px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 999px; border: 1px solid var(--hairline); color: var(--fg); transition: border-color .2s ease, box-shadow .2s ease, color .2s ease, background .2s ease; letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; }
.button.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent), black 55%), color-mix(in srgb, var(--accent), black 65%)); color: #0c0b08; border-color: color-mix(in srgb, var(--accent), black 30%); }
.button.primary:hover { box-shadow: 0 0 0 6px var(--ring); }
.button.ghost { color: var(--accent); }
.button.inline { padding: 4px 8px; border-radius: 8px; }
.button.inline:hover { box-shadow: 0 0 0 2px var(--ring) inset; }

/* Sections */
.section { padding: 92px 0; border-bottom: 1px solid var(--hairline); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 28px; }
.section h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(18px, 2.1vw, 26px); letter-spacing: 0.22em; text-transform: uppercase; color: #efece7; }
.section .sub { margin: 0; color: var(--muted); font-family: var(--serif); font-style: italic; letter-spacing: 0.02em; }
.copy { font-family: var(--serif); }
.copy p { margin: 0 0 16px; font-size: 19px; color: #efeae3; }
.copy a { color: var(--accent); border-bottom: 1px solid transparent; }
.copy a:hover { border-bottom-color: color-mix(in srgb, var(--accent), white 15%); }

/* Rituals grid */
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 860px) { .grid { grid-template-columns: 1fr 1fr; } }
.card {
  padding: 18px 18px 16px; border: 1px solid var(--hairline); border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0));
}
.card h3 { margin: 0 0 6px; font-family: var(--serif); font-weight: 600; font-size: 19px; letter-spacing: 0.02em; text-transform: none; }
.card p { margin: 0; color: #e0dbd4; font-family: var(--serif); font-size: 18px; font-style: italic; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-family: var(--serif); }
.list li { padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 12px; background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0)); font-size: 18px; }
.list strong { color: #efece7; font-family: var(--serif); font-weight: 600; }
.list em { color: #ddd9d2; font-style: normal; }

/* Footer */
.site-footer { padding: 40px 0 60px; color: var(--muted); font-family: var(--serif); font-size: clamp(14px, 0.5vw + 12px, 16px); font-variant-caps: small-caps; letter-spacing: 0.06em; }
/* Keep footer items visually grouped instead of stretched edge-to-edge */
.site-footer .wrap { display: flex; justify-content: center; align-items: baseline; gap: 14px; flex-wrap: wrap; text-align: center; }
.site-footer p { margin: 0; }
.muted { color: var(--muted); }

/* Motion */
.fade { opacity: 0; transform: translateY(8px); will-change: opacity, transform; }
.fade.in { opacity: 1; transform: translateY(0); transition: opacity .6s ease, transform .6s ease; }
@keyframes caret-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fade, .fade.in { opacity: 1; transform: none; transition: none; }
  .button.primary:hover, .button.inline:hover { box-shadow: none; }
}

/* Focus styles */
:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--ring); border-radius: 10px; }
.nav a:focus-visible, .brand:focus-visible, .button:focus-visible { box-shadow: 0 0 0 3px var(--ring); }

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Fine typography tweaks */
h1, h2, h3 { -webkit-font-smoothing: antialiased; }
.hero h1 { font-feature-settings: "liga" 1, "kern" 1; }
.brand-top, .section h2 { font-feature-settings: "smcp" 0, "liga" 1, "kern" 1; }

/* Selection */
::selection { background: color-mix(in srgb, var(--accent), black 82%); color: var(--fg); }

/* Mobile refinements */
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .hero { padding: 14vh 0 10vh; }
  .hero .lede { font-size: 20px; max-width: 50ch; }
  .toc { font-size: 13px; letter-spacing: 0.12em; }
  .section { padding: 72px 0; }
}

/* Invite page */
body.invite-body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.invite-main {
  flex: 1 0 auto;
}

.wrap.narrow {
  max-width: 700px;
}

.invite-hero {
  padding: 16vh 0 9vh;
  border-bottom: 1px solid var(--hairline);
  text-align: center;
  position: relative;
}

.invite-hero::after {
  content: "";
  position: absolute;
  inset: auto auto 10% 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: url('/assets/favicon.svg') no-repeat center/contain;
  opacity: 0.05;
  pointer-events: none;
}

.invite-overline {
  margin: 0;
  font-family: var(--serif);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--muted);
}

.invite-hero h1 {
  margin: 18px 0 12px;
  font-family: var(--brand);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: clamp(32px, 6vw, 58px);
}

.invitee-line {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 22px);
  color: #efeae3;
}

.invitee-name { color: var(--accent); font-weight: 600; letter-spacing: 0.02em; font-size: 1.05em; }

.invite-envelope {
  display: block;
  width: clamp(120px, 20vw, 200px);
  margin: 18px auto 20px;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.2));
}

.invite-typed {
  position: relative;
  display: block;
  margin: 22px auto 0;
  width: min(100%, 54ch);
  font-family: var(--serif);
  font-size: clamp(18px, 1.5vw, 22px);
  color: #efeae3;
  min-height: 3.2em;
  text-align: center;
}

/* Session card under the typed intro */
.invite-session {
  margin: 28px auto 0;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent 70%);
  width: min(100%, 560px);
  text-align: left;
}

.invite-session [data-session-title],
.invite-session .invite-session-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--muted);
}

.invite-session .invite-date {
  margin: 6px 0;
  font-family: var(--serif);
  font-size: 18px;
  color: #efeae3;
  font-style: normal;
  letter-spacing: 0.02em;
}

.invite-session .bullet::before {
  content: '▌';
  display: inline-block;
  margin-right: 8px;
  color: var(--accent);
}

/* Links row under session block */
.invite-links {
  margin: 18px auto 0;
  width: min(100%, 560px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 16px;
  color: #efeae3;
  padding: 2px 0;
  border: none;
  border-radius: 0;
  background: none;
  border-bottom: 1px solid transparent;
}

.arrow-link .arrow { color: var(--accent); }

.arrow-link:hover { border-bottom-color: color-mix(in srgb, var(--accent), white 20%); }

.arrow-link.left { justify-content: flex-start; }
.arrow-link.right { justify-content: flex-end; }

.invite-typed .typed-shadow {
  display: block;
  visibility: hidden;
  white-space: pre-wrap;
  pointer-events: none;
}

.invite-typed .typed-live {
  position: absolute;
  inset: 0;
  width: 100%;
  text-align: center;
}

.invite-typed .typed-content {
  display: inline-block;
  text-align: left;
  white-space: pre-wrap;
}

.typing-caret {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--accent);
  margin-left: 3px;
  vertical-align: -0.1em;
  animation: caret-blink 1s steps(1, end) infinite;
}

.invite-date {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Invitation body currently uses hero only; content card removed by design */

.invite-copy {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  color: #efeae3;
}

.invite-copy.muted {
  color: var(--muted);
  font-size: 17px;
}

.invite-meta {
  margin: 0;
  padding: 22px 24px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.0));
  display: grid;
  gap: 18px;
}

.invite-meta dt {
  font-family: var(--serif);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
}

.invite-meta dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  color: #efeae3;
}

.link {
  border-bottom: 1px solid transparent;
}

.link:hover {
  border-bottom-color: color-mix(in srgb, var(--accent), white 20%);
}

.invite-footer {
  border-top: 1px solid var(--hairline);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent 70%);
}

@media (max-width: 640px) {
  .invite-hero {
    padding: 14vh 0 7vh;
  }
  .invite-content {
    padding: 60px 0 80px;
  }
  .invite-meta {
    text-align: left;
  }
}
