/* warandcards.appnice.dev (also appnice.dev/warandcards/): hand-kept, not made by build.py. Only relative URLs in this
   folder: Caddy rewrites every path of the subdomain to /warandcards{path}. Colours from the game's style bible. */
:root {
  --cream: #f1e3c6; --paper: #faf3e3; --ink: #3f2c18; --ink-soft: #6b4e2e; --brown: #6b4e2e;
  --blue: #4a6fa5; --blue-dk: #2f4c7a; --brick: #b4553c; --ember: #c8452f; --gold: #e3b448; --leaf: #4f7436;
  --edge: #d8c39a;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 500 18px/1.55 "Alegreya Sans", system-ui, -apple-system, "Segoe UI", sans-serif; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; margin: 0; font-family: "Cinzel", Georgia, serif; font-weight: 700; }
h2 { font-size: clamp(28px, 5.5vw, 42px); text-align: center; color: var(--ink); }
.lead { text-align: center; max-width: 660px; margin: 12px auto 0; color: var(--ink-soft); font-size: 19px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
section { padding: 64px 0; }

/* Top bar */
.top { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; }
.top .brand { display: flex; align-items: center; gap: 10px; font: 700 18px "Cinzel", Georgia, serif; text-decoration: none; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.top .brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.lang { text-decoration: none; font-weight: 700; padding: 4px 14px; border-radius: 999px; background: var(--paper); border: 2px solid var(--edge); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; text-align: center; color: #fff;
  background: linear-gradient(180deg, rgba(40,26,12,.25) 0%, rgba(40,26,12,.55) 60%, rgba(40,26,12,.85) 100%), url(img/bg-castle.webp) center 30% / cover no-repeat; }
.hero > .wrap { position: relative; z-index: 1; }
.hero .logo { width: min(400px, 82vw); margin: 0 auto; filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); }
.hero h1 { font-size: clamp(26px, 5.5vw, 44px); margin-top: 10px; padding: 0 8px; text-shadow: 0 2px 10px rgba(0,0,0,.55); }
.hero .sub { margin: 12px auto 0; max-width: 560px; font-size: 19px; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.hero .note { margin: 14px 0 0; font-size: 15px; opacity: .92; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding-top: 80px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 350px; text-align: left; }
  .hero-grid .logo { margin: 0; width: 380px; }
  .hero-grid .sub { margin-left: 0; }
  .hero-grid .stores { justify-content: flex-start; }
}

/* Store buttons */
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 10px 22px; border-radius: 14px;
  background: #15110c; color: #fff; font-weight: 700; font-size: 18px; text-decoration: none; border: 2px solid rgba(255,255,255,.75);
  box-shadow: 0 5px 0 rgba(0,0,0,.25); transition: transform .15s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn small { display: block; font-size: 12px; font-weight: 500; opacity: .85; line-height: 1; }
.btn span { text-align: left; line-height: 1.1; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* How it plays: three steps with landscape screenshots */
.steps { display: grid; gap: 28px; margin-top: 36px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step { text-align: center; display: flex; flex-direction: column; }
.step .num { align-self: center; }
.step .shot { margin-top: auto; }
.step .num { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--blue); color: #fff; font: 700 22px "Cinzel", Georgia, serif; box-shadow: 0 3px 0 var(--blue-dk); }
.step h3 { margin-top: 10px; font-size: 22px; }
.step p { margin: 6px 0 16px; color: var(--ink-soft); }
.shot { width: 100%; margin: 16px auto 0; flex: none; border-radius: 16px; border: 5px solid #241a10; background: #241a10;
  box-shadow: 0 16px 30px -14px rgba(40,26,12,.6); aspect-ratio: 16 / 9; object-fit: cover; }

/* Features */
.alt { background: var(--cream); border-top: 3px solid var(--edge); border-bottom: 3px solid var(--edge); }
.feats { display: grid; gap: 18px; margin-top: 36px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.feat { background: var(--paper); border: 3px solid var(--edge); border-radius: 22px; padding: 22px; box-shadow: 0 6px 0 rgba(216,195,154,.7);
  display: flex; gap: 16px; align-items: flex-start; }
.feat .ico { flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--blue); display: flex; align-items: center; justify-content: center;
  font-size: 26px; box-shadow: 0 3px 0 var(--blue-dk); }
.feat h3 { font-size: 20px; }
.feat p { margin: 6px 0 0; color: var(--ink-soft); font-size: 17px; }
.split { display: grid; gap: 32px; align-items: center; margin-top: 40px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.split ul { margin: 0; padding-left: 22px; }
.split li { margin: 6px 0; }
.split li b { color: var(--ink); }
.foe { display: flex; align-items: flex-end; justify-content: center; gap: 6px; }
.foe img { width: 120px; }
.foe img.boss { width: 190px; }

/* Get it */
.get-it { text-align: center; max-width: 720px; margin: 0 auto; }
.get-it ul { text-align: left; max-width: 540px; margin: 18px auto 0; }

/* Footer */
footer { background: #2a1d10; color: #f1e3c6; padding: 40px 0 48px; text-align: center; font-size: 16px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; margin: 12px 0; }
footer a { color: #fff; text-underline-offset: 3px; }
footer img { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto; }

/* Hero demo: a phone playing two short years of the game (demo/demo.js draws the game on a canvas) */
.demo { margin: 0 auto; width: 330px; max-width: calc(100vw - 48px); text-align: center; color: var(--ink); }
.demo .phone-frame { position: relative; aspect-ratio: 9 / 19; border-radius: 44px; background: #17120c; padding: 10px;
  box-shadow: 0 24px 50px rgba(0,0,0,.45), inset 0 0 0 2px #3a2c1c; }
.demo .phone-frame::before { content: ""; position: absolute; z-index: 4; top: 18px; left: 50%; width: 76px; height: 20px;
  margin-left: -38px; border-radius: 12px; background: #17120c; pointer-events: none; }
.demo .screen { container-type: inline-size; position: relative; min-width: 0; height: 100%; border-radius: 35px; overflow: hidden;
  background: #3b2a18; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.demo canvas.board { position: absolute; left: 0; top: 0; display: block; touch-action: pan-y; }
.demo .hand-zone { position: absolute; left: 0; right: 0; bottom: 0; touch-action: none; }
.demo button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; border: 0; background: none; padding: 0; }
.demo .start, .demo .end { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 44px 16px 24px; background-size: cover; background-position: center; }
.demo .start { background-image: linear-gradient(rgba(30,20,10,.05), rgba(30,20,10,.55)), url(demo/bg_start.jpg); }
.demo .start .logo { width: 86%; filter: drop-shadow(0 8px 12px rgba(0,0,0,.4)); }
.demo .play, .demo .again { display: flex; align-items: center; justify-content: center; width: 64%; height: 56px;
  background: url(demo/btn_green.webp) center / 100% 100% no-repeat; color: #fff; font: 700 24px "Cinzel", Georgia, serif;
  text-shadow: 0 2px 0 #1f4a14, 0 0 6px rgba(0,0,0,.35); }
.demo .play { animation: pulse 1.1s ease-in-out infinite alternate; }
.demo .play:active, .demo .again:active { transform: translateY(2px) scale(.98); }
.demo .hint { margin: 0; background: rgba(250,243,227,.94); border-radius: 14px; padding: 6px 14px; font-weight: 700; font-size: 15px; line-height: 1.3; max-width: 100%; }
.demo .end { gap: 10px; justify-content: flex-end; padding-bottom: 22px; }
.demo .end::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(30,20,10,.1), rgba(30,20,10,.25) 30%, rgba(30,20,10,.75)); }
.demo .end > * { position: relative; }
.demo .ribbon { width: 100%; margin-bottom: auto; margin-top: 8px; }
.demo .ribbon img { width: 100%; height: auto; }
.demo .ribbon h3 { position: absolute; left: 0; right: 0; top: 34%; transform: translateY(-50%); font-size: 26px; color: #fff;
  text-shadow: 0 2px 0 #3a2410, 0 0 8px rgba(0,0,0,.4); }
.demo .end p { margin: 0; background: rgba(250,243,227,.95); border-radius: 14px; padding: 10px 12px; font-weight: 700; font-size: 15px; line-height: 1.3; }
.demo .end h4 { margin: 2px 0 0; font: 700 17px "Cinzel", Georgia, serif; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,.7); }
.demo .get { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.demo .get .btn { justify-content: center; margin: 0; min-height: 44px; padding: 6px 14px; font-size: 16px; }
.demo .get .btn svg { width: 20px; height: 20px; }
.demo .again { height: 42px; width: 56%; font-size: 17px; background-image: url(demo/btn_wood.webp); text-shadow: 0 2px 0 #4d2c08; }
@container (max-width: 270px) {
  .demo .end p, .demo .hint { font-size: 13px; }
  .demo .get .btn { font-size: 14px; min-height: 40px; }
  .demo .ribbon h3 { font-size: 21px; }
  .demo .play { font-size: 20px; height: 48px; }
}
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .demo * { animation: none !important; } }
