:root {
  --ink: #071b43;
  --ink-soft: #092e83;
  --deep: #071b43;
  --teal: #092e83;
  --teal-bright: #35d6f1;
  --glass: #77b9f0;
  --gold: #f2cc81;
  --gold-light: #f2cc81;
  --ivory: #fff3da;
  --paper: #f4ecd9;
  --white: #fff9ea;
  --muted: #596b86;
  --line: rgba(7, 27, 67, 0.16);
  --shadow: 0 24px 70px rgba(3, 19, 28, 0.18);
  --display: "Cinzel", Georgia, serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1240px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
button { color: inherit; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-150%);
  padding: 10px 14px;
  background: var(--gold-light);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  border-radius: 4px;
}
.skip-link:focus { transform: translateY(0); }

.site-shell { overflow: clip; }
.site-header {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 30;
  width: min(calc(100% - 48px), var(--max));
  height: 94px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ivory);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.site-header.is-stuck {
  position: fixed;
  width: 100%;
  height: 72px;
  padding-inline: max(24px, calc((100% - var(--max)) / 2));
  background: rgba(7, 27, 67, 0.94);
  border-bottom-color: rgba(169, 240, 232, 0.14);
  backdrop-filter: blur(18px);
  animation: headerDrop 0.3s ease-out both;
}
@keyframes headerDrop { from { transform: translate(-50%, -100%); } to { transform: translate(-50%, 0); } }
.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.brand > span:last-child { display: grid; line-height: 1.1; }
.brand strong { font-family: var(--display); font-size: 15px; font-weight: 500; }
.brand small { margin-top: 4px; color: var(--glass); font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; }
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--glass);
}
.brand-mark svg { width: 100%; fill: none; stroke: currentColor; stroke-width: 1.2; }
.brand-mark.small { width: 32px; height: 32px; font-size: 30px; }
.site-nav { display: flex; align-items: center; gap: 29px; }
.site-nav a {
  position: relative;
  color: rgba(246, 241, 230, 0.78);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}
.site-nav > a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 1px;
  transform: scaleX(0);
  background: var(--glass);
  transition: transform 0.25s ease;
}
.site-nav > a:hover::after, .site-nav > a:focus-visible::after { transform: scaleX(1); }
.site-nav .nav-cta {
  padding: 12px 17px;
  color: var(--gold-light);
  border: 1px solid rgba(216, 182, 106, 0.52);
  transition: background 0.2s ease, color 0.2s ease;
}
.site-nav .nav-cta:hover { color: var(--ink); background: var(--gold-light); }
.nav-toggle { display: none; }

.hero {
  position: relative;
  min-height: 850px;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(420px, 0.97fr);
  align-items: center;
  padding: 150px max(24px, calc((100% - var(--max)) / 2)) 90px;
  color: var(--ivory);
  background:
    linear-gradient(90deg, rgba(7, 27, 67, .98) 0%, rgba(7, 27, 67, .93) 42%, rgba(7, 27, 67, .5) 72%, rgba(7, 27, 67, .28) 100%),
    url("assets/site/twilight-horizon.webp") center / cover no-repeat,
    #071b43;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(169, 240, 232, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(169, 240, 232, 0.09) 1px, transparent 1px);
  background-size: 90px 90px;
  mask-image: linear-gradient(90deg, transparent, #000 45%, #000);
}
.hero-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 24%, rgba(255,255,255,.75) 0 1px, transparent 1.5px),
    radial-gradient(circle at 44% 18%, rgba(255,255,255,.55) 0 1px, transparent 1.5px),
    radial-gradient(circle at 73% 13%, rgba(216,182,106,.8) 0 1px, transparent 1.5px),
    radial-gradient(circle at 92% 29%, rgba(255,255,255,.6) 0 1px, transparent 1.5px),
    radial-gradient(circle at 59% 42%, rgba(255,255,255,.4) 0 1px, transparent 1.5px);
}
.hero-copy { position: relative; z-index: 2; max-width: 680px; padding-right: 30px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.eyebrow span { width: 33px; height: 1px; background: currentColor; }
.hero .eyebrow, .eyebrow.light { color: var(--glass); }
.hero h1 {
  margin: 0 0 27px;
  font-family: var(--display);
  font-size: clamp(59px, 6.1vw, 94px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.045em;
}
.hero h1 em { color: var(--gold-light); font-family: var(--serif); font-weight: 400; }
.hero-lede { max-width: 600px; margin-bottom: 35px; color: rgba(246, 241, 230, 0.73); font-size: 17px; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; }
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.button:hover { transform: translateY(-2px); }
.button:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.button-primary { color: var(--ink); background: var(--gold-light); border-color: var(--gold-light); }
.button-primary:hover { background: #ffe7a4; }
.button-ghost { color: var(--ivory); background: transparent; border-color: rgba(246, 241, 230, 0.32); }
.button-ghost:hover { border-color: var(--glass); background: rgba(169, 240, 232, 0.08); }
.hero-stats { display: flex; gap: 42px; margin: 52px 0 0; }
.hero-stats div { position: relative; display: grid; }
.hero-stats div + div::before { content: ""; position: absolute; top: 6px; bottom: 6px; left: -21px; width: 1px; background: rgba(255,255,255,.14); }
.hero-stats dt { color: var(--gold-light); font-family: var(--serif); font-size: 26px; }
.hero-stats dd { margin: 1px 0 0; color: rgba(246,241,230,.5); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }

.hero-art { position: relative; z-index: 1; height: 610px; }
.sun-disc {
  position: absolute;
  top: 48px;
  left: 50%;
  width: 270px;
  height: 270px;
  transform: translateX(-50%);
  border: 1px solid rgba(243,217,145,.45);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243,217,145,.2), rgba(216,182,106,.04) 60%, transparent 62%);
  box-shadow: 0 0 80px rgba(216,182,106,.12);
}
.sun-disc::after { content: ""; position: absolute; inset: 18px; border: 1px solid rgba(243,217,145,.13); border-radius: 50%; }
.glass-spire {
  position: absolute;
  bottom: 126px;
  left: 50%;
  width: 145px;
  height: 405px;
  clip-path: polygon(50% 0, 93% 27%, 81% 100%, 17% 100%, 5% 27%);
  background: linear-gradient(104deg, rgba(169,240,232,.06) 0 21%, rgba(169,240,232,.32) 22% 37%, rgba(36,122,129,.09) 38% 64%, rgba(208,251,245,.3) 65% 74%, rgba(7,35,45,.08) 75%);
  border: 1px solid rgba(169,240,232,.35);
  filter: drop-shadow(0 0 22px rgba(100,215,207,.18));
}
.glass-spire::before { content: ""; position: absolute; top: 26%; bottom: 0; left: 49%; width: 1px; background: rgba(216,252,247,.35); transform: rotate(4deg); }
.spire-one { transform: translateX(-50%); }
.spire-two { height: 294px; width: 100px; left: 25%; transform: rotate(-8deg); opacity: .65; }
.spire-three { height: 326px; width: 110px; left: 69%; transform: rotate(8deg); opacity: .7; }
.horizon-line { position: absolute; right: 2%; bottom: 145px; left: 2%; height: 1px; background: linear-gradient(90deg, transparent, var(--glass), transparent); box-shadow: 0 0 17px var(--glass); }
.sea { position: absolute; right: -15%; bottom: -10px; left: -15%; height: 195px; }
.sea-back { opacity: .65; background: linear-gradient(169deg, transparent 37%, rgba(70,177,177,.2) 38% 44%, rgba(14,74,87,.6) 45%); clip-path: polygon(0 47%, 13% 38%, 29% 51%, 44% 33%, 59% 47%, 75% 32%, 89% 45%, 100% 35%, 100% 100%, 0 100%); }
.sea-front { background: linear-gradient(173deg, transparent 37%, rgba(100,215,207,.18) 38% 40%, #092f3b 41%); clip-path: polygon(0 45%, 14% 55%, 31% 42%, 47% 60%, 62% 43%, 80% 57%, 100% 39%, 100% 100%, 0 100%); }
.hero-sigil {
  position: absolute;
  right: 0;
  bottom: 45px;
  width: 116px;
  color: rgba(243,217,145,.35);
}
.hero-sigil svg { fill: none; stroke: currentColor; stroke-width: 1; }
.hero-note { position: absolute; right: 28px; bottom: 32px; display: flex; gap: 10px; align-items: center; color: rgba(246,241,230,.36); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; writing-mode: vertical-rl; }
.hero-note span { color: var(--gold); }

.intro-band {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 18px 24px;
  color: rgba(246,241,230,.63);
  background: #092e83;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .025em;
  text-align: center;
}
.intro-band p { margin: 0; }
.intro-band strong { color: var(--gold-light); font-weight: 400; }
.intro-band > span { color: var(--teal-bright); }

.section { padding: 118px max(24px, calc((100% - var(--max)) / 2)); }
.section-heading { display: grid; grid-template-columns: 1fr 440px; gap: 80px; align-items: end; margin-bottom: 50px; }
.section-heading h2, .thread-heading h2, .use-copy h2 { margin: 0; font-family: var(--display); font-size: clamp(48px, 5vw, 72px); font-weight: 400; line-height: .98; letter-spacing: -.035em; }
.section-heading > p { margin: 0; color: var(--muted); line-height: 1.75; }
.asset-section { background: var(--paper); }
.asset-toolbar { display: flex; gap: 22px; align-items: center; justify-content: space-between; padding: 19px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.search-field { display: flex; min-width: 260px; align-items: center; gap: 11px; }
.search-field svg { width: 18px; fill: none; stroke: var(--teal); stroke-width: 1.7; }
.search-field input { width: 100%; padding: 8px 0; color: var(--ink); background: transparent; border: 0; outline: 0; }
.search-field input::placeholder { color: #7f898e; }
.filter-list { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.filter-button { padding: 8px 12px; color: #687277; background: transparent; border: 1px solid transparent; cursor: pointer; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.filter-button:hover { color: var(--teal); }
.filter-button.is-active { color: var(--ink); border-color: rgba(7,25,35,.25); background: rgba(255,255,255,.35); }
.result-count { margin: 24px 0 20px; color: #7b8589; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.asset-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 16px; }
.asset-card { grid-column: auto; min-width: 0; background: rgba(255,255,255,.45); border: 1px solid rgba(7,25,35,.1); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.asset-card:nth-child(5n + 1), .asset-card:nth-child(5n + 5) { grid-column: auto; }
.asset-card:hover { transform: translateY(-5px); border-color: rgba(20,109,115,.4); box-shadow: 0 18px 40px rgba(7,25,35,.1); }
.asset-preview-button { position: relative; width: 100%; height: 170px; padding: 0; overflow: hidden; background: #071b43; border: 0; cursor: zoom-in; }
.asset-card:nth-child(5n + 1) .asset-preview-button, .asset-card:nth-child(5n + 5) .asset-preview-button { height: 170px; }
.asset-preview-button::after { content: "View full image"; position: absolute; right: 12px; bottom: 12px; padding: 7px 9px; opacity: .88; color: var(--ink); background: var(--gold-light); box-shadow: 0 5px 18px rgba(7,27,67,.22); font-size: 8px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; transition: opacity .2s ease, transform .2s ease; }
.asset-card:hover .asset-preview-button::after, .asset-preview-button:focus-visible::after { opacity: 1; transform: translateY(-2px); }
.asset-preview-button img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s ease; }
.photo-asset .asset-preview-button img { object-fit: cover; }
.asset-card:hover img { transform: scale(1.025); }
.asset-card-content { padding: 15px 16px 17px; }
.asset-card-top { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.asset-category { margin-bottom: 8px; color: var(--teal); font-size: 9px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.asset-card h3 { margin-bottom: 8px; font-family: var(--serif); font-size: 19px; font-weight: 400; line-height: 1.2; }
.asset-card p { margin-bottom: 15px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.asset-format { flex: 0 0 auto; padding: 4px 7px; color: #69757a; border: 1px solid rgba(7,25,35,.13); font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.asset-card-actions { display: flex; gap: 15px; align-items: center; }
.text-button { padding: 0; color: var(--ink); background: none; border: 0; border-bottom: 1px solid rgba(7,25,35,.35); cursor: pointer; font-size: 10px; font-weight: 900; letter-spacing: .09em; text-decoration: none; text-transform: uppercase; }
.text-button:hover { color: var(--teal); border-color: var(--teal); }
.empty-state { padding: 70px 20px; text-align: center; border: 1px dashed rgba(7,25,35,.25); }
.empty-state > span { color: var(--teal); font-size: 42px; }
.empty-state h3 { margin: 12px 0 4px; font-family: var(--serif); font-size: 28px; font-weight: 400; }
.empty-state p { color: var(--muted); }

.page-hero { position: relative; min-height: 570px; display: flex; align-items: flex-end; padding: 155px max(24px,calc((100% - var(--max))/2)) 86px; overflow: hidden; color: var(--ivory); background: linear-gradient(90deg,rgba(7,27,67,.98),rgba(7,27,67,.86) 52%,rgba(7,27,67,.34)),url("assets/site/twilight-horizon.webp") center/cover no-repeat; }
.page-hero::before { content: ""; position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(rgba(119,185,240,.12) 1px,transparent 1px),linear-gradient(90deg,rgba(119,185,240,.09) 1px,transparent 1px); background-size: 90px 90px; mask-image: linear-gradient(90deg,transparent,#000 45%,#000); }
.page-hero > div { position: relative; z-index: 1; max-width: 820px; }
.page-hero .eyebrow { color: var(--glass); }
.page-hero h1 { margin: 0; font-family: var(--display); font-size: clamp(65px,9vw,118px); font-weight: 400; line-height: .85; letter-spacing: -.055em; }
.page-hero > div > p:last-child { max-width: 640px; margin: 30px 0 0; color: rgba(255,243,218,.7); font-size: 16px; line-height: 1.8; }
.page-hero-mark { position: absolute; right: 7vw; bottom: -95px; color: rgba(53,214,241,.13); font-family: var(--serif); font-size: min(36vw,430px); line-height: 1; }

.realm-portal-section { padding: 105px max(24px,calc((100% - var(--max))/2)) 118px; background: linear-gradient(145deg,#fff9ea,#edf4fb); }
.realm-portal-heading { margin-bottom: 42px; }
.realm-portal-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.realm-portal-card { position: relative; min-height: 560px; display: flex; align-items: flex-end; overflow: hidden; color: var(--ivory); background: var(--deep); border: 1px solid rgba(7,27,67,.16); box-shadow: 0 24px 55px rgba(7,27,67,.2); text-decoration: none; }
.realm-portal-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease,filter .55s ease; }
.ternovya-portal > img { object-position: 70% center; }
.realm-portal-shade { position: absolute; inset: 0; background: linear-gradient(180deg,rgba(7,27,67,.04),rgba(7,27,67,.32) 40%,rgba(7,27,67,.98) 90%); transition: background .3s ease; }
.realm-portal-number { position: absolute; top: 20px; left: 20px; padding: 6px 8px; color: var(--gold); background: rgba(7,27,67,.76); border: 1px solid rgba(242,204,129,.35); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.realm-portal-copy { position: relative; z-index: 1; display: flex; width: 100%; flex-direction: column; padding: 31px; }
.realm-portal-copy small { color: var(--teal-bright); font-size: 8px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.realm-portal-copy strong { margin: 9px 0 12px; font-family: var(--display); font-size: clamp(35px,4vw,53px); font-weight: 400; line-height: 1; }
.realm-portal-copy > span { min-height: 54px; color: rgba(255,243,218,.66); font-size: 12px; line-height: 1.65; }
.realm-portal-copy b { display: flex; justify-content: space-between; margin-top: 25px; padding-top: 14px; color: var(--gold); border-top: 1px solid rgba(242,204,129,.25); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.realm-portal-copy i { font-style: normal; transition: transform .2s ease; }
.realm-portal-card:hover > img { transform: scale(1.035); filter: saturate(1.08); }
.realm-portal-card:hover .realm-portal-shade { background: linear-gradient(180deg,rgba(7,27,67,0),rgba(7,27,67,.22) 35%,rgba(7,27,67,.98) 88%); }
.realm-portal-card:hover .realm-portal-copy i { transform: translateX(5px); }

.template-section { background: linear-gradient(145deg, #fff9ea, #edf4fb); }
.template-heading { margin-bottom: 42px; }
.template-showcase { display: grid; grid-template-columns: minmax(330px,.78fr) minmax(0,1.22fr); overflow: hidden; background: var(--white); border: 1px solid rgba(7,27,67,.13); box-shadow: 0 30px 75px rgba(7,27,67,.14); }
.template-visual { position: relative; display: grid; min-height: 670px; padding: 30px; place-items: center; background: radial-gradient(circle at 50% 25%,rgba(53,214,241,.14),transparent 35%),linear-gradient(155deg,#071b43,#092e83); }
.template-visual::before { content: ""; position: absolute; inset: 16px; pointer-events: none; border: 1px solid rgba(242,204,129,.36); }
.template-visual img { position: relative; z-index: 1; width: min(100%,430px); max-height: 650px; object-fit: contain; filter: drop-shadow(0 25px 35px rgba(0,0,0,.34)); }
.template-ratio { position: absolute; z-index: 2; top: 29px; left: 29px; padding: 7px 9px; color: var(--midnight,#071b43); background: var(--starlight,#f2cc81); font-size: 8px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.template-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(34px,5vw,70px); }
.template-copy h3 { margin: 0 0 18px; font-family: var(--display); font-size: clamp(34px,4vw,58px); font-weight: 400; line-height: 1.05; }
.template-copy > p:not(.asset-category) { max-width: 650px; color: var(--muted); line-height: 1.75; }
.template-copy dl { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin: 20px 0 30px; }
.template-copy dl div { padding-top: 10px; border-top: 1px solid var(--line); }
.template-copy dt { color: var(--teal); font-size: 8px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.template-copy dd { margin: 4px 0 0; color: #495b7a; font-size: 11px; }
.template-copy ol { display: grid; gap: 11px; margin: 0 0 32px; padding: 0; list-style: none; }
.template-copy li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; color: #445675; font-size: 12px; }
.template-copy li span { color: var(--gold); font-family: var(--display); font-size: 13px; }
.template-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.template-secondary { color: var(--ink); background: transparent; border-color: rgba(7,27,67,.25); }
.template-secondary:hover { color: var(--royal,#092e83); border-color: var(--royal,#092e83); background: rgba(119,185,240,.1); }
.standalone-templates { padding-top: 105px; }
.template-future { display: flex; gap: 20px; align-items: center; margin-top: 24px; padding: 28px 32px; color: var(--ivory); background: #092e83; }
.template-future > span { color: var(--gold); font-size: 27px; }
.template-future h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 24px; font-weight: 400; }
.template-future p { margin: 0; color: rgba(255,243,218,.6); font-size: 12px; }

.thread-section {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: 80px;
  color: var(--ivory);
  background:
    radial-gradient(circle at 12% 80%, rgba(53,214,241,.18), transparent 35%),
    linear-gradient(135deg, #071b43, #092e83);
}
.thread-heading { padding-top: 24px; }
.thread-heading h2 { margin-bottom: 26px; }
.thread-heading > p:last-child { max-width: 390px; color: rgba(246,241,230,.58); line-height: 1.8; }
.thread-builder { min-width: 0; }
.thread-form { padding: 28px; background: rgba(255,255,255,.045); border: 1px solid rgba(169,240,232,.14); }
.form-row { display: grid; gap: 16px; }
.form-row.two-up { grid-template-columns: 1fr 1fr; }
.thread-form label { display: grid; gap: 7px; margin-bottom: 16px; color: rgba(246,241,230,.7); font-size: 9px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.thread-form input, .thread-form select, .thread-form textarea { width: 100%; padding: 13px 14px; color: var(--ivory); background: rgba(1,13,19,.35); border: 1px solid rgba(169,240,232,.16); border-radius: 0; outline: 0; resize: vertical; }
.thread-form input::placeholder, .thread-form textarea::placeholder { color: rgba(246,241,230,.3); }
.thread-form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--glass) 50%), linear-gradient(135deg, var(--glass) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.thread-form select option { color: var(--ink); background: var(--ivory); }
.thread-form input:focus, .thread-form select:focus, .thread-form textarea:focus { border-color: var(--gold); }
.thread-preview-wrap { margin: 18px 0 0 72px; }
.preview-label { display: flex; justify-content: space-between; margin-bottom: 8px; color: rgba(246,241,230,.44); font-size: 8px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.preview-label span:last-child { color: var(--teal-bright); }
.thread-preview { position: relative; padding: 31px; overflow: hidden; color: var(--ink); background: var(--ivory); border-left: 4px solid var(--gold); box-shadow: var(--shadow); }
.thread-preview::after { content: "◇"; position: absolute; right: 15px; bottom: -34px; color: rgba(20,109,115,.08); font-family: var(--serif); font-size: 140px; }
.preview-type { margin-bottom: 9px; color: var(--teal); font-size: 9px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.thread-preview h3 { margin-bottom: 22px; font-family: var(--serif); font-size: 31px; font-weight: 400; line-height: 1.1; }
.thread-preview dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.thread-preview dl div { border-top: 1px solid var(--line); padding-top: 8px; }
.thread-preview dt { color: var(--teal); font-size: 8px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.thread-preview dd { margin: 3px 0 0; color: #44545b; font-size: 11px; }
.preview-hook { position: relative; z-index: 1; margin: 0; color: #293d46; font-family: var(--serif); font-size: 16px; font-style: italic; }
.button-gold { color: var(--ink); background: var(--gold-light); }
.full-width { width: 100%; margin-top: 10px; }

.prompt-section { background: #f7f3eb; }
.prompt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.prompt-card { position: relative; min-height: 300px; padding: 29px; overflow: hidden; background: var(--white); border: 1px solid var(--line); }
.prompt-card::before { content: attr(data-number); position: absolute; top: -31px; right: 11px; color: rgba(20,109,115,.055); font-family: var(--serif); font-size: 160px; line-height: 1; }
.prompt-card-top { position: relative; display: flex; align-items: center; justify-content: space-between; }
.prompt-icon { display: grid; width: 40px; height: 40px; place-items: center; color: var(--gold); border: 1px solid rgba(216,182,106,.45); border-radius: 50%; font-family: var(--serif); font-size: 19px; }
.prompt-tag { color: var(--teal); font-size: 8px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.prompt-card h3 { position: relative; margin: 27px 0 11px; font-family: var(--serif); font-size: 28px; font-weight: 400; }
.prompt-text { position: relative; margin-bottom: 24px; color: #546269; font-family: var(--serif); font-size: 15px; line-height: 1.75; }
.prompt-card footer { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.prompt-card footer span { color: #8a9397; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }

.use-section { display: grid; grid-template-columns: 1.45fr .55fr; gap: 22px; color: var(--ivory); background: var(--paper); }
.use-card { display: grid; grid-template-columns: .9fr 1.1fr; gap: 45px; padding: 54px; background: #071b43; }
.use-copy h2 { font-size: clamp(38px, 4vw, 59px); }
.steps { display: grid; gap: 26px; margin: 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: 13px; padding-bottom: 22px; border-bottom: 1px solid rgba(169,240,232,.12); }
.steps > li > span { color: var(--gold-light); font-family: var(--serif); font-size: 17px; }
.steps h3 { margin-bottom: 4px; font-family: var(--serif); font-size: 21px; font-weight: 400; }
.steps p { margin: 0; color: rgba(246,241,230,.55); font-size: 12px; line-height: 1.65; }
.contribute-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 38px; color: var(--ink); background: var(--gold-light); }
.contribute-glyph { color: var(--teal); font-size: 30px; }
.contribute-card h3 { margin: 18px 0 10px; font-family: var(--serif); font-size: 30px; font-weight: 400; }
.contribute-card p { margin-bottom: 28px; color: #47545a; font-size: 13px; line-height: 1.7; }
.button-ghost-light { color: var(--ink); border-color: rgba(7,25,35,.34); }
.button-ghost-light:hover { background: rgba(255,255,255,.3); border-color: var(--ink); }

.site-footer { padding: 60px max(24px, calc((100% - var(--max)) / 2)) 28px; color: rgba(255,243,218,.6); background: #04122e; }
.footer-brand { display: flex; gap: 16px; align-items: center; }
.footer-brand strong { color: var(--ivory); font-family: var(--serif); font-size: 23px; font-weight: 400; }
.footer-brand p { margin: 3px 0 0; font-size: 11px; }
.footer-links { display: flex; gap: 26px; justify-content: flex-end; margin-top: -35px; }
.footer-links a { color: var(--glass); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.footer-fineprint { margin: 48px 0 0; padding-top: 18px; color: rgba(246,241,230,.28); border-top: 1px solid rgba(255,255,255,.08); font-size: 9px; letter-spacing: .05em; }

.asset-modal {
  width: min(1050px, calc(100% - 36px));
  max-height: calc(100vh - 36px);
  padding: 0;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid rgba(169,240,232,.4);
  box-shadow: 0 40px 100px rgba(0,0,0,.55);
}
.asset-modal[open] { display: grid; grid-template-columns: 1.05fr .95fr; animation: modalIn .22s ease-out both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.asset-modal::backdrop { background: rgba(1,12,18,.82); backdrop-filter: blur(9px); }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 38px; height: 38px; color: var(--ivory); background: rgba(7,25,35,.74); border: 1px solid rgba(255,255,255,.2); cursor: pointer; font-size: 24px; line-height: 1; }
.modal-preview { display: grid; min-height: 600px; padding: 25px; place-items: center; background: #071b43; }
.modal-preview img { width: 100%; max-height: 650px; object-fit: contain; }
.modal-content { display: flex; flex-direction: column; justify-content: center; padding: 52px 42px; }
.modal-category { color: var(--teal); font-size: 9px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.modal-content h2 { margin-bottom: 17px; font-family: var(--serif); font-size: 42px; font-weight: 400; line-height: 1.06; }
.modal-content > p:not(.modal-category):not(.usage-note) { color: var(--muted); font-size: 14px; line-height: 1.75; }
.modal-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
.modal-meta div { padding-top: 9px; border-top: 1px solid var(--line); }
.modal-meta div:last-child { grid-column: 1 / -1; }
.modal-meta dt { color: var(--teal); font-size: 8px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.modal-meta dd { margin: 3px 0 0; color: #3f4f56; font-size: 12px; }
.usage-note { padding: 13px 15px; color: #41545b; background: rgba(20,109,115,.08); border-left: 2px solid var(--teal); font-size: 12px; }
.modal-actions { display: grid; gap: 8px; margin-top: 16px; }
.modal-actions .button-ghost { color: var(--ink); border-color: rgba(7,25,35,.25); }
.modal-actions .button-ghost:hover { background: rgba(20,109,115,.07); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: min(340px, calc(100% - 48px)); padding: 13px 17px; opacity: 0; color: var(--ink); background: var(--gold-light); box-shadow: var(--shadow); font-size: 12px; font-weight: 800; transform: translateY(20px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1050px) {
  .site-nav { gap: 19px; }
  .hero { grid-template-columns: 1fr .8fr; }
  .hero-art { transform: scale(.88); transform-origin: center; }
  .section-heading { grid-template-columns: 1fr 350px; gap: 45px; }
  .asset-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .asset-card, .asset-card:nth-child(n) { grid-column: auto; }
  .thread-section { grid-template-columns: 1fr; gap: 40px; }
  .thread-heading { max-width: 650px; }
  .thread-builder { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
  .thread-preview-wrap { margin: 0; }
  .use-section { grid-template-columns: 1fr; }
  .realm-portal-grid { grid-template-columns: 1fr; }
  .realm-portal-card { min-height: 440px; }
}

@media (max-width: 1250px) and (min-width: 1051px) {
  .asset-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .asset-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 1080px) {
  html { scroll-padding-top: 76px; }
  .site-header { width: calc(100% - 32px); height: 78px; }
  .site-header.is-stuck { padding-inline: 16px; }
  .nav-toggle { display: grid; width: 42px; height: 42px; padding: 10px; place-content: center; gap: 5px; color: var(--ivory); background: transparent; border: 1px solid rgba(255,255,255,.2); cursor: pointer; }
  .nav-toggle > span:not(.sr-only) { display: block; width: 19px; height: 1px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
  .nav-toggle[aria-expanded="true"] > span:first-child { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] > span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] > span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .site-nav { position: fixed; top: 0; right: 0; bottom: 0; width: min(360px, 88vw); padding: 110px 30px 40px; flex-direction: column; align-items: stretch; gap: 4px; visibility: hidden; pointer-events: none; background: #071b43; box-shadow: -20px 0 60px rgba(0,0,0,.35); clip-path: inset(0 0 0 100%); transition: clip-path .25s ease, visibility 0s linear .25s; }
  .site-nav.is-open { visibility: visible; pointer-events: auto; clip-path: inset(0); transition: clip-path .25s ease; }
  .site-nav a { padding: 15px 5px; font-family: var(--serif); font-size: 20px; font-weight: 400; letter-spacing: 0; text-transform: none; border-bottom: 1px solid rgba(255,255,255,.08); }
  .site-nav .nav-cta { margin-top: 20px; padding: 15px; font-family: var(--sans); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-align: center; text-transform: uppercase; }
  .hero { min-height: 970px; grid-template-columns: 1fr; align-content: center; padding-top: 120px; padding-bottom: 60px; }
  .page-hero { min-height: 520px; padding-top: 125px; padding-bottom: 70px; }
  .hero-copy { max-width: 720px; padding: 0; }
  .hero h1 { font-size: clamp(53px, 12vw, 80px); }
  .hero-art { height: 350px; margin-top: 15px; transform: scale(.76); transform-origin: top center; }
  .hero-note { display: none; }
  .intro-band { flex-direction: column; gap: 5px; }
  .intro-band > span { display: none; }
  .section { padding-top: 84px; padding-bottom: 84px; }
  .section-heading { grid-template-columns: 1fr; gap: 20px; }
  .section-heading > p { max-width: 600px; }
  .asset-toolbar { align-items: stretch; flex-direction: column; }
  .filter-list { justify-content: flex-start; }
  .thread-builder { grid-template-columns: 1fr; }
  .template-showcase { grid-template-columns: 1fr; }
  .template-visual { min-height: 560px; }
  .prompt-grid { grid-template-columns: 1fr; }
  .use-card { grid-template-columns: 1fr; padding: 40px; }
  .asset-modal[open] { grid-template-columns: 1fr; }
  .modal-preview { min-height: 350px; max-height: 45vh; }
  .modal-content { padding: 36px 28px; }
  .footer-links { justify-content: flex-start; margin-top: 34px; }
}

@media (max-width: 560px) {
  .brand strong { font-size: 15px; }
  .hero { min-height: 930px; }
  .page-hero { min-height: 500px; }
  .page-hero h1 { font-size: 59px; }
  .realm-portal-section { padding: 76px 18px 84px; }
  .realm-portal-card { min-height: 410px; }
  .realm-portal-copy { padding: 24px; }
  .hero h1 { font-size: 52px; }
  .hero-lede { font-size: 15px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .hero-stats { gap: 28px; }
  .hero-stats div + div::before { left: -14px; }
  .hero-art { margin-top: 35px; transform: scale(.67); }
  .section { padding-inline: 18px; }
  .section-heading h2, .thread-heading h2 { font-size: 46px; }
  .asset-grid { grid-template-columns: 1fr; }
  .asset-card:nth-child(n) { grid-column: auto; }
  .asset-preview-button, .asset-card:nth-child(n) .asset-preview-button { height: 280px; }
  .form-row.two-up { grid-template-columns: 1fr; gap: 0; }
  .thread-form { padding: 19px; }
  .template-visual { min-height: 470px; padding: 22px; }
  .template-visual img { max-height: 440px; }
  .template-copy { padding: 31px 23px; }
  .template-copy dl { grid-template-columns: 1fr; }
  .template-actions .button { width: 100%; }
  .thread-preview { padding: 24px; }
  .thread-preview dl { grid-template-columns: 1fr; }
  .use-card { padding: 33px 25px; }
  .contribute-card { padding: 34px 25px; }
  .site-footer { padding-inline: 20px; }
  .footer-links { flex-wrap: wrap; gap: 16px; }
  .modal-content h2 { font-size: 34px; }
}

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