/* ============ FlipStack Page Styles (standalone) ============ */

/* ---------------------- Brand tokens ---------------------- */
:root {
  --flip-primary:   #3552a4;  /* deep blue */
  --flip-accent:    #30cab1;  /* aqua */
  --flip-secondary: #3498db;  /* bright blue */
  --flip-white:     #ffffff;

  --text:       #f6f7fb;
  --text-dim:   #cfd5e8;
  --panel-border: rgba(255,255,255,.16);

  /* Icon size (desktop default) */
  --icon-size: 320px;
}

/* ----------------------- Base / reset ---------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: light dark; }

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(52,152,219,.25), transparent),
    linear-gradient(180deg, #0f1222 0%, #0b0e1a 100%);
  line-height: 1.5;
}

/* --------------------- Layout helpers ---------------------- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
.center    { text-align: center; }
.visually-hidden { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ======================== HERO ============================= */
.hero { position: relative; isolation: isolate; }

.hero-brand {
  background: linear-gradient(135deg, var(--flip-primary), var(--flip-accent));
  padding: 3.5rem 1rem 2.75rem;
}

.hero-inner {
  display: flex; align-items: center; justify-content: center; gap: 2rem;
  max-width: 1100px; margin: 0 auto; padding: 2rem 1rem;
}

.hero-icon img {
  width: var(--icon-size);
  height: auto;
  border-radius: 24px;
  box-shadow: 0 12px 36px rgba(0,0,0,.35);
  display: block;
}

.hero-text { max-width: 540px; }

/* Base hero text styles (apply to all p under .hero-text) */
.hero-text h1 {
  margin: 0 0 .5rem;
  font-size: clamp(2rem, 5vw, 3rem);
}

.hero-text p {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  opacity: .95;
  font-weight: 500;
}

@media (max-width: 480px) {
  .hero-text p { font-size: 1.6rem; }
}

/* Subline overrides (placed AFTER .hero-text p so it wins) */
.hero-text .hero-subline {
  margin: .1rem 0 1.2rem;
  font-size: .95rem;
  opacity: .92;
  font-weight: 400;
}


/* ======================= CTA badge ========================= */
/* CTA badge */
.cta-row { display:flex; gap:.6rem; flex-wrap:wrap; align-items:center; margin-top:.75rem; }
.app-store-badge { display:block; height:80px; width:auto; }   /* desktop */
@media (max-width: 520px) {
  .app-store-badge { height:60px; }
}

/* ======================= FEATURES ========================= */
section { padding: 1.5rem 0; }
h2 { font-size: 1.6rem; margin: 0 0 .8rem; }

.features {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 1rem;
}

/* Desktop: 3 per row (make sure this comes AFTER any earlier .features rule) */
.features {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}

/* Tablet: 2 per row */
@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile: 1 per row */
@media (max-width: 600px) {
  .features { grid-template-columns: 1fr; }
}

/* Cards */

.features .card {
  background: rgba(255,255,255,0.06); /* subtle translucent panel */
  color: var(--text);                 /* use your site text color */
  border-radius: 12px;
  padding: 1rem 1rem 1.1rem;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.features .card h3 { color: var(--flip-accent); } /* aqua pop */
.features .card p  { color: var(--text-dim); }   /* lighter gray */

/* Panel behind cards (neutral brand tint) */
.feature-panel {
  margin-top: .75rem; padding: 1rem; border-radius: 16px;
  background: linear-gradient(180deg, rgba(53,82,164,.12), rgba(48,202,177,.12));
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(4px);
}

/* Explore Features link styled as button */
.feature-panel .center a {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  background: var(--flip-accent);
  color: #000;
  transition: background 0.2s ease, transform 0.2s ease;
}

.feature-panel .center a:hover {
  background: var(--flip-secondary);
  transform: translateY(-2px);
}

/* ------- FAQ teaser ------- */
.faq-panel{
  margin-top:.5rem; padding:1rem; border-radius:16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(4px);
}

.faq-grid{
  display:grid; gap:1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.faq-tile{
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius:12px;
  padding:1rem;
}

.faq-tile h3{
  margin:0 0 .5rem;
  font-size:1.05rem;
  color: var(--flip-accent);
  font-weight: 600;
}

.faq-list{
  margin:0; padding-left:1rem;
}
.faq-list li{
  margin:.25rem 0;
  color: var(--text-dim);
  font-size:.95rem;
}

/* Button inside FAQ panel */
.faq-button{
  display:inline-block;
  padding:.65rem 1.25rem;
  border-radius:8px;
  font-weight:500;
  text-decoration:none;
  background: var(--flip-accent);
  color:#000;
  transition: background .2s ease, transform .2s ease;
}
.faq-button:hover{
  background: var(--flip-secondary);
  transform: translateY(-2px);
}

/* FAQ teaser: details/summary styling for dark theme */
.faq-tile details {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  padding: 10px 12px;
  margin: 10px 0;
}

.faq-tile summary {
  cursor: pointer;
  list-style: none;
  outline: none;
  font-weight: 600;
  color: var(--flip-white);
}
.faq-tile summary::-webkit-details-marker { display: none; }

/* Optional: subtle open state tint */
.faq-tile details[open] {
  background: rgba(255,255,255,0.06);
}

.faq-tile .answer {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: .95rem;
  line-height: 1.45;
}

/* Keep the two-column layout you had */
.faq-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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


/* Stack to one column on small screens */
@media (max-width: 720px){
  .faq-grid{ grid-template-columns: 1fr; }
}


/* ====================== SCREENSHOTS ======================== */
/* Screenshots: 4-up on large, 2-up on medium/small */
.screenshots {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  justify-items: center; /* center images in their cells */
}

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

/* Make images scale nicely inside the grid cells */
.screenshots img {
  width: 100%;
  max-width: 220px;   /* tweak to taste */
  height: auto;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.08);
}

.screenshots figure {
  margin: 0;
  text-align: center;
}

.screenshots figcaption {
  margin-top: .4rem;
  font-size: 0.8rem;   /* smaller text */
  line-height: 1.2;
  color: var(--text-dim);
}


/* Smooth scroll across the site */
html { scroll-behavior: smooth; }

/* Floating Back to top button */
#backToTop {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  background: var(--flip-accent);
  color: #000;
  padding: .6rem .9rem;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  display: none;           /* hidden until scrolled */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .3s ease, transform .3s ease, background .2s ease;
}
#backToTop:hover { background: var(--flip-secondary); }
#backToTop:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(48,202,177,.55);
}

/* When scrolled down, reveal it */
body.scrolled #backToTop {
  display: inline-block;
  opacity: 1;
  transform: translateY(0);
}

/* Keep clear of mobile bottom bars */
@media (max-width: 720px) {
  #backToTop { bottom: 1rem; right: 1rem; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #backToTop { transition: none; }
}



/* ---------- FOOTER ---------- */
.site-footer {
  margin-top: 3rem;
  padding: 2.5rem 1.5rem;
  background: rgba(255,255,255,0.05);
  border-top: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px 16px 0 0;
  color: var(--text-dim);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-brand h3 {
  margin: 0 0 .25rem;
  font-size: 1.25rem;
  color: var(--flip-white);
}

.footer-brand .tagline {
  margin: 0 0 .75rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.footer-brand .byline {
  font-size: 0.85rem;
  color: var(--text-dim);
}
.footer-brand .byline a {
  color: var(--flip-accent);
  text-decoration: none;
  font-weight: 500;
}
.footer-brand .byline a:hover {
  text-decoration: underline;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}
.footer-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-nav a:hover {
  color: var(--flip-accent);
}


/* ====================== RESPONSIVE ======================== */
@media (max-width: 820px) {
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-text  { max-width: 640px; }
  .cta-row    { justify-content: center; }

  /* Smaller icon on mobile */
  :root { --icon-size: 200px; }
}

@media (max-width: 720px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  .footer-nav ul {
    grid-template-columns: repeat(2, auto);
    gap: 0.6rem 1.2rem;
  }
}
