/* Reset + base typography + scrollbar. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--inkwell-mist);
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Drifting pastel blobs — the ethos splash's signature ambient field.
   Three slow-moving purple / orange / lime orbs behind everything. */
.blobs { position: fixed; inset: -10%; z-index: 0; pointer-events: none; filter: blur(90px); }
.blob { position: absolute; border-radius: 50%; }
.blob-p { width: 520px; height: 520px; left: 4%;  top: 6%;    background: rgba(158,103,247,0.28); animation: drift1 27s ease-in-out infinite alternate; }
.blob-o { width: 440px; height: 440px; right: 3%; top: 30%;   background: rgba(255,108,45,0.16);  animation: drift2 33s ease-in-out infinite alternate; }
.blob-l { width: 500px; height: 500px; left: 36%; bottom: 2%; background: rgba(213,243,138,0.40); animation: drift3 29s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(130px, 90px) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-110px, 130px) scale(0.92); } }
@keyframes drift3 { to { transform: translate(-90px, -110px) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .blob { animation: none !important; } }

#root { position: relative; z-index: 1; min-height: 100dvh; }

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
a { color: var(--inkwell-twilight); text-decoration: none; }
a:hover { text-decoration: underline; }
input, textarea, select { font: inherit; color: inherit; }
textarea { resize: none; }

/* Headings — Inkwell ethos schema: General Sans, tight tracking, NO italics.
   Accent words get purple color only (upright). Sentient is reserved for the
   wordmark / display moments, never italic accents in running headings. */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--fg-1);
  letter-spacing: -0.025em;
  margin: 0;
  line-height: 1.1;
}
h1 { font-size: 48px; letter-spacing: -0.03em; }
h2 { font-size: 34px; }
h3 { font-size: 22px; letter-spacing: -0.02em; }
h4 { font-size: 18px; }

h1 em, h2 em, h3 em, .display em, em.accent, .accent {
  font-style: normal;
  font-weight: inherit;
  color: var(--purple-deep);
}

p { margin: 0; }

.eyebrow, .mono, .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* Form controls */
.input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--fg-1);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--stroke-1);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus {
  border-color: var(--inkwell-sky-deep);
  box-shadow: 0 0 0 3px rgba(158, 103, 247, 0.15);
}
.input::placeholder { color: var(--fg-3); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--inkwell-twilight);
  color: var(--fg-on-dark);
}
.btn-primary:hover:not(:disabled) { background: var(--inkwell-ocean); }

.btn-secondary {
  background: rgba(255,255,255,0.7);
  color: var(--inkwell-sky-deep);
  border: 1px solid var(--inkwell-sky-deep);
}
.btn-secondary:hover:not(:disabled) { background: var(--inkwell-sky-deep); color: var(--fg-on-dark); }

.btn-ghost { background: transparent; color: var(--fg-2); }
.btn-ghost:hover:not(:disabled) { background: var(--stroke-2); color: var(--fg-1); }

.btn-danger { background: var(--inkwell-orange); color: var(--fg-on-dark); }
.btn-danger:hover:not(:disabled) { filter: brightness(1.05); }

.btn-icon {
  width: 36px; height: 36px; padding: 0;
  border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; justify-content: center;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(40, 35, 35, 0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(40, 35, 35, 0.30); }

/* Focus ring */
:focus-visible { outline: 2px solid var(--inkwell-sky-deep); outline-offset: 2px; border-radius: 4px; }

/* Loading spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--stroke-1);
  border-top-color: var(--inkwell-sky-deep);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
}

/* Utility */
.hidden { display: none !important; }
.flex { display: flex; }
.column { flex-direction: column; }
.center { align-items: center; justify-content: center; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.grow { flex: 1 1 0; min-width: 0; min-height: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: var(--font-mono); }
.accent { color: var(--inkwell-sky-deep); }
.muted { color: var(--fg-3); }

@media (max-width: 768px) {
  h1 { font-size: 36px; }
  h2 { font-size: 26px; }
  h3 { font-size: 20px; }
}
