/* Base reset, typography defaults, layout primitives, buttons, forms. */

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

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

body {
  margin: 0;
  background: var(--color-white);
  color: var(--color-text-body);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-4);
  color: var(--color-black);
  font-family: var(--font-heading);
  line-height: 1.15;
  font-weight: 700;
}

p {
  margin: 0 0 var(--space-4);
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  top: -48px;
  left: var(--space-4);
  z-index: 1000;
  background: var(--color-black);
  color: var(--color-white);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-button);
  font-weight: 700;
  transition: top var(--motion-fast);
}

.skip-link:focus {
  top: var(--space-4);
}

/* ---- Focus visibility ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 2px;
  /* No border-radius here — forcing one squared off round controls
     (carousel arrows, zoom button, lightbox close) while focused. */
}

.on-dark :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--color-accent-line);
}

/* ---- Containers ---- */
.container {
  width: min(100% - (var(--page-gutter) * 2), var(--container-content));
  margin-inline: auto;
}

.container--wide {
  width: min(100% - (var(--page-gutter) * 2), var(--container-wide));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - (var(--page-gutter) * 2), var(--container-narrow));
  margin-inline: auto;
}

/* ---- Sections ---- */
.section {
  padding-block: var(--section-padding);
}

.section--dark {
  background: var(--color-black);
  color: var(--color-text-on-dark);
}

.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: var(--color-text-on-dark);
}

.section--soft {
  background: var(--color-bg-soft);
}

.section-heading {
  max-width: 760px;
  margin-bottom: var(--space-7);
}

.section-heading--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 var(--space-3);
  color: var(--color-red);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.on-dark .eyebrow {
  color: var(--color-accent-line);
}

h1 {
  font-size: var(--text-h1-inner);
}

h2 {
  font-size: var(--text-h2);
}

h3 {
  font-size: var(--text-h3);
}

.lead {
  font-size: var(--text-lg);
  color: var(--color-text-body);
}

.on-dark .lead {
  color: var(--color-text-on-dark-muted);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--btn-min-height, 44px);
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius-button);
  font-weight: 700;
  font-size: var(--text-sm);
  border: 1px solid transparent;
  transition: background-color var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-red);
  color: var(--color-white);
  border-color: var(--color-red);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-red-hover);
  border-color: var(--color-red-hover);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-red);
  border-color: var(--color-white);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--color-bg-soft);
}

.btn-outline {
  background: transparent;
  color: var(--color-red);
  border-color: var(--color-red);
  min-height: 44px;
  padding: 0.7rem 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--text-sm);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--color-red);
  color: var(--color-white);
}

.btn-outline--on-dark {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline--on-dark:hover,
.btn-outline--on-dark:focus-visible {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--color-white);
}

.btn-block {
  width: 100%;
}

/* ---- Forms ---- */
.form-field {
  margin-bottom: var(--space-5);
}

.form-field label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-black);
}

.form-control {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border-light);
  background: var(--color-white);
  color: var(--color-text-body);
  border-radius: var(--radius-button);
  font: inherit;
}

textarea.form-control {
  min-height: 140px;
  resize: vertical;
}

.form-control:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 1px;
  border-color: var(--color-red);
}

.form-hint {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-body-light);
}

.form-error {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-error);
  font-weight: 600;
}

.form-field--invalid .form-control {
  border-color: var(--color-error);
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.form-consent input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.form-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* ---- Utility ---- */
.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;
}

.text-center {
  text-align: center;
}

.icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex-shrink: 0;
}

/* ---- Scroll-reveal (progressive enhancement, see main.js) ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--motion-slow), transform var(--motion-slow);
}

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

.no-js [data-reveal] {
  opacity: 1;
  transform: none;
}
