/*
Theme Name: Hoot Commerce
Theme URI: https://hootcommerce.com
Author: Hoot Commerce
Description: Lightweight custom theme for Hoot Commerce — hybrid affiliate content + e-commerce agency site. Built for speed (no page builder, no bundled framework), block-editor compatible, WCAG-conscious.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: hoot-commerce
*/

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */
:root {
  /* Color */
  --hc-ink: #14161F;         /* dusk sections, footer, dark nav */
  --hc-ink-soft: #1F2233;
  --hc-paper: #F7F5EF;       /* base background */
  --hc-paper-dim: #EFEBE0;   /* card background on paper */
  --hc-navy: #1F2740;        /* primary text on light */
  --hc-navy-soft: #4A5170;   /* secondary text on light */
  --hc-amber: #E3A23C;       /* owl-eye accent — primary CTA / focus */
  --hc-amber-dark: #C8862A;
  --hc-moss: #4B6355;        /* secondary accent — tags, success, links on dark */
  --hc-line: #DDD8C8;        /* hairline dividers on paper */
  --hc-line-dark: #34384A;   /* hairline dividers on ink */
  --hc-white: #FFFFFF;

  /* Type */
  --hc-font-display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  --hc-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hc-font-mono: "IBM Plex Mono", "Courier New", monospace;

  /* Type scale */
  --hc-size-eyebrow: 0.75rem;
  --hc-size-body: 1.0625rem;
  --hc-size-h4: 1.25rem;
  --hc-size-h3: 1.75rem;
  --hc-size-h2: 2.5rem;
  --hc-size-h1: clamp(2.25rem, 5vw, 3.75rem);

  /* Spacing */
  --hc-space-xs: 0.5rem;
  --hc-space-sm: 1rem;
  --hc-space-md: 1.75rem;
  --hc-space-lg: 3rem;
  --hc-space-xl: 5rem;

  /* Layout */
  --hc-max-width: 1180px;
  --hc-radius: 3px;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--hc-paper);
  color: var(--hc-navy);
  font-family: var(--hc-font-body);
  font-size: var(--hc-size-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--hc-moss); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--hc-font-display);
  color: var(--hc-navy);
  line-height: 1.1;
  margin: 0 0 var(--hc-space-sm);
  font-weight: 600;
}
h1 { font-size: var(--hc-size-h1); letter-spacing: -0.02em; }
h2 { font-size: var(--hc-size-h2); letter-spacing: -0.01em; }
h3 { font-size: var(--hc-size-h3); }
h4 { font-size: var(--hc-size-h4); }

p { margin: 0 0 var(--hc-space-sm); color: var(--hc-navy-soft); }

.hc-mono {
  font-family: var(--hc-font-mono);
  font-variant-numeric: tabular-nums;
}

/* Visible keyboard focus everywhere — accessibility floor */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.hc-card:focus-visible {
  outline: 2px solid var(--hc-amber);
  outline-offset: 3px;
  border-radius: var(--hc-radius);
}

.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.hc-container {
  max-width: var(--hc-max-width);
  margin: 0 auto;
  padding: 0 var(--hc-space-md);
}

.hc-section { padding: var(--hc-space-xl) 0; }
.hc-section--tight { padding: var(--hc-space-lg) 0; }
.hc-section--ink { background: var(--hc-ink); color: var(--hc-paper); }
.hc-section--ink h2, .hc-section--ink h3 { color: var(--hc-paper); }
.hc-section--ink p { color: #A9ADC2; }
.hc-section--dim { background: var(--hc-paper-dim); }

.hc-eyebrow {
  font-family: var(--hc-font-mono);
  font-size: var(--hc-size-eyebrow);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hc-amber-dark);
  display: block;
  margin-bottom: var(--hc-space-xs);
}
.hc-section--ink .hc-eyebrow { color: var(--hc-amber); }

.hc-hr {
  border: none;
  border-top: 1px solid var(--hc-line);
  margin: 0;
}

/* ==========================================================================
   SITE HEADER
   ========================================================================== */
.hc-header {
  background: var(--hc-paper);
  border-bottom: 1px solid var(--hc-line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.hc-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--hc-space-sm) 0;
  gap: var(--hc-space-md);
}

.hc-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--hc-font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--hc-navy);
}
.hc-brand:hover { text-decoration: none; }

.hc-brand__mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.hc-nav {
  display: flex;
  align-items: center;
  gap: var(--hc-space-md);
}

.hc-nav ul {
  list-style: none;
  display: flex;
  gap: var(--hc-space-md);
  margin: 0;
  padding: 0;
}

.hc-nav a {
  color: var(--hc-navy);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.35rem 0.1rem;
  position: relative;
}
.hc-nav a:hover { text-decoration: none; color: var(--hc-amber-dark); }

/* Owl-eye focus ring — signature hover element, nav + cards only */
.hc-nav a::after,
.hc-card:hover .hc-card__ring,
.hc-btn:focus-visible {
  content: "";
}

.hc-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1px solid var(--hc-amber);
  transform: translateX(-50%) scale(0);
  transition: transform 0.18s ease;
}
.hc-nav a:hover::after { transform: translateX(-50%) scale(1); }

.hc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--hc-font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--hc-radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hc-btn:hover { text-decoration: none; }

.hc-btn--primary {
  background: var(--hc-amber);
  color: var(--hc-ink);
}
.hc-btn--primary:hover {
  background: var(--hc-amber-dark);
  box-shadow: 0 0 0 3px rgba(227, 162, 60, 0.25);
}

.hc-btn--ghost {
  background: transparent;
  border-color: var(--hc-navy);
  color: var(--hc-navy);
}
.hc-section--ink .hc-btn--ghost { border-color: var(--hc-paper); color: var(--hc-paper); }
.hc-btn--ghost:hover { background: var(--hc-navy); color: var(--hc-paper); }

.hc-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hc-navy);
  border-radius: var(--hc-radius);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hc-hero {
  padding: var(--hc-space-xl) 0;
}
.hc-hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--hc-space-xl);
  align-items: center;
}
.hc-hero h1 { margin-bottom: var(--hc-space-sm); }
.hc-hero__sub {
  font-size: 1.15rem;
  max-width: 46ch;
  margin-bottom: var(--hc-space-md);
}
.hc-hero__actions {
  display: flex;
  gap: var(--hc-space-sm);
  flex-wrap: wrap;
}

/* Instrument panel — signature hero element */
.hc-panel {
  border: 1px solid var(--hc-line);
  border-radius: var(--hc-radius);
  background: var(--hc-white);
  overflow: hidden;
}
.hc-panel__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--hc-space-sm) var(--hc-space-md);
  border-bottom: 1px solid var(--hc-line);
  position: relative;
}
.hc-panel__row:last-child { border-bottom: none; }
.hc-panel__label {
  font-size: 0.8rem;
  color: var(--hc-navy-soft);
  letter-spacing: 0.03em;
}
.hc-panel__value {
  font-family: var(--hc-font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--hc-navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hc-panel__trend { font-size: 0.85rem; }
.hc-panel__trend--up { color: var(--hc-moss); }
.hc-panel__trend--down { color: #B4463F; }
.hc-panel__row::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--hc-amber);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.hc-panel__row:hover::before { opacity: 1; }

/* ==========================================================================
   TRUST BAR
   ========================================================================== */
.hc-trust {
  border-top: 1px solid var(--hc-line);
  border-bottom: 1px solid var(--hc-line);
  padding: var(--hc-space-md) 0;
}
.hc-trust__label {
  text-align: center;
  margin-bottom: var(--hc-space-sm);
}
.hc-trust__logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--hc-space-lg);
}
.hc-trust__logos img {
  max-height: 32px;
  width: auto;
  filter: grayscale(1);
  opacity: 0.6;
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.hc-trust__logos img:hover { filter: grayscale(0); opacity: 1; }

/* ==========================================================================
   CARDS (services / resources)
   ========================================================================== */
.hc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--hc-space-md);
}

.hc-card {
  background: var(--hc-white);
  border: 1px solid var(--hc-line);
  border-radius: var(--hc-radius);
  padding: var(--hc-space-md);
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.hc-card:hover {
  border-color: var(--hc-amber);
  transform: translateY(-2px);
}
.hc-card__icon {
  width: 26px; height: 26px;
  margin-bottom: var(--hc-space-sm);
  color: var(--hc-amber-dark);
}
.hc-card h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.hc-card p { font-size: 0.95rem; margin-bottom: var(--hc-space-sm); }
.hc-card__link { font-family: var(--hc-font-mono); font-size: 0.82rem; font-weight: 600; }

/* Owl-eye focus ring on card hover */
.hc-card__ring {
  position: absolute;
  top: var(--hc-space-md);
  right: var(--hc-space-md);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--hc-line);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.hc-card:hover .hc-card__ring {
  border-color: var(--hc-amber);
  box-shadow: 0 0 0 4px rgba(227, 162, 60, 0.15);
}

/* Resource / blog cards */
.hc-post-card__meta {
  font-family: var(--hc-font-mono);
  font-size: 0.75rem;
  color: var(--hc-navy-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hc-post-card__image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--hc-radius);
  margin-bottom: var(--hc-space-sm);
  background: var(--hc-paper-dim);
}
.hc-post-card__image img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   CTA BAND
   ========================================================================== */
.hc-cta {
  text-align: center;
}
.hc-cta h2 { max-width: 30ch; margin: 0 auto var(--hc-space-sm); }
.hc-cta p { max-width: 46ch; margin: 0 auto var(--hc-space-md); }

/* ==========================================================================
   SINGLE / PAGE CONTENT
   ========================================================================== */
.hc-content {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--hc-space-xl) var(--hc-space-md);
}
.hc-content h1 { margin-bottom: var(--hc-space-xs); }
.hc-content .hc-post-meta {
  font-family: var(--hc-font-mono);
  font-size: 0.85rem;
  color: var(--hc-navy-soft);
  margin-bottom: var(--hc-space-lg);
}
.hc-content h2 { margin-top: var(--hc-space-lg); font-size: 1.9rem; }
.hc-content h3 { margin-top: var(--hc-space-md); font-size: 1.4rem; }
.hc-content ul, .hc-content ol { color: var(--hc-navy-soft); padding-left: 1.3em; }
.hc-content blockquote {
  border-left: 3px solid var(--hc-amber);
  margin: var(--hc-space-md) 0;
  padding: 0.2rem 0 0.2rem var(--hc-space-md);
  font-style: italic;
  color: var(--hc-navy-soft);
}
.hc-content img { border-radius: var(--hc-radius); margin: var(--hc-space-sm) 0; }
.hc-content table { width: 100%; border-collapse: collapse; margin: var(--hc-space-md) 0; }
.hc-content table th, .hc-content table td {
  border: 1px solid var(--hc-line);
  padding: 0.6rem 0.8rem;
  text-align: left;
}
.hc-content table th { background: var(--hc-paper-dim); font-family: var(--hc-font-mono); font-size: 0.85rem; }

/* Affiliate disclosure box */
.hc-disclosure {
  background: var(--hc-paper-dim);
  border: 1px solid var(--hc-line);
  border-radius: var(--hc-radius);
  padding: var(--hc-space-sm) var(--hc-space-md);
  font-size: 0.9rem;
  margin-bottom: var(--hc-space-lg);
}
.hc-disclosure p { margin: 0; font-size: 0.88rem; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.hc-footer {
  background: var(--hc-ink);
  color: #A9ADC2;
  padding: var(--hc-space-xl) 0 var(--hc-space-md);
}
.hc-footer a { color: var(--hc-paper); }
.hc-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--hc-space-lg);
  padding-bottom: var(--hc-space-lg);
  border-bottom: 1px solid var(--hc-line-dark);
}
.hc-footer__brand {
  font-family: var(--hc-font-display);
  color: var(--hc-paper);
  font-size: 1.2rem;
  margin-bottom: var(--hc-space-xs);
}
.hc-footer h4 {
  color: var(--hc-paper);
  font-family: var(--hc-font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--hc-space-sm);
}
.hc-footer ul { list-style: none; margin: 0; padding: 0; }
.hc-footer li { margin-bottom: 0.5rem; font-size: 0.92rem; }
.hc-footer__bottom {
  display: flex;
  justify-content: space-between;
  padding-top: var(--hc-space-md);
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: var(--hc-space-sm);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .hc-hero__grid { grid-template-columns: 1fr; }
  .hc-grid { grid-template-columns: repeat(2, 1fr); }
  .hc-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .hc-nav ul, .hc-header .hc-btn--ghost { display: none; }
  .hc-menu-toggle { display: inline-flex; }
  .hc-grid { grid-template-columns: 1fr; }
  .hc-trust__logos { gap: var(--hc-space-md); }
  .hc-footer__grid { grid-template-columns: 1fr; }
  .hc-footer__bottom { flex-direction: column; }
}
