/* ============================================================
   SKETCHY — Global Styles
   Palette: Jet #2D3142 | Slate #4F5D75 | Silver #BFC0C0
            White #FFFFFF | Coral #FF6B35
   Font: Outfit (all weights)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  background: #FFFFFF;
  color: #1E2130;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Tokens ── */
:root {
  --jet:        #1E2130;
  --jet-soft:   #2D3142;
  --slate:      #4A5568;
  --slate-light:#718096;
  --silver:     #BFC0C0;
  --silver-light:#E8E9EC;
  --white:      #FFFFFF;
  --coral:      #FF5722;
  --coral-hover:#E64A19;
  --coral-dim:  rgba(255,87,34,.10);
  --coral-glow: 0 0 0 3px rgba(255,87,34,.20);
  --footer-bg:  #1A1D27;
  --footer-border: rgba(255,255,255,.08);
  --radius:     14px;
  --radius-sm:  9px;
  --transition: .2s ease;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  line-height: 1.12;
  color: var(--jet);
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2.6rem, 5.5vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p  { color: var(--slate); font-size: 1.05rem; line-height: 1.75; }
a  { color: var(--coral); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--coral-hover); }

/* ── Layout ── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 28px; }
section { padding: 96px 0; }

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--silver-light);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; max-width: 1140px; margin: 0 auto; padding: 0 28px;
}
.nav-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 800; font-size: 1.5rem;
  color: var(--jet); text-decoration: none;
  display: flex; align-items: center; gap: 9px;
  letter-spacing: -.03em;
}
.nav-logo img {
  width: 28px; height: 28px; border-radius: 7px;
  object-fit: cover; flex-shrink: 0;
}
.nav-s-glyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex-shrink: 0;
  background: var(--coral); color: #fff;
  font-family: 'Outfit', sans-serif; font-weight: 900;
  font-size: 1.1rem; letter-spacing: -.04em;
  border-radius: 8px;
  line-height: 1;
}
.nav-hub {
  font-size: .9rem; font-weight: 600; color: var(--slate);
  border: 1.5px solid var(--silver);
  border-radius: 24px; padding: 7px 18px;
  text-decoration: none; transition: all var(--transition);
  letter-spacing: -.01em;
}
.nav-hub:hover {
  border-color: var(--coral);
  color: var(--coral);
  background: var(--coral-dim);
}

/* ── HERO ── */
.hero {
  padding: 88px 0 72px;
  background: var(--white);
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 65% 55% at 50% -5%, rgba(255,87,34,.07) 0%, transparent 68%);
  pointer-events: none;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--coral-dim); color: var(--coral);
  font-size: .82rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 24px; margin-bottom: 24px;
  border: 1px solid rgba(255,87,34,.25);
}
.hero-title { margin-bottom: 20px; }
.hero-title em { font-style: italic; color: var(--coral); }
.hero-sub {
  font-size: 1.2rem; color: var(--slate);
  max-width: 580px; margin-bottom: 44px; line-height: 1.8;
  font-weight: 400;
}
.hero-badges {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 56px;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--white); border: 1.5px solid var(--silver-light);
  border-radius: 24px; padding: 6px 14px;
  font-size: .84rem; font-weight: 500; color: var(--slate);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.badge::before { content: '✓'; color: var(--coral); font-weight: 700; }

/* ── TOOL CARD ── */
.tool-card {
  background: var(--white);
  border: 1.5px solid var(--silver-light);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(30,33,48,.08);
  overflow: hidden;
}
.tool-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--silver-light);
  background: #F9F9FB;
}
.tool-card-header span { font-size: .82rem; color: var(--slate); font-weight: 500; }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.dot-r { background: #FF6058; }
.dot-y { background: #FFBC2E; }
.dot-g { background: #28C940; }
.tool-body { padding: 32px; }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--silver);
  border-radius: var(--radius);
  padding: 56px 28px; text-align: center;
  cursor: pointer; transition: all var(--transition);
  background: #FAFAFA; position: relative;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--coral);
  background: var(--coral-dim);
  box-shadow: var(--coral-glow);
}
.upload-icon {
  width: 60px; height: 60px; margin: 0 auto 16px;
  background: var(--coral-dim); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.upload-icon svg { stroke: var(--coral); }
.upload-title {
  font-size: 1.15rem; font-weight: 700;
  color: var(--jet); margin-bottom: 7px;
}
.upload-sub { font-size: .9rem; color: var(--slate-light); }
.upload-sub strong { color: var(--coral); font-weight: 600; }
#file-input { display: none; }

/* Controls */
.controls-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px 24px; margin: 24px 0 12px;
}
.ctrl-mode-row {
  margin-bottom: 20px;
}
.ctrl-group label {
  display: block; font-size: .78rem; font-weight: 700;
  color: var(--jet); text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: 8px;
}
.ctrl-group select,
.ctrl-group input[type="number"] {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--silver); border-radius: var(--radius-sm);
  font-size: .95rem; color: var(--jet); background: var(--white);
  outline: none; appearance: none; transition: border-color var(--transition);
  font-family: 'Outfit', sans-serif; font-weight: 500;
}
.ctrl-group select:focus, .ctrl-group input:focus {
  border-color: var(--coral); box-shadow: var(--coral-glow);
}
.range-row { display: flex; align-items: center; gap: 12px; }
.range-val { font-size: .92rem; font-weight: 700; color: var(--coral); min-width: 32px; text-align: right; }
input[type="range"] {
  width: 100%; padding: 0; cursor: pointer;
  accent-color: var(--coral); height: 4px;
}

/* Preview split */
.preview-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 22px;
}
.preview-pane {
  border: 1.5px solid var(--silver-light); border-radius: var(--radius-sm);
  overflow: hidden; background: #F7F8FA; min-height: 220px;
  display: flex; flex-direction: column;
}
.pane-label {
  font-size: .74rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--slate);
  padding: 9px 14px; border-bottom: 1px solid var(--silver-light);
  background: var(--white);
}
.pane-content {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 14px; overflow: auto;
}
.pane-content img, .pane-content svg {
  max-width: 100%; max-height: 230px; object-fit: contain;
}
.pane-placeholder { text-align: center; color: var(--silver); }
.pane-placeholder svg { margin-bottom: 8px; opacity: .45; }
.pane-placeholder p { font-size: .82rem; color: var(--silver); }

/* Action bar */
.action-bar {
  display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap;
}
.btn-primary {
  flex: 1; padding: 14px 28px;
  background: var(--coral); color: var(--white);
  border: none; border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: all var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  letter-spacing: -.01em;
}
.btn-primary:hover {
  background: var(--coral-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,87,34,.30);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary {
  padding: 14px 22px;
  background: var(--white); color: var(--jet);
  border: 1.5px solid var(--silver); border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif; font-size: .95rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.btn-secondary:hover { border-color: var(--coral); color: var(--coral); }

/* Progress */
.progress-wrap { margin-top: 18px; display: none; }
.progress-wrap.visible { display: block; }
.progress-bar { height: 4px; background: var(--silver-light); border-radius: 2px; overflow: hidden; }
.progress-fill {
  height: 100%; background: var(--coral);
  border-radius: 2px; width: 0%; transition: width .3s ease;
}
.progress-label { font-size: .8rem; color: var(--slate-light); margin-top: 8px; font-weight: 500; }

/* SVG code output */
.svg-output { margin-top: 18px; display: none; }
.svg-output.visible { display: block; }
.code-block {
  background: #14161F; border-radius: var(--radius-sm);
  padding: 18px; overflow-x: auto; max-height: 180px;
  font-family: 'Courier New', monospace; font-size: .78rem;
  color: #BFC0C0; line-height: 1.65;
}

/* ── FEATURES ── */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.feat-card {
  padding: 32px; border-radius: var(--radius);
  border: 1.5px solid var(--silver-light);
  transition: all var(--transition); background: var(--white);
}
.feat-card:hover {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px var(--coral-dim), 0 8px 32px rgba(0,0,0,.06);
  transform: translateY(-3px);
}
.feat-card h3 { margin-bottom: 10px; font-size: 1.1rem; }
.feat-card p { font-size: .95rem; line-height: 1.7; }

/* ── HOW IT WORKS ── */
.steps-list { display: flex; flex-direction: column; }
.step {
  display: grid; grid-template-columns: 72px 1fr;
  gap: 28px; padding: 40px 0;
  border-bottom: 1px solid var(--silver-light);
}
.step:last-child { border-bottom: none; }
.step-num {
  font-size: 3rem; font-weight: 900;
  color: var(--coral); line-height: 1;
  opacity: .9; letter-spacing: -.04em;
}
.step h3 { margin-bottom: 8px; font-size: 1.2rem; }
.step p { font-size: .97rem; }

/* ── USE CASES ── */
.use-cases-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}
.uc-card {
  padding: 28px; background: var(--white);
  border-radius: var(--radius); border: 1.5px solid var(--silver-light);
  transition: all var(--transition);
}
.uc-card:hover { border-color: var(--coral); transform: translateY(-2px); }
.uc-card h3 { font-size: 1rem; margin-bottom: 8px; margin-top: 0; }
.uc-card p { font-size: .9rem; line-height: 1.7; }

/* ── FAQ ── */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--silver-light); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 0; cursor: pointer; gap: 20px;
  font-size: 1.05rem; font-weight: 600; color: var(--jet);
  list-style: none; user-select: none; letter-spacing: -.01em;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: '+'; font-size: 1.5rem; color: var(--coral);
  font-weight: 300; flex-shrink: 0; transition: transform var(--transition);
}
details[open] .faq-q::after { transform: rotate(45deg); }
.faq-a { padding: 0 0 24px; font-size: .97rem; color: var(--slate); line-height: 1.8; }

/* ── SECTION HEADERS ── */
.section-label {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--coral); margin-bottom: 12px;
  display: block;
}
.section-head { margin-bottom: 56px; }
.section-head h2 { margin-bottom: 14px; }
.section-head p { color: var(--slate); max-width: 580px; font-size: 1.05rem; }

/* ── ALTERNATING BG ── */
section:nth-child(even) { background: #F8F9FB; }

/* ── FOOTER (dark) ── */
footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  padding: 72px 0 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px; margin-bottom: 56px;
}
.footer-brand .nav-logo {
  font-size: 1.3rem; margin-bottom: 14px; display: inline-flex;
  color: #FFFFFF;
}
.footer-brand p {
  font-size: .88rem; color: rgba(255,255,255,.5);
  line-height: 1.7; max-width: 230px;
}
.footer-col h4 {
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.35); margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col ul li a {
  font-size: .9rem; color: rgba(255,255,255,.6);
  text-decoration: none; font-weight: 400;
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--coral); }
.footer-bottom {
  border-top: 1px solid var(--footer-border);
  padding-top: 28px; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: .82rem; color: rgba(255,255,255,.3); }
.footer-bottom a { color: rgba(255,255,255,.3); font-size: .82rem; transition: color var(--transition); }
.footer-bottom a:hover { color: var(--coral); }

/* ── INNER PAGE HERO ── */
.page-hero { padding: 72px 0 56px; border-bottom: 1px solid var(--silver-light); }
.page-hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin-bottom: 14px; }
.page-hero p { max-width: 620px; font-size: 1.1rem; }

/* ── PROSE (about / terms / privacy) ── */
.prose { max-width: 800px; margin: 0 auto; padding: 72px 28px 96px; }
.prose h2 {
  font-size: 1.65rem; margin: 56px 0 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--silver-light);
}
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { font-size: 1.1rem; margin: 32px 0 10px; }
.prose p { margin-bottom: 18px; font-size: .98rem; line-height: 1.85; }
.prose ul { padding-left: 22px; margin-bottom: 18px; }
.prose ul li { font-size: .98rem; color: var(--slate); margin-bottom: 8px; line-height: 1.75; }
.prose .highlight-box {
  background: var(--coral-dim); border-left: 3px solid var(--coral);
  padding: 18px 22px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 28px 0;
}
.prose .highlight-box p { margin: 0; color: var(--jet); font-weight: 500; font-size: .95rem; }
.last-updated { font-size: .82rem; color: var(--silver); margin-top: -10px; margin-bottom: 44px; }

/* ── ABOUT ── */
.about-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 20px; margin: 56px 0;
}
.stat-block {
  text-align: center; padding: 32px 16px;
  border-radius: var(--radius); background: #F8F9FB;
  border: 1.5px solid var(--silver-light);
  transition: border-color var(--transition);
}
.stat-block:hover { border-color: var(--coral); }
.stat-block .num {
  font-size: 2.8rem; font-weight: 900;
  color: var(--coral); display: block; line-height: 1; letter-spacing: -.04em;
}
.stat-block span.label {
  font-size: .82rem; color: var(--slate-light);
  display: block; margin-top: 8px; line-height: 1.4;
}
.manifesto {
  background: var(--footer-bg); color: var(--white);
  border-radius: var(--radius); padding: 56px 52px; margin: 56px 0;
}
.manifesto h2 { color: var(--white); margin-bottom: 20px; font-size: 2rem; }
.manifesto p { color: rgba(255,255,255,.6); line-height: 1.85; font-size: 1rem; }
.manifesto p + p { margin-top: 14px; }

/* ── ANIMATIONS ── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: var(--white); border-radius: 50%;
  animation: spin .7s linear infinite; display: inline-block;
}

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  background: var(--jet); color: var(--white);
  padding: 14px 22px; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 500;
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
  transform: translateY(80px); opacity: 0;
  transition: all .3s ease; pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success::before { content: '✓  '; color: var(--coral); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .manifesto { padding: 40px 32px; }
}
@media (max-width: 768px) {
  section { padding: 64px 0; }
  .preview-split { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 48px; }
  .controls-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 56px 1fr; gap: 20px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .container { padding: 0 18px; }
}

/* ── CONTAINER MAX WIDTH tighter ── */
.container { max-width: 980px; }

/* ── CTRL HINT ── */
.ctrl-hint {
  font-size: .7rem; font-weight: 400; color: var(--slate-light);
  text-transform: none; letter-spacing: 0; margin-left: 4px;
}

/* ── CONTROLS FULL-WIDTH ROW ── */
.ctrl-group--full {
  grid-column: 1 / -1;
}

/* ── PARAMS GRID ── */
.params-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px; margin-bottom: 32px;
}
.param-card {
  padding: 28px 24px;
  border: 1.5px solid var(--silver-light);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color var(--transition), transform var(--transition);
}
.param-card:hover {
  border-color: var(--coral);
  transform: translateY(-2px);
}
.param-num {
  font-size: .72rem; font-weight: 800; letter-spacing: .1em;
  color: var(--coral); margin-bottom: 10px; text-transform: uppercase;
}
.param-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.param-card p { font-size: .9rem; line-height: 1.75; margin-bottom: 14px; }
.param-tip {
  font-size: .8rem; font-weight: 600; color: var(--coral);
  background: var(--coral-dim); padding: 7px 12px;
  border-radius: var(--radius-sm); border-left: 2px solid var(--coral);
}

/* ── MODE EXPLAINER ── */
.mode-explainer {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin-top: 8px;
}
.mode-block {
  padding: 28px; border-radius: var(--radius);
  background: #F8F9FB; border: 1.5px solid var(--silver-light);
}
.mode-label {
  font-size: .82rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; color: var(--coral); margin-bottom: 10px;
}
.mode-block p { font-size: .92rem; line-height: 1.75; }

@media (max-width: 640px) {
  .mode-explainer { grid-template-columns: 1fr; }
  .params-grid { grid-template-columns: 1fr; }
}
