/* Shared visitor tokens and controls.
   Canonical file. Caddy serves one folder per host, so copy this file,
   fonts/, and the icons into each site root (scripts/sync-shared.sh).

   Plus Jakarta Sans is SIL OFL 1.1 (Tokotype). Latin variable file.
   Bricolage Grotesque is SIL OFL 1.1 (Atelier Triay). The wordmark uses
   a semibold cut, subset to the letters in the name.
   License text: fonts/OFL.txt and fonts/bricolage-OFL.txt
   If a webfont does not load, UI falls back to the next family. */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  unicode-range: U+0020, U+0052, U+0054, U+0061, U+0069, U+006E, U+006F, U+0070, U+0078;
}

:root {
  --color-bg: #14061f;
  --color-bg-raise: #2a103c;
  --color-surface: #2a103c;
  --color-card: var(--color-surface);
  --color-text: #fff7f4;
  --color-muted: #f3cfe2;
  --color-border: rgba(255, 247, 244, 0.2);
  --color-accent: #a3134e;
  --color-accent-hover: #861043;
  --color-accent-press: #6e0d38;
  --color-on-accent: #ffffff;
  --color-accent-soft: rgba(255, 208, 166, 0.16);
  --color-coral: #ffb39a;
  --color-danger: #8f1d3a;
  --color-error: var(--color-danger);
  --color-ink: #1c1024;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --space-10: 80px;

  --radius: 18px;
  --radius-pill: 999px;
  --shadow: 0 10px 30px rgba(8, 2, 16, 0.28);
  --shadow-hover: 0 16px 36px rgba(8, 2, 16, 0.38);

  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    sans-serif;

  --tap-min: 44px;
  --tap: var(--tap-min);
  --focus-ring: 3px solid var(--color-coral);
  --focus: var(--focus-ring);
  --focus-offset: 3px;
  --page-pad: clamp(16px, 5vw, 40px);
  --content: min(68rem, 100%);
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(900px 520px at 100% -10%, rgba(255, 122, 74, 0.38), transparent 58%),
    radial-gradient(720px 480px at -12% 8%, rgba(219, 39, 119, 0.32), transparent 52%),
    radial-gradient(680px 420px at 70% 110%, rgba(124, 58, 237, 0.28), transparent 55%);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image: radial-gradient(rgba(255, 247, 244, 0.22) 0.65px, transparent 0.7px);
  background-size: 3px 3px;
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--space-2);
  top: var(--space-2);
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.4em;
  min-height: var(--tap-min);
  max-width: 100%;
  color: var(--color-text);
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1;
  text-decoration: none;
}

.wordmark-mark {
  display: block;
  width: 16px;
  height: 16px;
  width: 1cap;
  height: 1cap;
  flex: 0 0 auto;
}

.wordmark-name {
  display: block;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
  color: var(--color-text);
  font-family: inherit;
  font-weight: inherit;
  font-style: normal;
  font-synthesis: none;
  font-size: inherit;
  line-height: 1;
  letter-spacing: -0.03em;
}

@media (min-width: 56rem) {
  .wordmark {
    font-size: 28px;
  }

  .wordmark-mark {
    width: 18px;
    height: 18px;
    width: 1cap;
    height: 1cap;
  }
}

.wordmark:hover .wordmark-name {
  color: #ffffff;
}

.wordmark:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: 2px;
}

.surface-light {
  --color-text: #1c1024;
  --color-muted: #4a3348;
  --color-border: #eadde4;
  --color-surface: #ffffff;
  --color-bg: #fff8f6;
  --color-accent-soft: rgba(163, 19, 78, 0.1);
  --focus-ring: 3px solid #a3134e;
  --focus: var(--focus-ring);
  color-scheme: light;
  background: var(--color-surface);
  color: var(--color-text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: 10px 22px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}

.btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-accent-hover);
}

.btn-primary:active:not(:disabled) {
  background: var(--color-accent-press);
}

.btn-secondary {
  background: transparent;
  border-color: var(--color-text);
  color: var(--color-text);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-accent-soft);
}

.btn-secondary:active:not(:disabled) {
  background: var(--color-accent-soft);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.field-label {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--color-text);
}

.field-input,
.invite-input {
  width: 100%;
  min-height: var(--tap-min);
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font);
  font-size: 1rem;
  color-scheme: light;
}

.field-textarea {
  min-height: 8rem;
  resize: vertical;
  line-height: 1.5;
}

.field-input::placeholder,
.invite-input::placeholder {
  color: var(--color-muted);
  opacity: 1;
}

.field-input:focus-visible,
.invite-input:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  background: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.contact-status,
.form-status {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-muted);
}

.contact-status--err,
.form-status--err {
  color: var(--color-danger);
  font-weight: 650;
}

.contact-status[hidden],
.form-status[hidden],
[hidden] {
  display: none !important;
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

::selection {
  background: #a3134e;
  color: #ffffff;
}

section[id] {
  scroll-margin-top: 5.5rem;
}

@media (prefers-reduced-motion: no-preference) {
  .btn,
  .wordmark,
  .work-card,
  .chip,
  .find-list a,
  .site-nav a,
  .footer-link,
  .quiet-link,
  .copy-icon,
  .copy-email,
  .home-link {
    transition:
      transform 0.16s ease,
      background-color 0.16s ease,
      border-color 0.16s ease,
      color 0.16s ease;
  }

  .btn:hover:not(:disabled) {
    transform: translateY(-1px);
  }

  .btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
  }

  a.work-card:hover {
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .btn,
  .work-card,
  .chip,
  .find-list a,
  .gate-card,
  .contact-panel,
  .banner-slot {
    border: 1px solid ButtonText;
  }
}

@media print {
  body {
    background: #fff;
    color: #1c1024;
  }

  body::before,
  .banner-slot {
    display: none;
  }

  .btn {
    border: 1px solid #1c1024;
  }
}
