/* ThreadCAD website. One stylesheet; the app's own tokens (packages/emb_theme):
   dark only, warm orange gradient for the one primary action, gold for PRO,
   neutral glass surfaces so the work is the colour on screen. */

@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-display: swap; src: url("/assets/fonts/plus-jakarta-sans-regular.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500; font-display: swap; src: url("/assets/fonts/plus-jakarta-sans-medium.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap; src: url("/assets/fonts/plus-jakarta-sans-semibold.woff2") format("woff2"); }

:root {
  --brand-start: #F64C18;
  --brand-end: #EE9539;
  --brand: #F27029;
  --text-brand: #FFA65C;
  --bg: #0B0B0F;
  --bg-deep: #060609;
  --surface: #14141A;
  --surface-raised: #1C1C24;
  --glass: rgba(22, 22, 28, 0.72);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.24);
  --text: #F4F4F6;
  --text-2: #A9A9B3;
  --text-3: #7C7C86;
  --pro: #FFD36B;
  --success: #4CD98B;
  --gradient: linear-gradient(90deg, var(--brand-start), var(--brand-end));
  --gradient-diag: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  --radius: 20px;
  --radius-sm: 12px;
  --container: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--text-brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--text-brand); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 600; }
h1 { font-size: clamp(36px, 6vw, 60px); }
h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
.muted { color: var(--text-2); }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 8px 14px; background: var(--surface-raised); border-radius: 8px; }
.skip-link:focus { left: 8px; }
.icon { width: 22px; height: 22px; flex: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 11, 15, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 19px; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a { color: var(--text-2); font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; }
.nav a.btn-ghost { color: var(--text); }
@media (max-width: 720px) { .nav a:not(.btn) { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; font-size: 16px; color: #fff; border: 1px solid transparent;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--gradient); }
.btn-ghost { background: var(--glass); border-color: var(--border-strong); color: var(--text); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* Hero */
.hero { position: relative; padding: clamp(48px, 9vw, 96px) 0 clamp(40px, 7vw, 80px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 820px; max-height: 820px;
  background: radial-gradient(closest-side, rgba(246, 76, 24, 0.28), transparent 70%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; margin-bottom: 20px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--glass);
  color: var(--text-2); font-size: 14px; font-weight: 500;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gradient); }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--text-2); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 16px; }
.store-note { font-size: 14px; color: var(--text-3); margin: 0; }
.store-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px;
  border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); line-height: 1.2;
}
.store-badge small { display: block; font-size: 11px; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
.store-badge strong { font-size: 16px; font-weight: 600; }
.store-badge:hover { text-decoration: none; border-color: var(--text-brand); }
.store-badge[aria-disabled="true"] { opacity: .75; cursor: default; }
.store-badge[aria-disabled="true"]:hover { border-color: var(--border-strong); }

/* Phone frames */
.phones { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 0; min-height: 420px; }
.phone {
  width: min(260px, 62vw); aspect-ratio: 1206 / 2622; border-radius: 38px; padding: 9px;
  background: linear-gradient(160deg, #2a2a33, #111116); border: 1px solid var(--border-strong);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .6) inset;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 30px; }
.phones .phone:nth-child(2) { margin-left: -64px; transform: translateY(-36px) rotate(4deg); z-index: 1; }
.phones .phone:nth-child(1) { transform: rotate(-3deg); }
@media (max-width: 860px) { .phones { min-height: 0; } .phones .phone:nth-child(2) { display: none; } .phones .phone:nth-child(1) { transform: none; } }

/* Sections */
section { padding: clamp(56px, 9vw, 104px) 0; }
.section-head { max-width: 680px; margin-bottom: clamp(28px, 5vw, 48px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker { color: var(--text-brand); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.alt { background: var(--bg-deep); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-2); margin: 0; font-size: 16px; }
.icon-tile {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px;
  background: rgba(242, 112, 41, 0.14); color: var(--text-brand); border: 1px solid rgba(242, 112, 41, 0.28);
}

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 16px; border-radius: 50%;
  background: var(--gradient); color: #fff; font-weight: 600;
}
.step p { color: var(--text-2); margin: 0; font-size: 16px; }

/* Showcase (photo + text) */
.showcase { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 6vw, 64px); align-items: center; }
@media (max-width: 860px) { .showcase { grid-template-columns: 1fr; } }
.showcase .photo { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 4 / 5; }
.showcase .photo img { width: 100%; height: 100%; object-fit: cover; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.ticks li .icon { color: var(--success); margin-top: 3px; }
.ticks li strong { color: var(--text); font-weight: 600; }

/* Formats */
.formats { display: flex; flex-wrap: wrap; gap: 10px; }
.format {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); font-weight: 600;
}
.format small { font-weight: 500; color: var(--text-2); font-size: 13px; }
.pro-badge {
  display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--pro); color: #2A1D00;
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
}

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }
.plan { display: flex; flex-direction: column; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.plan.featured { border-color: rgba(255, 211, 107, 0.55); background: linear-gradient(180deg, rgba(255, 211, 107, 0.08), var(--surface) 40%); }
.plan h3 { display: flex; align-items: center; gap: 10px; }
.price { font-size: 40px; font-weight: 600; letter-spacing: -0.02em; margin: 8px 0 4px; }
.price small { font-size: 16px; color: var(--text-2); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; color: var(--text-2); font-size: 16px; }
.plan li { display: flex; gap: 10px; }
.plan li .icon { width: 20px; height: 20px; color: var(--success); margin-top: 3px; }
.fine { font-size: 14px; color: var(--text-3); margin-top: 20px; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-brand); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--text-2); margin: 0 0 18px; }

/* CTA band */
.cta-band {
  text-align: center; border-radius: 28px; padding: clamp(36px, 6vw, 64px) var(--gutter);
  background: radial-gradient(120% 140% at 50% 0%, rgba(246, 76, 24, .25), transparent 60%), var(--surface);
  border: 1px solid var(--border);
}
.cta-band .store-badges { justify-content: center; margin-top: 24px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 48px; color: var(--text-2); font-size: 15px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--text-2); }
.footer-links a:hover { color: var(--text); }

/* Legal / document pages */
.doc { padding: clamp(40px, 7vw, 72px) 0 clamp(56px, 8vw, 96px); }
.doc .container { max-width: 780px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); }
.doc h2 { font-size: 24px; margin-top: 2em; }
.doc h3 { font-size: 18px; margin-top: 1.5em; }
.doc p, .doc li { color: var(--text-2); }
.doc strong { color: var(--text); }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }
.doc .updated { color: var(--text-3); font-size: 15px; }
.doc table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-2); }
.doc th { color: var(--text); font-weight: 600; }
.table-wrap { overflow-x: auto; }

/* Scroll reveal (progressive: only when JS runs) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }
