:root {
  /* Pure Native Dark Palette */
  --bg-base: #000000;
  --bg-surface: #1C1C1E;
  --text-main: #F9FAFB;
  --text-muted: #A1A1A6;
  --text-faint: #6E6E73;
  --accent: #818CF8;
  --accent-hover: #6366F1;
  --success-green: #34c759;
  --border: #333336;
  --border-light: rgba(255,255,255,0.08);

  --font-sans: "Manrope", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

/* --- RESET & BASE --- */
html { box-sizing: border-box; background-color: var(--bg-base); scroll-behavior: smooth; }
*, *:before, *:after { box-sizing: inherit; }

body {
  margin: 0; padding: 0;
  color: var(--text-main); font-family: var(--font-sans);
  line-height: 1.6; font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; border-radius: 8px; }
a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }
hr { border: 0; border-top: 1px solid var(--border); margin: 60px 0; }

/* --- TYPOGRAPHY --- */
h1, h2, h3 { color: var(--text-main); margin: 0; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: 36px; margin-bottom: 24px; line-height: 1.2; }
h2 { font-size: 22px; margin-bottom: 12px; }
h3 { font-size: 16px; margin-bottom: 8px; }
p { margin: 0 0 20px 0; color: var(--text-muted); }
strong { color: var(--text-main); font-weight: 600; }
ul { margin: 0 0 24px 0; padding-left: 24px; color: var(--text-muted); }
li { margin-bottom: 8px; }

.mono-text { font-family: var(--font-mono); font-size: 13px; letter-spacing: -0.02em; }

/* --- NAVIGATION --- */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 32px; box-sizing: border-box;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text-main); }
.nav-logo svg { width: 16px; height: 16px; stroke: var(--text-main); stroke-width: 2.5; }

/* --- LAYOUT CONTAINERS --- */
/* Default 600px width for homepage */
.container { max-width: 600px; margin: 0 auto; padding: 120px 24px 80px 24px; }
/* Modifier: 680px width for text-heavy pages (Privacy/Terms/Support) */
.container-lg { max-width: 680px; }

.section-block { margin-bottom: 64px; }
.overview { margin-bottom: 76px; }
.section-label { color: var(--text-faint); margin-bottom: 16px; display: block; text-transform: uppercase; letter-spacing: 0.05em; }

/* --- BUTTONS --- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background-color: #FFFFFF; color: #000000;
  border-radius: 6px; font-weight: 600; font-size: 15px;
  padding: 12px 24px; border: none; cursor: pointer; text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.15);
}
.btn-primary:hover { background-color: #F3F4F6; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(0.97); }
.btn-primary svg { width: 18px; height: 18px; }

.btn-nav {
  background-color: transparent; color: var(--text-main); border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 16px; font-size: 13px; font-weight: 500;
  transition: background-color 0.2s;
}
.btn-nav:hover { background-color: var(--bg-surface); cursor: pointer; }

/* Give the overview button its 8px margin in CSS instead of inline HTML */
.overview .btn-primary {
  margin-top: 8px;
}

/* --- HERO ACTIONS & META --- */
.hero-actions {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px; /* Forces a hard 16px space between the button and the text block */
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 10px; /* Forces space between the reassurance text and the padlock specs */
}

.cta-reassurance {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5; /* Gives wrapped text room to breathe on small screens */
  color: var(--text-muted);
}

.specs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-faint);
  flex-wrap: wrap;
}

.specs-row svg {
  width: 14px;
  height: 14px;
  min-width: 14px;
  flex-shrink: 0;
  color: var(--text-muted);
}

/* --- HOMEPAGE SPECIFICS --- */
.app-shot-wrapper {
  margin: 40px 0; width: 100%; padding: 40px 40px 24px 40px;
  display: flex; justify-content: center;
  background: radial-gradient(circle at top, var(--bg-surface) 0%, var(--bg-base) 100%);
  border: 1px solid var(--border); border-bottom: none; border-radius: 12px;
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 90%);
  mask-image: linear-gradient(to bottom, black 40%, transparent 90%);
}
.app-shot-wrapper img { width: 100%; max-width: 450px; height: auto; border-radius: 15px 15px 0 0; box-shadow: 0 16px 32px rgba(0,0,0,0.8), 0 0 0 1px var(--border-light); }

.quote-block { border-radius: 8px; display: flex; gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--border); margin: 32px 0; }
.quote-text { font-size: 14px; color: var(--text-muted); margin: 0; }
.quote-author { color: var(--text-muted); font-size: 13px; font-weight: 500; }

.info-list { list-style: none; padding: 0; margin: 0 0 24px 0; border-left: 2px solid var(--border); padding-left: 20px; }
.info-list li { margin-bottom: 12px; }
.info-list li h3 { margin-bottom: 4px; color: var(--text-main); }
.info-list li p { font-size: 15px; margin: 0; }

.pricing-card { background: var(--bg-surface); border: 1px solid var(--border); padding: 24px 32px 32px 32px; border-radius: 8px; margin-top: 24px; }
.pricing-card p { color: #D1D5DB; font-size: 14px; line-height: 1.6; }
.price-amount { font-size: 40px; font-weight: 600; color: var(--text-main); line-height: 1; margin-bottom: 20px; }
.price-amount span { font-size: 15px; color: var(--text-muted); font-weight: 400; }

.check-list { list-style: none; padding: 0; margin: 0 0 24px 0; }
.check-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }
.check-list svg { width: 16px; height: 16px; stroke: var(--success-green); flex-shrink: 0; margin-top: 2px; }

.tech-specs { display: flex; gap: 16px; margin-top: 16px; color: var(--text-faint); }
.tech-specs span { display: flex; align-items: center; gap: 6px; }

/* --- EXISTING LAYOUT --- */
.about-creator {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 24px;
}

/* --- NEW WRAPPER --- */
.creator-img-wrapper {
  position: relative;
  flex-shrink: 0; /* Prevents the flexbox from squishing your 64px image */
  cursor: pointer;
}

/* --- YOUR IMAGE (With added color-reveal transition) --- */
.creator-img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.3s ease; /* Makes the color change buttery smooth */
}

/* EXTRA DELIGHT: Reveal the color photo when they hover! */
.creator-img-wrapper:hover .creator-img {
  filter: grayscale(0%);
}

/* --- THE SPEECH BUBBLE --- */
.hover-message {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: var(--bg-surface); /* Swapped to your surface variable */
  color: var(--text-main);             /* Swapped to your text variable */
  border: 1px solid var(--border-light); /* Added a subtle border for dark mode depth */
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8); /* Deepened shadow for pure black backgrounds */
  z-index: 10;
  margin-bottom: 10px;
}

/* The Invisible Bridge */
.hover-message::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 20px;
  background-color: transparent;
}

/* The little triangle pointing down */
.hover-message::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  /* Swapped the top border color to match the surface background */
  border-color: var(--bg-surface) transparent transparent transparent;
}

/* The Hover State */
.creator-img-wrapper:hover .hover-message {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* --- FAQ / DETAILS --- */
details { border-bottom: 1px solid var(--border); padding: 20px 0; }
details summary { cursor: pointer; font-size: 15px; font-weight: 500; color: var(--text-main); list-style: none; display: flex; justify-content: space-between; align-items: center; }
details summary::-webkit-details-marker { display: none; }
details p { font-size: 15px; margin-top: 12px; margin-bottom: 0; color: var(--text-muted); }
details summary::after {
  content: ''; width: 8px; height: 8px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: translateY(-2px) rotate(45deg); transition: transform 0.2s ease;
}
details[open] summary::after { transform: translateY(2px) rotate(225deg); }

/* --- FAQ ANIMATION --- */

/* 1. Define the fade and slide animation */
@keyframes revealDetails {
  from {
    opacity: 0;
    transform: translateY(-8px); /* Starts slightly pulled up */
  }
  to {
    opacity: 1;
    transform: translateY(0);    /* Settles into its natural place */
  }
}

/* 2. Apply the animation to the paragraph ONLY when the details tag is open */
details[open] p {
  animation: revealDetails 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Optional: Prevent the summary tag from highlighting blue on mobile tap */
details summary {
  -webkit-tap-highlight-color: transparent;
}

/* --- CONTACT BOX (Support Page) --- */
.contact-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  display: flex; flex-direction: column; align-items: flex-start;
  margin-bottom: 64px;
}
.contact-box h3 { margin: 0 0 12px 0; font-size: 18px; color: var(--text-main); }
.contact-box p { color: var(--text-muted); font-size: 15px; margin: 0 0 24px 0; line-height: 1.5; }

/* --- PRIVACY & TERMS SPECIFICS --- */
.last-updated { font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); display: block; margin-bottom: 48px; }
.tldr-box { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px 32px; margin-bottom: 48px; }
.tldr-box h3 { margin: 0 0 12px 0; font-size: 16px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); }
.tldr-box p { color: var(--text-main); font-size: 16px; line-height: 1.6; }

/* --- DOWNLOAD PAGE SPECIFICS --- */
body.page-download { display: flex; flex-direction: column; min-height: 100vh; align-items: center; justify-content: center; }
body.page-download .container {
  max-width: 500px; text-align: center; padding: 100px 24px 40px; /* Offset for fixed nav */
  animation: fadeIn 0.6s ease-out forwards;
}
.icon-wrapper {
  width: 64px; height: 64px; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 16px; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px auto;
}
.icon-wrapper svg { width: 32px; height: 32px; stroke: var(--text-main); stroke-width: 2; }

/* --- STATUS ICON MODIFIERS (Success/Cancelled Pages) --- */
.icon-wrapper.is-circle { border-radius: 50%; }
.icon-wrapper.is-success { background: rgba(52, 199, 89, 0.1); border-color: rgba(52, 199, 89, 0.2); }
.icon-wrapper.is-success svg { stroke: var(--success-green); }
.icon-wrapper.is-neutral svg { stroke: var(--text-muted); }

.steps { text-align: left; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.step { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.step:last-child { margin-bottom: 0; }
.step-number { background: #333336; color: var(--text-main); width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.step-text h3 { margin: 0 0 4px 0; font-size: 15px; font-weight: 600; }
.step-text p { margin: 0; font-size: 14px; color: var(--text-muted); line-height: 1.4; }
.fallback { margin-top: 32px; font-size: 13px; color: var(--text-muted); }
.fallback a { color: var(--text-main); text-decoration: underline; cursor: pointer; }
.hidden { display: none !important; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- FOOTER --- */
.footer { margin-top: 80px; padding-top: 40px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; color: var(--text-faint); }
.footer a { color: var(--text-faint); text-decoration: none; transition: color 0.2s ease; }
.footer a:hover { color: var(--text-muted); opacity: 1; }

/* --- ACCESSIBILITY: KEYBOARD FOCUS STATES --- */

/* 1. Remove the default browser outline so we can replace it */
*:focus {
  outline: none;
}

/* 2. Create a global, clean focus ring for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px; /* Slight rounding for inline text links */
  transition: outline-color 0.2s ease;
}

/* 3. Match the border-radius for specific elements so the ring hugs them perfectly */
button:focus-visible,
.btn-primary:focus-visible,
.btn-nav:focus-visible {
  border-radius: 6px; /* Matches your standard button shape */
}

.creator-img-wrapper:focus-visible {
  border-radius: 8px; /* Hugs the profile image wrapper */
}

/* Add a little padding to the FAQ summary so the focus ring doesn't cut into the text */
details summary:focus-visible {
  border-radius: 4px;
  padding: 4px 8px;
  margin-left: -8px; /* Offsets the padding so the text stays aligned */
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 600px) {
  .nav { padding: 16px 20px; }
  .container, body.page-download .container { padding: 100px 20px 60px 20px; }
  h1 { font-size: 28px; }
  .app-shot-wrapper { padding: 20px 20px 0 20px; }
  .hero-actions {
    align-items: center;
    text-align: center;
  }
  .hero-meta {
    align-items: center; /* Ensures the stacked text elements stay centered */
  }
  .specs-row {
    justify-content: center;
  }
  /* --- MOBILE TOOLTIP POSITIONING --- */

  .hover-message {
    left: -10px;
    transform: translateY(10px); /* explicitly removes the X-axis shift */
    white-space: normal;
    width: 280px;
  }

  /* We must group :hover, :focus, and :active together to prevent the iOS tap bug */
  .creator-img-wrapper:hover .hover-message,
  .creator-img-wrapper:focus .hover-message,
  .creator-img-wrapper:active .hover-message {
    opacity: 1;
    visibility: visible;
    transform: translateY(0); /* Overrides the desktop -50% shift on the first tap */
    pointer-events: auto;
  }

  .hover-message::after {
    left: 42px;
    margin-left: 0; /* Resets the negative margin from the desktop layout */
  }

  .footer { flex-direction: column; gap: 16px; align-items: center; text-align: center; }
}
