/* PromptMaster — the site uses the system's own tokens.
   Obsidian base, gold accent, one accent on two elements, 8% margins. */

:root {
  --base: #0b0b0d;
  --surface: #141418;
  --surface-2: #1c1c22;
  --neutral: #f2efe9;
  --muted: #9a978f;
  --accent: #c9973f;
  --line: #2a2a31;
  --radius: 10px;
  --measure: 68ch;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --base: #f2efe9;
    --surface: #fffefb;
    --surface-2: #ebe7df;
    --neutral: #14141a;
    --muted: #63615c;
    --line: #ddd8cd;
  }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--base);
  color: var(--neutral);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 8%; }
@media (min-width: 900px) { .wrap { padding: 0 64px; } }

/* --- Type --- */
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 0.95; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); line-height: 1.05; margin-bottom: 0.6em; }
h3 { font-size: 1.15rem; line-height: 1.2; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lead { font-size: 1.15rem; color: var(--muted); }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
small { color: var(--muted); font-size: 0.85rem; }

a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

/* --- Header --- */
header.site {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--base) 92%, transparent);
  backdrop-filter: blur(8px);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: 64px;
}
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; text-decoration: none; }
nav.site { display: flex; gap: 24px; align-items: center; }
nav.site a { font-size: 0.92rem; text-decoration: none; color: var(--muted); }
nav.site a:hover { color: var(--neutral); }

/* --- Sections --- */
section { padding: 88px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
.hero { padding: 120px 0 96px; }
.hero h1 { max-width: 16ch; margin-bottom: 24px; }
.hero .lead { max-width: 52ch; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--neutral); font: inherit; font-size: 0.95rem; font-weight: 500;
  cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s;
}
.btn:hover:not(:disabled) { border-color: var(--muted); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #0b0b0d; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

/* --- Cards & grids --- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.card h3 { margin-bottom: 8px; }
.card p { font-size: 0.94rem; color: var(--muted); margin-bottom: 0; }

/* --- Pricing --- */
.price { font-family: var(--serif); font-size: 2.4rem; line-height: 1; margin: 12px 0 4px; }
.price span { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); }
.plan.featured { border-color: var(--accent); }
.plan ul { list-style: none; padding: 0; margin: 20px 0 0; font-size: 0.92rem; }
.plan li { padding: 6px 0; border-top: 1px solid var(--line); color: var(--muted); }
.plan li:first-child { border-top: 0; }
.tag {
  display: inline-block; font-size: 0.72rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 100px; padding: 2px 10px;
}

/* --- Code --- */
code, pre, .mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
code { font-size: 0.88em; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }
pre {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; overflow-x: auto;
  font-size: 0.86rem; line-height: 1.55;
}
pre code { background: none; padding: 0; }

/* --- Copy field --- */
.copyfield { display: flex; gap: 8px; align-items: stretch; margin: 8px 0 4px; }
.copyfield input {
  flex: 1; min-width: 0; font-family: ui-monospace, Menlo, monospace; font-size: 0.88rem;
  padding: 11px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface-2); color: var(--neutral);
}

/* --- Forms --- */
label { display: block; font-size: 0.86rem; color: var(--muted); margin-bottom: 6px; }
input[type=email], input[type=password], input[type=text] {
  width: 100%; padding: 11px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--neutral); font: inherit; font-size: 0.95rem;
}
input:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.field { margin-bottom: 16px; }

/* --- Stats --- */
.stat { font-family: var(--serif); font-size: 2rem; line-height: 1; }
.meter {
  height: 6px; border-radius: 100px; background: var(--surface-2);
  overflow: hidden; margin-top: 12px;
}
.meter > i { display: block; height: 100%; background: var(--accent); }

/* --- Table --- */
.scroll-x { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { text-align: left; padding: 9px 14px 9px 0; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 0.78rem;
     text-transform: uppercase; letter-spacing: .06em; }

/* --- Notices --- */
.notice {
  border: 1px solid var(--line); border-left: 2px solid var(--accent);
  background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px; font-size: 0.92rem; margin: 20px 0;
}
.notice.error { border-left-color: #e2571f; }
.notice p:last-child { margin-bottom: 0; }
[hidden] { display: none !important; }

/* --- Auth card --- */
.centered { min-height: 100vh; display: grid; place-items: center; padding: 32px 8%; }
.auth-card { width: 100%; max-width: 400px; }

footer.site { padding: 48px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
