* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background 0.25s ease, color 0.25s ease;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1rem;
}

::selection {
  background: color-mix(in srgb, var(--accent) 35%, transparent);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

main {
  flex: 1;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
  margin-top: 1.1rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--fg);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--fg-subtle);
  opacity: 0.8;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Primary button (filled on hover) */
.btn,
button[type='submit'] {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-size: 0.98rem;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  z-index: 0;
  transition: color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn::before,
button[type='submit']::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: -1;
}

.btn:hover,
button[type='submit']:hover {
  color: var(--accent-fg);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent);
}

.btn:active,
button[type='submit']:active {
  transform: translateY(0);
}

.btn:hover::before,
button[type='submit']:hover::before {
  transform: scaleX(1);
}

/* Secondary button — outline only, no wipe fill */
.btn-secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: transparent;
  color: var(--fg);
  font-size: 0.98rem;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.btn-secondary:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .btn::before,
  button[type='submit']::before {
    transition: none;
  }

  .btn:hover,
  .btn-secondary:hover,
  button[type='submit']:hover {
    transform: none;
  }
}
