/* Shack marketing site — mirrors the app's dark theme (frontend/src/index.css + tailwind.config.js)
   Palette: slate-950 bg, slate-900 cards, slate-800 borders, Electric Indigo primary,
   Playful Pink secondary, Sunshine Yellow accent. Nunito headings / Manrope body. */

:root {
  --bg: #020617;            /* slate-950 */
  --card: #0F172A;          /* slate-900 */
  --card-hover: #1E293B;    /* slate-800 */
  --border: #1E293B;        /* slate-800 */
  --border-soft: #334155;   /* slate-700 */
  --heading: #F1F5F9;       /* slate-100 */
  --body: #94A3B8;          /* slate-400 */
  --body-strong: #CBD5E1;   /* slate-300 */
  --primary: #6366F1;       /* Electric Indigo */
  --primary-hover: #4F46E5;
  --secondary: #F472B6;     /* Playful Pink */
  --accent: #FCD34D;        /* Sunshine Yellow */
  --amber: #F59E0B;
  --radius-card: 1.5rem;    /* rounded-3xl */
  --radius-tile: 1rem;      /* rounded-2xl */
}

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

html { scroll-behavior: smooth; }

body {
  overflow-x: clip;   /* 3D coverflow ghosts swing past the viewport edge */
  background: var(--bg);
  color: var(--body);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Nunito', sans-serif; color: var(--heading); letter-spacing: -0.025em; }

.wrap { max-width: 80rem; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }

section { padding: 5rem 0; }

/* ---------- nav ---------- */
nav { padding: 1.5rem 0; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.brand-mark {
  width: 2.5rem; height: 2.5rem; border-radius: var(--radius-tile);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center; flex: none;
}
.brand-mark svg { width: 1.5rem; height: 1.5rem; }
.brand-name { font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 1.5rem; color: var(--heading); }
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a:not(.btn) { color: var(--body); text-decoration: none; font-weight: 700; font-size: 0.95rem; transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--heading); }
@media (max-width: 820px) { .nav-links a:not(.btn) { display: none; } }

/* ---------- buttons (pill, like the app) ---------- */
.btn {
  display: inline-block; border-radius: 9999px; font-weight: 700; text-decoration: none;
  font-family: 'Manrope', sans-serif; font-size: 1rem; cursor: pointer; border: none;
  transition: all .2s ease; text-align: center;
}
.btn-primary {
  background: var(--primary); color: #fff; padding: 1rem 2rem;
  box-shadow: 0 10px 15px -3px rgba(99, 102, 241, .25), 0 4px 6px -4px rgba(99, 102, 241, .25);
}
.btn-primary:hover {
  background: var(--primary-hover); transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(99, 102, 241, .3), 0 8px 10px -6px rgba(99, 102, 241, .3);
}
.btn-outline {
  background: var(--card); color: var(--heading); padding: calc(1rem - 2px) calc(2rem - 2px);
  border: 2px solid var(--border);
}
.btn-outline:hover { background: var(--card-hover); border-color: var(--border-soft); }
.btn-sm { padding: 0.625rem 1.5rem; font-size: 0.95rem; }
.btn-sm.btn-outline { padding: calc(0.625rem - 2px) calc(1.5rem - 2px); }
.btn-on-gradient { background: var(--card); color: #A5B4FC; padding: 1rem 2rem; }
.btn-on-gradient:hover { transform: translateY(-2px); box-shadow: 0 20px 25px -5px rgba(2, 6, 23, .5); }

/* ---------- hero ---------- */
.hero { padding: 5rem 0 6rem; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
/* coverflow rotator — headlines swap with a 3D Cover Flow swing */
.cover-rotator { position: relative; perspective: 1100px; margin-bottom: 2rem; }
.cover-track { position: relative; transform-style: preserve-3d; }
.cover-slide {
  position: absolute; top: 0; left: 0; width: 100%;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateX(38%) rotateY(-50deg) scale(.82);
  transition: transform .8s cubic-bezier(.22, .61, .36, 1), opacity .8s ease, visibility 0s linear .8s;
  will-change: transform, opacity;
}
.cover-slide h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); font-weight: 800; line-height: 1.15; margin-bottom: 1.5rem; }
.cover-slide h1 .hl { color: var(--primary); }
.cover-slide .lede { font-size: 1.125rem; max-width: 34rem; }
.cover-slide.is-active {
  opacity: 1; visibility: visible; pointer-events: auto; z-index: 2;
  transform: none; transition-delay: 0s;
}
.cover-slide.is-prev, .cover-slide.is-next { visibility: visible; opacity: .05; filter: blur(3px); z-index: 1; transition-delay: 0s; }
.cover-slide.is-prev { transform: translateX(-38%) rotateY(50deg) scale(.82); }
.cover-dots { display: flex; gap: .5rem; margin-top: 1.75rem; }
.cover-dots button {
  width: 2rem; height: .45rem; border-radius: 9999px; border: none; padding: 0; cursor: pointer;
  background: var(--border-soft); transition: background .3s, width .3s;
}
.cover-dots button.on { background: var(--primary); width: 3rem; }
@media (prefers-reduced-motion: reduce) {
  .cover-slide { transform: none !important; transition: opacity .4s ease; }
  .cover-slide.is-prev, .cover-slide.is-next { opacity: 0; }
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.pill {
  font-size: 0.8rem; font-weight: 700; padding: 0.35rem 0.9rem; border-radius: 9999px;
  border: 1px solid var(--border); color: var(--body-strong); background: rgba(15, 23, 42, .6);
}
.hero-art { position: relative; }
.hero-art .glow {
  position: absolute; inset: 0; border-radius: var(--radius-card); filter: blur(64px);
  background: linear-gradient(135deg, rgba(99, 102, 241, .25), rgba(244, 114, 182, .25));
}
.hero-art img {
  position: relative; width: 100%; border-radius: var(--radius-card); display: block;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .6);
}

/* ---------- section headers ---------- */
.sec-head { text-align: center; margin-bottom: 4rem; }
.sec-head h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; margin-bottom: 1rem; }
.sec-head p { font-size: 1.125rem; }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 2rem; transition: box-shadow .3s, border-color .3s;
}
.card:hover { border-color: var(--border-soft); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .3); }
.card h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.75rem; }
.card .icon-tile {
  width: 3.5rem; height: 3.5rem; border-radius: var(--radius-tile);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem;
}
.tile-primary { background: rgba(99, 102, 241, .12); color: var(--primary); }
.tile-secondary { background: rgba(244, 114, 182, .12); color: var(--secondary); }
.tile-accent { background: rgba(252, 211, 77, .16); color: var(--amber); }
.icon-tile svg { width: 1.75rem; height: 1.75rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-4 { grid-template-columns: 1fr; } }

/* ---------- subscription math ---------- */
.math-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 2.5rem; overflow-x: auto;
}
.math-card table { width: 100%; border-collapse: collapse; min-width: 540px; }
.math-card th, .math-card td { padding: 1rem 1.25rem; text-align: left; }
.math-card thead th {
  color: var(--heading); font-family: 'Nunito', sans-serif; font-size: 0.95rem;
  border-bottom: 1px solid var(--border-soft);
}
.math-card tbody tr + tr td { border-top: 1px solid var(--border); }
.math-card td { color: var(--body-strong); font-variant-numeric: tabular-nums; }
.math-card td.win { color: var(--heading); font-weight: 700; }
.math-card td.win .save { color: var(--accent); font-weight: 700; font-size: 0.85rem; margin-left: 0.5rem; }
.math-note { font-size: 0.85rem; margin-top: 1.25rem; }

/* ---------- pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: 76rem; margin: 0 auto; }
@media (max-width: 1100px) { .pricing-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .pricing-grid { grid-template-columns: 1fr; } }

/* ---- Two ways to run Shack (self-hosted vs managed portal) ---- */
.duo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 68rem; margin: 0 auto; }
@media (max-width: 860px) { .duo-grid { grid-template-columns: 1fr; } }
.duo-card { display: flex; flex-direction: column; padding: 2.5rem; position: relative; }
.duo-card.featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), 0 20px 45px -20px rgba(99, 102, 241, .45); }
.duo-flag {
  position: absolute; top: -0.85rem; left: 2.5rem; padding: 0.3rem 0.9rem;
  border-radius: 999px; font-family: 'Nunito', sans-serif; font-weight: 800;
  font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--card); border: 1px solid var(--border); color: var(--body-strong);
}
.flag-managed { background: linear-gradient(135deg, var(--primary), var(--accent)); border: 0; color: #fff; }
.duo-lede { color: var(--body); margin-bottom: 1.4rem; }
.duo-card ul { list-style: none; margin: 0 0 2rem; flex: 1; }
.duo-card li { padding: 0.45rem 0 0.45rem 1.9rem; position: relative; color: var(--body-strong); }
.duo-card li::before {
  content: ''; position: absolute; left: 0; top: 0.78rem; width: 1.1rem; height: 1.1rem;
  background: var(--primary); border-radius: 50%; opacity: .18;
}
.duo-card li::after {
  content: '✓'; position: absolute; left: 0.22rem; top: 0.42rem;
  color: var(--primary); font-weight: 800; font-size: 0.8rem;
}
.mono-accent, .mono-inline {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--primary); font-size: 0.95em;
}

/* ---- Downloads ---- */
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; max-width: 62rem; margin: 0 auto; }
@media (max-width: 900px) { .dl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .dl-grid { grid-template-columns: 1fr; } }
.dl-card {
  display: flex; flex-direction: column; gap: 0.2rem; align-items: flex-start;
  padding: 1.4rem 1.6rem; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.dl-card:hover { transform: translateY(-2px); border-color: var(--primary); }
.dl-card strong { color: var(--heading); font-family: 'Nunito', sans-serif; font-size: 1.05rem; }
.dl-card span { color: var(--body); font-size: 0.88rem; }
.dl-note { text-align: center; color: var(--body); font-size: 0.9rem; max-width: 46rem; margin: 1.6rem auto 0; }
.price-card { display: flex; flex-direction: column; padding: 2.5rem; position: relative; }
.price-card.featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), 0 20px 45px -20px rgba(99, 102, 241, .45); }
.price-flag {
  position: absolute; top: -0.85rem; left: 2rem; background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; font-size: 0.75rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  padding: 0.3rem 0.9rem; border-radius: 9999px;
}
.price-amount { display: flex; align-items: baseline; gap: 0.5rem; margin: 1.25rem 0 0.25rem; }
.price-amount .num { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 3rem; color: var(--heading); }
.price-amount .per { font-size: 1rem; }
.price-sub { font-size: 0.9rem; margin-bottom: 1.5rem; }
.price-card ul { list-style: none; margin: 0 0 2rem; flex: 1; }
.price-card li { padding: 0.45rem 0 0.45rem 1.9rem; position: relative; color: var(--body-strong); }
.price-card li::before {
  content: ''; position: absolute; left: 0; top: 0.72rem; width: 1.15rem; height: 1.15rem;
  border-radius: 9999px; background: rgba(99, 102, 241, .15);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366F1' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 0.7rem; background-position: center; background-repeat: no-repeat;
}
.stripe-note { display: flex; align-items: center; justify-content: center; gap: 0.4rem; font-size: 0.8rem; margin-top: 0.9rem; }
.stripe-note svg { width: 0.9rem; height: 0.9rem; }

.pricing-fine {
  max-width: 62rem; margin: 2rem auto 0; padding: 0 0.25rem;
  font-size: 0.78rem; line-height: 1.7; color: #64748B;   /* slate-500 — quieter than body */
}
.pricing-fine p { margin-bottom: 0.6rem; }

/* ---------- partner band ---------- */
.partner-band {
  border: 1px solid var(--border); border-radius: var(--radius-card); padding: 3rem;
  background:
    radial-gradient(60rem 20rem at 110% -20%, rgba(244, 114, 182, .12), transparent),
    radial-gradient(50rem 18rem at -10% 120%, rgba(99, 102, 241, .14), transparent),
    var(--card);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: center;
}
@media (max-width: 860px) { .partner-band { grid-template-columns: 1fr; } }
.partner-band h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: 1rem; }
.partner-band ul { list-style: none; margin-top: 1.25rem; }
.partner-band li { padding: 0.4rem 0 0.4rem 1.9rem; position: relative; color: var(--body-strong); }
.partner-band li::before {
  content: ''; position: absolute; left: 0; top: 0.68rem; width: 1.15rem; height: 1.15rem; border-radius: 9999px;
  background: rgba(244, 114, 182, .15);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F472B6' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 0.7rem; background-position: center; background-repeat: no-repeat;
}
.partner-cta { text-align: center; }

/* ---------- FAQ ---------- */
.faq { max-width: 46rem; margin: 0 auto; }
.faq details {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-tile);
  padding: 1.25rem 1.5rem; margin-bottom: 1rem;
}
.faq summary {
  cursor: pointer; font-family: 'Nunito', sans-serif; font-weight: 700; color: var(--heading);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--primary); font-size: 1.4rem; font-weight: 700; flex: none; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 0.9rem; }

/* ---------- final CTA ---------- */
.cta-panel {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-card); padding: 4rem 3rem; text-align: center; color: #fff;
}
.cta-panel h2 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
.cta-panel p { font-size: 1.125rem; opacity: .9; margin-bottom: 2rem; }
.cta-panel .hero-ctas { justify-content: center; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); padding: 3rem 0; text-align: center; font-size: 0.95rem; }
footer .strong { font-weight: 700; color: var(--heading); }
footer .foot-links { margin-top: 0.75rem; display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }
footer a { color: var(--body); text-decoration: none; font-weight: 700; }
footer a:hover { color: var(--heading); }
footer .foot-fine {
  max-width: 52rem; margin: 1.5rem auto 0; font-size: 0.75rem; line-height: 1.7;
  color: #64748B;   /* slate-500 — same register as the pricing fine print */
}
footer .foot-fine a { color: inherit; text-decoration: underline; font-weight: 500; }
