/* Crown Infinity page skin: the game's navy and gold, parchment for reading, crimson for war.
   Colours come from the game's chronicle style (navy #0b1622, gold #bc9557 / #f6e3a8, parchment #e6d5ab). */

body.ci {
  --ci-navy: #070e18;
  --ci-navy-2: #0b1622;
  --ci-royal: #16305a;
  --ci-royal-hi: #2d5496;
  --ci-gold: #d9ad61;
  --ci-gold-2: #bc9557;
  --ci-gold-hi: #f6e3a8;
  --ci-parch: #f3e8cc;
  --ci-text: #e9e0c9;
  --ci-muted: #a9b2bd;
  --ci-crimson: #b0412a;
  --ci-line: rgba(217, 173, 97, 0.3);
  --ci-line-soft: rgba(217, 173, 97, 0.15);
  --chrome-bg: rgba(7, 14, 24, 0.84);
  --chrome-line: rgba(217, 173, 97, 0.18);
  --chrome-text: #e9e0c9;
  --chrome-muted: #a9b2bd;
  --chrome-strong: #fffaf0;
  --chrome-accent: #d9ad61;
  --chrome-menu-bg: rgba(9, 18, 30, 0.97);
  --chrome-pill-line: rgba(217, 173, 97, 0.5);
  --chrome-focus: #f6e3a8;
  --ambience-rgb: 246, 227, 168;
  background-color: var(--ci-navy);
  background-image:
    radial-gradient(ellipse 70% 50% at 70% 0%, rgba(45, 84, 150, 0.32), transparent 65%),
    radial-gradient(ellipse 60% 60% at 0% 60%, rgba(22, 48, 90, 0.4), transparent 70%);
  color: var(--ci-text);
}

body.ci ::selection { background: var(--ci-gold); color: #1b1305; }
body.ci .bz-eyebrow { color: var(--ci-gold); }
body.ci main a:not([class]) { color: var(--ci-gold-hi); }
body.ci h1, body.ci h2, body.ci h3 { color: var(--ci-gold-hi); }
body.ci .bz-btn { background: linear-gradient(120deg, #f6e3a8, #d9ad61 55%, #a57a3a); color: #1b1305; box-shadow: 0 10px 34px rgba(217, 173, 97, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
body.ci .bz-btn:hover { color: #1b1305; box-shadow: 0 14px 44px rgba(217, 173, 97, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
body.ci .bz-btn--ghost { background: rgba(7, 14, 24, 0.5); color: var(--ci-gold-hi); border-color: rgba(217, 173, 97, 0.45); box-shadow: none; }
body.ci .bz-btn--ghost:hover { background: rgba(217, 173, 97, 0.1); color: #fff; }
body.ci .bz-link { color: var(--ci-gold-hi); border-color: rgba(217, 173, 97, 0.5); }
body.ci .bz-h2 { font-family: "Cinzel", Georgia, serif; font-weight: 700; letter-spacing: 0.01em; line-height: 1.08; font-size: clamp(2rem, 1.25rem + 3vw, 3.75rem); }
body.ci .bz-section-head p:not(.bz-eyebrow) { color: var(--ci-muted); }
body.ci .bz-phone { background: linear-gradient(150deg, #33496e, #0b1622 46%, #26385a); --phone-glow: rgba(217, 173, 97, 0.18); }

/* The gold rule with a centre diamond from the game's captions */
.ci-rule { display: flex; align-items: center; gap: 12px; width: min(300px, 70%); margin: 18px 0 0; color: var(--ci-gold); }
.ci-rule::before, .ci-rule::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, currentColor); }
.ci-rule::after { background: linear-gradient(90deg, currentColor, transparent); }
.ci-rule span { width: 7px; height: 7px; background: currentColor; transform: rotate(45deg); }
.bz-section-head--center .ci-rule { margin-inline: auto; }

/* Product bar */
.ci-bar { position: sticky; top: var(--bz-header-h); z-index: 30; border-bottom: 1px solid var(--ci-line-soft); background: rgba(7, 14, 24, 0.88); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.ci-bar__inner { display: flex; align-items: center; gap: 18px; min-height: 56px; }
.ci-bar__name { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--ci-gold-hi); font-family: "Cinzel", Georgia, serif; font-size: 1rem; font-weight: 700; letter-spacing: 0.08em; text-decoration: none; }
.ci-bar__name img { width: 28px; height: 28px; border-radius: 8px; }
.ci-bar__links { display: flex; gap: 4px; margin: 0; padding: 0; overflow-x: auto; list-style: none; scrollbar-width: none; }
.ci-bar__links::-webkit-scrollbar { display: none; }
.ci-bar__links a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px; border-radius: 999px; color: var(--ci-text); font-size: 0.8125rem; font-weight: 550; text-decoration: none; white-space: nowrap; }
.ci-bar__links a:hover { color: #fff; background: rgba(217, 173, 97, 0.1); }
.ci-bar .bz-btn { margin-left: auto; flex-shrink: 0; min-height: 40px; padding: 8px 16px; font-size: 0.8125rem; }

/* Hero */
.ci-hero { position: relative; overflow: clip; isolation: isolate; padding: clamp(40px, 6vw, 88px) 0 clamp(56px, 8vw, 110px); }
.ci-hero__bg { position: absolute; inset: 0; z-index: -2; }
.ci-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; opacity: 0.32; filter: blur(2px) saturate(1.1); }
.ci-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 50% 60% at 72% 45%, rgba(217, 173, 97, 0.2), transparent 70%), linear-gradient(90deg, var(--ci-navy) 15%, rgba(7, 14, 24, 0.6) 55%, rgba(7, 14, 24, 0.75)), linear-gradient(0deg, var(--ci-navy), transparent 30%); }
.ci-hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.ci-hero h1 { font-family: "Cinzel", Georgia, serif; line-height: 0.98; }
.ci-hero__title { display: block; background: radial-gradient(circle at var(--gx, 30%) var(--gy, -80%), rgba(255, 252, 236, 0.95), rgba(255, 244, 214, 0) 34%), linear-gradient(180deg, #fff6d8 0%, #f6e3a8 40%, #c7974d 100%); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: clamp(3.25rem, 1.6rem + 6vw, 7rem); font-weight: 800; letter-spacing: 0.01em; filter: drop-shadow(0 6px 28px rgba(0, 0, 0, 0.5)); }
.ci-hero__tag { display: block; margin-top: 16px; color: var(--ci-gold); font-size: clamp(1rem, 0.9rem + 0.6vw, 1.375rem); font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; }
.ci-hero__deck { margin: 22px 0 0; max-width: 560px; color: var(--ci-text); font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); line-height: 1.6; }
.ci-hero__facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 30px 0 0; padding: 0; overflow: hidden; border: 1px solid var(--ci-line); border-radius: 16px; background: var(--ci-line); list-style: none; max-width: 560px; }
.ci-hero__facts li { padding: 14px 12px; background: rgba(9, 18, 30, 0.92); text-align: center; color: var(--ci-muted); font-size: 0.75rem; line-height: 1.35; }
.ci-hero__facts strong { display: block; margin-bottom: 2px; color: var(--ci-gold-hi); font-family: "Cinzel", Georgia, serif; font-size: 1.5rem; font-weight: 700; }
.ci-hero__stage { position: relative; display: flex; justify-content: center; align-items: center; min-height: 560px; }
.ci-hero__crest { position: absolute; width: min(360px, 54%); left: 0; top: 50%; transform: translateY(-50%) rotate(-6deg); border-radius: 26px; box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(217, 173, 97, 0.3); opacity: 0.9; }
.ci-hero__stage .bz-phone { position: relative; max-width: 280px; margin-left: 48%; transform: rotate(3deg); }
/* Gilt (showpiece.js): the lit shield sits over the crest's place with room for its shadow and spill. */
.ci-hero__crest { transition: opacity 0.7s ease; }
.ci-hero__stage.sp-live .ci-hero__crest { opacity: 0; }
.ci-gilt { position: absolute; left: calc(min(360px, 54%) * -0.15); top: 50%; width: calc(min(360px, 54%) * 1.3); aspect-ratio: 480 / 853; transform: translateY(-50%); pointer-events: none; }
.ci-hero__stage[data-showpiece] { touch-action: pan-y; }

/* Camp to crown */
.ci-towns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: town; }
.ci-towns figure { position: relative; margin: 0; overflow: hidden; border: 1px solid var(--ci-line); border-radius: 20px; background: #0b1622; }
.ci-towns img { width: 100%; aspect-ratio: 640 / 914; object-fit: cover; transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.ci-towns figure:hover img { transform: scale(1.05); }
.ci-towns figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 16px; background: linear-gradient(180deg, transparent, rgba(7, 14, 24, 0.95)); }
.ci-towns figcaption strong { display: block; color: var(--ci-gold-hi); font-family: "Cinzel", Georgia, serif; font-size: 1.25rem; font-weight: 700; letter-spacing: 0.06em; }
.ci-towns figcaption span { color: var(--ci-text); font-size: 0.8125rem; }
.ci-towns li { counter-increment: town; }
.ci-towns figure::before { content: "0" counter(town); position: absolute; z-index: 1; top: 14px; left: 16px; color: var(--ci-gold); font-family: "Cinzel", Georgia, serif; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.14em; }

/* Feature rows: copy beside phone captures */
.ci-feature { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.ci-feature--flip .ci-feature__media { order: -1; }
.ci-feature__media { display: flex; justify-content: center; gap: 16px; }
.ci-feature__media .bz-phone { max-width: 230px; }
.ci-feature__media .bz-phone:nth-child(2) { transform: translateY(40px); }
.ci-feature__media .bz-phone:nth-child(3) { transform: translateY(-20px); }
.ci-feature h2 { margin-bottom: 0; }
.ci-feature p { color: var(--ci-text); line-height: 1.7; }
.ci-list { display: grid; gap: 14px; margin: 24px 0 0; padding: 0; list-style: none; }
.ci-list li { position: relative; padding-left: 26px; color: var(--ci-text); line-height: 1.55; }
.ci-list li::before { content: ""; position: absolute; left: 2px; top: 0.5em; width: 9px; height: 9px; background: var(--ci-gold); transform: rotate(45deg); }
.ci-list strong { color: var(--ci-gold-hi); font-family: "Cinzel", Georgia, serif; letter-spacing: 0.03em; }

/* Hold Court */
.ci-court { position: relative; overflow: hidden; border: 1px solid var(--ci-line); border-radius: 30px; background: linear-gradient(180deg, #0e1b2d, #070e18); }
.ci-court__banner { width: 100%; aspect-ratio: 1000 / 282; object-fit: cover; mask-image: linear-gradient(180deg, #000 55%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); }
.ci-court__body { margin-top: -60px; padding: 0 clamp(22px, 4vw, 52px) clamp(26px, 4vw, 52px); position: relative; }
.ci-court__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 32px; }
.ci-writ { padding: 22px 22px 24px; border: 1px solid rgba(230, 213, 171, 0.35); border-radius: 16px; background: linear-gradient(180deg, rgba(243, 232, 204, 0.08), rgba(243, 232, 204, 0.03)); }
.ci-writ h3 { margin: 0 0 8px; font-family: "Cinzel", Georgia, serif; font-size: 1.1875rem; font-weight: 700; letter-spacing: 0.03em; }
.ci-writ p { margin: 0; color: var(--ci-text); font-size: 0.9375rem; line-height: 1.6; }
.ci-writ__seal { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-bottom: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d9644c, #8f2a1c 70%); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5); color: #f6e3a8; font-family: "Cinzel", Georgia, serif; font-size: 0.75rem; font-weight: 700; }

/* Open Realm */
.ci-realm { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(24px, 4vw, 52px); border: 1px dashed rgba(217, 173, 97, 0.45); border-radius: 30px; background: radial-gradient(ellipse 70% 80% at 100% 0%, rgba(45, 84, 150, 0.3), transparent 60%), rgba(9, 18, 30, 0.75); }
.ci-realm .bz-chip { margin-bottom: 14px; }
.ci-realm__media { display: flex; justify-content: center; }

/* Chronicle in Motion */
.ci-motion { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 16px; }
.ci-motion figure { margin: 0; }
.ci-motion .bz-phone { max-width: none; }
.ci-motion figcaption { margin-top: 12px; color: var(--ci-muted); font-size: 0.875rem; line-height: 1.5; }
.ci-motion figcaption strong { display: block; color: var(--ci-gold-hi); font-family: "Cinzel", Georgia, serif; font-size: 1rem; letter-spacing: 0.03em; }

/* Facts */
.ci-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; border: 1px solid var(--ci-line); border-radius: 22px; background: var(--ci-line); }
.ci-facts > div { padding: 22px 24px; background: rgba(9, 18, 30, 0.94); }
.ci-facts dt { margin-bottom: 6px; color: var(--ci-gold); font-size: 0.75rem; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; }
.ci-facts dd { margin: 0; color: var(--ci-text); line-height: 1.55; }

@media (max-width: 1000px) {
  .ci-hero__grid, .ci-feature, .ci-realm { grid-template-columns: minmax(0, 1fr); }
  .ci-feature--flip .ci-feature__media { order: 0; }
  .ci-hero__stage { min-height: 0; padding: 20px 0 10px; order: -1; }
  .ci-court__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ci-motion { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ci-towns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .ci-bar { position: relative; top: 0; }
  .ci-bar__links { display: none; }
  .ci-bar .bz-btn { min-height: 38px; padding: 7px 14px; }
  .ci-bar__inner { gap: 10px; min-height: 52px; justify-content: space-between; }
  .ci-hero__crest { width: 46%; left: 2%; }
  .ci-gilt { width: calc(46% * 1.3); left: calc(2% - 46% * 0.15); }
  .ci-hero__stage .bz-phone { max-width: 182px; margin-left: 46%; }
  .ci-hero__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ci-feature__media .bz-phone { max-width: 46%; }
  .ci-feature__media .bz-phone:nth-child(3) { display: none; }
  .ci-court__grid { grid-template-columns: minmax(0, 1fr); }
  .ci-facts { grid-template-columns: minmax(0, 1fr); }
  .ci-court__body { margin-top: -24px; }
}

@media (max-width: 480px) {
  .ci-towns { gap: 8px; }
  .ci-towns figcaption { padding: 28px 10px 10px; }
  .ci-towns figcaption strong { font-size: 1rem; }
  .ci-towns figcaption span { display: none; }
  .ci-motion { gap: 16px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .ci-towns img { transition: none; }
}

/* Older Crown pages (Command Journal, support, policies) keep their layout; these recolour them. */
body.ci .button { background: linear-gradient(120deg, #f6e3a8, #d9ad61 55%, #a57a3a); color: #1b1305; border-color: transparent; border-radius: 999px; }
body.ci .button:hover { color: #1b1305; filter: brightness(1.06); }
body.ci .button.secondary { background: rgba(7, 14, 24, 0.5); color: var(--ci-gold-hi); border-color: rgba(217, 173, 97, 0.45); }
body.ci :is(.card, .contact-panel) { background: rgba(9, 18, 30, 0.78); border-color: var(--ci-line); }
body.ci .card-label { color: var(--ci-gold) !important; }
body.ci .eyebrow { color: var(--ci-gold); }
body.ci .text-link { color: var(--ci-gold-hi); }
body.ci :is(.journal-community, .journal-button--primary) { background: linear-gradient(120deg, #f6e3a8, #d9ad61 55%, #a57a3a); color: #1b1305 !important; border-color: transparent; }
body.ci .journal-frame a:focus-visible { outline-color: var(--ci-gold-hi); }

/* Camp to crown: one town, scrubbed through its four ages (bezhig.js drives the fade) */
.ci-grow { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.ci-grow__stage { position: relative; overflow: hidden; width: 100%; max-width: 500px; aspect-ratio: 640 / 914; max-height: 80vh; margin-inline: auto; border: 1px solid var(--ci-line); border-radius: 26px; background: #0b1622; box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), 0 0 120px rgba(217, 173, 97, 0.12); }
.ci-grow__stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ci-grow__stage img + img { opacity: 0; }
.ci-grow__stage[data-showpiece] { touch-action: pan-y; }
.ci-grow__badge { position: absolute; left: 16px; bottom: 16px; z-index: 2; padding: 8px 14px; border: 1px solid rgba(217, 173, 97, 0.5); border-radius: 999px; background: rgba(7, 14, 24, 0.82); color: var(--ci-gold-hi); font-family: "Cinzel", Georgia, serif; font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.ci-grow__controls { margin-top: 26px; }
.ci-grow__range { width: 100%; accent-color: var(--ci-gold); }
.ci-grow__stops { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.ci-grow__stops button { width: 100%; min-height: 44px; padding: 8px 6px; border: 1px solid var(--ci-line); border-radius: 12px; background: rgba(9, 18, 30, 0.7); color: var(--ci-text); font-family: "Cinzel", Georgia, serif; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.06em; cursor: pointer; transition: border-color 0.2s, background-color 0.2s, color 0.2s; }
.ci-grow__stops button[aria-pressed="true"] { border-color: var(--ci-gold); background: rgba(217, 173, 97, 0.14); color: var(--ci-gold-hi); }
.ci-grow__note { margin-top: 12px; color: var(--ci-muted); font-size: 0.8125rem; }

@media (max-width: 1000px) {
  .ci-grow { grid-template-columns: minmax(0, 1fr); }
  .ci-grow__stage { max-width: 520px; width: 100%; }
}

/* Five ages fit one row on phones. */
@media (max-width: 480px) {
  .ci-grow__stops { gap: 5px; }
  .ci-grow__stops button { padding: 8px 1px; font-size: 0.6875rem; letter-spacing: 0.01em; }
}
