/* ── Reset & Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --mahogany:   #3d1f0a;
  --mahogany2:  #4a2810;
  --card-bg:    #2e1608;
  --brass:      #d4af37;
  --dim-brass:  #a8956a;
  --pale-brass: #c8b89a;
  --cream:      #e8ddb5;
  --text:       #c0aa88;
  --muted:      #8a7a62;
  --border:     rgba(212,175,55,0.22);
}

html { scroll-behavior: smooth; }

body {
  background-color: #3d1f0a;
  background-image:
    linear-gradient(165deg, #5a3018 0%, #3a1c08 40%, #4a2810 70%, #2e1508 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 17px;
  line-height: 1.7;
}

a { color: var(--brass); text-decoration: none; }
a:hover { color: var(--cream); }

/* ── Typography ───────────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: 'Georgia', serif;
  color: var(--cream);
  letter-spacing: 0.03em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.1rem; color: var(--brass); margin-bottom: 0.5rem; }

.section-title { text-align: center; margin-bottom: 0.6rem; }
.section-sub   { text-align: center; color: var(--muted); margin-bottom: 2.5rem; font-size: 1rem; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
.btn-primary  { background: linear-gradient(135deg, #c9a227, #a8810f); color: #1a1209; border: none; box-shadow: 0 4px 16px rgba(212,175,55,0.30); }
.btn-secondary { background: transparent; color: var(--cream); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--brass); color: var(--brass); }
.btn-icon { font-size: 1.4rem; }
.btn small { display: block; font-size: 0.65rem; font-weight: 400; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.08em; }
.download-buttons { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 2rem; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  padding: 60px 32px 56px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(160deg, #6b3e1a 0%, #5a3214 12%, #4a2810 30%,
                    #5c3418 50%, #472a10 65%, #3a2008 80%, #4e2e12 100%);
}
.hero-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-text { flex: 1; min-width: 280px; max-width: 480px; }
.app-icon {
  width: 80px; height: 80px;
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.7), 0 0 0 1px rgba(212,175,55,0.2);
  margin-bottom: 16px;
  display: block;
}
.hero-text .subtitle {
  font-size: 1rem;
  color: var(--brass);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 4px;
  margin-bottom: 14px;
}
.tagline { color: var(--cream); font-size: 1.05rem; line-height: 1.65; margin-bottom: 10px; }
.tagline-detail { color: var(--cream); font-size: 1.05rem; line-height: 1.65; }

/* ── Decorative Rotor Panel ───────────────────────────────────────── */
.rotor-panel-demo {
  flex-shrink: 0;
  background:
    linear-gradient(160deg,
      #6b2d1a 0%, #4f1e0d 18%, #5c2415 45%, #3e1609 68%, #4f1e0d 100%
    );
  border: 6px solid #7a5a1e;
  border-radius: 12px;
  padding: 18px 20px 14px;
  box-shadow:
    0 0 0 1px rgba(212,175,55,0.15),
    0 12px 40px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,220,100,0.1);
  position: relative;
}

/* Wood grain texture overlay */
.rotor-panel-demo::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    rgba(255,255,255,0.006) 1px,
    rgba(255,255,255,0.006) 2px
  );
  pointer-events: none;
}

.panel-nameplate {
  text-align: center;
  font-family: 'Courier New', monospace;
  font-size: 0.62rem;
  font-weight: bold;
  letter-spacing: 0.22em;
  color: #f0d070;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(212,175,55,0.25);
}

.rotors-row-demo {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.rotor-unit-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.rotor-label-demo {
  font-size: 0.58rem;
  color: #9a8866;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: bold;
  font-family: -apple-system, sans-serif;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.rotor-info-demo {
  display: flex;
  gap: 4px;
  align-items: center;
}

.rotor-type-badge {
  font-size: 0.58rem;
  font-weight: bold;
  color: #4ecdc4;
  background: rgba(78,205,196,0.12);
  border: 1px solid rgba(78,205,196,0.35);
  border-radius: 3px;
  padding: 1px 4px;
  letter-spacing: 0.05em;
  font-family: 'Courier New', monospace;
}

.rotor-ring-badge {
  font-size: 0.55rem;
  font-weight: bold;
  color: #a89070;
  background: linear-gradient(145deg, #3a3530, #252018);
  border: 1px solid #5a5040;
  border-radius: 3px;
  padding: 1px 4px;
  letter-spacing: 0.04em;
  font-family: 'Courier New', monospace;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
}

/* Rotor assembly: [indicator] [housing] */
.rotor-assembly-demo {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Indicator frame with metal ears */
.indicator-frame-demo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 0;
}
.indicator-frame-demo::before,
.indicator-frame-demo::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #b8b4a8, #888478, #5e5c56);
  border: 1px solid #7a7870;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.45), 0 1px 4px rgba(0,0,0,0.55);
  z-index: 10;
}
.indicator-frame-demo::before { top: 0; }
.indicator-frame-demo::after  { bottom: 0; }

/* Oval indicator window */
.rotor-indicator-demo {
  width: 24px;
  height: 48px;
  background: #e8dca8;
  border: 2px solid #8a8878;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1px rgba(180,170,140,0.4),
    inset 0 2px 5px rgba(0,0,0,0.15),
    0 3px 10px rgba(0,0,0,0.7);
  position: relative;
  overflow: hidden;
}
.rotor-indicator-demo::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(0,0,0,0.06) 0%, transparent 100%);
  pointer-events: none;
}
.rotor-indicator-demo span {
  font-size: 0.95rem;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  color: #111;
  position: relative;
  z-index: 1;
}

/* Gear housing — dark slot with simulated teeth */
.rotor-housing-demo {
  width: 26px;
  height: 105px;
  background:
    linear-gradient(180deg,
      #0d0d0d 0%, #111 20%, #181818 50%, #111 80%, #0d0d0d 100%
    );
  border-radius: 5px;
  border: 2px solid #333;
  border-top-color: #222;
  border-bottom-color: #444;
  box-shadow:
    inset 0 4px 12px rgba(0,0,0,0.9),
    inset 0 -4px 12px rgba(0,0,0,0.9),
    inset 2px 0 8px rgba(0,0,0,0.5),
    inset -2px 0 8px rgba(0,0,0,0.5),
    0 2px 6px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}

/* Simulated teeth using repeating gradient */
.teeth-viewport-demo {
  position: absolute;
  top: 4px; bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  background: repeating-linear-gradient(
    180deg,
    #0a0a0a 0px,  #0a0a0a 2px,
    #2a2a2a 2px,  #2a2a2a 5px,
    #1a1a1a 5px,  #1a1a1a 7px,
    #323232 7px,  #323232 10px,
    #1e1e1e 10px, #1e1e1e 12px,
    #0a0a0a 12px, #0a0a0a 14px
  );
  border-radius: 2px;
}
/* Fade top/bottom of teeth */
.teeth-viewport-demo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(0,0,0,0.95) 0%,
    rgba(0,0,0,0.5) 8%,
    transparent 16%,
    transparent 84%,
    rgba(0,0,0,0.5) 92%,
    rgba(0,0,0,0.95) 100%
  );
  pointer-events: none;
}

/* Panel footer: reflector + plugboard labels */
.panel-footer-demo {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(212,175,55,0.2);
  flex-wrap: wrap;
}
.reflector-badge-demo {
  font-size: 0.58rem;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  color: #ffd700;
  background: rgba(255,215,0,0.08);
  border: 1px solid rgba(255,215,0,0.25);
  border-radius: 3px;
  padding: 2px 6px;
  letter-spacing: 0.06em;
}
.plugboard-badge-demo {
  font-size: 0.58rem;
  font-family: 'Courier New', monospace;
  color: #9a8866;
  border: 1px solid rgba(154,136,102,0.25);
  border-radius: 3px;
  padding: 2px 6px;
  letter-spacing: 0.04em;
}

/* ── The Machine + How It Works ───────────────────────────────────── */
.the-machine {
  padding: 70px 24px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--border);
}
.machine-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}
.machine-screenshot {
  width: 366px;
  flex-shrink: 0;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.65), 0 0 0 1px rgba(212,175,55,0.14);
}
.machine-text {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
}
.machine-text h2 { margin-bottom: 16px; }
.historical-wrap {
  margin-top: 24px;
}
.historical-img {
  width: 33%;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,175,55,0.15);
  display: block;
  margin: 0 auto;
}
.historical-caption {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: -apple-system, sans-serif;
  font-style: italic;
  margin-top: 6px;
  text-align: center;
}
.machine-text > p { color: var(--text); font-size: 1rem; line-height: 1.7; margin-bottom: 32px; }

.steps { display: flex; flex-direction: column; gap: 20px; }
.step { display: flex; gap: 18px; align-items: flex-start; }
.step-number {
  font-size: 1.6rem;
  font-weight: 700;
  color: rgba(212,175,55,0.30);
  font-family: 'Courier New', monospace;
  flex-shrink: 0;
  width: 40px;
  line-height: 1;
  padding-top: 2px;
}
.step-body h3 { color: var(--brass); margin-bottom: 4px; font-size: 1rem; }
.step-body p  { font-size: 0.92rem; color: var(--text); line-height: 1.6; }

/* ── Features + Screenshots ───────────────────────────────────────── */
.features {
  padding: 70px 24px;
  background: rgba(0,0,0,0.15);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 1020px;
  margin: 0 auto;
}
.feature-card {
  background: rgba(0,0,0,0.28);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
.feature-card:hover { border-color: rgba(212,175,55,0.50); transform: translateY(-3px); }

/* Screenshot shown at natural portrait ratio on the left */
.feature-card-img-wrap {
  flex: 1;
  overflow: hidden;
  border-right: 1px solid var(--border);
}
.feature-card-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}

/* Description on the right */
.feature-card-body {
  flex: 1;
  min-width: 0;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.feature-icon { font-size: 1.4rem; margin-bottom: 10px; color: var(--brass); }
.feature-card-body h3 { margin-bottom: 6px; font-size: 1rem; }
.feature-card-body p { color: var(--text); font-size: 0.88rem; line-height: 1.6; }

/* ── Mac Download ─────────────────────────────────────────────────── */
.mac-download {
  padding: 70px 24px;
  background: rgba(0,0,0,0.2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.mac-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}
.mac-screenshot {
  flex: 1;
  min-width: 280px;
  max-width: 500px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(212,175,55,0.12);
}
.mac-text { flex: 1; min-width: 260px; }
.mac-text h2 { margin-bottom: 16px; }
.mac-text p { margin-bottom: 24px; color: var(--text); }
.mac-note { font-size: 0.82rem; color: var(--muted); margin-top: 14px; margin-bottom: 0; font-family: -apple-system, sans-serif; }

/* ── App Store ────────────────────────────────────────────────────── */
.appstore-section { padding: 70px 24px; text-align: center; }
.appstore-badge-wrap { margin-top: 8px; }
.appstore-badge img { height: 54px; }
.appstore-badge:hover img { opacity: 0.85; }

/* ── Privacy ──────────────────────────────────────────────────────── */
.privacy {
  padding: 40px 24px;
  background: rgba(0,0,0,0.25);
  border-top: 1px solid var(--border);
}
.privacy-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.privacy-icon { font-size: 2rem; flex-shrink: 0; margin-top: 2px; }
.privacy h3 { color: var(--brass); margin-bottom: 6px; }
.privacy p { font-size: 0.95rem; color: var(--text); }

/* ── Footer ───────────────────────────────────────────────────────── */
footer {
  padding: 28px 24px;
  background: rgba(0,0,0,0.35);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.footer-link { color: var(--dim-brass); }
.footer-link:hover { color: var(--brass); }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .hero-inner { flex-direction: column; align-items: center; }
  .hero-text { text-align: center; }
  .download-buttons { justify-content: center; }
  .machine-inner { flex-direction: column; }
  .machine-screenshot { max-width: 100%; }
  .mac-inner { flex-direction: column; }
  .privacy-inner { flex-direction: column; }
  .rotors-row-demo { gap: 8px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { flex-direction: column; }
  .feature-card-img-wrap { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .feature-card-img { width: 100%; max-height: 260px; object-fit: cover; }
}
