@import url('https://fonts.googleapis.com/css2?family=Reenie+Beanie&family=Special+Elite&display=swap');

:root {
  --parchment: #f4edd9;
  --parchment-dark: #e8debe;
  --leather: #4e301d;
  --ink: #2c1f17;
  --ink-light: #524035;
  --coral: #d35400;
  --seafoam: #769382;
  --seafoam-dark: #4d6657;
  --shadow: 0 20px 45px rgba(44, 31, 23, 0.16);
  --line: rgba(78, 48, 29, 0.15);
  --line-dashed: rgba(78, 48, 29, 0.25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
  margin: 0; 
  color: var(--ink); 
  background: #201712 url('https://images.unsplash.com/photo-1544924222-35598d979352?auto=format&fit=crop&w=1200&q=80') center/cover no-repeat;
  font-family: "Special Elite", system-ui, monospace; 
  line-height: 1.6; 
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }

/* Book Scrapbook Container */
.book-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 20px;
  background: rgba(15, 10, 8, 0.85); /* darken wood table background */
  backdrop-filter: blur(2px);
}

.book-header {
  max-width: 1240px;
  margin: 0 auto 30px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px dashed var(--parchment);
  padding-bottom: 15px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--parchment);
}
.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid var(--parchment);
  border-radius: 50%;
  font-size: 24px;
}
.brand strong {
  font-size: 20px;
  letter-spacing: 0.05em;
}
.header-nav {
  display: flex;
  gap: 25px;
}
.header-nav a {
  color: var(--parchment-dark);
  font-size: 13px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.2s;
}
.header-nav a:hover, .header-nav a.active {
  color: #fff;
}

/* Double-page book spread */
.book-spread {
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--parchment);
  border: 12px solid var(--leather);
  border-radius: 8px;
  box-shadow: var(--shadow);
  position: relative;
}

/* Page binding line */
.book-spread::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  background: linear-gradient(90deg, rgba(0,0,0,0.15), rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.15));
  border-left: 1px solid rgba(0,0,0,0.25);
  border-right: 1px solid rgba(0,0,0,0.25);
  pointer-events: none;
}

.left-page, .right-page {
  padding: 40px;
  background: radial-gradient(circle at center, var(--parchment), var(--parchment-dark));
  position: relative;
}
.left-page {
  border-right: 1px dashed rgba(78, 48, 29, 0.15);
}

.page-title {
  font-size: 28px;
  margin: 0 0 20px;
  border-bottom: 2px dashed var(--line);
  padding-bottom: 10px;
  color: var(--leather);
}

/* Canvas Area */
.canvas-frame {
  position: relative;
  aspect-ratio: 45/27;
  overflow: hidden;
  border: 3px solid var(--leather);
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  background: #3e5a6f;
  margin-bottom: 24px;
}
#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

/* Game overlays */
.game-overlay {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: none;
  place-items: center;
  align-content: center;
  padding: 24px;
  text-align: center;
  background: rgba(44, 31, 23, 0.95);
  color: var(--parchment);
}
.game-overlay.open {
  display: grid;
}
.game-overlay h3 {
  font-size: 32px;
  margin: 0 0 10px;
}
.game-overlay p {
  font-size: 13px;
  color: var(--parchment-dark);
  max-width: 420px;
  margin: 0 auto 20px;
}

.atlas-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 24px;
  border: 2px solid var(--coral);
  border-radius: 4px;
  background: var(--coral);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transition: all 0.2s;
  text-transform: uppercase;
}
.atlas-button:hover {
  background: #b84500;
}
.atlas-button.outline {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}
.atlas-button.outline:hover {
  background: var(--ink);
  color: var(--parchment);
}

/* Dials Stats Layout */
.stats-dials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.dial-card {
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--line);
  padding: 12px 10px;
  text-align: center;
  border-radius: 4px;
}
.dial-card small {
  display: block;
  font-size: 9px;
  color: var(--ink-light);
}
.dial-card strong {
  display: block;
  font-size: 20px;
  margin-top: 4px;
  color: var(--leather);
}

/* Right Page Clue wanted block */
.clue-banner {
  background: rgba(255, 255, 255, 0.4);
  border: 2px dashed var(--line);
  padding: 15px 20px;
  margin-bottom: 24px;
  border-radius: 4px;
}
.clue-details {
  display: flex;
  justify-content: space-around;
  gap: 15px;
}
.clue-details-col {
  text-align: center;
}
.clue-details-col dt {
  font-size: 9px;
  color: var(--ink-light);
}
.clue-details-col dd {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--coral);
}

/* Captain's handwritten logbook diary */
.logbook-panel {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: 4px;
  margin-bottom: 24px;
}
.logbook-panel h3 {
  margin: 0 0 10px;
  font-size: 16px;
  border-bottom: 1.5px dashed var(--line);
  padding-bottom: 6px;
}
.logbook-entries {
  height: 120px;
  overflow-y: auto;
  font-family: "Reenie Beanie", cursive;
  font-size: 24px;
  line-height: 1.1;
  color: #1a2a6c; /* blue ink feel */
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.logbook-entries p {
  margin: 0;
  border-bottom: 1px dashed rgba(26, 42, 108, 0.15);
  padding-bottom: 2px;
}

/* Guide list styles */
.guide-list {
  padding: 0;
  margin: 0 0 24px;
  list-style: none;
  font-size: 13px;
}
.guide-list li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 20px;
}
.guide-list li::before {
  content: "•";
  position: absolute;
  left: 5px;
  color: var(--coral);
}

/* Contact form styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  border-top: 2px dashed var(--line);
  padding-top: 24px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 10px;
  text-transform: uppercase;
}
.form-group input, .form-group textarea {
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  border-radius: 4px;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--coral);
}
.contact-form .atlas-button {
  align-self: flex-start;
}

/* Bottom Footer (Book layout) */
.book-footer {
  max-width: 1240px;
  margin: 30px auto 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 2px dashed var(--parchment);
  padding-top: 15px;
  color: var(--parchment-dark);
  font-size: 11px;
}
.book-footer a {
  text-decoration: none;
}
.book-footer a:hover {
  color: #fff;
}

.toast {
  position: fixed; 
  z-index: 120; 
  left: 50%; 
  bottom: 24px; 
  transform: translate(-50%, 18px); 
  padding: 10px 20px; 
  border: 2px solid var(--leather); 
  background: var(--parchment); 
  color: var(--ink); 
  box-shadow: var(--shadow); 
  font-size: 12px; 
  font-weight: 700; 
  opacity: 0; 
  pointer-events: none; 
  transition: .2s;
  border-radius: 4px;
}
.toast.show { 
  opacity: 1; 
  transform: translate(-50%, 0); 
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  z-index: 110;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 15px 24px;
  background: var(--parchment);
  border-top: 3px solid var(--leather);
  box-shadow: 0 -8px 25px rgba(0,0,0,0.25);
  display: none;
}
.cookie-banner.show {
  display: block;
}
.cookie-content {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}
.cookie-content p {
  margin: 0;
  font-size: 12px;
  color: var(--ink-light);
}
.cookie-content .atlas-button {
  min-height: 38px;
  padding: 0 16px;
  box-shadow: none;
}

/* Pricing Page Styles inside Book spread */
.pricing-spread {
  grid-template-columns: 1fr; /* single full-width column inside pricing book spread */
}
.pricing-section {
  padding: 10px;
}
.pricing-heading {
  text-align: center;
  margin-bottom: 40px;
  border-bottom: 2px dashed var(--line);
  padding-bottom: 20px;
}
.pricing-heading h1 {
  font-size: 36px;
  margin: 0 0 10px;
  color: var(--leather);
}
.pricing-heading p {
  color: var(--ink-light);
  font-size: 14px;
  max-width: 600px;
  margin: 0 auto;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.price-card {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: 4px;
  transition: all 0.2s;
}
.price-card:hover {
  transform: translateY(-4px);
  border-color: var(--coral);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.price-card.popular {
  border: 2px solid var(--coral);
  background: rgba(255, 255, 255, 0.65);
}
.card-inner {
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.price-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  color: var(--leather);
}
.price-card .price {
  font-size: 32px;
  color: var(--coral);
  margin: 0 0 15px;
  font-weight: 700;
}
.price-card .price span {
  font-size: 12px;
  color: var(--ink-light);
}
.price-card .desc {
  font-size: 12px;
  color: var(--ink-light);
  margin-bottom: 20px;
  min-height: 45px;
}
.features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 25px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px dashed var(--line);
  padding-top: 15px;
}
.features-list li {
  font-size: 12px;
  position: relative;
  padding-left: 15px;
}
.features-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--seafoam-dark);
}
.price-card .atlas-button {
  margin-top: auto;
  width: 100%;
}
.ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--coral);
  color: #fff;
  font-size: 9px;
  padding: 5px 12px;
  border-radius: 4px;
}

/* Modal form style */
.modal-overlay {
  position: fixed;
  z-index: 150;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open {
  display: flex;
}
.checkout-modal {
  background: var(--parchment);
  border: 4px solid var(--leather);
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow);
  padding: 24px;
  position: relative;
  border-radius: 4px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px dashed var(--line);
  padding-bottom: 10px;
  margin-bottom: 15px;
}
.modal-header h2 {
  margin: 0;
  font-size: 22px;
}
.close-btn {
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--ink-light);
}
.order-summary {
  background: rgba(0,0,0,0.03);
  border: 1px dashed var(--line);
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.price-tag {
  color: var(--coral);
  font-weight: 700;
}
.billing-disclosure {
  font-size: 9px;
  color: var(--ink-light);
  line-height: 1.4;
  margin: 10px 0;
}

/* About/Terms Page spread columns */
.about-page-spread {
  grid-template-columns: 1fr;
}
.legal-main {
  padding: 10px;
}
.legal-copy {
  max-width: 900px;
  margin: 0 auto;
}
.legal-copy h2 {
  margin-top: 30px;
  border-bottom: 1.5px dashed var(--line);
  padding-bottom: 6px;
}
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--coral);
  font-size: 12px;
  text-decoration: none;
}

@media(max-width: 960px) {
  .book-spread {
    grid-template-columns: 1fr;
  }
  .left-page {
    border-right: 0;
    border-bottom: 2px dashed var(--line);
  }
  .book-spread::after {
    display: none; /* remove page crease */
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}
@media(max-width: 650px) {
  .book-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  .left-page, .right-page {
    padding: 20px;
  }
  .stats-dials {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .cookie-content {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important}}
