/**
 * Horizon Theme — Base Styles
 * Document reset, typography, GeneratePress overrides, layout utilities.
 */

/* ── Google Fonts loaded via wp_enqueue_style in functions.php ── */

/* ==========================================================================
   Document
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body,
.editor-styles-wrapper {
  background-color: var(--hp-bg);
  color: var(--hp-text);
  font-family: var(--hp-font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Override GeneratePress body background */
body.hp {
  background-color: var(--hp-bg);
}

::selection {
  background: var(--hp-gold);
  color: var(--hp-bg);
}

/* ==========================================================================
   Headings
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--hp-font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--hp-text);
  margin-top: 0;
}

h1 { font-size: var(--hp-text-4xl); }
h2 { font-size: var(--hp-text-3xl); }
h3 { font-size: var(--hp-text-2xl); }
h4 { font-size: var(--hp-text-xl); }

/* ==========================================================================
   Links
   ========================================================================== */

a {
  color: var(--hp-gold);
  text-decoration: none;
  transition: color var(--hp-dur) var(--hp-ease);
}

a:hover,
a:focus-visible {
  color: var(--hp-gold-light);
}

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

/* ==========================================================================
   GeneratePress layout overrides
   ========================================================================== */

/* Kill the GeneratePress sidebar everywhere */
.hp .sidebar-container { display: none !important; }
.hp .content-area      { width: 100% !important; max-width: 100% !important; }

/* Remove default GP page title on pages that supply their own hero */
.hp-has-hero .entry-header,
.hp-has-hero .page-header { display: none !important; }

/* GP navigation — transparent over hero, never white */
.hp .site-header,
.hp #masthead,
.hp .site-header .inside-header {
  background-color: transparent !important;
  background: transparent !important;
}

.hp .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--hp-header-h);
  background: transparent;
  transition: background var(--hp-dur) var(--hp-ease), box-shadow var(--hp-dur) var(--hp-ease);
}

.hp .site-header.hp-scrolled {
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--hp-border);
}

.hp .site-header .site-title a,
.hp .site-header .site-description {
  color: var(--hp-text);
}

.hp .main-navigation a {
  color: var(--hp-text);
  font-family: var(--hp-font-body);
  font-size: var(--hp-text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color var(--hp-dur) var(--hp-ease);
}

.hp .main-navigation a:hover {
  color: var(--hp-gold);
}

/* GP site header inner */
.hp .inside-header {
  max-width: var(--hp-content-max);
  margin: 0 auto;
  padding: 0 var(--hp-content-pad);
  height: var(--hp-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Remove GP default padding on content */
.hp .site-content .content-area {
  padding: 0;
}

.hp .entry-content > *:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Layout utilities
   ========================================================================== */

.hp-container {
  max-width: var(--hp-content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--hp-content-pad);
  padding-right: var(--hp-content-pad);
}

.hp-section {
  padding-top: var(--hp-sp-20);
  padding-bottom: var(--hp-sp-20);
}

.hp-section--tight {
  padding-top: var(--hp-sp-12);
  padding-bottom: var(--hp-sp-12);
}

.hp-section--flush {
  padding-top: 0;
  padding-bottom: 0;
}

/* ==========================================================================
   Section head (eyebrow + title + view-all)
   ========================================================================== */

.hp-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--hp-sp-4);
  margin-bottom: var(--hp-sp-8);
}

.hp-eyebrow {
  display: block;
  font-family: var(--hp-font-body);
  font-size: var(--hp-text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hp-gold);
  margin-bottom: var(--hp-sp-2);
}

.hp-section-head h2 {
  margin-bottom: 0;
}

.hp-viewall {
  flex-shrink: 0;
  font-size: var(--hp-text-sm);
  font-weight: 500;
  color: var(--hp-gold);
  display: inline-flex;
  align-items: center;
  gap: var(--hp-sp-1);
  white-space: nowrap;
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: border-color var(--hp-dur) var(--hp-ease);
}

.hp-viewall:hover {
  border-bottom-color: var(--hp-gold);
  color: var(--hp-gold);
}

/* ==========================================================================
   Rule divider
   ========================================================================== */

.hp-rule {
  border: none;
  border-top: 1px solid var(--hp-border);
  margin: 0;
}

/* ==========================================================================
   Page header (compact — used on inner pages)
   ========================================================================== */

.hp-page-header {
  background: var(--hp-bg-surface);
  border-bottom: 1px solid var(--hp-border);
  padding: var(--hp-sp-12) 0 var(--hp-sp-10);
  margin-top: var(--hp-header-h);
}

.hp-page-header__eyebrow {
  display: block;
  font-family: var(--hp-font-body);
  font-size: var(--hp-text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hp-gold);
  margin-bottom: var(--hp-sp-3);
}

.hp-page-header__title {
  font-size: var(--hp-text-4xl);
  margin-bottom: var(--hp-sp-2);
}

.hp-page-header__subtitle {
  font-size: var(--hp-text-lg);
  color: var(--hp-text-muted);
  margin-bottom: 0;
  font-family: var(--hp-font-display);
  font-style: italic;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.hp-footer {
  background: var(--hp-bg);
  border-top: 1px solid var(--hp-border);
  padding: var(--hp-sp-16) 0 var(--hp-sp-8);
}

.hp-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--hp-sp-12);
  margin-bottom: var(--hp-sp-12);
}

.hp-footer__brand-name {
  font-family: var(--hp-font-display);
  font-size: var(--hp-text-2xl);
  font-weight: 600;
  color: var(--hp-gold);
  margin-bottom: var(--hp-sp-2);
}

.hp-footer__tagline {
  font-size: var(--hp-text-sm);
  color: var(--hp-text-muted);
  margin-bottom: var(--hp-sp-6);
}

.hp-footer__heading {
  font-family: var(--hp-font-body);
  font-size: var(--hp-text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hp-gold);
  margin-bottom: var(--hp-sp-4);
}

.hp-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--hp-sp-3);
}

.hp-footer__links a {
  font-size: var(--hp-text-sm);
  color: var(--hp-text-muted);
  transition: color var(--hp-dur) var(--hp-ease);
}

.hp-footer__links a:hover {
  color: var(--hp-text);
}

.hp-footer__bar {
  border-top: 1px solid var(--hp-border);
  padding-top: var(--hp-sp-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--hp-sp-4);
  font-size: var(--hp-text-xs);
  color: var(--hp-text-disabled);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.hp-field {
  display: flex;
  flex-direction: column;
  gap: var(--hp-sp-2);
}

.hp-field__label {
  font-size: var(--hp-text-sm);
  font-weight: 500;
  color: var(--hp-text-muted);
  letter-spacing: 0.02em;
}

.hp-field input,
.hp-field select,
.hp-field textarea {
  background: var(--hp-bg);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-r-sm);
  color: var(--hp-text);
  font-family: var(--hp-font-body);
  font-size: var(--hp-text-base);
  padding: 0.75rem 1rem;
  width: 100%;
  transition: border-color var(--hp-dur) var(--hp-ease);
  -webkit-appearance: none;
  appearance: none;
}

.hp-field input:focus,
.hp-field select:focus,
.hp-field textarea:focus {
  outline: none;
  border-color: var(--hp-border-strong);
  box-shadow: 0 0 0 3px var(--hp-gold-muted);
}

.hp-field textarea {
  resize: vertical;
  min-height: 140px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .hp-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  h1 { font-size: var(--hp-text-3xl); }
  h2 { font-size: var(--hp-text-2xl); }

  .hp-footer__grid {
    grid-template-columns: 1fr;
    gap: var(--hp-sp-8);
  }

  .hp-footer__bar {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--hp-sp-2);
  }

  .hp-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hp .site-header {
    position: sticky;
    top: 0;
  }
}
