/* Historical Connect — Premium Black & Gold Theme */
/* Production-ready: external stylesheet, safe to minify before deploy */

:root {
  --black: #0a0a0a;
  --black-soft: #111111;
  --black-card: #161616;
  --gold: #c9a84c;
  --gold-light: #e8d48b;
  --gold-dark: #9a7b2e;
  --gold-glow: rgba(201, 168, 76, 0.25);
  --text: #e8e4dc;
  --text-muted: #9a958a;
  --border: rgba(201, 168, 76, 0.2);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --max-width: 1200px;
  --section-pad: clamp(4rem, 8vw, 7rem);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--gold-light);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ── Typography ── */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--gold-light);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 600px;
}

/* ── Layout ── */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

section {
  padding: var(--section-pad) 0;
}

/* ── Navigation ── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.85rem 0;
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.18);
  transition: background 0.3s, border-color 0.3s;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
}

.nav-logo {
  flex-shrink: 0;
}

.nav-logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: opacity 0.3s;
}

.nav-logo:hover img {
  opacity: 0.85;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  margin-left: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  list-style: none;
}

.nav-links a {
  position: relative;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--gold-light);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.75rem;
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 6px;
  color: var(--text);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s, background 0.3s;
}

.nav-store-btn:hover {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.06);
  box-shadow: 0 0 16px rgba(201, 168, 76, 0.15);
  color: var(--text);
  transform: translateY(-1px);
}

.nav-store-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--gold-light);
}

.nav-store-btn-text {
  text-align: left;
  line-height: 1.2;
}

.nav-store-btn-text small {
  display: block;
  font-size: 0.5rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav-store-btn-text strong {
  font-size: 0.7rem;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 6px;
  cursor: pointer;
  padding: 0.5rem;
  transition: border-color 0.3s;
}

.nav-toggle:hover {
  border-color: var(--gold);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--gold);
  margin: 4px 0;
  transition: 0.3s;
}

/* ── Hero ── */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  padding: 5.5rem 0 2.5rem;
  overflow: hidden;
  background: linear-gradient(165deg, #050505 0%, #080808 45%, #0a0a0a 100%);
}

.hero-ambient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 70% at 28% 48%, rgba(201, 168, 76, 0.13), transparent 65%),
    radial-gradient(ellipse 40% 55% at 68% 50%, rgba(201, 168, 76, 0.06), transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-composition {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3rem);
}

.hero-visual {
  flex: 0 0 45%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-circle {
  position: relative;
  width: clamp(300px, 34vw, 460px);
  height: clamp(300px, 34vw, 460px);
}

.hero-circle-glow {
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(201, 168, 76, 0.28) 0%,
    rgba(201, 168, 76, 0.08) 40%,
    transparent 68%
  );
  animation: heroGlowPulse 5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroGlowPulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

.hero-particles span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  animation: particleFloat 6s ease-in-out infinite;
}

.hero-particles span:nth-child(1) { top: 8%; left: 18%; animation-delay: 0s; }
.hero-particles span:nth-child(2) { top: 22%; right: 10%; animation-delay: 0.8s; width: 2px; height: 2px; }
.hero-particles span:nth-child(3) { bottom: 30%; left: 6%; animation-delay: 1.6s; }
.hero-particles span:nth-child(4) { bottom: 12%; right: 20%; animation-delay: 2.4s; width: 2px; height: 2px; }
.hero-particles span:nth-child(5) { top: 50%; left: 2%; animation-delay: 3.2s; }
.hero-particles span:nth-child(6) { top: 40%; right: 4%; animation-delay: 1.2s; width: 2px; height: 2px; }
.hero-particles span:nth-child(7) { bottom: 45%; right: 8%; animation-delay: 4s; }
.hero-particles span:nth-child(8) { top: 65%; left: 12%; animation-delay: 2s; width: 2px; height: 2px; }

@keyframes particleFloat {
  0%, 100% { opacity: 0; transform: translateY(0); }
  30% { opacity: 0.5; }
  50% { opacity: 0.35; transform: translateY(-8px); }
  70% { opacity: 0.15; }
}

.hero-circle-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 76, 0.5);
  box-shadow:
    0 0 50px rgba(201, 168, 76, 0.18),
    0 0 100px rgba(201, 168, 76, 0.08),
    inset 0 0 50px rgba(201, 168, 76, 0.05);
}

.hero-circle-inner {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(201, 168, 76, 0.04), transparent 70%);
}

.hero-emblem {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  -webkit-mask-image: radial-gradient(circle, #000 68%, transparent 76%);
  mask-image: radial-gradient(circle, #000 68%, transparent 76%);
}

.hero-copy {
  flex: 0 0 55%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  line-height: 1.08;
  margin-bottom: 0;
  color: var(--gold-light);
  letter-spacing: -0.01em;
}

.hero-title-gold {
  background: linear-gradient(135deg, #e8d48b 0%, #c9a84c 45%, #9a7b2e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-divider {
  width: 72px;
  height: 1px;
  margin: 1rem 0 1.25rem;
  background: linear-gradient(90deg, var(--gold), rgba(201, 168, 76, 0.2));
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  color: var(--text);
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 0.65rem;
}

.hero-support {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.3vw, 1rem);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.75rem;
  max-width: 460px;
}

.hero-buttons--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: flex-start;
  margin-bottom: 0;
}

.store-btn--hero {
  padding: 0.85rem 1.65rem;
  min-height: 58px;
  border-radius: 10px;
  border-color: rgba(201, 168, 76, 0.3);
  background: rgba(10, 10, 10, 0.7);
}

.store-btn--hero svg {
  width: 26px;
  height: 26px;
}

.store-btn--hero .store-btn-text strong {
  font-size: 1.05rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
}

.store-btn:hover {
  border-color: var(--gold);
  box-shadow: 0 0 20px var(--gold-glow);
  color: var(--text);
  transform: translateY(-2px);
}

.store-btn svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.store-btn-text {
  text-align: left;
  line-height: 1.3;
}

.store-btn-text small {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.store-btn-text strong {
  font-size: 1rem;
  font-weight: 600;
}

/* ── Features ── */

.features {
  background: var(--black-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.features-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 0 3rem;
  margin-bottom: 0.5rem;
}

.features-header .section-label {
  margin-bottom: 1.25rem;
}

.features-header .section-title {
  margin-bottom: 0;
}

.features-divider {
  width: 72px;
  height: 1px;
  margin: 1.5rem 0 1.75rem;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.features-subtitle {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1080px;
  margin: 0 auto;
}

.feature-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 240px;
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.75rem;
  text-align: center;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.feature-card:hover {
  border-color: rgba(201, 168, 76, 0.45);
  box-shadow: 0 0 28px rgba(201, 168, 76, 0.12);
  transform: translateY(-4px);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--black);
  flex-shrink: 0;
}

.feature-icon svg {
  width: 26px;
  height: 26px;
}

.feature-card h3 {
  margin-bottom: 0.75rem;
  color: var(--gold-light);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
  line-height: 1.6;
}

/* ── Application Preview ── */

.preview {
  background: var(--black);
  border-top: 1px solid var(--border);
  padding: clamp(2.5rem, 4vw, 3.5rem) 0;
}

.preview-container {
  max-width: 1220px;
}

.preview-composition {
  display: flex;
  align-items: center;
  gap: clamp(1.75rem, 3.5vw, 3rem);
}

.preview-copy {
  flex: 0 0 42%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.preview-copy .section-label {
  margin-bottom: 0.85rem;
}

.preview-copy .section-title {
  margin-bottom: 0;
}

.preview-divider {
  width: 72px;
  height: 1px;
  margin: 1rem 0 1.15rem;
  background: linear-gradient(90deg, var(--gold), rgba(201, 168, 76, 0.2));
}

.preview-subtitle {
  max-width: 400px;
  margin: 0;
  text-align: left;
}

.preview-showcase {
  position: relative;
  flex: 0 0 58%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.preview-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(300px, 36vw, 420px);
  height: clamp(440px, 52vw, 640px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    ellipse,
    rgba(201, 168, 76, 0.16) 0%,
    rgba(201, 168, 76, 0.05) 45%,
    transparent 72%
  );
  pointer-events: none;
}

.phone-mockup {
  position: relative;
  z-index: 1;
  max-width: 100%;
}

.phone-frame {
  width: clamp(310px, 30vw, 340px);
  max-width: 100%;
  padding: 10px;
  border-radius: 44px;
  background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
  border: 1px solid rgba(201, 168, 76, 0.35);
  box-shadow:
    0 0 36px rgba(201, 168, 76, 0.14),
    0 20px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.phone-screen {
  border-radius: 36px;
  overflow: hidden;
  background: #050505;
  line-height: 0;
}

.phone-screenshot {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* ── CTA Banner ── */

.cta-banner {
  text-align: center;
  background: linear-gradient(135deg, var(--black-card), var(--black-soft));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(3rem, 6vw, 5rem) 2rem;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, var(--gold-glow), transparent 70%);
  pointer-events: none;
}

.cta-banner h2 {
  position: relative;
  margin-bottom: 1rem;
}

.cta-banner p {
  position: relative;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ── FAQ ── */

.faq-list {
  max-width: 800px;
  margin: 3rem auto 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--gold-light);
  transition: color 0.2s;
}

.faq-question:hover {
  color: var(--gold);
}

.faq-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--gold);
  transition: transform 0.3s;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding-bottom: 1.5rem;
}

.faq-answer p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── Footer ── */

.footer {
  background: var(--black-soft);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
}

.footer-brand img {
  width: 44px;
  height: auto;
  object-fit: contain;
  display: block;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.875rem;
  max-width: 300px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Policy Pages ── */

.policy-page {
  padding-top: 8rem;
  padding-bottom: 4rem;
  min-height: 100vh;
}

.policy-header {
  text-align: center;
  margin-bottom: 3rem;
}

.policy-header h1 {
  margin-bottom: 0.5rem;
}

.policy-date {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.policy-content {
  max-width: 760px;
  margin: 0 auto;
}

.policy-content h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  color: var(--gold);
}

.policy-content p,
.policy-content li {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.policy-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.policy-content li {
  margin-bottom: 0.5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.back-link:hover {
  color: var(--gold-light);
}

.back-link svg {
  width: 16px;
  height: 16px;
}

/* ── Responsive ── */

@media (max-width: 1024px) {
  .nav-store-btn-text small {
    display: none;
  }

  .nav-store-btn {
    padding: 0.45rem 0.6rem;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    z-index: 99;
    flex-direction: column;
    align-items: stretch;
    background: rgba(5, 5, 5, 0.98);
    padding: 1.5rem;
    border-bottom: 1px solid rgba(201, 168, 76, 0.18);
    gap: 1.25rem;
    margin-left: 0;
  }

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

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .nav-actions {
    flex-direction: column;
    width: 100%;
  }

  .nav-store-btn {
    width: 100%;
    justify-content: center;
    padding: 0.6rem 1rem;
  }

  .nav-store-btn-text small {
    display: block;
  }

  .nav-toggle {
    display: block;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-links {
    justify-content: center;
  }

  .hero-composition {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .hero-visual,
  .hero-copy {
    flex: 0 0 auto;
    width: 100%;
  }

  .hero-copy {
    text-align: center;
    align-items: center;
  }

  .hero-circle {
    width: clamp(240px, 58vw, 320px);
    height: clamp(240px, 58vw, 320px);
  }

  .hero-divider {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-support {
    max-width: 360px;
  }

  .hero-buttons--inline {
    justify-content: center;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .store-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 640px;
  }

  .preview-composition {
    flex-direction: column;
    gap: 1.75rem;
  }

  .preview-copy {
    flex: 0 0 auto;
    width: 100%;
    text-align: center;
    align-items: center;
  }

  .preview-subtitle {
    text-align: center;
    max-width: 400px;
  }

  .preview-divider {
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
  }

  .preview-showcase {
    flex: 0 0 auto;
    width: 100%;
  }

  .phone-frame {
    width: clamp(300px, 72vw, 380px);
  }
}

@media (max-width: 480px) {
  .features-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
  }

  .features-header {
    padding: 1.5rem 0 2.5rem;
  }

  .phone-frame {
    width: 85vw;
    min-width: 82vw;
    max-width: 88vw;
  }
}
