/* Kingdoms In Peril — rebuilt 2026, mobile-first */

:root {
  --gold: #e3b04b;
  --gold-bright: #f5cf7d;
  --red-deep: #1a0505;
  --red-glow: #7a1408;
  --ink: #0d0304;
  --paper: #f4ede0;
  --text: #f0e8da;
  --text-dim: #c9bda8;
  --card-bg: rgba(10, 3, 4, 0.72);
  --card-border: rgba(227, 176, 75, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
  color: var(--text);
  background-color: var(--ink);
  line-height: 1.6;
}

/* Fixed splash background — a fixed-position layer instead of
   background-attachment: fixed, which is broken on iOS Safari */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(8, 2, 3, 0.45), rgba(8, 2, 3, 0.72)),
    url('assets/KIP-Red-Splash.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

img { max-width: 100%; height: auto; }

a { color: var(--gold-bright); }

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 3, 4, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--card-border);
}

.nav-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo img {
  height: 67px;
  width: auto;
  max-width: none;
  display: block;
}

@media (max-width: 640px) {
  .nav-logo img { height: 54px; }
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--gold-bright);
  border-bottom-color: var(--gold);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-shrink: 0;
}

a.nav-buy {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border-radius: 6px;
  padding: 0.4rem 0.9rem;
  white-space: nowrap;
}

a.nav-buy:hover { filter: brightness(1.1); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.4rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--gold-bright);
  margin: 5px 0;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10, 3, 4, 0.97);
    border-bottom: 1px solid var(--card-border);
    padding: 0.25rem 1.25rem 0.75rem;
  }

  .site-nav.open { display: flex; }

  .site-nav a {
    padding: 0.8rem 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(227, 176, 75, 0.15);
  }

  .site-nav a:last-child { border-bottom: none; }
}

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: calc(1.25rem + 50px) 1rem 0.75rem;
}

.hero-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 0.75rem;
  align-items: center;
  justify-items: center;
}

@media (min-width: 700px) {
  .hero-grid { grid-template-columns: 1fr 1.5fr; gap: 2rem; align-items: start; }
  .hero-text { text-align: left; }
  .hero-text h1, .hero-text .hero-sub { margin-left: 0; }
  .hero-text h1 { margin-top: 0.35rem; }
  .hero-logo { justify-self: end; }
}

.hero-logo {
  width: min(260px, 62vw);
  filter: drop-shadow(0 0 24px rgba(227, 176, 75, 0.35));
}

.hero h1 {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 600;
  margin: 0 auto;
  max-width: 34ch;
}

.hero h1 em { color: var(--gold-bright); }

.hero-sub {
  color: var(--text-dim);
  margin: 0.5rem auto 0;
  max-width: 52ch;
}

/* ---------- Sections & cards ---------- */

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.5rem;
  backdrop-filter: blur(3px);
}

.section-title {
  color: var(--gold-bright);
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  text-align: center;
}

/* ---------- Buy panel ---------- */

.buy-grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 800px) {
  .buy-grid { grid-template-columns: 3fr 2fr; }
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: #000;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.buy-box { text-align: center; }

.buy-box .box-art {
  width: min(280px, 70vw);
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.6));
}

.price {
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  margin: 0.5rem 0 0;
  line-height: 1.1;
}

.price small {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dim);
}

.ships-note {
  color: var(--gold-bright);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0.35rem 0 1rem;
}

.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border: none;
  border-radius: 8px;
  padding: 0.85rem 2.2rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(227, 176, 75, 0.35);
  transition: transform 0.1s, filter 0.15s;
}

.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-paypal {
  background: linear-gradient(180deg, #ffd865, #f7b32b);
}

/* ---------- Quote ---------- */

.quote {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text);
}

.quote cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-weight: 700;
  color: var(--gold-bright);
}

/* ---------- Products ---------- */

.products-grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 800px) {
  .products-grid { grid-template-columns: 1fr 1fr; }
}

.contents-list {
  margin: 0;
  padding-left: 1.2rem;
}

.contents-list li { margin-bottom: 0.5rem; }

.made-usa {
  font-weight: 700;
  color: var(--gold-bright);
}

.art-strip {
  display: block;
  margin: 1.5rem auto 0;
  border-radius: 10px;
  border: 1px solid var(--card-border);
}

/* ---------- Order form ---------- */

.order-form {
  display: grid;
  gap: 0.9rem;
  max-width: 640px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  gap: 0.9rem;
}

@media (min-width: 560px) {
  .form-row-2 { grid-template-columns: 1fr 1fr; }
  .form-row-3 { grid-template-columns: 2fr 1fr 1fr; }
}

.order-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}

.order-form input,
.order-form select,
.order-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(227, 176, 75, 0.4);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
}

.order-form input:focus,
.order-form select:focus,
.order-form textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.order-form select { appearance: auto; }
.order-form select option { color: #000; background: #fff; }

.order-total {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0.75rem;
  border: 1px dashed var(--card-border);
  border-radius: 8px;
}

.order-total span { color: var(--gold-bright); font-size: 1.4rem; }

.order-fine {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: center;
  margin: 0;
}

.hidden-field { position: absolute; left: -9999px; }

/* ---------- Splash / footer ---------- */

.splash {
  display: block;
  width: 100%;
  max-width: 1100px;
  margin: 2rem auto 0;
}

.site-footer {
  background: rgba(6, 2, 2, 0.9);
  border-top: 1px solid var(--card-border);
  margin-top: 2rem;
  padding: 2rem 1rem;
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
  text-align: center;
}

@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; text-align: left; }
}

.site-footer h3 {
  color: var(--gold-bright);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.site-footer p { margin: 0.25rem 0; font-size: 0.92rem; color: var(--text-dim); }

.social-row {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
}

@media (min-width: 700px) { .social-row { justify-content: flex-start; } }

.social-row img { width: 32px; height: 32px; }

.copyright {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 2rem;
  letter-spacing: 0.06em;
}

/* ---------- Privacy page ---------- */

.prose { max-width: 760px; margin: 0 auto; }
.prose h1 { color: var(--gold-bright); }
.prose strong { color: var(--gold-bright); }

/* ---------- Thanks page ---------- */

.thanks-wrap {
  max-width: 560px;
  margin: 3rem auto;
  text-align: center;
}
