/* ==========================================================================
   Helmsted — shared styles
   Derived from the business card: flat ink, serif display, hairline
   structure, one teal accent. No gradients, no glows, no shadows.
   ========================================================================== */

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

:root {
  /* Teal ramp (design.md) */
  --teal-100: oklch(0.845 0.143 164.978);
  --teal-300: oklch(0.696 0.17 162.48);
  --teal-500: oklch(0.596 0.145 163.225);
  --teal-700: oklch(0.508 0.118 165.612);
  --teal-900: oklch(0.432 0.095 166.913);

  /* Dark neutrals (design.md) */
  --page-bg: oklch(0.205 0.005 265);
  --body-text: oklch(0.985 0 0);
  --quiet-text: oklch(0.65 0 0);
  --quiet-fill: oklch(0.28 0.005 265);
  --hairline: oklch(1 0 0 / 10%);
  --error: oklch(0.704 0.191 22.216);

  /* Roles */
  --accent: var(--teal-300);       /* emphasis on dark, as on the card */
  --action: var(--teal-700);       /* buttons */
  --action-hover: var(--teal-500);

  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

html {
  background: var(--page-bg);
}

body {
  font-family: var(--font-sans);
  background: var(--page-bg);
  color: var(--body-text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}

::selection {
  background: var(--teal-700);
  color: var(--body-text);
}

/* --- Atmosphere ------------------------------------------------------------ */
/* One faint brand glow + edge vignette, and a film grain that echoes the
   card stock. Both fixed, static, behind all content. */

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 42% at 50% 0%, color-mix(in oklch, var(--teal-500) 7%, transparent), transparent 72%),
    radial-gradient(ellipse 130% 110% at 50% 45%, transparent 58%, oklch(0 0 0 / 22%) 100%);
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- Type ----------------------------------------------------------------- */

.micro {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--quiet-text);
}

.micro .dot {
  color: var(--accent);
}

/* --- Site header ----------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--hairline);
}

.site-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.4rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--body-text);
}

.brand:hover {
  text-decoration: none;
  opacity: 0.8;
}

.brand svg {
  width: 22px;
  height: 22px;
}

.brand span {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: -0.005em;
}

/* --- Controls --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--action);
  border-radius: 0;
  background: var(--action);
  color: var(--body-text);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: var(--action-hover);
  border-color: var(--action-hover);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn-ghost {
  background: transparent;
  border-color: var(--hairline);
  color: var(--body-text);
}

.btn-ghost:hover {
  background: transparent;
  border-color: var(--quiet-text);
}

.input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
  color: var(--body-text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.input::placeholder {
  color: var(--quiet-text);
}

.input:focus {
  border-color: var(--teal-500);
}

/* --- Site footer + disclosure ----------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  text-align: center;
  padding: 2rem;
}

.site-footer .micro {
  display: block;
  margin-bottom: 0.5rem;
}

.footer-copy {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--quiet-text);
}

.footer-copy a {
  color: inherit;
}

.disclosure {
  background: var(--quiet-fill);
  border-top: 1px solid var(--hairline);
  padding: 1.5rem 2rem;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  line-height: 1.7;
  color: var(--quiet-text);
}

.disclosure-inner {
  max-width: 920px;
  margin: 0 auto;
}

.disclosure strong {
  color: var(--body-text);
  font-weight: 600;
}

.disclosure a {
  white-space: nowrap;
}

/* --- Motion ------------------------------------------------------------------ */

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fade-in 0.5s ease both;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
