@import "tailwindcss";

@theme {
  --font-display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype",
    Palatino, Georgia, serif;
  --font-sans: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --color-ink: #0b1219;
  --color-ink-soft: #121c27;
  --color-ink-mid: #1a2733;
  --color-paper: #f3efe6;
  --color-paper-deep: #e7e0d2;
  --color-ivory: #faf7f1;
  --color-fg: #f3efe6;
  --color-muted: #9aa3ac;
  --color-subtle: #6e7882;
  --color-ink-fg: #141c24;
  --color-ink-muted: #5a646e;
  --color-steel: #8fa0b0;
  --color-line: #2a3642;
  --color-rule: #d4ccbc;

  --text-display: clamp(2.75rem, 1.2rem + 6vw, 5.25rem);
  --text-lede: clamp(1.35rem, 1.05rem + 1.2vw, 1.85rem);
  --text-section: clamp(2rem, 1.3rem + 2.4vw, 3.35rem);
  --tracking-label: 0.26em;
  --tracking-display: -0.02em;

  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

@layer base {
  html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
  }

  body {
    background-color: var(--color-ink);
    color: var(--color-fg);
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.6;
  }

  h1,
  h2,
  h3,
  h4 {
    text-wrap: balance;
  }

  p {
    text-wrap: pretty;
  }

  button:not(:disabled),
  [role="button"]:not(:disabled) {
    cursor: pointer;
  }

  ::selection {
    background: color-mix(in oklab, var(--color-steel) 45%, transparent);
    color: var(--color-fg);
  }

  img {
    outline: 1px solid color-mix(in oklab, var(--color-fg) 10%, transparent);
    outline-offset: -1px;
  }
}

@layer components {
  .site-wrap {
    width: min(1120px, calc(100% - 2.5rem));
    margin-inline: auto;
  }

  @media (min-width: 768px) {
    .site-wrap {
      width: min(1120px, calc(100% - 4rem));
    }
  }

  .label-kicker {
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--color-steel);
  }

  .serif-italic {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
  }

  .hairline {
    height: 1px;
    background: var(--color-line);
    border: 0;
  }

  .hairline-light {
    height: 1px;
    background: var(--color-rule);
    border: 0;
  }

  .grain::after {
    content: "";
    pointer-events: none;
    position: absolute;
    inset: 0;
    opacity: 0.09;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
}

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

  .reveal,
  .reveal-delay-1,
  .reveal-delay-2,
  .reveal-delay-3 {
    animation: none !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.reveal {
  animation: rise-in 700ms var(--ease-out-soft) both;
}

.reveal-delay-1 {
  animation-delay: 90ms;
}
.reveal-delay-2 {
  animation-delay: 180ms;
}
.reveal-delay-3 {
  animation-delay: 270ms;
}
