/*
Theme Name: HikeStack
Theme URI: https://hikestack.com
Author: HikeStack
Author URI: https://hikestack.com
Description: A lean, fast, Elementor-ready technology studio theme for HikeStack. Built as a flexible engine in the spirit of lightweight base themes, optimised for the Elementor page builder. Warm, editorial palette with an engineering-studio voice.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hikestack
Tags: elementor, business, technology, one-column, two-columns, custom-menu, custom-logo, featured-images, full-width-template, blog
*/

/* ============================================================
   HIKESTACK DESIGN TOKENS
   Blend: Web Agency 04 structure + Anthropic-inspired palette
   ============================================================ */
:root {
  /* Palette — 70% template neutrals + 30% Anthropic warmth */
  --hs-base:    #FAFAF8;  /* template near-white base */
  --hs-sand:    #F4F4F2;  /* template grey section surface */
  --hs-ivory:   #FAF9F5;  /* Anthropic ivory — warm feature sections + near-white text */
  --hs-ink:     #16151A;  /* near-black text + dark sections */
  --hs-ink-soft:#23222A;  /* lifted dark surface */
  --hs-clay:    #CC785C;  /* Anthropic clay accent */
  --hs-clay-dk: #B5644A;  /* accent hover */
  --hs-kraft:   #BFB8A8;  /* subtle warm neutral */
  --hs-border:  #E7E6E2;  /* divider */
  --hs-muted:   #6E6D73;  /* secondary text on light */
  --hs-muted-d: #B5B4B0;  /* secondary text on dark */
  --hs-white:   #FFFFFF;

  /* Type */
  --hs-font-display: "Hanken Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hs-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Scale */
  --hs-maxw: 1200px;
  --hs-radius: 18px;
  --hs-radius-sm: 12px;
  --hs-gap: 28px;

  /* Elementor global hooks (so builder content inherits brand) */
  --e-global-color-primary: var(--hs-ink);
  --e-global-color-secondary: var(--hs-clay);
  --e-global-color-text: var(--hs-ink);
  --e-global-color-accent: var(--hs-clay);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--hs-font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--hs-ink);
  background: var(--hs-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--hs-font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--hs-ink);
  margin: 0 0 0.5em;
}

a { color: var(--hs-clay); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--hs-clay-dk); }

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

p { margin: 0 0 1.1em; }

.hs-container {
  max-width: var(--hs-maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--hs-ink); color: var(--hs-ivory);
  padding: 12px 18px; z-index: 100000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: var(--hs-ivory); }

/* Accessible focus */
a:focus-visible, button:focus-visible, input:focus-visible, .hs-btn:focus-visible {
  outline: 3px solid var(--hs-clay);
  outline-offset: 2px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.hs-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--hs-font-display);
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1.5px solid var(--hs-ink);
  background: var(--hs-ink); color: var(--hs-ivory);
  cursor: pointer; transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.hs-btn:hover { background: var(--hs-clay); border-color: var(--hs-clay); color: var(--hs-white); transform: translateY(-1px); }
.hs-btn--ghost { background: transparent; color: var(--hs-ink); }
.hs-btn--ghost:hover { background: var(--hs-ink); color: var(--hs-ivory); border-color: var(--hs-ink); }
.hs-btn--clay { background: var(--hs-clay); border-color: var(--hs-clay); color: var(--hs-white); }
.hs-btn--clay:hover { background: var(--hs-clay-dk); border-color: var(--hs-clay-dk); }

/* ============================================================
   SITE HEADER
   ============================================================ */
.hs-header {
  position: sticky; top: 0; z-index: 999;
  background: rgba(250, 250, 248, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--hs-border);
}
.hs-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: 74px;
  max-width: var(--hs-maxw); margin: 0 auto; padding: 0 24px;
}
.hs-brand {
  font-family: var(--hs-font-display);
  font-weight: 700; font-size: 22px; letter-spacing: -0.03em;
  color: var(--hs-ink); display: inline-flex; align-items: center; gap: 9px;
}
.hs-brand:hover { color: var(--hs-ink); }
.hs-brand__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--hs-clay); display: inline-block; }
.hs-brand img { max-height: 36px; width: auto; }

.hs-nav { display: flex; align-items: center; gap: 30px; }
.hs-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.hs-nav a {
  font-family: var(--hs-font-body);
  font-weight: 500; font-size: 15px; color: var(--hs-ink);
  position: relative; padding: 4px 0;
}
.hs-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--hs-clay); transition: width .22s ease;
}
.hs-nav a:hover::after, .hs-nav .current-menu-item > a::after { width: 100%; }
.hs-nav .sub-menu {
  position: absolute; top: 130%; left: 0; min-width: 220px;
  background: var(--hs-white); border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius-sm); padding: 8px; flex-direction: column; gap: 0;
  box-shadow: 0 18px 40px rgba(26,25,21,.10); opacity: 0; visibility: hidden;
  transform: translateY(6px); transition: all .2s ease;
}
.hs-nav .menu-item-has-children { position: relative; }
.hs-nav .menu-item-has-children:hover .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.hs-nav .sub-menu a { display: block; padding: 9px 12px; border-radius: 8px; }
.hs-nav .sub-menu a:hover { background: var(--hs-sand); }
.hs-nav .sub-menu a::after { display: none; }

.hs-header__cta { display: flex; align-items: center; gap: 14px; }

/* Mobile nav */
.hs-burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.hs-burger span { display: block; width: 24px; height: 2px; background: var(--hs-ink); margin: 5px 0; transition: .25s; }
.hs-mobile-nav { display: none; }

@media (max-width: 980px) {
  .hs-nav, .hs-header__cta .hs-btn { display: none; }
  .hs-burger { display: block; }
  .hs-mobile-nav {
    display: block; background: var(--hs-ivory); border-bottom: 1px solid var(--hs-border);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .hs-mobile-nav.open { max-height: 600px; }
  .hs-mobile-nav ul { list-style: none; margin: 0; padding: 12px 24px 20px; }
  .hs-mobile-nav .sub-menu { padding-left: 16px; }
  .hs-mobile-nav a { display: block; padding: 12px 0; font-weight: 500; color: var(--hs-ink); border-bottom: 1px solid var(--hs-border); }
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.hs-footer { background: var(--hs-ink); color: var(--hs-muted-d); padding: 76px 0 32px; }
.hs-footer a { color: var(--hs-muted-d); }
.hs-footer a:hover { color: var(--hs-clay); }
.hs-footer__grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 48px;
  padding-bottom: 52px; border-bottom: 1px solid rgba(255,255,255,.10);
}
.hs-footer__brand { font-family: var(--hs-font-display); font-weight: 700; font-size: 22px; color: var(--hs-ivory); letter-spacing: -0.03em; margin-bottom: 14px; display: inline-flex; align-items: center; gap: 9px; }
.hs-footer__brand img { max-height: 34px; }
.hs-footer__blurb { font-size: 15px; line-height: 1.65; max-width: 320px; }
.hs-footer__social { display: flex; gap: 12px; margin-top: 22px; }
.hs-footer__social a {
  width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
}
.hs-footer__social a:hover { background: var(--hs-clay); border-color: var(--hs-clay); color: var(--hs-white); }
.hs-footer__col h5 { color: var(--hs-ivory); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 18px; font-weight: 600; }
.hs-footer__col ul { list-style: none; margin: 0; padding: 0; }
.hs-footer__col li { margin-bottom: 11px; font-size: 15px; }
.hs-footer__news input {
  width: 100%; padding: 13px 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18);
  background: var(--hs-ink-soft); color: var(--hs-ivory); font-family: var(--hs-font-body); margin-bottom: 12px;
}
.hs-footer__news input::placeholder { color: var(--hs-muted-d); }
.hs-footer__bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding-top: 26px; font-size: 14px;
}
@media (max-width: 880px) {
  .hs-footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 540px) {
  .hs-footer__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   GENERIC CONTENT (blog, pages) — used when NOT Elementor
   ============================================================ */
.hs-page { padding: 64px 0 80px; }
.hs-page__title { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 28px; }
.hs-entry { max-width: 760px; margin: 0 auto; }
.hs-entry img { border-radius: var(--hs-radius-sm); margin: 1.5em 0; }

.hs-postgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 900px) { .hs-postgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .hs-postgrid { grid-template-columns: 1fr; } }
.hs-card {
  background: var(--hs-white); border: 1px solid var(--hs-border); border-radius: var(--hs-radius);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease;
}
.hs-card:hover { transform: translateY(-4px); box-shadow: 0 22px 44px rgba(26,25,21,.08); }
.hs-card__thumb { aspect-ratio: 16/10; background: var(--hs-sand); overflow: hidden; }
.hs-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hs-card__body { padding: 22px 22px 26px; }
.hs-card__cat { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--hs-clay); }
.hs-card__title { font-size: 19px; margin: 10px 0 8px; line-height: 1.25; }
.hs-card__meta { font-size: 13px; color: var(--hs-muted); }

/* Pagination */
.hs-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 56px; }
.hs-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px;
  border: 1px solid var(--hs-border); border-radius: 10px; color: var(--hs-ink); font-weight: 600; padding: 0 12px;
}
.hs-pagination .page-numbers.current, .hs-pagination .page-numbers:hover { background: var(--hs-ink); color: var(--hs-ivory); border-color: var(--hs-ink); }

/* WP core alignment helpers */
.aligncenter { margin-left: auto; margin-right: auto; }
.alignright { float: right; margin-left: 1.5em; }
.alignleft { float: left; margin-right: 1.5em; }
.wp-caption-text { font-size: 13px; color: var(--hs-muted); }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); height: 1px; width: 1px; overflow: hidden; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
