/* qozyai — sunroom brand kit
   Shared tokens, base styles, primitives. Page-specific decoration (sun rays,
   leaves, philosophy strip etc.) lives inline on the page that uses it. */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400&display=swap');

:root {
  --bg: #fbf6e3;
  --bg-2: #f4ecc8;
  --cream: #fffaee;
  --paper: #fffdf5;

  --leaf: #5e7a4c;
  --leaf-2: #7a9665;
  --leaf-light: #b8cf9f;
  --leaf-soft: rgba(94, 122, 76, 0.12);
  --leaf-line: rgba(94, 122, 76, 0.18);

  --sun: #f0c14b;
  --sun-2: #e6a932;
  --sun-soft: rgba(240, 193, 75, 0.18);

  --terra: #c97b5c;
  --terra-2: #a8593a;
  --terra-soft: rgba(201, 123, 92, 0.14);

  --red: #b04539;
  --red-soft: rgba(176, 69, 57, 0.12);
  --red-line: rgba(176, 69, 57, 0.32);

  --ink: #2d2a1a;
  --ink-2: #6b6452;
  --ink-3: #948c75;

  --sans: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --serif: 'Newsreader', Georgia, serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Back-compat aliases (old dark-theme token names mapped to qozy values) */
  --bg-elev: var(--cream);
  --bg-elev-2: var(--bg-2);
  --bg-hover: var(--bg-2);
  --border: var(--leaf-line);
  --border-strong: rgba(94, 122, 76, 0.3);
  --text: var(--ink);
  --text-dim: var(--ink-2);
  --text-faint: var(--ink-3);
  --accent: var(--leaf);
  --accent-fg: var(--cream);
  --accent-bg: var(--leaf-soft);
  --accent-border: rgba(94, 122, 76, 0.32);
  --green: var(--leaf);
  --green-bg: var(--leaf-soft);
  --amber: var(--sun-2);
  --amber-bg: var(--sun-soft);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
a {
  color: var(--leaf);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: var(--leaf-light);
}
a:hover { text-decoration-color: var(--leaf); }

.display { font-family: var(--sans); font-weight: 600; letter-spacing: -0.025em; }
.sans { font-family: var(--sans); }
.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); }

/* Brand mark */
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--sans); font-weight: 600;
  font-size: 20px; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 32%, #ffe27a, var(--sun) 55%, var(--sun-2));
  box-shadow: 0 0 28px rgba(240, 193, 75, 0.55), inset -1px -2px 4px rgba(180,120,0,0.18);
  flex-shrink: 0;
  /* hide legacy inner "q" letter */
  font-size: 0;
  color: transparent;
  text-indent: -9999px;
  overflow: hidden;
}
.brand-mark.sm { width: 28px; height: 28px; box-shadow: 0 0 16px rgba(240, 193, 75, 0.4); }
.brand-mark.lg { width: 52px; height: 52px; }
.brand-domain {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12px;
  margin-left: 4px;
  font-weight: 400;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--ink);
}
h1 { font-size: clamp(34px, 5vw, 44px); line-height: 1.05; }
h2 { font-size: 22px; line-height: 1.2; }
h3 { font-size: 18px; line-height: 1.25; }
p { margin: 0 0 14px; color: var(--ink-2); }
.lede { font-size: 18px; color: var(--ink-2); margin-bottom: 28px; line-height: 1.55; }
strong { color: var(--ink); font-weight: 600; }
em.q { color: var(--terra); font-family: var(--serif); font-style: italic; font-weight: 500; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  background: var(--cream);
  color: var(--ink);
  border: 1px solid var(--leaf-line);
  border-radius: 12px;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 120ms, border-color 120ms, color 120ms;
}
.btn:hover {
  background: var(--bg-2);
  border-color: rgba(94, 122, 76, 0.32);
  text-decoration: none;
}
.btn.primary, .btn.accent {
  background: var(--leaf);
  color: var(--cream);
  border-color: var(--leaf);
  font-weight: 600;
}
.btn.primary:hover, .btn.accent:hover { background: var(--ink); border-color: var(--ink); }
.btn.danger {
  color: var(--red);
  border-color: var(--red-line);
}
.btn.danger:hover {
  background: var(--red-soft);
  border-color: var(--red);
}
.btn.danger.solid {
  background: var(--red);
  color: var(--cream);
  border-color: var(--red);
  font-weight: 600;
}
.btn.danger.solid:hover { background: #92382e; }
.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}
.btn.ghost:hover { background: var(--cream); color: var(--ink); }
.btn.full { width: 100%; }
.btn.lg { padding: 13px 22px; font-size: 15px; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label {
  font-family: var(--sans);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  font-weight: 600;
}
.field label .optional {
  color: var(--ink-3);
  text-transform: none;
  letter-spacing: 0;
  font-style: italic;
  font-family: var(--serif);
  font-weight: 400;
  margin-left: 4px;
}
.field .hint {
  font-size: 13px;
  color: var(--ink-3);
  font-family: var(--serif);
  font-style: italic;
}
.input, .select, .textarea {
  width: 100%;
  background: var(--paper);
  border: 1px solid rgba(94, 122, 76, 0.22);
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 12px;
  font-family: var(--serif);
  font-size: 16px;
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}
.input::placeholder { color: var(--ink-3); font-style: italic; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px var(--leaf-soft);
}
.input.mono, .textarea.mono { font-family: var(--mono); font-size: 13.5px; font-style: normal; }
.textarea { min-height: 80px; resize: vertical; }

/* Cards */
.card {
  background: var(--cream);
  border: 1px solid var(--leaf-line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 18px 40px -24px rgba(94, 122, 76, 0.25);
}
.card.tight { padding: 0; }
.card.pad-lg { padding: 36px; }
.card-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--leaf-soft);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.card-title { font-family: var(--sans); font-weight: 600; font-size: 16px; letter-spacing: -0.005em; margin: 0; }
.card-sub { font-size: 13px; color: var(--ink-3); margin: 3px 0 0; font-family: var(--serif); font-style: italic; }
.card-body { padding: 18px 22px; }

/* Pills */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans);
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 500;
  border: 1px solid transparent;
  line-height: 1.4;
}
.pill .dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.pill.green { color: var(--leaf); background: var(--leaf-soft); border-color: rgba(94, 122, 76, 0.28); }
.pill.amber { color: var(--sun-2); background: rgba(240, 193, 75, 0.18); border-color: rgba(230, 169, 50, 0.32); }
.pill.red   { color: var(--red); background: var(--red-soft); border-color: var(--red-line); }
.pill.terra { color: var(--terra-2); background: var(--terra-soft); border-color: rgba(168, 89, 58, 0.3); }
.pill.neutral { color: var(--ink-2); background: var(--cream); border-color: var(--leaf-line); }
.pill.accent { color: var(--leaf); background: var(--leaf-soft); border-color: var(--accent-border); }

/* Auth shell */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 0 20px;
  position: relative;
}
.auth-top {
  padding: 22px 0;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; z-index: 1;
}
.auth-main {
  display: grid; place-items: center;
  padding: 20px 0 40px;
  position: relative; z-index: 1;
}
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--cream);
  border: 1px solid var(--leaf-line);
  border-radius: 22px;
  padding: 32px;
  box-shadow: 0 20px 60px -22px rgba(94, 122, 76, 0.32);
}
.auth-card h1 { font-size: 26px; line-height: 1.15; margin-bottom: 8px; }
.auth-card .lede { font-size: 15.5px; margin-bottom: 22px; }
.auth-footer {
  padding: 20px 0 28px;
  color: var(--ink-3); font-size: 13px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-style: italic; font-family: var(--serif);
  position: relative; z-index: 1;
}
.auth-footer a { color: var(--ink-3); }

/* Article shell */
.article, .article-shell {
  max-width: 740px;
  margin: 0 auto;
  padding: 24px 22px 80px;
  position: relative; z-index: 1;
}
.article-top {
  padding: 6px 0 24px;
  border-bottom: 1px solid var(--leaf-line);
  margin-bottom: 36px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.article ol, .article ul { padding-left: 22px; color: var(--ink-2); }
.article li { margin-bottom: 6px; }
.article code, code.inline {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--cream);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--ink);
  border: 1px solid var(--leaf-line);
}

/* Snippet block */
.snippet {
  background: var(--paper);
  border: 1px solid var(--leaf-line);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  display: flex; align-items: center; gap: 10px;
  word-break: break-all;
}
.snippet > code { background: transparent; border: none; padding: 0; flex: 1; }
.snippet button, .snippet .copy {
  margin-left: auto;
  flex-shrink: 0;
  padding: 5px 11px;
  font-size: 12px;
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  border: 1px solid var(--leaf-line);
  border-radius: 7px;
  cursor: pointer;
}
.snippet button:hover, .snippet .copy:hover { background: var(--bg-2); }

/* Callout */
.callout {
  background: var(--paper);
  border: 1px solid var(--leaf-line);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}
.callout strong { color: var(--ink); }
.callout.amber { border-color: rgba(230, 169, 50, 0.4); background: rgba(240, 193, 75, 0.08); }
.callout.terra { border-color: rgba(168, 89, 58, 0.3); background: var(--terra-soft); }

/* Status messages */
.status { font-size: 13.5px; min-height: 18px; margin-top: 6px; font-family: var(--serif); font-style: italic; }
.status.ok { color: var(--leaf); }
.status.error { color: var(--red); font-style: normal; }

/* Sun rays / leaf decorations (page-optional) */
.sun-rays {
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 1200px; height: 900px;
  background: radial-gradient(ellipse at top, rgba(240, 193, 75, 0.35), transparent 55%);
  pointer-events: none;
  z-index: 0;
}
.leaf-deco { position: absolute; pointer-events: none; z-index: 0; color: var(--leaf-light); opacity: 0.65; }
