/* ============================================================
   GlowShoot — warm darkroom studio
   ============================================================ */

:root {
  /* warm-tinted neutrals (hue ~65, amber family) */
  --bg:        oklch(0.17 0.012 65);
  --bg-deep:   oklch(0.14 0.010 65);
  --panel:     oklch(0.21 0.014 65);
  --panel-2:   oklch(0.25 0.016 65);
  --line:      oklch(0.32 0.018 65 / 0.55);
  --text:      oklch(0.95 0.012 85);
  --text-dim:  oklch(0.73 0.018 78);
  --text-faint:oklch(0.56 0.016 72);
  --accent:    oklch(0.80 0.150 75);
  --accent-hi: oklch(0.86 0.130 80);
  --accent-ink:oklch(0.24 0.055 70);

  --space-xs: 4px; --space-sm: 8px; --space-md: 16px;
  --space-lg: 24px; --space-xl: 40px; --space-2xl: 72px;

  --r-sm: 8px; --r-md: 12px; --r-lg: 18px;

  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;

  --shadow-md: 0 10px 30px oklch(0.08 0.01 65 / 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection { background: oklch(0.8 0.15 75 / 0.35); }

kbd {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text-dim);
}

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px clamp(16px, 4vw, 48px);
  background: oklch(0.17 0.012 65 / 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}
.wordmark .mark { width: 26px; height: 26px; border-radius: 7px; }

.head-nav { display: flex; align-items: center; gap: var(--space-lg); }
.head-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.head-nav a:hover { color: var(--text); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: var(--accent-hi); }
.btn-primary:disabled {
  background: var(--panel-2);
  color: var(--text-faint);
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--line);
}
.btn-ghost:hover:not(:disabled) { color: var(--text); border-color: oklch(0.45 0.02 65); }
.btn-ghost:disabled { color: var(--text-faint); cursor: not-allowed; }

.btn-pro {
  background: oklch(0.8 0.15 75 / 0.12);
  color: var(--accent) !important;
  border-color: oklch(0.8 0.15 75 / 0.35);
  padding: 8px 14px;
}
.btn-pro:hover { background: oklch(0.8 0.15 75 / 0.2); }

/* ---------- hero ---------- */

.hero {
  padding: clamp(40px, 7vw, 88px) clamp(16px, 4vw, 48px) clamp(24px, 3vw, 40px);
  max-width: 1200px;
  margin-inline: auto;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 8.5vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin-left: -0.04em;
  max-width: 14ch;
}

.hero-sub {
  margin-top: var(--space-lg);
  max-width: 52ch;
  font-size: 1.1rem;
  color: var(--text-dim);
}

/* ---------- studio ---------- */

.studio {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-lg);
  align-items: start;
  max-width: 1200px;
  margin-inline: auto;
  padding: var(--space-md) clamp(16px, 4vw, 48px) var(--space-2xl);
}

.stage-wrap { min-width: 0; }

.stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  background:
    radial-gradient(oklch(0.30 0.02 65 / 0.5) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--space-lg);
  overflow: hidden;
}

.stage canvas {
  max-width: 100%;
  max-height: 68vh;
  width: auto;
  height: auto;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-md);
}

/* empty state */
.dropzone { width: 100%; }
.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
}
.drop-glyph {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: var(--space-sm);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.12); }
}
.drop-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.drop-hint { color: var(--text-faint); font-size: 0.92rem; }
.drop-actions { display: flex; gap: var(--space-sm); margin-top: var(--space-md); }

.stage.dragover {
  border-color: var(--accent);
  background:
    radial-gradient(oklch(0.8 0.15 75 / 0.08) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--bg-deep);
}

.chip {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  background: oklch(0.14 0.01 65 / 0.85);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
.chip:hover { color: var(--text); }
.replace-chip {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.stage:hover .replace-chip, .replace-chip:focus-visible { opacity: 1; }

.stage-note {
  margin-top: var(--space-sm);
  font-size: 0.82rem;
  color: var(--text-faint);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- rail ---------- */

.rail {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--space-lg);
  position: sticky;
  top: 76px;
}

.control-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.control-group { display: flex; flex-direction: column; gap: 10px; }

/* swatches */
.swatches {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-sm);
}
.swatch {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.swatch:hover { transform: scale(1.08); }
.swatch[aria-selected="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--bg);
}
.swatch .swatch-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: oklch(0.98 0.01 85);
  text-shadow: 0 1px 3px oklch(0.1 0.01 65 / 0.7);
  background: oklch(0.15 0.01 65 / 0.25);
  border-radius: 6px;
}

/* sliders */
.sliders { gap: var(--space-md); }
.slider-row { display: flex; flex-direction: column; gap: 6px; }

input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--panel-2);
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  transition: transform 0.1s ease;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: none;
}

/* segmented */
.segmented {
  display: flex;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 3px;
  gap: 3px;
}
.segmented button {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-faint);
  background: transparent;
  border: none;
  border-radius: 9px;
  padding: 7px 4px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.segmented button:hover { color: var(--text-dim); }
.segmented button[aria-pressed="true"] {
  background: var(--panel-2);
  color: var(--text);
}

/* export */
.export-group { gap: 10px; border-top: 1px solid var(--line); padding-top: var(--space-lg); }
.export-row { display: flex; align-items: center; gap: var(--space-sm); }

select {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  cursor: pointer;
}

.wm-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-faint);
  cursor: pointer;
  white-space: nowrap;
}
.wm-toggle input { accent-color: var(--accent); }
.wm-toggle .lock { color: var(--accent); font-weight: 600; }

.export-secondary { display: flex; gap: var(--space-sm); }
.export-secondary .btn { flex: 1; padding: 9px 10px; font-size: 0.85rem; }

/* ---------- sections ---------- */

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: var(--space-xl);
}

.steps, .pricing, .faq {
  max-width: 1000px;
  margin-inline: auto;
  padding: var(--space-2xl) clamp(16px, 4vw, 48px);
}
.steps { border-top: 1px solid var(--line); }

.step-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-xl);
}
.step-list li { display: flex; gap: var(--space-md); align-items: flex-start; }
.step-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--accent);
  min-width: 1.2ch;
}
.step-list h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.step-list p { color: var(--text-dim); font-size: 0.95rem; max-width: 38ch; }

/* pricing */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
  align-items: start;
}
.plan {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--space-xl) var(--space-lg);
}
.plan-pro {
  background: var(--panel);
  border-color: oklch(0.8 0.15 75 / 0.4);
}
.plan h3 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.plan-badge { color: var(--accent); }
.price {
  font-family: var(--font-display);
  font-size: 3.2rem;
  line-height: 1.1;
  margin: var(--space-sm) 0 var(--space-md);
}
.price-note { font-family: var(--font-body); font-size: 0.9rem; font-weight: 500; color: var(--text-faint); }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: var(--space-lg); }
.plan li { color: var(--text-dim); font-size: 0.95rem; padding-left: 22px; position: relative; }
.plan li::before { content: "✦"; position: absolute; left: 0; color: var(--text-faint); font-size: 0.7rem; top: 4px; }
.plan-pro li::before { color: var(--accent); }
.plan li strong { color: var(--text); }
.plan-note { font-size: 0.85rem; color: var(--text-faint); }
.plan-pro .btn-primary { width: 100%; }
.license-form .btn { flex-shrink: 0; }

.license-details { margin-top: var(--space-md); }
.license-details summary {
  font-size: 0.85rem;
  color: var(--text-faint);
  cursor: pointer;
}
.license-details summary:hover { color: var(--text-dim); }
.license-form { display: flex; gap: var(--space-sm); margin-top: var(--space-sm); }
.license-form input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 12px;
}
.license-form input::placeholder { color: var(--text-faint); }
.license-msg { font-size: 0.85rem; margin-top: var(--space-sm); color: var(--text-dim); min-height: 1.2em; }
.license-msg.ok { color: oklch(0.8 0.14 150); }
.license-msg.err { color: oklch(0.72 0.16 30); }

/* faq */
.faq details {
  border-bottom: 1px solid var(--line);
  padding: var(--space-md) 0;
}
.faq summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-faint); font-size: 1.2rem; transition: transform 0.15s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: var(--space-sm); color: var(--text-dim); max-width: 65ch; }

/* footer */
.site-foot {
  border-top: 1px solid var(--line);
  padding: var(--space-xl) clamp(16px, 4vw, 48px) var(--space-2xl);
  text-align: center;
  color: var(--text-faint);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.site-foot strong { color: var(--text-dim); }
.foot-links a { color: var(--text-dim); text-decoration: none; }
.foot-links a:hover { color: var(--text); }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  translate: -50% 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, translate 0.2s ease;
  z-index: 100;
}
.toast.show { opacity: 1; translate: -50% 0; }

/* ---------- responsive ---------- */

@media (max-width: 920px) {
  .studio { grid-template-columns: 1fr; }
  .rail { position: static; }
  .head-nav a:not(.btn-pro) { display: none; }
  .swatches { grid-template-columns: repeat(9, 1fr); }
  .stage { min-height: 300px; }
  .stage canvas { max-height: 52vh; }
}

@media (max-width: 560px) {
  .swatches { grid-template-columns: repeat(6, 1fr); }
  .drop-actions { flex-direction: column; }
  .export-row { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .drop-glyph { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
