@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root { --font-display: 'Bricolage Grotesque Variable'; --font-body: 'Public Sans Variable'; }
  html { -webkit-text-size-adjust: 100%; }
  body { @apply bg-paper text-body font-sans antialiased; }
  h1, h2, h3 { @apply font-display text-ink; letter-spacing: -0.02em; }
  :focus-visible { outline: 3px solid #E8A317; outline-offset: 3px; border-radius: 4px; }
  ::selection { background: #E8A317; color: #0E3B34; }
}

@layer components {
  .wrap { @apply mx-auto w-full max-w-6xl px-5 sm:px-8; }
  .btn { @apply inline-flex items-center justify-center gap-2 rounded-full px-5 py-2.5 text-[15px] font-semibold transition-colors; }
  .btn-primary { @apply btn bg-ink text-paper hover:bg-sea; }
  .btn-ghost { @apply btn border border-ink/25 text-ink hover:border-ink hover:bg-white; }
  .field { @apply w-full rounded-xl border border-line bg-white px-4 py-3 text-[15px] text-body placeholder:text-muted/70 focus:border-sea focus:outline-none focus:ring-2 focus:ring-sea/20; }
  .label { @apply mb-1.5 block text-sm font-semibold text-ink; }
}

/* The hero line: drawn tangled, then pulled straight (stretim = to set right). */
.stretim-line path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.stretim-line .tangle { animation: tangle-out 1.6s ease-in-out 0.3s forwards; }
.stretim-line .straight { opacity: 0; stroke-dashoffset: 1; animation: straight-in 1.2s ease-out 1.5s forwards; }
@keyframes tangle-out { to { opacity: 0; stroke-dashoffset: -1; } }
@keyframes straight-in { to { opacity: 1; stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .stretim-line .tangle { animation: none; opacity: 0; }
  .stretim-line .straight { animation: none; opacity: 1; stroke-dashoffset: 0; }
}
