/* ============================================================================
   AUBURY & CO — BASE STYLES
   Reset, typography, and foundational element styling
   ============================================================================ */

/* FONT IMPORTS */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Inter:wght@300;400;500;600;700&display=swap');

/* RESET & HTML */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--morning);
  color: var(--text-body);
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-weight: var(--weight-400);
  /* overflow-x: clip prevents horizontal scroll without creating a
     scroll container — required so `position: sticky` on .navbar
     works on iOS Safari. Fallback `hidden` for browsers that do not
     yet support `clip`. Fixed 21 Apr 2026. */
  overflow-x: hidden;
  overflow-x: clip;
}

/* TYPOGRAPHY: HEADINGS */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: var(--leading-tight);
  font-weight: var(--weight-700);
  margin-bottom: var(--space-6);
  letter-spacing: var(--tracking-tight);
}

h1 {
  font-size: var(--text-6xl);
  font-size: clamp(var(--text-4xl), 8vw, var(--text-6xl));
  font-weight: var(--weight-400);
  letter-spacing: var(--tracking-widest);
}

h2 {
  font-size: var(--text-5xl);
  font-size: clamp(var(--text-3xl), 6vw, var(--text-5xl));
  font-weight: var(--weight-400);
  margin-bottom: var(--space-8);
}

h3 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-500);
  margin-bottom: var(--space-6);
}

h4 {
  font-size: var(--text-xl);
  font-weight: var(--weight-600);
  margin-bottom: var(--space-4);
}

h5 {
  font-size: var(--text-lg);
  font-weight: var(--weight-600);
}

h6 {
  font-size: var(--text-base);
  font-weight: var(--weight-600);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

/* TYPOGRAPHY: TEXT */
p {
  margin-bottom: var(--space-6);
  color: var(--charcoal);
}

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

small {
  font-size: var(--text-sm);
  color: var(--muted);
}

strong {
  font-weight: var(--weight-600);
  color: var(--ink);
}

em {
  font-style: italic;
  color: var(--ink);
}

/* LINKS */
a {
  color: var(--forest);
  text-decoration: none;
  transition: color var(--transition-base);
  position: relative;
}

a:hover {
  color: var(--forest-deep);
  text-decoration: underline;
}

a:active {
  color: var(--forest-deep);
}

a:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* LISTS */
ul, ol {
  margin-bottom: var(--space-6);
  margin-left: var(--space-6);
}

li {
  margin-bottom: var(--space-3);
}

ul li {
  list-style-type: disc;
}

ol li {
  list-style-type: decimal;
}

/* NAVBAR LIST RESET — override generic list styles above */
.navbar-menu {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  margin-left: 0 !important;
}

.navbar-menu li {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* FOOTER LIST RESET — override generic list styles */
.footer-section ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  margin-left: 0 !important;
}

.footer-section li {
  list-style: none !important;
  list-style-type: none !important;
}

/* BLOCKQUOTE */
blockquote {
  font-family: var(--serif);
  font-size: var(--text-2xl);
  line-height: var(--leading-relaxed);
  color: var(--ink);
  border-left: 4px solid var(--forest);
  padding: var(--space-6);
  margin: var(--space-8) 0;
  font-style: italic;
  background: rgba(44, 62, 45, 0.03);
}

blockquote cite {
  display: block;
  font-style: normal;
  font-size: var(--text-base);
  color: var(--muted);
  margin-top: var(--space-4);
}

/* CODE */
code {
  font-family: var(--mono);
  background: var(--linen);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}

pre {
  background: var(--linen);
  color: var(--charcoal);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin-bottom: var(--space-6);
  font-family: var(--mono);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* IMAGES */
img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

img[loading="lazy"] {
  background: linear-gradient(45deg, var(--linen) 25%, transparent 25%, transparent 75%, var(--linen) 75%, var(--linen)),
              linear-gradient(45deg, var(--linen) 25%, transparent 25%, transparent 75%, var(--linen) 75%, var(--linen));
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  background-color: var(--cream);
}

/* HORIZONTAL RULE */
hr {
  border: none;
  height: 1px;
  background: var(--border-light);
  margin: var(--space-12) 0;
}

/* FORMS */
input,
textarea,
select {
  font-family: var(--sans);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--warm-white);
  border: 1px solid var(--border-light);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base), background-color var(--transition-base);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--forest);
  background: rgba(44, 62, 45, 0.02);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* BUTTONS (GENERAL) */
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  font-family: var(--sans);
  font-size: var(--text-base);
  font-weight: var(--weight-600);
  cursor: pointer;
  border: none;
  border-radius: var(--radius-full);
  padding: var(--space-3) var(--space-6);
  transition: all var(--transition-base);
}

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

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* TABLES */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-8);
}

th {
  text-align: left;
  font-weight: var(--weight-600);
  padding: var(--space-4);
  border-bottom: 2px solid var(--forest);
  background: var(--cream);
}

td {
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-light);
}

tbody tr:hover {
  background: var(--linen);
}

/* TEXT SELECTION */
::selection {
  background: var(--forest);
  color: var(--light-text);
}

::-moz-selection {
  background: var(--forest);
  color: var(--light-text);
}

/* SCROLLBAR (WEBKIT) */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--warm-white);
}

::-webkit-scrollbar-thumb {
  background: var(--parchment);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--forest);
}

/* UTILITY: CLEARFIX */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* UTILITY: VISUALLY HIDDEN */
.sr-only,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* SKIP TO MAIN LINK */
.skip-to-main {
  position: absolute;
  left: -9999px;
  z-index: var(--z-modal);
  padding: var(--space-4);
  background: var(--forest);
  color: var(--light-text);
  text-decoration: none;
  border-radius: var(--radius-md);
}

.skip-to-main:focus {
  left: var(--space-4);
  top: var(--space-4);
}
