/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--white);
  line-height: 1.65;
  font-size: 16px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
footer { flex-shrink: 0; }

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary);
  line-height: 1.2;
}

h1 {
  font-size: clamp(28px, 4vw + 1rem, 44px);
  font-weight: 800;
  margin-bottom: var(--space-sm);
  margin-top: 0;
}
.hero h1 {
  font-size: clamp(32px, 5vw + 1rem, 56px);
}
h2 {
  font-size: clamp(24px, 3vw + 1rem, 34px);
  font-weight: 800;
  margin-bottom: var(--space-sm);
  margin-top: var(--space-md);
}
h3 {
  font-size: clamp(20px, 2vw + 1rem, 24px);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  margin-top: var(--space-md);
}
ul, ol {
  list-style-type: none;
  padding-left: 0;
}
ul li, ol li {
  margin-bottom: 8px;
}
p {
  margin-bottom: var(--space-sm);
}
small, .small {
  font-size: 13px;
}
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Focus States for Accessibility */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Media Queries for Typography & Container */
@media (min-width: 768px) {
  body {
    font-size: 17px;
    line-height: 1.7;
  }
    /* Removed hardcoded sizes for fluid typography */
    small, .small { font-size: 14px; }
  }

@media (min-width: 1536px) {
  .container {
    max-width: var(--container-max-lg);
  }
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
label {
  font-weight: 500;
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
}
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 16px;
  background-color: var(--white);
  border-radius: 0;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 1px var(--primary);
}
textarea {
  min-height: 120px;
  resize: vertical;
}
.radio-group {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}
.radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  font-weight: 400;
}
.error-msg {
  color: var(--secondary);
  font-size: 14px;
  margin-top: 4px;
  display: none;
}
.error-msg.visible {
  display: block;
}
input[aria-invalid="true"], select[aria-invalid="true"] {
  border-color: var(--secondary);
}
