/* ======================================================
   BASE STYLES — HAVENROCK
   Global reset, typography, and element defaults
====================================================== */

/* ===============================
   RESET / NORMALIZATION
================================ */

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

html {
  width: 100%;
  scroll-behavior: smooth;
}

/* body {
  width: 100%;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  background: var(--color-bg);
  color: var(--color-text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
} */

body {
  font-family: var(--font-body);
  font-size: clamp(
    var(--text-body-min),
    1.2vw,
    var(--text-body-max)
  );
  line-height: 1.75;
  color: var(--color-text-primary);
}

/* ===============================
   MEDIA ELEMENTS
================================ */

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

video {
  height: auto;
}

svg {
  fill: currentColor;
}

/* ===============================
   LINKS
================================ */

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

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

/* ===============================
   TYPOGRAPHY
================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-primary);
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(
    var(--text-hero-min),
    5vw,
    var(--text-hero-max)
  );
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.005em;
  color: var(--color-primary);
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(
    var(--text-h2-min),
    3.5vw,
    var(--text-h2-max)
  );
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: 0.01em;
  color: var(--color-primary);
}

h3,
h4,
h5,
h6 {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
} */

h3 {
  font-size: 1.2rem;
  margin-bottom: .6rem;
}

/* h1,
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.005em;
} */

/* h1 {
  line-height: 1.15;
} */

h2 {
  line-height: 1.2;
}

p {
  margin-bottom: 1rem;
  color: var(--color-text-primary);
}

/* Text spacing rhythm */
p + p {
  margin-top: 1rem;
}

/* ===============================
   LISTS
================================ */

ul,
ol {
  margin: 0;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Remove default list style when needed */
.list-reset {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ===============================
   FORMS (BASE ONLY)
================================ */

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

button {
  border: none;
  background: none;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ===============================
   TABLES
================================ */

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.75rem;
}

/* ===============================
   HR
================================ */

hr {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: 3rem 0;
}

/* ===============================
   SELECTION
================================ */

::selection {
  background: rgba(176, 141, 87, 0.25); /* bronze tint */
}

/* ===============================
   ACCESSIBILITY HELPERS
================================ */

.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;
}
