/* Kickflip — shared styles */

:root {
  --brand: #e3260f;
  --brand-light: #ff4a2e;
  --brand-deep: #a8130a;
  --ink: #1b1211;
  --bg: #fffaf7;
  --bg-alt: #fbeee8;
  --surface: #ffffff;
  --text: #241817;
  --text-muted: #62504d;
  --border: #efd9d1;
  --accent: #c01a0b;          /* red that passes contrast on light backgrounds */
  --accent-contrast: #ffffff;
  --radius: 18px;
  --shadow: 0 1px 2px rgb(60 10 0 / 6%), 0 8px 30px rgb(60 10 0 / 9%);
  --max: 1080px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #150e0d;
    --bg-alt: #1e1413;
    --surface: #271b19;
    --text: #fbf1ee;
    --text-muted: #c5aaa5;
    --border: #3c2825;
    --accent: #ff7b69;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 30px rgb(0 0 0 / 35%);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10;
}
.skip:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-nav { display: flex; gap: 4px 18px; flex-wrap: wrap; }
.site-nav a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; padding: 6px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none; border: 0; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand-deep); color: #fff; box-shadow: var(--shadow); }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn[aria-disabled="true"] { cursor: default; }
.btn small { display: block; font-weight: 500; font-size: 0.72rem; opacity: 0.75; line-height: 1.1; }
.btn .btn-label { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.btn svg { width: 22px; height: 22px; flex: none; }

/* Hero */
.hero { padding: clamp(48px, 9vw, 104px) 0 clamp(40px, 7vw, 80px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; gap: 36px; } }
.hero-icon { width: 88px; height: 88px; border-radius: 22px; box-shadow: var(--shadow); margin-bottom: 22px; }
.eyebrow {
  display: inline-block; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.lede { font-size: 1.2rem; color: var(--text-muted); max-width: 34em; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.fineprint { font-size: 0.85rem; color: var(--text-muted); margin-top: 16px; }

/* Sections */
section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 40em; margin-bottom: 40px; }
.section-head p { color: var(--text-muted); font-size: 1.1rem; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card p { color: var(--text-muted); margin: 0; }
.card .icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--brand-light), var(--brand)); color: #fff; margin-bottom: 16px;
}
.card .icon svg { width: 22px; height: 22px; }

/* Spreads (home page) */
.hero-art { display: grid; place-items: center; }
.hero-art img { width: min(100%, 340px); border-radius: 22%; box-shadow: 0 20px 60px rgb(160 20 5 / 35%); transform: rotate(-4deg); }
.tags { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 5px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 0.9rem; color: var(--text-muted); }


/* Requirements */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* FAQ */
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 0 22px; margin-bottom: 12px;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 600; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 400; color: var(--accent);
}
.faq details[open] summary::after { content: "–"; }
.faq details > *:not(summary) { color: var(--text-muted); }
.faq details > p:last-child { padding-bottom: 18px; margin-bottom: 0; }

/* CTA band */
.cta-band {
  text-align: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgb(255 255 255 / 92%); font-size: 1.1rem; }
.cta-band .cta-row { justify-content: center; }
.cta-band .btn-primary { background: #fff; color: var(--brand-deep); }

/* Long-form pages (support, privacy, terms) */
.page-head { padding: clamp(44px, 7vw, 80px) 0 12px; }
.page-head p { color: var(--text-muted); font-size: 1.1rem; max-width: 40em; }
.prose { max-width: 46em; padding-bottom: 80px; }
.prose h2 { font-size: 1.5rem; margin-top: 2.2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose .meta { color: var(--text-muted); font-size: 0.95rem; }
.callout {
  border-left: 4px solid var(--brand); background: var(--bg-alt);
  padding: 16px 20px; border-radius: 0 12px 12px 0; margin: 1.5em 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout h2:first-child { margin-top: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 1.5em; border: 1px solid var(--border); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; background: var(--surface); }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--bg-alt); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
kbd {
  font: 600 0.85em ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 1px 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; background: var(--bg);
}

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; padding: 0; list-style: none; }
.toc a {
  display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border);
  text-decoration: none; color: var(--text); font-size: 0.9rem; background: var(--surface);
}

/* 404 */
.notfound { text-align: center; padding: 120px 0; }
.notfound .code { font-size: clamp(4rem, 14vw, 8rem); font-weight: 800; color: var(--brand); line-height: 1; margin-bottom: 12px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 48px; font-size: 0.9rem; color: var(--text-muted); }
.site-footer .wrap { display: grid; gap: 14px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-nav a { color: var(--text-muted); text-decoration: none; }
.footer-nav a:hover { color: var(--text); }
.site-footer p { margin: 0; }

/* Responsive */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .site-header .wrap { padding-top: 10px; padding-bottom: 10px; }
  .site-nav { width: 100%; gap: 4px 16px; }
  .btn { width: 100%; justify-content: center; }
}

.table-wrap td:last-child { white-space: nowrap; }
