/* =============================================================================
 * HONORICH — Base
 * Reset, document defaults, typography primitives, focus, container, helpers.
 * ===========================================================================*/

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

input,
select,
textarea {
  color: inherit;
}

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

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

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-family: var(--ff-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-display);
  color: var(--c-navy);
}

h1 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
}

h4 {
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
}

hr {
  border: 0;
  border-top: 1px solid var(--c-line);
  margin: var(--sp-6) 0;
}

/* Selection */
::selection {
  background: var(--c-gold);
  color: var(--c-navy);
}

/* Focus rings — visible, gold-tinted, never removed without replacement */
:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--sp-4);
  background: var(--c-navy);
  color: var(--c-bg);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-md);
  z-index: var(--z-toast);
  transition: top var(--d-base) var(--e-out);
}

.skip-link:focus,
.skip-link:focus-visible {
  top: var(--sp-4);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--container-pad);
}

.container--narrow {
  max-width: 880px;
}

.container--wide {
  max-width: 1480px;
}

/* Section spacing */
.section {
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: clamp(2.5rem, 1.5rem + 3vw, 5rem);
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--grid-gap);
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
}

/* Vertical rhythm helpers */
.stack > * + * {
  margin-top: var(--sp-4);
}

.stack-lg > * + * {
  margin-top: var(--sp-6);
}

/* Eyebrow label */
.eyebrow {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--c-gold-deep);
  margin-bottom: var(--sp-4);
}

.eyebrow--light {
  color: var(--c-gold);
}

/* Display headings */
.display-1 {
  font-size: var(--fs-display-1);
  font-weight: var(--fw-black);
  line-height: var(--lh-display);
  letter-spacing: -0.025em;
}

.display-2 {
  font-size: var(--fs-display-2);
  font-weight: var(--fw-bold);
  line-height: var(--lh-display);
  letter-spacing: -0.022em;
}

/* Lead paragraph */
.lead {
  font-size: var(--fs-body-lg);
  color: var(--c-text-muted);
  line-height: 1.55;
  max-width: 60ch;
}

/* Visually hidden — for screen readers only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Dark section theme — sets background + text colour */
.theme-dark {
  background: var(--c-navy);
  color: var(--c-bg);
}

.theme-dark h1,
.theme-dark h2,
.theme-dark h3,
.theme-dark h4 {
  color: var(--c-bg);
}

.theme-dark .lead {
  color: rgba(250, 248, 244, 0.75);
}

.theme-dark .eyebrow {
  color: var(--c-gold);
}

.theme-cream {
  background: var(--c-bg-soft);
}

/* Reduced motion — override transitions globally for users who request it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
