/* atelier — noir editorial design system */

:root {
  --ink:           #0a0608;
  --ink-1:         #100a0c;
  --ink-2:         #15090e;
  --ink-warm:      #1b0e10;

  --paper:         #f5ece0;
  --paper-soft:    rgba(245, 236, 224, 0.72);
  --paper-dim:     rgba(245, 236, 224, 0.48);
  --paper-ghost:   rgba(245, 236, 224, 0.18);

  --rule:          rgba(245, 236, 224, 0.10);
  --rule-soft:     rgba(245, 236, 224, 0.06);

  --champagne:     #e8d5b0;
  --champagne-dim: rgba(232, 213, 176, 0.55);
  --rose:          #ff7990;
  --rose-dim:      rgba(255, 121, 144, 0.4);
  --ember:         #c44558;

  --glass:         rgba(255, 244, 230, 0.035);
  --glass-edge:    rgba(255, 244, 230, 0.09);

  --shadow-deep:   0 30px 80px -20px rgba(0,0,0,.65), 0 12px 32px -16px rgba(0,0,0,.4);
  --shadow-card:   0 2px 12px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.04);

  --font-display:  'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --font-body:     'Cormorant Garamond', 'Fraunces', Georgia, serif;
  --font-mono:     'DM Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --ease:          cubic-bezier(.2, .65, .2, 1);
  --ease-out:      cubic-bezier(.16, 1, .3, 1);
  --ease-in:       cubic-bezier(.55, 0, .85, .5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--paper);
  background: var(--ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}
button { cursor: pointer; }
img { display: block; max-width: 100%; }

/* warm noir gradient ambient */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(800px 600px at 15% -10%, rgba(196, 69, 88, 0.10), transparent 60%),
    radial-gradient(700px 500px at 90% 110%, rgba(232, 213, 176, 0.06), transparent 60%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-warm) 100%);
  z-index: -3;
  pointer-events: none;
}

/* fine paper grain */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .96 0 0 0 0 .92 0 0 0 0 .86 0 0 0 .14 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/></svg>");
  opacity: 0.7;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: -2;
}

/* vignette */
.vignette {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
  z-index: -1;
}

/* page frame (corner ornaments) */
.frame-corners {
  position: fixed;
  inset: 20px;
  border: 1px solid var(--rule-soft);
  pointer-events: none;
  z-index: 0;
}
.frame-corners::before,
.frame-corners::after,
.frame-corners > i:first-child,
.frame-corners > i:last-child {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid var(--champagne-dim);
}
.frame-corners::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.frame-corners::after  { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.frame-corners > i:first-child { bottom: -1px; left: -1px; border-right: none; border-top: none; }
.frame-corners > i:last-child  { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* shared chrome */
.wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  font-size: 22px;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--paper);
}
.wordmark__mark {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 12px var(--rose-dim);
  transform: translateY(-4px);
}
.wordmark small {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-dim);
  font-style: normal;
}

/* form controls (shared) */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-dim);
}
.input,
.textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--glass);
  border: 1px solid var(--rule);
  border-radius: 10px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.4;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.input:focus,
.textarea:focus {
  border-color: var(--champagne-dim);
  background: rgba(255, 244, 230, 0.05);
}
.textarea { resize: vertical; min-height: 90px; }
.input::placeholder,
.textarea::placeholder { color: var(--paper-ghost); font-style: italic; }

/* primary button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
  box-shadow: 0 8px 26px -8px rgba(245,236,224,0.25);
}
.btn:hover {
  transform: translateY(-1px);
  background: var(--champagne);
  box-shadow: 0 14px 36px -10px rgba(232, 213, 176, 0.35);
}
.btn:active { transform: translateY(0); }
.btn--ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: none;
}
.btn--ghost:hover {
  background: var(--glass);
  border-color: var(--champagne-dim);
  color: var(--champagne);
}
.btn--small { padding: 10px 16px; font-size: 10px; }
.btn--danger:hover { background: var(--ember); color: var(--paper); border-color: var(--ember); }

/* err pill */
.err {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rose);
  border: 1px solid var(--rose-dim);
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 121, 144, 0.06);
}

/* utility */
.italic { font-style: italic; }
.serif  { font-family: var(--font-display); }
.mono   { font-family: var(--font-mono); letter-spacing: 0.18em; text-transform: uppercase; font-size: 10px; }

/* reveal animation primitives */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}
@keyframes draw {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 rgba(255,121,144,0); }
  50%      { box-shadow: 0 0 24px rgba(255,121,144,0.3); }
}

/* selection */
::selection { background: var(--champagne); color: var(--ink); }
