/* Reset & Base */
* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--page);
  color: var(--slate);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
}

h1 {
  font-size: 60px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 40px;
  line-height: 1.14;
}

h3 {
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

/* Links */
a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

a:not(.btn):hover {
  color: var(--ink);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 30px;
  border-radius: var(--radius-full);
  border: none;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--ink);
  color: var(--surface);
}

.btn-primary:hover {
  background: var(--blue-deep);
}

.btn-primary:active {
  transform: scale(0.96);
}

.btn-secondary {
  background: var(--surface);
  border: 2px solid var(--border-lighter);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--ink);
  background: var(--page);
}

/* Form elements */
input[type="email"],
input[type="text"] {
  font-family: var(--font-sans);
  font-size: 16px;
  padding: 14px 24px;
  border: 2px solid var(--border-lightest);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

input[type="email"]:focus-visible,
input[type="text"]:focus-visible {
  outline: none;
  border-color: var(--blue);
  background: var(--page);
}

input[type="email"]::placeholder,
input[type="text"]::placeholder {
  color: var(--slate-light);
}

input[type="email"]:invalid:not(:placeholder-shown),
input[type="text"]:invalid:not(:placeholder-shown) {
  border-color: #C92A2A;
}

/* Wrapper/container */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* Eyebrow label */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.eyebrow-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

/* Mono labels */
.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--slate-light);
}

.mono-number {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--blue);
  font-weight: 500;
}

/* Dot motif SVG animation */
.lm-dot {
  animation: lm-pulse 2.8s ease-in-out infinite;
}

@keyframes lm-pulse {
  0%, 100% {
    opacity: 0.5;
    r: 3;
  }
  50% {
    opacity: 1;
    r: 4.2;
  }
}

/* Touch targets */
a, button, input[type="email"], input[type="text"] {
  min-height: 44px;
}

/* Skip to main content link (keyboard only) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--blue);
  color: var(--surface);
  padding: 8px 12px;
  text-decoration: none;
  z-index: 100;
  border-radius: 0 0 4px 0;
}

.skip-link:focus-visible {
  top: 0;
  outline: none;
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation delays for cascading effects */
.reveal:nth-child(1) { transition-delay: 0s; }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }

/* Reduced motion */
@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;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Mobile-first typography scaling */
@media (max-width: 880px) {
  body {
    font-size: 14px;
  }

  h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 31px;
  }

  h3 {
    font-size: 18px;
  }

  .btn {
    padding: 14px 28px;
    font-size: 14px;
  }

  .eyebrow-label {
    font-size: 11px;
  }

  .mono-number {
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 13px;
  }

  h1 {
    font-size: 32px;
    line-height: 1.1;
  }

  h2 {
    font-size: 24px;
  }

  h3 {
    font-size: 17px;
  }

  p {
    font-size: 14px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 13px;
    min-height: 44px;
  }

  input[type="email"],
  input[type="text"] {
    font-size: 16px;
    padding: 12px 20px;
  }

  .mono {
    font-size: 11px;
  }
}
