/* Four Triads website. Fonts: Fraunces and Outfit (SIL Open Font License), served from this site. */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/fraunces-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap; src: url("/fonts/fraunces-latin-wght-italic.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/outfit-latin-wght-normal.woff2") format("woff2"); }

:root {
  --bg: #0d100c;
  --bg-2: #141a12;
  --card: #192017;
  --line: rgba(214, 178, 96, 0.22);
  --text: #ece5d2;
  --muted: #b3ad98;
  --gold: #e7bd5c;
  --gold-hi: #fff0c2;
  --gold-lo: #b9822a;
  --moss: #8fae5a;
  --radius: 14px;
  --wrap: 1120px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Outfit", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.65; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; font-weight: 600; margin: 0 0 0.5em; color: #f6ecd2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--gold); color: #000; padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(11, 14, 10, 0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--serif); font-weight: 600; font-size: 1.2rem; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.brand img { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-hi); background: rgba(231, 189, 92, 0.08); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 12px; font: inherit; cursor: pointer; }
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; background: #0b0e0a; border-bottom: 1px solid var(--line); padding: 8px 16px 14px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 1px solid transparent; transition: transform 0.15s, filter 0.15s; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-gold { background: linear-gradient(var(--gold-hi), var(--gold) 50%, var(--gold-lo)); color: #241703; box-shadow: 0 6px 24px rgba(231, 189, 92, 0.25); }
.btn-gold:hover { color: #241703; }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { color: var(--gold-hi); border-color: rgba(231, 189, 92, 0.5); }
.store { display: inline-flex; flex-direction: column; line-height: 1.2; padding: 10px 22px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.45); color: var(--text); text-decoration: none; min-width: 170px; }
.store small { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; }
.store strong { font-size: 1.15rem; }
.store.soon { cursor: default; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
section { padding: 72px 0; }
.alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.eyebrow { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.8rem; font-weight: 600; color: var(--moss); margin-bottom: 10px; }
.lead { font-size: 1.15rem; color: #ddd5bf; }
.muted { color: var(--muted); }
.center { text-align: center; }
.gold-text { background: linear-gradient(var(--gold-hi), var(--gold) 55%, var(--gold-lo)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Hero */
.hero { position: relative; min-height: min(78vh, 720px); display: grid; align-items: end; padding: 0; overflow: hidden; isolation: isolate; }
.hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, var(--bg) 2%, rgba(13, 16, 12, 0.55) 40%, rgba(13, 16, 12, 0.1) 75%), radial-gradient(ellipse at 50% 30%, transparent 40%, rgba(0, 0, 0, 0.45)); }
.hero .wrap { padding: 120px 0 64px; }
.banner { position: relative; }
.banner img { width: 100%; height: clamp(230px, 33.33vw, 680px); object-fit: cover; object-position: 50% 50%; }
.banner::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(to top, var(--bg), transparent); }
.intro { padding: 36px 0 24px; }
.intro h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
.intro .lead { max-width: 36em; margin-inline: auto; }
.hero.game .logo { width: min(560px, 88%); filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.8)); margin-bottom: 8px; }
.hero.game .tagline { font-family: var(--serif); font-style: italic; font-size: clamp(1.15rem, 2.4vw, 1.5rem); max-width: 30em; text-shadow: 0 2px 12px #000; }

/* Cards and grids */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { color: var(--gold-hi); }
.card p:last-child { margin-bottom: 0; }

.game-card { display: grid; grid-template-columns: 1.15fr 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; text-decoration: none; color: var(--text); transition: border-color 0.2s, transform 0.2s; }
.game-card:hover { border-color: rgba(231, 189, 92, 0.6); transform: translateY(-2px); color: var(--text); }
.game-card .art { position: relative; min-height: 300px; }
.game-card .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.game-card .body { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.game-card .body img { width: 300px; max-width: 100%; margin-bottom: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; padding: 0; list-style: none; }
.tags li { font-size: 0.85rem; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; color: var(--muted); }
@media (max-width: 760px) { .game-card { grid-template-columns: 1fr; } .game-card .art { min-height: 220px; } .game-card .body { padding: 24px; } }

/* Trailer */
.video { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55); background: #000; aspect-ratio: 16 / 9; }
.video video { width: 100%; height: 100%; }
/* The big play button over the trailer's first frame; tapping anywhere on the picture plays it. */
.video .play { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  width: 100%; border: 0; padding: 0; cursor: pointer; color: #fff; font: inherit;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.45) 100%); transition: background 0.2s; }
.video .play[hidden] { display: none; }
.video .play:hover { background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.35) 100%); }
.play-ring { display: grid; place-items: center; width: clamp(68px, 11vw, 112px); aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(var(--gold-hi), var(--gold) 50%, var(--gold-lo)); box-shadow: 0 0 0 6px rgba(231, 189, 92, 0.22), 0 10px 34px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s, box-shadow 0.2s; animation: play-pulse 2.4s ease-in-out infinite; }
.play-ring svg { width: 46%; fill: #241703; }
.video .play:hover .play-ring, .video .play:focus-visible .play-ring { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(231, 189, 92, 0.3), 0 10px 34px rgba(0, 0, 0, 0.7); }
.play-label { font-family: var(--serif); font-weight: 600; font-size: clamp(1rem, 2.2vw, 1.4rem); letter-spacing: 0.04em; text-shadow: 0 2px 10px #000, 0 0 2px #000; }
@keyframes play-pulse { 0%, 100% { box-shadow: 0 0 0 6px rgba(231, 189, 92, 0.22), 0 10px 34px rgba(0, 0, 0, 0.7); } 50% { box-shadow: 0 0 0 14px rgba(231, 189, 92, 0.08), 0 10px 34px rgba(0, 0, 0, 0.7); } }
@media (max-width: 520px) { .video .play { gap: 8px; } }

/* Seven lands */
.lands { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.land { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 4; border: 1px solid var(--line); }
.land img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.land:hover img { transform: scale(1.06); }
.land span { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 8px 10px; text-align: center; font-family: var(--serif); font-weight: 600; font-size: 0.95rem; color: #f6e4b0; background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent); }
@media (max-width: 900px) { .lands { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) { .lands { grid-template-columns: repeat(2, 1fr); } .land:last-child { grid-column: span 2; aspect-ratio: 3 / 2; } }

/* Screenshots */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.shots button { padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: zoom-in; background: #000; aspect-ratio: 16 / 9; }
.shots img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.shots button:hover img { transform: scale(1.04); }
dialog.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 92vh; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, 0.9); }
dialog.lightbox img { max-width: 96vw; max-height: 86vh; border-radius: 8px; }
dialog.lightbox .lb-bar { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
dialog.lightbox button { background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 999px; padding: 6px 16px; font: inherit; cursor: pointer; }

/* Facts */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 12px; } }

/* Text pages */
.page-head { padding: 64px 0 24px; }
.prose h2 { font-size: 1.55rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.qa { border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.qa summary { cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; color: var(--gold); font-size: 1.4rem; line-height: 1; }
.qa details[open] summary::after { content: "–"; }
.qa details > div { padding: 0 0 14px; color: #ddd5bf; }
.callout { border-left: 3px solid var(--gold); background: rgba(231, 189, 92, 0.06); padding: 16px 20px; border-radius: 0 10px 10px 0; margin: 24px 0; }
.callout-emblem { display: flex; align-items: center; gap: 24px; }
.callout-emblem p { margin: 0; flex: 1; }
.callout-emblem .callout-text { flex: 1; min-width: 0; }
.callout-emblem .callout-text p + p { margin-top: 0.7em; color: var(--muted); }
/* The Knight of Calatrava on the left, the cross on the right, the text between them. */
.callout-emblem img.knight { flex: none; width: 150px; height: auto; object-fit: cover; border-radius: 6px; border: 1px solid rgba(214, 178, 96, 0.55); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55); filter: none; }
/* On a phone the two pictures sit side by side above the text, which then has the full width. */
@media (max-width: 600px) {
  .callout-emblem { display: grid; grid-template-columns: auto auto; justify-content: space-around; align-items: center; row-gap: 16px; }
  .callout-emblem img.knight { grid-row: 1; grid-column: 1; width: 110px; }
  .callout-emblem img:not(.knight) { grid-row: 1; grid-column: 2; width: 96px; height: 96px; }
  .callout-emblem .callout-text { grid-row: 2; grid-column: 1 / -1; }
}
.callout-emblem img { flex: none; width: 110px; height: 110px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6)); }
@media (max-width: 520px) { .callout-emblem { gap: 16px; } .callout-emblem img { width: 72px; height: 72px; } }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 0.92rem; background: #0a0c09; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--gold-hi); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
