/* ClipLoom — shared styles (editorial / warm theme) */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #f7f2ea;
  --bg-alt: #efe6d8;
  --surface: #fffdf9;
  --ink: #1d1a16;
  --ink-soft: #5c544a;
  --line: #e2d7c6;
  --accent: #e5533d;
  --accent-ink: #ffffff;
  --accent-soft: #fbe1da;
  --teal: #1f7a6d;
  --teal-soft: #d8efe9;
  --shadow: 0 1px 2px rgba(40, 30, 20, .06), 0 12px 32px rgba(40, 30, 20, .08);
  --radius: 18px;
  --maxw: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15130f;
    --bg-alt: #1d1a15;
    --surface: #221e18;
    --ink: #f3ece1;
    --ink-soft: #b5aa9a;
    --line: #3a332a;
    --accent: #ff6b52;
    --accent-ink: #1a0c08;
    --accent-soft: #3d1f18;
    --teal: #5fc7b5;
    --teal-soft: #173430;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-soft); }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--teal); margin-bottom: .8rem;
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--surface); padding: 8px 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: "Fraunces", serif; font-weight: 700; font-size: 1.3rem; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; color: var(--ink); font: inherit; }
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-tiktok { background: #000; color: #fff; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
section { padding: 88px 0; }
section.alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin-top: .2em; }
.card p:last-child { margin-bottom: 0; }
.icon-badge {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 1.3rem; margin-bottom: 12px;
}
.step-num {
  font-family: "Fraunces", serif; font-size: 2.4rem; font-weight: 700; color: var(--accent); line-height: 1; margin-bottom: 10px;
}

/* Hero */
.hero { padding: 72px 0 88px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero p.lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 560px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding: 0; list-style: none; }
.pill-list li { font-size: .85rem; padding: 6px 12px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font-weight: 600; }

.hero-visual { position: relative; }
.timeline {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: var(--shadow);
}
.timeline .bar { height: 54px; border-radius: 12px; background: repeating-linear-gradient(90deg, var(--bg-alt) 0 10px, var(--line) 10px 11px); position: relative; overflow: hidden; }
.timeline .seg { position: absolute; top: 0; bottom: 0; border-radius: 10px; background: color-mix(in srgb, var(--accent) 35%, transparent); border: 2px solid var(--accent); }
.timeline .row { display: flex; justify-content: space-between; font-size: .82rem; color: var(--ink-soft); margin: 10px 0 18px; }
.clips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.clip { aspect-ratio: 9/16; border-radius: 14px; background: linear-gradient(160deg, var(--teal), #0d3b35); position: relative; overflow: hidden; color: #fff; font-size: .75rem; padding: 10px; display: flex; flex-direction: column; justify-content: flex-end; }
.clip:nth-child(2) { background: linear-gradient(160deg, var(--accent), #7a1f12); }
.clip:nth-child(3) { background: linear-gradient(160deg, #6b5bd2, #2a2166); }
.clip .tag { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.92); color: #1d1a16; padding: 3px 8px; border-radius: 999px; font-weight: 700; font-size: .7rem; }

/* Scope table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-alt); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .88em; background: var(--bg-alt); padding: 2px 6px; border-radius: 6px; }

/* Post composer demo (Content Posting API UX) */
.composer { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
@media (max-width: 820px) { .composer { grid-template-columns: 1fr; } }
.phone { aspect-ratio: 9/16; border-radius: 26px; background: linear-gradient(170deg, #1f7a6d, #0b2925); border: 8px solid #111; position: relative; color: #fff; padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; max-width: 260px; }
.phone .cap { font-size: .85rem; line-height: 1.4; word-break: break-word; }
.form-row { margin-bottom: 18px; }
.form-row > label, .form-row > .label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
input[type="text"], textarea, select {
  width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font: inherit;
}
textarea { min-height: 84px; resize: vertical; }
.creator { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--bg-alt); margin-bottom: 18px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #6b5bd2); flex: none; }
.checks { display: flex; flex-wrap: wrap; gap: 16px; }
.checks label, .switch-row label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sub-options { margin: 12px 0 0 4px; padding-left: 14px; border-left: 3px solid var(--line); }
.sub-options label { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; font-weight: 500; }
.hint { font-size: .85rem; color: var(--ink-soft); margin-top: 6px; }
.notice { font-size: .9rem; padding: 12px 14px; border-radius: 12px; background: var(--teal-soft); color: var(--ink); }
.notice.warn { background: var(--accent-soft); }
.toast { margin-top: 14px; font-weight: 600; color: var(--teal); min-height: 1.5em; }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.checklist li::before { content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 700; }

/* FAQ */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 8px; }

/* Legal pages */
.legal-hero { padding: 64px 0 32px; border-bottom: 1px solid var(--line); }
.legal { display: grid; grid-template-columns: 240px 1fr; gap: 48px; padding: 48px 20px 96px; }
@media (max-width: 860px) { .legal { grid-template-columns: 1fr; } .toc { position: static !important; } }
.toc { position: sticky; top: 90px; align-self: start; font-size: .9rem; }
.toc ol { padding-left: 18px; margin: 0; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.legal article { max-width: 760px; }
.legal article h2 { font-size: 1.5rem; margin-top: 2.2em; scroll-margin-top: 90px; }
.legal article h2:first-child { margin-top: 0; }
.legal article h3 { font-size: 1.1rem; margin-top: 1.4em; }
.legal article ul { padding-left: 20px; }
.legal article li { margin-bottom: 6px; }
.summary-box { background: var(--teal-soft); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 36px; }
.summary-box ul { margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 36px; font-size: .92rem; color: var(--ink-soft); }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
@media (max-width: 720px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--ink); margin: 0 0 10px; font-size: .95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.disclaimer { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .82rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
