/* =========================================================
   SPINLY — shared site styles for content pages
   The wheel tool has its own embedded styles (dark theme).
   ========================================================= */

:root {
  --bg: #faf9f6;
  --bg-alt: #ffffff;
  --bg-card: #ffffff;
  --ink: #1a1a2a;
  --ink-soft: #4a4a5e;
  --ink-dim: #7a7a8c;
  --border: #e7e5df;
  --border-strong: #d0cec7;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-soft: #eff6ff;

  /* Spinwheel palette accents */
  --c1: #fb4f4e;
  --c2: #4583b8;
  --c3: #fbc117;
  --c4: #56ab55;
  --c5: #a155b9;
  --c6: #ff8c42;

  --shadow-sm: 0 2px 4px rgba(26,26,42,.06);
  --shadow-md: 0 6px 18px rgba(26,26,42,.08);
  --shadow-lg: 0 18px 40px rgba(26,26,42,.12);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  font-size: 17px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

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

button { font-family: inherit; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.site-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--ink);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }

.brand-logo {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: conic-gradient(
    from -30deg,
    var(--c1) 0deg 60deg,
    var(--c3) 60deg 120deg,
    var(--c4) 120deg 180deg,
    var(--c2) 180deg 240deg,
    var(--c5) 240deg 300deg,
    var(--c6) 300deg 360deg
  );
  position: relative;
  box-shadow: 0 0 0 2px white, var(--shadow-sm);
}
.brand-logo::before {
  content: "";
  position: absolute;
  inset: 35%;
  background: var(--bg-alt);
  border-radius: 50%;
}

.site-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: auto;
}
.site-nav a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 15px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
}
.site-nav a:hover {
  color: var(--ink);
  background: var(--accent-soft);
  text-decoration: none;
}
.site-nav a.active {
  color: var(--accent);
}

.site-nav .dropdown {
  position: relative;
}
.site-nav .dropdown-trigger {
  background: transparent;
  border: none;
  color: var(--ink-soft);
  font-family: inherit;
  font-weight: 500;
  font-size: 15px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background .15s, color .15s;
}
.site-nav .dropdown-trigger:hover {
  color: var(--ink);
  background: var(--accent-soft);
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.site-nav .dropdown:hover .dropdown-menu,
.site-nav .dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink);
}
.dropdown-menu a:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

.btn-cta {
  background: var(--accent);
  color: white !important;
  padding: 9px 18px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
  transition: background .15s !important;
}
.btn-cta:hover {
  background: var(--accent-hover) !important;
  color: white !important;
  text-decoration: none !important;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.nav-toggle svg { width: 24px; height: 24px; color: var(--ink); }

@media (max-width: 800px) {
  .site-nav { display: none; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    padding: 12px 24px 18px;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    align-items: stretch;
  }
  .site-nav.open a, .site-nav.open .dropdown-trigger {
    padding: 12px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    width: 100%;
    text-align: left;
  }
  .site-nav .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0 0 0 14px;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }
  .site-nav.open .dropdown:hover .dropdown-menu,
  .site-nav.open .dropdown.open .dropdown-menu {
    display: block;
  }
  .nav-toggle { display: block; }
}

/* ============================================================
   CONTENT CONTAINERS
   ============================================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

h1 {
  font-size: clamp(36px, 5vw, 56px);
  margin-bottom: 18px;
}
h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  margin: 56px 0 18px;
}
h3 {
  font-size: 22px;
  margin: 36px 0 12px;
}
h4 {
  font-size: 17px;
  font-weight: 600;
  margin: 24px 0 8px;
}

.lede {
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 32px;
}

article p, .prose p {
  margin: 0 0 1.1em;
  color: var(--ink-soft);
}
article p:last-child, .prose p:last-child { margin-bottom: 0; }

article ul, article ol, .prose ul, .prose ol {
  margin: 0 0 1.1em 1.2em;
  color: var(--ink-soft);
}
article li, .prose li {
  margin-bottom: 0.4em;
}

article blockquote, .prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin: 24px 0;
  color: var(--ink-soft);
  font-style: italic;
}

article strong, .prose strong { color: var(--ink); font-weight: 700; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 70px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-text {
  max-width: 540px;
}
.hero-eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .15s, transform .1s;
  text-decoration: none !important;
}
.btn:hover { background: var(--accent-hover); color: white; }
.btn:active { transform: scale(.98); }
.btn-secondary {
  background: white;
  color: var(--ink);
  border: 1.5px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--accent-soft); color: var(--ink); border-color: var(--accent); }
.btn svg { width: 18px; height: 18px; }

.hero-visual {
  display: grid;
  place-items: center;
  position: relative;
}
.hero-wheel {
  width: min(100%, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--c1) 0deg 45deg,
    var(--c2) 45deg 90deg,
    var(--c3) 90deg 135deg,
    var(--c4) 135deg 180deg,
    var(--c5) 180deg 225deg,
    var(--c6) 225deg 270deg,
    var(--c1) 270deg 315deg,
    var(--c4) 315deg 360deg
  );
  box-shadow: 0 30px 60px rgba(26,26,42,.18);
  position: relative;
  animation: slowSpin 30s linear infinite;
}
@keyframes slowSpin {
  to { transform: rotate(360deg); }
}
.hero-wheel::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 22%; height: 22%;
  transform: translate(-50%,-50%);
  background: white;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.hero-wheel-pointer {
  position: absolute;
  top: 50%;
  right: -10px;
  transform: translateY(-50%);
  width: 36px;
  height: 50px;
  z-index: 2;
  filter: drop-shadow(-2px 4px 6px rgba(0,0,0,.3));
}

@media (max-width: 800px) {
  .hero { padding: 40px 0 50px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-text { max-width: none; }
}

/* ============================================================
   SECTIONS
   ============================================================ */
section.section { padding: 60px 0; }
section.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-heading { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-heading h2 { margin-top: 0; }
.section-heading p { color: var(--ink-soft); font-size: 18px; }

/* ============================================================
   FEATURE GRID
   ============================================================ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
a.card { color: var(--ink); }
a.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.card .card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  font-size: 22px;
}
.card h3 { margin: 0 0 8px; font-size: 19px; }
.card p { color: var(--ink-soft); font-size: 15px; margin: 0; }

/* ============================================================
   BLOG / ARTICLE
   ============================================================ */
article.post {
  padding: 50px 0 80px;
}
article.post header {
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 28px;
}
article.post .post-meta {
  color: var(--ink-dim);
  font-size: 14px;
  margin-bottom: 8px;
}
article.post h1 { margin-bottom: 12px; }
article.post .post-deck {
  font-size: 19px;
  color: var(--ink-soft);
  margin-top: 14px;
}

.post-list { display: grid; gap: 20px; }
.post-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color .15s, transform .15s, box-shadow .15s;
  color: var(--ink);
}
.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--ink);
}
.post-card .post-card-meta {
  color: var(--ink-dim);
  font-size: 13px;
}
.post-card h3 { margin: 0; font-size: 21px; }
.post-card p { color: var(--ink-soft); font-size: 15px; margin-top: 4px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin-top: 80px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 50px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 0 24px;
  max-width: 1100px;
  margin: 0 auto;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.footer-brand p {
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: 14px;
  max-width: 320px;
}
.footer-grid h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin: 0 0 14px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid li a {
  color: var(--ink-soft);
  font-size: 14px;
}
.footer-grid li a:hover { color: var(--accent); }

.site-footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 24px 0;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-dim);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer-bottom .cookie-prefs-link {
  background: transparent;
  border: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--border-strong);
}
.site-footer-bottom .cookie-prefs-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}
.site-footer-bottom .footer-sep {
  color: var(--ink-dim);
  opacity: 0.6;
  padding: 0 2px;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }

/* ============================================================
   TEMPLATE GALLERY
   ============================================================ */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 40px;
}
.template-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  overflow: hidden;
}
.template-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.template-card-link {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  color: var(--ink);
  text-decoration: none !important;
}
.template-card-link:hover { color: var(--ink); }
.template-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 26px;
  margin-bottom: 6px;
  flex-shrink: 0;
}
.template-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}
.template-card p {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0;
  flex: 1;
}
.template-card-foot {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.template-cta {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}
.template-link {
  display: block;
  padding: 10px 24px 16px;
  font-size: 13px;
  color: var(--ink-dim);
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.template-link:hover { color: var(--accent); text-decoration: none; background: var(--accent-soft); }

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-list {
  margin-top: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--ink-dim);
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  transition: transform .2s;
}
.faq-item[open] summary { color: var(--accent); background: var(--accent-soft); }
.faq-item[open] summary::after { content: "−"; color: var(--accent); }
.faq-item summary:hover { background: var(--accent-soft); }
.faq-item > div {
  padding: 4px 22px 22px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}
.faq-item > div p { margin: 0 0 10px; }
.faq-item > div p:last-child { margin-bottom: 0; }
.faq-item > div a { color: var(--accent); }

.mode-note {
  max-width: 720px;
  margin: 36px auto 0;
  padding: 18px 24px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
  text-align: center;
}

.cta-banner {
  background: linear-gradient(135deg, var(--c2) 0%, var(--c5) 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 50px 40px;
  text-align: center;
  margin: 60px auto;
  max-width: 900px;
  box-shadow: var(--shadow-lg);
}
.cta-banner h2 { color: white; margin: 0 0 12px; }
.cta-banner p { color: rgba(255,255,255,.9); font-size: 17px; margin-bottom: 24px; }
.cta-banner .btn {
  background: white;
  color: var(--ink);
}
.cta-banner .btn:hover { background: var(--bg); color: var(--ink); }
