/* Nydli placeholder — mirrors the app's design tokens (neutral shadcn scale,
   Geist-like sans stack, 0.625rem radius, hairlines + air instead of frames). */

:root {
  color-scheme: light;
  --background: #ffffff;
  --foreground: #0a0a0a;
  --muted: #f5f5f5;
  --muted-foreground: #737373;
  --border: #e5e5e5;
  --radius: 0.625rem;
  /* Accent: "mørk plomme" from the brand palette. Inverted in dark mode, where a
     near-black button would disappear into the background. */
  --accent: #4a3f4d;
  --accent-foreground: #ffffff;
  --success: #2f6f4f;
  --danger: #a33a3a;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: #0a0a0a;
    --foreground: #fafafa;
    --muted: #262626;
    --muted-foreground: #a3a3a3;
    --border: rgb(255 255 255 / 0.1);
    --accent: #fafafa;
    --accent-foreground: #0a0a0a;
    --success: #7fd1a4;
    --danger: #f08a8a;
  }
}

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

html {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--background);
  color: var(--foreground);
  min-height: 100svh;
  line-height: 1.6;
}

/* Soft neutral glow behind the content; the image is grayscale with alpha so
   it sits quietly on both themes. */
.backdrop {
  position: fixed;
  inset: 0;
  background: url("../images/background.webp") center / cover no-repeat;
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2.5rem;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: block;
  border-radius: 0.5rem;
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pill {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  white-space: nowrap;
}

/* Hero */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 3.5rem;
}

h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}

.lead {
  margin-top: 1.25rem;
  max-width: 36rem;
  font-size: 1.0625rem;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

/* Features: no cards, no frames — air and inset hairlines, like the app. */

.features {
  list-style: none;
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 2.5rem;
}

.features li {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.features h2 {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.features p {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Sign-up form
   Brevo's own stylesheet is not loaded, so the first block below restates the
   handful of rules its main.js actually depends on. Everything after that is
   ours. */

.input--hidden {
  display: none !important;
}

.sib-form-message-panel {
  display: none;
}

.sib-form-message-panel--active {
  display: block;
}

/* main.js writes the message into these labels; empty ones must not take space. */
.entry__error {
  display: none;
}

.entry__error:not(:empty) {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--danger);
}

.sib-form-block__button-disabled {
  opacity: 0.5;
  cursor: default;
}

.sib-hide-loader-icon {
  display: none;
}

.progress-indicator__icon {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
  animation: indicator-spin 1.3s cubic-bezier(0.46, 0.35, 0.39, 0.85) infinite;
}

@keyframes indicator-spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- Presentation --- */

.signup {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  max-width: 30rem;
}

.signup h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.signup form > p {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.signup .sib-form-block {
  margin-top: 1rem;
}

.signup .sib-input {
  margin-top: 0.875rem;
}

.entry__label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.signup .input {
  width: 100%;
  font: inherit;
  font-size: 1rem; /* keeps iOS from zooming the viewport on focus */
  color: var(--foreground);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5625rem 0.75rem;
}

.signup .input:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 2px;
  border-color: transparent;
}

.sib-form-block__button {
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem; /* 44px touch target */
  padding: 0 1.25rem;
  color: var(--accent-foreground);
  background: var(--accent);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

.sib-form-block__button:hover {
  opacity: 0.9;
}

.sib-form-block__button:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 2px;
}

.signup-fine {
  margin-top: 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted-foreground);
}

.signup-message {
  margin-bottom: 1.25rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.signup-message--success {
  color: var(--success);
  border-color: currentColor;
}

.signup-message--error {
  color: var(--danger);
  border-color: currentColor;
}

/* The Turnstile iframe is a fixed 300px wide; keep it from forcing a scrollbar
   on narrow screens. */
.sib-captcha {
  max-width: 100%;
  overflow-x: auto;
}

.signoff {
  margin-top: 3rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Inline links in body copy: underlined, never browser-blue. */
.lead a,
.signoff a,
.signup-fine a {
  color: var(--foreground);
  text-underline-offset: 2px;
}

/* Footer */

.site-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

/* Entrance: subtle rise-and-fade, floored to nothing when the OS asks for
   reduced motion (same rule the app applies globally). */

.hero > * {
  animation: rise 0.6s ease-out both;
}

.hero > :nth-child(2) {
  animation-delay: 0.08s;
}

.hero > :nth-child(3) {
  animation-delay: 0.16s;
}

.hero > :nth-child(4) {
  animation-delay: 0.24s;
}

.hero > :nth-child(5) {
  animation-delay: 0.32s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

@media (max-width: 34rem) {
  .features {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero {
    padding-block: 2.5rem;
  }
}
