:root {
  --paper: #F1F2EC;
  --paper-raised: #FFFFFF;
  --ink: #1F2A26;
  --ink-soft: #55625C;
  --line: #D6D9CF;
  --stamp: #2F6B52;
  --stamp-dark: #1F4D3B;
  --gold: #A8791F;
  --gold-soft: #F3E7CD;
  --danger: #A63E2F;
  --radius: 4px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header ---- */

.topbar {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.01em;
}

.wordmark-mark { width: 30px; height: 30px; color: var(--stamp); }
.wordmark-letters { font-family: 'IBM Plex Mono', monospace; font-size: 9px; fill: var(--paper); }

.topbar-status {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft);
}

/* ---- Hero ---- */

.hero { padding: 64px 0 40px; text-align: left; }

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--stamp-dark);
  margin: 0 0 14px;
}

.hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

.hero-sub {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0;
}

/* ---- Tray (drop zone) ---- */

.tray-section { padding-bottom: 12px; }

.tray {
  background: var(--paper-raised);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.tray.dragover {
  border-color: var(--stamp);
  background: #F6FAF7;
}

.tray-idle, .tray-file, .tray-working, .tray-done, .tray-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* The [hidden] attribute must always win over the display:flex above,
   otherwise every tray state shows stacked on top of each other at once. */
.tray-idle[hidden], .tray-file[hidden], .tray-working[hidden], .tray-done[hidden], .tray-error[hidden] {
  display: none;
}

.tray-icon { width: 44px; height: 44px; color: var(--ink-soft); }
.done-icon { color: var(--stamp); }

.tray-title {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 600;
  margin: 0;
}

.error-title { color: var(--danger); }

.tray-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft);
  margin: 0;
}

.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 480px;
}

.file-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 6px 8px 6px 12px;
  border-radius: var(--radius);
}

.file-chip-remove {
  background: none;
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
}
.file-chip-remove:hover { color: var(--danger); }

.tray-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* stamp animation */
.stamp-rig { width: 88px; height: 88px; }
.stamp-svg {
  width: 100%;
  height: 100%;
  color: var(--stamp);
  animation: stampThump 0.9s ease-in-out infinite;
  transform-origin: 50% 20%;
}
.stamp-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  font-weight: 500;
  fill: currentColor;
}
@keyframes stampThump {
  0%   { transform: translateY(-6px) rotate(-2deg); }
  50%  { transform: translateY(4px) rotate(1deg); }
  100% { transform: translateY(-6px) rotate(-2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .stamp-svg { animation: none; }
}

/* ---- Buttons ---- */

.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-primary { background: var(--stamp); color: #fff; }
.btn-primary:hover { background: var(--stamp-dark); }

.btn-ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink-soft); }

.btn-gold { background: var(--gold); color: #fff; white-space: nowrap; }
.btn-gold:hover { background: #8C6418; }

.usage-line {
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 14px;
}

/* ---- Pro / seal section ---- */

.pro-section { padding: 56px 0 72px; }

.seal-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  display: grid;
  gap: 16px;
}

.seal-icon { width: 40px; height: 40px; color: var(--gold); }
.seal-letters { font-family: 'IBM Plex Mono', monospace; font-size: 10px; fill: currentColor; }

.seal-copy h2 {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  margin: 0 0 6px;
}

.seal-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.55;
}

.plan-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.plan-option {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  position: relative;
}

.plan-option:has(input:checked) {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.plan-option input {
  position: absolute;
  top: 14px;
  right: 14px;
  accent-color: var(--gold);
}

.plan-name {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
}

.plan-price {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
}

.plan-detail {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--ink-soft);
}

.plan-period {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-soft);
}

@media (max-width: 480px) {
  .plan-options { grid-template-columns: 1fr; }
}

.upgrade-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.upgrade-form input {
  flex: 1;
  min-width: 200px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  background: var(--paper);
}

.pro-check {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
}

.linklike {
  background: none;
  border: none;
  padding: 0;
  color: var(--stamp-dark);
  text-decoration: underline;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
}

/* ---- Footer ---- */

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-soft);
}

@media (max-width: 560px) {
  .seal-card { padding: 24px; }
  .hero { padding-top: 44px; }
}
