/* ==========================================================================
   OwnSnap / Derek Bothma — shared stylesheet
   Single stylesheet for the whole site. Change the tokens in :root to
   re-brand everything at once.
   ========================================================================== */

:root {
  /* ---- Brand tokens: change these to re-skin the site ---- */
  --brand:        #3d5afe;
  --brand-dark:   #2c3fd6;
  --brand-tint:   #eef1ff;
  --accent:       #ff8a3d;

  /* ---- Neutrals ---- */
  --bg:           #ffffff;
  --bg-alt:       #f7f8fb;
  --surface:      #ffffff;
  --border:       #e4e7ef;
  --text:         #14161d;
  --text-muted:   #5b6376;

  /* ---- Layout ---- */
  --maxw:         1080px;
  --maxw-prose:   680px;
  --radius:       14px;
  --radius-sm:    8px;
  --shadow:       0 1px 2px rgba(20, 22, 29, .04), 0 8px 24px rgba(20, 22, 29, .06);
  --shadow-lg:    0 2px 4px rgba(20, 22, 29, .05), 0 18px 50px rgba(20, 22, 29, .10);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand:      #7b8cff;
    --brand-dark: #6274ff;
    --brand-tint: #191d33;
    --accent:     #ff9a57;

    --bg:         #0e1016;
    --bg-alt:     #14171f;
    --surface:    #171b24;
    --border:     #272c38;
    --text:       #eceef4;
    --text-muted: #a0a7b8;

    --shadow:     0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg:  0 2px 4px rgba(0, 0, 0, .35), 0 18px 50px rgba(0, 0, 0, .5);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p  { margin: 0 0 1.1em; }

/* ---------- Layout helpers ---------- */
.wrap  { max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.prose { max-width: var(--maxw-prose); }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .45em; }

section { padding: clamp(52px, 8vw, 88px) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.center { text-align: center; }
.lede { font-size: 1.15rem; color: var(--text-muted); max-width: 46ch; }
.center .lede { margin-inline: auto; }
.muted { color: var(--text-muted); }
.small { font-size: .875rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 22px; height: 62px; }
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 1.06rem; letter-spacing: -.02em;
  color: var(--text); text-decoration: none; margin-right: auto;
}
.brand-mark {
  width: 28px; height: 28px; flex: none; display: block;
  object-fit: contain;
}
.nav a.nav-link {
  color: var(--text-muted); text-decoration: none;
  font-size: .95rem; font-weight: 550;
}
.nav a.nav-link:hover, .nav a.nav-link[aria-current="page"] { color: var(--text); }
@media (max-width: 640px) {
  .nav { height: auto; padding-block: 12px; flex-wrap: wrap; gap: 8px 16px; }
  .brand { flex-basis: 100%; margin-right: 0; }
  .nav a.nav-link { font-size: .9rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: .97rem; font-weight: 650; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { color: var(--text); background: var(--bg-alt); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.center .btn-row { justify-content: center; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(48px, 7vw, 84px); padding-bottom: clamp(48px, 7vw, 84px); }
.hero-grid {
  display: grid; gap: clamp(32px, 5vw, 60px); align-items: center;
  grid-template-columns: 1.05fr .95fr;
}
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
  display: inline-block; margin-bottom: 18px;
  padding: 5px 13px; border-radius: 999px;
  background: var(--brand-tint); color: var(--brand);
  font-size: .8rem; font-weight: 700; letter-spacing: .01em;
}

/* Phone mockup — pure CSS, no image needed until you have screenshots */
.phone {
  width: min(285px, 82%); margin-inline: auto;
  aspect-ratio: 9 / 19;
  border-radius: 38px; padding: 11px;
  background: linear-gradient(160deg, #2a2f3d, #11131a);
  box-shadow: var(--shadow-lg);
}
.phone-screen {
  height: 100%; border-radius: 28px; overflow: hidden;
  background: var(--surface);
  display: flex; flex-direction: column;
}
.phone-screen img { height: 100%; width: 100%; object-fit: cover; }
.phone-placeholder {
  flex: 1; display: flex; flex-direction: column; gap: 10px;
  padding: 26px 18px; justify-content: center; align-items: center;
  text-align: center; color: var(--text-muted); font-size: .8rem;
  background: linear-gradient(170deg, var(--brand-tint), var(--surface));
}
.phone-placeholder strong { color: var(--text); font-size: .95rem; }

/* ---------- Store badges ---------- */
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.center .store-badges { justify-content: center; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 15px; border-radius: 12px;
  background: var(--text); color: var(--bg);
  text-decoration: none; line-height: 1.15;
  transition: transform .12s ease, opacity .12s ease;
}
.store-badge:hover { transform: translateY(-1px); color: var(--bg); opacity: .9; }
.store-badge svg { width: 22px; height: 22px; flex: none; fill: currentColor; }
.store-badge span { display: block; font-size: .62rem; opacity: .8; letter-spacing: .03em; text-transform: uppercase; }
.store-badge b { display: block; font-size: .97rem; font-weight: 700; letter-spacing: -.01em; }
.store-badge[data-soon]::after {
  content: "Soon"; margin-left: 4px; align-self: center;
  font-size: .6rem; font-weight: 700; text-transform: uppercase;
  padding: 3px 6px; border-radius: 5px;
  background: color-mix(in srgb, currentColor 18%, transparent);
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
}
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 40px; height: 40px; border-radius: 11px; margin-bottom: 16px;
  background: var(--brand-tint); color: var(--brand);
  display: grid; place-items: center; font-size: 1.15rem;
}

/* ---------- Product cards ---------- */
.product {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .15s ease, transform .15s ease;
}
.product:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product-media {
  aspect-ratio: 4 / 3; background: var(--bg-alt);
  display: grid; place-items: center;
  color: var(--text-muted); font-size: .82rem; text-align: center; padding: 12px;
  border-bottom: 1px solid var(--border);
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; gap: 4px; }
.product-body h3 { margin-bottom: .2em; }
.product-desc { color: var(--text-muted); font-size: .94rem; margin-bottom: 16px; }
.product-foot { margin-top: auto; display: flex; align-items: center; gap: 14px; }
.price { font-size: 1.3rem; font-weight: 750; letter-spacing: -.02em; }
.product-foot .btn { margin-left: auto; padding: 11px 20px; }
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 6px;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  background: var(--brand-tint); color: var(--brand); margin-bottom: 10px;
  align-self: flex-start;
}
.badge-soldout { background: color-mix(in srgb, var(--text-muted) 15%, transparent); color: var(--text-muted); }

/* ---------- FAQ ---------- */
details.faq {
  border-bottom: 1px solid var(--border); padding: 4px 0;
}
details.faq summary {
  cursor: pointer; list-style: none; padding: 16px 0;
  font-weight: 650; display: flex; align-items: center; gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; margin-left: auto; font-size: 1.35rem; font-weight: 400;
  color: var(--text-muted); line-height: 1; transition: transform .15s ease;
}
details.faq[open] summary::after { content: "\2212"; }
details.faq > div { padding: 0 0 16px; color: var(--text-muted); }
details.faq > div p:last-child { margin-bottom: 0; }

/* ---------- Callout ---------- */
.callout {
  border-left: 3px solid var(--brand); background: var(--bg-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px; margin: 0 0 1.4em;
}
.callout p:last-child { margin-bottom: 0; }
.callout-warn { border-left-color: var(--accent); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; border-radius: var(--radius); padding: clamp(34px, 5vw, 54px);
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .88); max-width: 46ch; margin-inline: auto; }
.cta-band .btn-primary { background: #fff; color: var(--brand-dark); }
.cta-band .btn-primary:hover { background: #f2f4ff; color: var(--brand-dark); }
.cta-band .store-badge { background: rgba(255, 255, 255, .14); color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border); background: var(--bg-alt);
  padding: 46px 0 34px; font-size: .92rem;
}
.footer-grid {
  display: grid; gap: 28px; grid-template-columns: 1.4fr repeat(2, 1fr);
  margin-bottom: 30px;
}
@media (max-width: 680px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-muted); margin-bottom: 12px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--text-muted); text-decoration: none; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 10px 20px;
  color: var(--text-muted); font-size: .86rem;
}
.footer-bottom .spacer { margin-left: auto; }

/* ---------- Utility ---------- */
.stack-sm > * + * { margin-top: 10px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.hide { display: none !important; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #fff; padding: 10px 16px; z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
