/* publicdomain.ai prototype */
:root {
  --ink: #1c1917;
  --ink-soft: #44403c;
  --cream: #faf6ef;
  --paper: #f3ebe0;
  --card: #fffdf8;
  --line: #e7ddd0;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --gold: #b45309;
  --gold-soft: #fef3c7;
  --danger: #9f1239;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(28, 25, 23, 0.08);
  --max: 1080px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #fff7e8 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #e7f5f2 0%, transparent 50%),
    var(--cream);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(250, 246, 239, 0.9);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.85rem 0; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 0.55rem;
  font-family: var(--serif); font-weight: 700; font-size: 1.15rem;
  color: var(--ink); text-decoration: none; margin-right: auto;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(145deg, #0f766e, #134e4a);
  color: #fff; display: grid; place-items: center;
  font-size: 0.85rem; font-weight: 800; letter-spacing: -0.03em;
}
.nav-links { display: flex; gap: 0.2rem 0.85rem; flex-wrap: wrap; align-items: center; }
.nav-links a {
  color: var(--ink-soft); text-decoration: none; font-size: 0.92rem; font-weight: 550;
  padding: 0.25rem 0.15rem;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent-dark); }
.nav-cta {
  background: var(--ink) !important; color: #fff !important;
  padding: 0.45rem 0.85rem !important; border-radius: 999px;
}
.nav-cta:hover { background: var(--accent-dark) !important; }
.credits-chip {
  font-size: 0.8rem; background: var(--gold-soft); color: var(--gold);
  border: 1px solid #f5d78e; padding: 0.25rem 0.65rem; border-radius: 999px; font-weight: 650;
}
.menu-btn {
  display: none; border: 1px solid var(--line); background: var(--card);
  border-radius: 10px; padding: 0.4rem 0.65rem; font: inherit; cursor: pointer;
}

/* Hero */
.hero {
  padding: 3.2rem 0 2.2rem;
  display: grid; gap: 2rem;
  grid-template-columns: 1.15fr 0.85fr; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  background: #ecfdf8; border: 1px solid #99f6e4;
  padding: 0.3rem 0.65rem; border-radius: 999px; margin-bottom: 0.9rem;
}
.hero h1 {
  font-family: var(--serif); font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.12; margin: 0 0 0.9rem; letter-spacing: -0.02em;
}
.hero p.lead { font-size: 1.08rem; color: var(--ink-soft); margin: 0 0 1.4rem; max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1rem; }
.hero-note { font-size: 0.88rem; color: var(--ink-soft); margin: 0; }
.hero-art {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow); overflow: hidden; aspect-ratio: 1;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border: none; border-radius: 999px; padding: 0.75rem 1.2rem;
  font: inherit; font-weight: 650; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-secondary { background: var(--ink); color: #fff; }
.btn-secondary:hover { background: #292524; color: #fff; }
.btn-ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--paper); color: var(--ink); }
.btn-gold { background: #d97706; color: #fff; }
.btn-gold:hover { background: #b45309; color: #fff; }
.btn:disabled, .btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

/* Sections */
.section { padding: 2.4rem 0; }
.section-head { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1.2rem; flex-wrap: wrap; }
.section h2 {
  font-family: var(--serif); font-size: clamp(1.5rem, 2.8vw, 2rem);
  margin: 0; letter-spacing: -0.02em;
}
.section .sub { color: var(--ink-soft); margin: 0.35rem 0 0; max-width: 40rem; }
.muted { color: var(--ink-soft); }

/* Cards / grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 4px 16px rgba(28,25,23,0.04);
}
.card-body { padding: 1rem 1.05rem 1.15rem; }
.card h3 { margin: 0 0 0.35rem; font-size: 1.05rem; font-family: var(--serif); }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.style-card { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; text-decoration: none; color: inherit; display: block; }
.style-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.style-card .thumb { aspect-ratio: 1; background: var(--paper); }
.style-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.style-card .label {
  padding: 0.7rem 0.85rem; font-weight: 650; font-size: 0.92rem;
  border-top: 1px solid var(--line);
}
.price { font-weight: 750; font-size: 1.25rem; color: var(--ink); }
.price span { font-size: 0.85rem; font-weight: 550; color: var(--ink-soft); }
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  background: #ecfdf8; color: var(--accent-dark);
  border: 1px solid #99f6e4; padding: 0.18rem 0.45rem; border-radius: 999px;
}
.badge-gold { background: var(--gold-soft); color: var(--gold); border-color: #f5d78e; }

/* Create page */
.create-layout {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 1.25rem; align-items: start;
}
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 1.15rem; box-shadow: 0 4px 16px rgba(28,25,23,0.04);
}
.panel h2 { font-family: var(--serif); font-size: 1.25rem; margin: 0 0 0.85rem; }
.style-picker {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.55rem; margin-bottom: 1rem;
}
.style-opt {
  border: 2px solid var(--line); border-radius: 12px; overflow: hidden;
  cursor: pointer; background: var(--paper); padding: 0; text-align: left;
  font: inherit; color: inherit; position: relative;
}
.style-opt img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.style-opt span {
  display: block; font-size: 0.68rem; font-weight: 650; padding: 0.35rem 0.4rem;
  line-height: 1.2; min-height: 2.3rem;
}
.style-opt.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(15,118,110,0.2); }
.style-opt.selected::after {
  content: "✓"; position: absolute; top: 6px; right: 6px;
  background: var(--accent); color: #fff; width: 20px; height: 20px;
  border-radius: 50%; font-size: 0.7rem; display: grid; place-items: center; font-weight: 800;
}
label.field { display: block; font-weight: 650; font-size: 0.88rem; margin: 0 0 0.4rem; }
textarea, input[type="text"], input[type="email"], select {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 0.75rem 0.85rem; font: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
textarea:focus, input:focus, select:focus {
  outline: 2px solid rgba(15,118,110,0.35); border-color: var(--accent);
}
.gen-row { display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; margin-top: 0.9rem; }
.result-frame {
  aspect-ratio: 1; background:
    repeating-linear-gradient(45deg, #f3ebe0, #f3ebe0 10px, #efe6d8 10px, #efe6d8 20px);
  border-radius: 14px; border: 1px dashed #d6c9b6; overflow: hidden;
  display: grid; place-items: center; position: relative;
}
.result-frame img { width: 100%; height: 100%; object-fit: cover; }
.result-placeholder { text-align: center; color: var(--ink-soft); padding: 1.5rem; }
.spinner {
  width: 42px; height: 42px; border: 3px solid #d6c9b6; border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 0.8rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.license-note {
  margin-top: 0.9rem; background: #ecfdf8; border: 1px solid #99f6e4;
  border-radius: 12px; padding: 0.85rem 0.95rem; font-size: 0.9rem; color: var(--ink-soft);
}
.license-note strong { color: var(--accent-dark); }

/* Pricing */
.price-card {
  padding: 1.35rem; display: flex; flex-direction: column; gap: 0.7rem; height: 100%;
}
.price-card.featured {
  border-color: var(--accent); box-shadow: 0 0 0 2px rgba(15,118,110,0.15), var(--shadow);
  position: relative;
}
.price-card ul { margin: 0; padding-left: 1.1rem; color: var(--ink-soft); flex: 1; }
.price-card li { margin: 0.35rem 0; }
.price-card .btn { width: 100%; margin-top: 0.5rem; }

/* Forms */
.form-grid { display: grid; gap: 0.85rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.help { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.3rem; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(28,25,23,0.45);
  display: none; align-items: center; justify-content: center; z-index: 80; padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--card); border-radius: 18px; width: min(100%, 440px);
  padding: 1.35rem; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.modal h3 { font-family: var(--serif); margin: 0 0 0.5rem; }
.demo-banner {
  background: #fff7ed; border: 1px solid #fdba74; color: #9a3412;
  border-radius: 10px; padding: 0.55rem 0.75rem; font-size: 0.85rem; font-weight: 650;
  margin-bottom: 0.9rem;
}
.modal-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }

/* Account */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin-bottom: 1.2rem; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1rem;
  text-align: center;
}
.stat .n { font-size: 1.6rem; font-weight: 800; font-family: var(--serif); }
.stat .l { font-size: 0.82rem; color: var(--ink-soft); }
.history-list { display: grid; gap: 0.7rem; }
.history-item {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 0.8rem; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0.55rem;
}
.history-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }

/* FAQ */
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 0.85rem 1rem; margin-bottom: 0.6rem;
}
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { margin: 0.55rem 0 0; color: var(--ink-soft); }

/* Footer */
.site-footer {
  margin-top: auto; border-top: 1px solid var(--line);
  background: #efe7da; padding: 1.6rem 0 2rem; color: var(--ink-soft); font-size: 0.9rem;
}
.footer-row {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: start;
}
.footer-links { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--accent-dark); }
.proto-tag {
  display: inline-block; margin-top: 0.85rem;
  background: #fff7ed; border: 1px solid #fdba74; color: #9a3412;
  padding: 0.3rem 0.65rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700;
}

/* Schools highlight */
.callout {
  background: linear-gradient(135deg, #ecfdf8, #f0fdf4);
  border: 1px solid #99f6e4; border-radius: 18px; padding: 1.4rem 1.5rem;
}

/* Toast */
.toast {
  position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--ink); color: #fff; padding: 0.75rem 1.1rem; border-radius: 999px;
  font-size: 0.9rem; z-index: 90; transition: transform .25s ease; max-width: min(92vw, 420px);
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* Responsive */
@media (max-width: 900px) {
  .hero, .create-layout, .grid-3, .grid-4, .stat-row { grid-template-columns: 1fr 1fr; }
  .style-picker { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 720px) {
  .menu-btn { display: inline-flex; }
  .nav-links {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    background: var(--card); border: 1px solid var(--line); border-radius: 14px;
    padding: 0.6rem; margin-top: 0.3rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.55rem 0.4rem; }
  .hero, .create-layout, .grid-2, .grid-3, .grid-4, .form-row, .stat-row, .history-item {
    grid-template-columns: 1fr;
  }
  .style-picker { grid-template-columns: repeat(2, 1fr); }
  .hero { padding-top: 1.8rem; }
}

/* Famous characters + spotlight */
.group-label {
  font-size: 0.78rem; font-weight: 750; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--accent); margin: 0.85rem 0 0.55rem;
}
.group-label:first-child { margin-top: 0; }
.source-note {
  font-size: 0.75rem; color: var(--ink-soft); margin: 0.15rem 0 0; line-height: 1.35;
}
.style-card .label .source-note { font-weight: 500; margin-top: 0.25rem; }
.style-picker.famous { grid-template-columns: repeat(5, 1fr); }
.style-opt .source-mini {
  display: block; font-size: 0.62rem; font-weight: 500; color: var(--ink-soft);
  padding: 0 0.4rem 0.4rem; line-height: 1.25;
}
.spotlight-table {
  width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  font-size: 0.92rem;
}
.spotlight-table th, .spotlight-table td {
  text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.spotlight-table th { background: var(--paper); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.spotlight-table tr:last-child td { border-bottom: none; }
.yes { color: var(--accent-dark); font-weight: 700; }
.no { color: var(--danger); font-weight: 700; }
.warn-box {
  background: #fff7ed; border: 1px solid #fdba74; color: #9a3412;
  border-radius: 14px; padding: 1rem 1.1rem; margin: 1rem 0;
}
@media (max-width: 900px) {
  .style-picker.famous { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .style-picker.famous { grid-template-columns: repeat(2, 1fr); }
  .spotlight-table { display: block; overflow-x: auto; }
}
