/* ==========================================================================
   Cannon & Cannon Properties — Base Styles
   Reset, typography fundamentals, global element defaults
   ========================================================================== */

/* -----------------------------------------------------------------------
   Google Fonts
   ----------------------------------------------------------------------- */
/* Fonts loaded via <link> in header.php — do not duplicate here */

/* -----------------------------------------------------------------------
   Modern CSS Reset
   ----------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

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

/* -----------------------------------------------------------------------
   Document
   ----------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-dark);
  background-color: var(--color-cream);
  line-height: var(--leading-normal); /* 1.5 — body text sweet spot */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* -----------------------------------------------------------------------
   Headings
   ----------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--leading-snug); /* 1.25 — tighter than body, not crushed */
  color: var(--color-purple-deep);
  font-weight: 600;
  margin-bottom: var(--space-md);
  text-wrap: balance; /* Keeps headings from orphaning last word */
}

h1, h2 {
  line-height: var(--leading-tight); /* 1.15 — display headings */
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl);  }
h5 { font-size: var(--text-lg);  }
h6 { font-size: var(--text-base); }

/* -----------------------------------------------------------------------
   Body Text
   ----------------------------------------------------------------------- */
p {
  margin-bottom: var(--space-md);
}

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

/* -----------------------------------------------------------------------
   Links
   ----------------------------------------------------------------------- */
a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition), text-decoration var(--transition);
}

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

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

/* -----------------------------------------------------------------------
   Blockquote
   ----------------------------------------------------------------------- */
blockquote {
  border-left: 4px solid var(--color-gold);
  padding-left: var(--space-lg);
  font-style: italic;
  color: var(--color-purple-deep);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  margin-bottom: var(--space-lg);
}

/* -----------------------------------------------------------------------
   Selection
   ----------------------------------------------------------------------- */
::selection {
  background-color: var(--color-purple-deep);
  color: var(--color-white);
}

::-moz-selection {
  background-color: var(--color-purple-deep);
  color: var(--color-white);
}

/* -----------------------------------------------------------------------
   Focus — accessible and on-brand
   ----------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-purple-medium);
  outline-offset: 2px;
}

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

.skip-link,
.skip-to-content {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-gold);
  color: var(--color-purple-dark);
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 10000;
  transition: top var(--transition);
}

.skip-link:focus,
.skip-to-content:focus {
  top: 0;
  text-decoration: none;
  color: var(--color-purple-dark);
}

/* -----------------------------------------------------------------------
   Horizontal Rule
   ----------------------------------------------------------------------- */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-2xl) 0;
}
