/* NobleWars website: night sky and parchment, banner red and gold, like the app. */
:root {
  --night: #1C0F06;
  --night-2: #2A1709;
  --parchment: #F4EAD5;
  --parchment-2: #E9DABA;
  --edge: #B89B6A;
  --ink: #2B2118;
  --ink-muted: #6B5B4B;
  --red: #8C2F1B;
  --red-dark: #5E1D10;
  --gold: #E2B23C;
  --gold-light: #F2C230;
  --cream: #FFF5DA;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 18px/1.6 "EB Garamond", Georgia, serif; color: var(--ink); background: var(--parchment); }
h1, h2, h3, .brand, .kicker, .num, .button, .store { font-family: Cinzel, Georgia, serif; }
a { color: var(--red); }
img { display: block; }

/* Top bar */
.top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 16px max(16px, calc((100% - 1160px) / 2)); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font-weight: 800; letter-spacing: .06em; font-size: 20px; }
.brand img { border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.langs { position: relative; }
.langs summary { list-style: none; cursor: pointer; color: var(--cream); font-size: 14px; padding: 4px 10px; border-radius: 6px; font-family: Cinzel, serif; background: rgba(242, 194, 48, .15); }
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: " ▾"; opacity: .7; }
.langs nav { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: grid; grid-template-columns: repeat(2, minmax(130px, 1fr)); gap: 2px; padding: 8px; border-radius: 10px; background: rgba(28, 15, 6, .97); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); max-height: 70vh; overflow-y: auto; }
.langs nav a { color: var(--cream); opacity: .8; text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
.langs nav a:hover { opacity: 1; background: rgba(242, 194, 48, .12); }
.langs nav a[aria-current] { opacity: 1; background: rgba(242, 194, 48, .2); }

/* Hero: text and a spinning globe over the night sky */
.hero { position: relative; overflow: hidden; color: var(--cream); min-height: 92vh;
  background: radial-gradient(ellipse at 70% 45%, #4A2510 0%, var(--night-2) 38%, var(--night) 75%);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 24px;
  padding: 96px max(16px, calc((100% - 1160px) / 2)) 56px; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: radial-gradient(1px 1px at 20% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 80% 20%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 60% 80%, #ffe9b0 50%, transparent 51%), radial-gradient(1px 1px at 35% 70%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 60%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 10% 85%, #ffe9b0 50%, transparent 51%),
    radial-gradient(1px 1px at 50% 12%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 70% 92%, #fff 50%, transparent 51%); }
.hero-text { position: relative; z-index: 2; }
.kicker { color: var(--gold); text-transform: uppercase; letter-spacing: .14em; font-size: 14px; margin: 0 0 8px; }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; margin: 0 0 18px; font-weight: 800;
  text-shadow: 0 3px 0 var(--red-dark), 0 8px 30px rgba(0,0,0,.6); }
.lead { font-size: clamp(19px, 2vw, 23px); max-width: 32ch; margin: 0 0 28px; color: #F3E6C8; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store { display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: 12px; text-decoration: none;
  background: linear-gradient(#A63A22, var(--red)); color: var(--cream); font-weight: 600; font-size: 15px;
  border: 2px solid var(--gold); box-shadow: 0 4px 0 var(--red-dark), 0 10px 24px rgba(0,0,0,.35); }
.store:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--red-dark); }
.store-icon { width: 20px; height: 20px; background: var(--gold-light);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16.4 12.6c0-2.7 2.2-4 2.3-4.1-1.3-1.9-3.3-2.1-4-2.1-1.7-.2-3.3 1-4.2 1-.9 0-2.2-1-3.6-.9-1.9 0-3.6 1.1-4.5 2.7-1.9 3.4-.5 8.3 1.4 11 .9 1.3 2 2.8 3.4 2.8 1.4-.1 1.9-.9 3.5-.9s2.1.9 3.6.9c1.5 0 2.4-1.4 3.3-2.7 1-1.5 1.5-3 1.5-3.1-.1 0-2.8-1.1-2.7-4.6zM13.7 4.6c.8-.9 1.3-2.2 1.1-3.5-1.1.1-2.4.7-3.2 1.6-.7.8-1.3 2.1-1.1 3.4 1.2.1 2.4-.6 3.2-1.5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16.4 12.6c0-2.7 2.2-4 2.3-4.1-1.3-1.9-3.3-2.1-4-2.1-1.7-.2-3.3 1-4.2 1-.9 0-2.2-1-3.6-.9-1.9 0-3.6 1.1-4.5 2.7-1.9 3.4-.5 8.3 1.4 11 .9 1.3 2 2.8 3.4 2.8 1.4-.1 1.9-.9 3.5-.9s2.1.9 3.6.9c1.5 0 2.4-1.4 3.3-2.7 1-1.5 1.5-3 1.5-3.1-.1 0-2.8-1.1-2.7-4.6zM13.7 4.6c.8-.9 1.3-2.2 1.1-3.5-1.1.1-2.4.7-3.2 1.6-.7.8-1.3 2.1-1.1 3.4 1.2.1 2.4-.6 3.2-1.5z'/%3E%3C/svg%3E") center / contain no-repeat; }
.store-icon.play {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2.5v19l10-9.5zM15.3 13.2l2.6 2.5-11 6.2zM15.3 10.8L6.9 2.1l11 6.2zM19.1 9l2.9 1.6c.8.5.8 1.4 0 1.9l-3 1.6-2.7-2.6z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2.5v19l10-9.5zM15.3 13.2l2.6 2.5-11 6.2zM15.3 10.8L6.9 2.1l11 6.2zM19.1 9l2.9 1.6c.8.5.8 1.4 0 1.9l-3 1.6-2.7-2.6z'/%3E%3C/svg%3E"); }
.soon { display: inline-block; padding: 11px 18px; border: 2px dashed var(--gold); border-radius: 12px; color: var(--gold-light); font-family: Cinzel, serif; font-size: 15px; }
.explore { display: inline-block; margin-top: 22px; color: var(--gold-light); font-family: Cinzel, serif; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(242,194,48,.5); }
.stats { display: flex; gap: 32px; margin: 30px 0 0; }
.stats div { margin: 0; }
.stats dt { font-family: Cinzel, serif; font-weight: 800; font-size: 30px; color: var(--gold-light); line-height: 1; }
.stats dd { margin: 4px 0 0; font-size: 15px; color: #D9C9A6; }
/* Japanese has no spaces: break between phrases, and never before a small kana. */
:lang(ja) { word-break: auto-phrase; line-break: strict; }
.hero-globe { position: relative; z-index: 1; display: block; aspect-ratio: 1; width: 100%; max-width: 640px; justify-self: center; border-radius: 50%; }
.hero-globe::after { content: ""; position: absolute; inset: 8%; border-radius: 50%; pointer-events: none; box-shadow: 0 0 90px 10px rgba(242, 194, 48, .22); }
.hero-globe #globe { position: absolute; inset: 0; }
.hero-globe .maplibregl-canvas { outline: none; }
.hero-globe .maplibregl-canvas-container { cursor: grab; }
.hero-globe .maplibregl-canvas { clip-path: circle(50%); }
.hero-globe .credit { position: absolute; left: 0; right: 0; bottom: -22px; text-align: center; font-size: 11px; opacity: .55; }
.hero-globe .credit a { color: inherit; }
.hero-globe .maplibregl-canvas-container:active { cursor: grabbing; }

main section { padding: 72px max(16px, calc((100% - 1160px) / 2)); }
main h2 { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; margin: 0 0 28px; text-align: center; color: var(--red-dark); }

/* How it works */
.how { background: var(--parchment); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.steps li { position: relative; background: var(--cream); border: 1px solid var(--edge); border-radius: 14px; padding: 30px 22px 22px;
  box-shadow: 0 2px 0 var(--parchment-2), 0 12px 30px rgba(92, 58, 27, .12); }
.num { position: absolute; top: -20px; left: 22px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--red); color: var(--gold-light); font-weight: 800; border: 2px solid var(--gold); font-size: 15px; }
.steps h3, .grid h3 { margin: 6px 0 6px; font-size: 20px; color: var(--ink); }
.steps p, .grid p { margin: 0; color: var(--ink-muted); }

/* Screenshots: four phones in a row, a swipeable strip on small screens */
.shots { background: var(--night); color: var(--cream); }
.shots h2 { color: var(--cream); }
.phones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.phones figure { margin: 0; text-align: center; }
.phones img { width: 100%; height: auto; border-radius: 22px; border: 6px solid #140302;
  box-shadow: 0 0 0 2px var(--gold), 0 18px 40px rgba(0,0,0,.5); background: var(--parchment); }
.phones figcaption { margin-top: 14px; font-family: Cinzel, serif; font-weight: 600; font-size: 16px; color: var(--gold-light); }

/* Features */
.features { background: linear-gradient(var(--parchment-2), var(--parchment)); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid article { padding: 22px; border-radius: 14px; background: rgba(255, 245, 218, .6); border: 1px solid rgba(184, 155, 106, .6); }
.grid svg { width: 44px; height: 44px; color: var(--red); }

/* World teaser and closing call */
.world-teaser, .cta { text-align: center; }
.world-teaser { background: var(--night); color: var(--cream); }
.world-teaser h2, .cta h2 { color: inherit; }
.world-teaser p { max-width: 46ch; margin: 0 auto 26px; color: #E5D6B5; font-size: 20px; }
.button { display: inline-block; padding: 13px 26px; border-radius: 12px; background: linear-gradient(#F5CD4C, var(--gold)); color: var(--red-dark);
  text-decoration: none; font-weight: 800; border: 2px solid #A67C1A; box-shadow: 0 4px 0 #A67C1A; }
.cta { background: radial-gradient(ellipse at 50% 0%, #A63A22, var(--red-dark)); color: var(--cream); }
.cta p { margin: -12px 0 26px; font-size: 20px; }
.cta .stores { justify-content: center; }
.cta .store { background: linear-gradient(#F5CD4C, var(--gold)); color: var(--red-dark); box-shadow: 0 4px 0 #A67C1A; }
.cta .store-icon { background: var(--red-dark); }

.foot { background: var(--night); color: #CDBB96; text-align: center; padding: 36px 16px 44px; font-size: 15px; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 14px 0; }
.foot a { color: var(--gold-light); }
.safety { max-width: 60ch; margin: 0 auto; }
.small { font-size: 13px; opacity: .7; margin: 0; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 86px; text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero .stores, .stats { justify-content: center; }
  .hero-globe { max-width: min(380px, 86vw); order: -1; margin-bottom: 4px; }
  .steps, .grid { grid-template-columns: 1fr; }
  .phones { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; padding-bottom: 8px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .phones figure { flex: 0 0 66%; scroll-snap-align: center; }
  .steps { gap: 34px; }
  main section { padding-top: 56px; padding-bottom: 56px; }
}

/* Full-screen world map */
.world-page { background: var(--night); overflow: hidden; }
.world-page #globe { position: fixed; inset: 0; }
.map-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: linear-gradient(rgba(28, 15, 6, .92), rgba(28, 15, 6, 0)); }
.map-bar .brand { font-size: 17px; }
.map-count { flex: 1; text-align: center; color: var(--gold-light); font-family: Cinzel, serif; font-size: 14px; }
.map-hint { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 3; margin: 0; padding: 8px 16px; border-radius: 20px;
  background: rgba(28, 15, 6, .8); color: var(--cream); font-size: 15px; white-space: nowrap; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis;
  transition: opacity .8s; }
.map-hint.gone { opacity: 0; pointer-events: none; }
.maplibregl-popup-content { background: var(--cream); border: 1px solid var(--edge); border-radius: 10px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.maplibregl-popup-tip { border-top-color: var(--cream) !important; border-bottom-color: var(--cream) !important; }
.pop { display: flex; flex-direction: column; gap: 3px; font: 16px/1.3 "EB Garamond", Georgia, serif; color: var(--ink); min-width: 140px; }
.pop b { font-family: Cinzel, serif; font-size: 16px; }
.pop .tag { align-self: flex-start; color: #fff; padding: 1px 8px; border-radius: 6px; font-family: Cinzel, serif; font-size: 13px; }
.pop .guild { display: flex; align-items: center; gap: 6px; }
.pop .guild svg { flex: none; }
.pop .ruins { color: var(--ink-muted); font-style: italic; }
@media (max-width: 520px) { .map-count { display: none; } .map-bar { justify-content: space-between; } }

/* The globe's Layers box */
.layers { position: absolute; left: 12px; bottom: 34px; z-index: 3; display: flex; flex-direction: column; gap: 4px;
  padding: 10px 14px; border-radius: 12px; background: rgba(255, 245, 218, .95); border: 2px solid #4A2A12;
  box-shadow: 0 4px 14px rgba(0,0,0,.3); font: 15px/1.3 "EB Garamond", Georgia, serif; color: var(--ink); }
.layers b { font-family: Cinzel, Georgia, serif; font-size: 13px; color: var(--red-dark); }
.layers label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.layers input { width: 17px; height: 17px; accent-color: #8C2F1B; }
