/* ============================================================
   DigitalBuilds.org — base styles
   Plain CSS, no build step required. Organized top to bottom:
   variables -> reset -> layout -> components -> page-specific
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Source+Sans+3:wght@400;500;600&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg: #ecda8e;
  --bg-alt: #fffbea;
  --text: #241d0a;
  --text-muted: #3d3420;
  --border: #d8c989;
  --accent: #a8531b;
  --accent-hover: #7c3d14;
  --success: #2f7a4f;
  --radius: 2px;
  --max-width: 1080px;
  --font: 'Source Sans 3', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Rajdhani', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(80, 66, 24, 0.5) 0px,
    rgba(80, 66, 24, 0.5) 1px,
    transparent 1px,
    transparent 26px
  );
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header / nav ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
}
.logo:hover { text-decoration: none; }

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}
.nav-links a:hover { color: var(--text); }

/* ---------- hero ---------- */

.hero {
  padding-top: 80px;
  padding-bottom: 60px;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.8rem;
  text-transform: uppercase;
  margin: 0 0 16px;
  letter-spacing: 0.01em;
}

.platform-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.platform-badge {
  position: relative;
  overflow: hidden;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text);
  padding: 18px 20px 10px;
  border-radius: 12px;
  border-bottom: 3px solid #143d16;
  background: linear-gradient(180deg, #dcf7dd 0%, #58c95e 24%, #3f9e44 58%, #1f6b23 100%);
  box-shadow:
    0 4px 8px rgba(10, 30, 10, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -8px 12px -6px rgba(0, 30, 5, 0.35);
  transition: background 0.15s ease, transform 0.08s ease, box-shadow 0.08s ease;
}
.platform-badge::before {
  content: '';
  position: absolute;
  top: 8%;
  left: 6%;
  right: 6%;
  height: 24%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.45) 100%);
  pointer-events: none;
}
.platform-badge::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 10%;
  height: 22%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  filter: blur(3px);
  pointer-events: none;
}
.platform-badge:hover {
  text-decoration: none;
  background: linear-gradient(180deg, #ecfdec 0%, #6ad86f 24%, #4aac4f 58%, #235f26 100%);
  transform: scale(1.05);
  box-shadow:
    0 6px 11px rgba(10, 30, 10, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -8px 12px -6px rgba(0, 30, 5, 0.4);
}
.platform-badge:active {
  transform: scale(1.01) translateY(2px);
  border-bottom-width: 1px;
  box-shadow:
    0 1px 2px rgba(10, 30, 10, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.platform-sub {
  position: relative;
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 3px;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- product sections ---------- */

.section {
  padding-top: 48px;
  padding-bottom: 48px;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.5rem;
  margin: 0 0 8px;
}

.section-subtitle {
  color: var(--text-muted);
  margin: 0 0 32px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 60ch;
  margin: 12px 0 32px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.product-card {
  border: 1px solid #2c5170;
  border-radius: 14px;
  padding: 24px;
  background: #17303f;
  display: flex;
  flex-direction: column;
}

.product-card h3 {
  color: #e7eef2;
}

.product-card .badge {
  color: #e2992f;
  border-color: rgba(226, 153, 47, 0.4);
}

.product-card .price {
  color: #e2992f;
}

.ebook-cover {
  width: 120px;
  margin: 0 0 16px;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: transparent;
  border: 1px solid rgba(168, 83, 27, 0.4);
  padding: 4px 9px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  width: fit-content;
}

.product-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.product-card .price {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 12px 0 16px;
}

.product-card p.desc {
  color: #92a9b8;
  font-size: 0.95rem;
  flex-grow: 1;
  margin: 0 0 16px;
}

.pain-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0 0 0 24px;
}

.pain-list li {
  position: relative;
  padding: 7px 0 7px 22px;
  border-bottom: 1px dotted var(--border);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.pain-list li:last-child { border-bottom: none; }

.pain-list li::before {
  content: '✗';
  position: absolute;
  left: 0;
  top: 7px;
  color: #d9694f;
  font-weight: 700;
}

.fix-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0 0 0 24px;
}

.fix-list li {
  position: relative;
  padding: 7px 0 7px 22px;
  border-bottom: 1px dotted var(--border);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.fix-list li:last-child { border-bottom: none; }

.fix-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 7px;
  color: var(--success);
  font-weight: 700;
}

.apps-list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0 0 0 24px;
}

.apps-list li {
  position: relative;
  padding: 7px 0 7px 22px;
  border-bottom: 1px dotted var(--border);
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.apps-list li:last-child { border-bottom: none; }

.apps-list li::before {
  content: '•';
  position: absolute;
  left: 4px;
  top: 5px;
  color: var(--accent);
  font-weight: 700;
}

.product-card .card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: auto;
}

.product-card .card-actions .btn {
  flex: 0 0 auto;
  min-width: 0;
  width: 116px;
  padding-left: 16px;
  padding-right: 16px;
  white-space: nowrap;
}


/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  min-width: 140px;
  padding: 15px 26px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, transform 0.08s ease, box-shadow 0.08s ease;
}

.btn:hover { text-decoration: none; }

.btn:active { transform: scale(1.01) translateY(2px); }

.btn-primary,
.btn-secondary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #dcf7dd 0%, #58c95e 24%, #3f9e44 58%, #1f6b23 100%);
  color: var(--text);
  border-bottom: 3px solid #143d16;
  box-shadow:
    0 4px 8px rgba(10, 30, 10, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -8px 12px -6px rgba(0, 30, 5, 0.35);
}
.btn-primary::before,
.btn-secondary::before {
  content: '';
  position: absolute;
  top: 8%;
  left: 6%;
  right: 6%;
  height: 24%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.45) 100%);
  pointer-events: none;
}
.btn-primary::after,
.btn-secondary::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 10%;
  height: 22%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  filter: blur(3px);
  pointer-events: none;
}
.btn-primary:hover,
.btn-secondary:hover {
  background: linear-gradient(180deg, #ecfdec 0%, #6ad86f 24%, #4aac4f 58%, #235f26 100%);
  transform: scale(1.05);
  box-shadow:
    0 6px 11px rgba(10, 30, 10, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -8px 12px -6px rgba(0, 30, 5, 0.4);
}
.btn-primary:active,
.btn-secondary:active {
  border-bottom-width: 1px;
  box-shadow:
    0 1px 2px rgba(10, 30, 10, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-block { display: block; width: 100%; }

/* ---------- product detail page ---------- */

.product-detail {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  padding-top: 56px;
  padding-bottom: 56px;
  align-items: start;
}

@media (max-width: 720px) {
  .product-detail { grid-template-columns: 1fr; }
}

.product-detail .buy-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--bg-alt);
  position: sticky;
  top: 90px;
}

.product-detail .buy-box .price {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 4px;
}

.product-detail .buy-box .price-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 0 20px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.feature-list li {
  padding-left: 22px;
  position: relative;
  margin-bottom: 10px;
  color: var(--text-muted);
}
.feature-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

/* ---------- numbered step-by-step instructions (order matters, unlike feature-list) ---------- */

.step-list {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 20px 0;
}
.step-list li {
  counter-increment: step;
  padding-left: 34px;
  position: relative;
  margin-bottom: 14px;
  color: var(--text-muted);
}
.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--bg);
  border: 2px solid var(--accent);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- simple message pages (success / cancel) ---------- */

.message-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}

.message-page .icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.message-page h1 {
  margin: 0 0 12px;
  font-size: 1.8rem;
}

.message-page p {
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto 24px;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- desktop / phone view toggle ---------- */

.view-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 2px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  z-index: 1000;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.view-btn {
  border: none;
  background: none;
  font-size: 16px;
  line-height: 1;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.view-btn.active {
  background: #4caf50;
  color: var(--text);
}

#phone-frame {
  display: none;
  justify-content: center;
  padding: 80px 24px;
}

.phone-shell {
  width: 390px;
  height: 844px;
  background: #000;
  border-radius: 44px;
  padding: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.phone-shell iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 30px;
  background: var(--bg);
}

body.phone-view .wrap { display: none; }
body.phone-view #phone-frame { display: flex; }
