/*
 * SocialHiker.net — Global Design System
 * =======================================
 * HOW TO INSTALL
 * --------------
 * Option A (Elementor / WP theme): Paste into
 *   Appearance → Customize → Additional CSS
 *
 * Option B (child theme): @import or paste into
 *   your child theme's style.css
 *
 * Option C (Code Snippets plugin): Add as a CSS
 *   snippet (type: CSS / Front-end)
 *
 * The Google Fonts @import below must be the FIRST
 * line of whichever CSS file you paste this into.
 * If your theme already loads any of these fonts,
 * remove them from the @import to avoid duplication.
 * -----------------------------------------------
 */

/* ── 1. GOOGLE FONTS ──────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Fira+Sans+Condensed:wght@600;700&family=Roboto+Slab:wght@400;500&family=Roboto:wght@400;500&display=swap');


/* ── 2. BRAND TOKENS ──────────────────────────── */
/*
 * All brand colors are defined once here as CSS
 * variables. Reference these everywhere — never
 * hardcode an amber hex value again.
 *
 * AMBER SCALE
 *   --sh-amber       Primary interactive (links, icons, buttons)
 *   --sh-amber-dark  Text on light amber fills (labels, headings)
 *   --sh-amber-mid   Hover states, borders
 *   --sh-amber-light Subtle fills (pills, badges, avatar bg)
 *
 * NEUTRAL SCALE
 *   --sh-text        Body text (maps to your current body color)
 *   --sh-text-muted  Secondary/meta text
 *   --sh-border      Default border color
 *   --sh-surface     Card / field background (off-white)
 */
:root {
  /* Amber */
  --sh-amber:        #c8882a;
  --sh-amber-dark:   #9a6418;
  --sh-amber-mid:    #f0c070;
  --sh-amber-light:  #faeeda;

  /* Neutrals — adjust if your theme uses different values */
  --sh-text:         #1a1a1a;
  --sh-text-muted:   #6b6b6b;
  --sh-border:       rgba(0, 0, 0, 0.12);
  --sh-surface:      #f5f4f0;

  /* Radius */
  --sh-radius-sm:    4px;
  --sh-radius-md:    8px;
  --sh-radius-lg:    12px;
  --sh-radius-pill:  20px;
}


/* ── 3. TYPE SYSTEM ───────────────────────────── */
/*
 * THREE REGISTERS — each font has a specific role:
 *
 *  Fira Sans Condensed 700  →  Brand voice
 *    Site section headers, field labels, taxonomy
 *    pills, badge text, button labels, nav labels.
 *    Always uppercase with letter-spacing.
 *
 *  Roboto Slab 500/400      →  Editorial / personal
 *    Hike log titles, post titles, prev/next link
 *    titles. Warm, journal-like. Never all-caps.
 *
 *  Roboto 400/500           →  Functional UI
 *    Body copy, metadata, form fields, comments,
 *    dates, counts. Clean and legible at small sizes.
 *
 * The rules below apply globally. Elementor widget
 * overrides can reference these classes directly.
 */

/* Base body */
body,
.entry-content,
.comment-content {
  font-family: 'Roboto', -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--sh-text);
}

/* Hike log / post titles → Roboto Slab */
.entry-title,
.hike-log-title,
h1.post-title {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 500;
  line-height: 1.3;
  color: var(--sh-text);
}

/* Site section headers → Fira Sans Condensed */
h2.section-header,
.elementor-heading-title,
.widget-title,
.hl-responses-head {
  font-family: 'Fira Sans Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sh-text);
}

/* Links — global */
a {
  color: var(--sh-amber);
  text-decoration: none;
}
a:hover {
  color: var(--sh-amber-dark);
  text-decoration: underline;
}


/* ── 4. HIKE LOG COMPONENT ────────────────────── */
/*
 * All rules are namespaced under .hike-log so they
 * don't bleed into other post types.
 * Apply class="hike-log" to your single post
 * wrapper in the Elementor template or PHP template.
 */

/* Section badge */
.hike-log .hl-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sh-amber-dark);
  background: var(--sh-amber-light);
  padding: 4px 12px;
  border-radius: var(--sh-radius-md);
  margin-bottom: 0.6rem;
}

/* Post title */
.hike-log .entry-title {
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 500;
  margin: 0 0 0.75rem;
}

/* Taxonomy pills — challenge + peak */
.hike-log .hl-taxonomy {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.hike-log .hl-tax-link {
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sh-amber-dark);
  background: var(--sh-amber-light);
  padding: 4px 12px;
  border-radius: var(--sh-radius-pill);
  text-decoration: none;
  transition: background 0.15s;
}
.hike-log .hl-tax-link:hover {
  background: var(--sh-amber-mid);
  color: var(--sh-amber-dark);
  text-decoration: none;
}

/* Author meta bar */
.hike-log .hl-meta-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 0.5px solid var(--sh-border);
}
.hike-log .hl-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sh-amber-light);
  border: 1.5px solid var(--sh-amber-mid);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--sh-amber-dark);
}
.hike-log .hl-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hike-log .hl-meta-author {
  font-size: 14px;
  font-weight: 500;
  color: var(--sh-amber);
  text-decoration: none;
}
.hike-log .hl-meta-author:hover {
  text-decoration: underline;
  color: var(--sh-amber-dark);
}
.hike-log .hl-meta-date {
  font-size: 13px;
  color: var(--sh-text-muted);
}

/* Field grid */
.hike-log .hl-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 1.25rem;
}
@media (max-width: 480px) {
  .hike-log .hl-fields-grid {
    grid-template-columns: 1fr;
  }
}
.hike-log .hl-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--sh-surface);
  border-radius: var(--sh-radius-md);
  padding: 10px 12px;
}
.hike-log .hl-field-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--sh-amber);
}
.hike-log .hl-field-label {
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--sh-amber-dark);
  margin-bottom: 2px;
  display: block;
}
.hike-log .hl-field-value {
  font-size: 13px;
  color: var(--sh-text);
  display: block;
}

/* Narrative / trip report */
.hike-log .hl-narrative,
.hike-log .entry-content > p:first-of-type {
  background: var(--sh-surface);
  border-left: 3px solid var(--sh-amber);
  border-radius: 0 var(--sh-radius-md) var(--sh-radius-md) 0;
  padding: 1rem 1.25rem;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

/* Photo grid */
.hike-log .hl-photos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 1.5rem;
}
@media (max-width: 480px) {
  .hike-log .hl-photos {
    grid-template-columns: repeat(2, 1fr);
  }
}
.hike-log .hl-photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--sh-radius-md);
  display: block;
}

/* Edit bar — visible to post author only (PHP conditional) */
.hike-log .hl-edit-bar {
  display: flex;
  align-items: center;
  margin-bottom: 1.75rem;
}
.hike-log .hl-edit-note {
  font-size: 12px;
  color: var(--sh-text-muted);
  margin-right: auto;
}
.hike-log .hl-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sh-amber-dark);
  background: none;
  border: 1px solid var(--sh-amber-mid);
  border-radius: var(--sh-radius-md);
  padding: 6px 14px;
  cursor: pointer;
  text-decoration: none;
}
.hike-log .hl-edit-btn:hover {
  background: var(--sh-amber-light);
  color: var(--sh-amber-dark);
  text-decoration: none;
}

/* Prev / Next — scoped to current peak */
.hike-log .hl-prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 0.5px solid var(--sh-border);
  border-bottom: 0.5px solid var(--sh-border);
  margin-bottom: 1.75rem;
}
.hike-log .hl-prevnext-item {
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-decoration: none;
}
.hike-log .hl-prevnext-item.older {
  padding-right: 1rem;
}
.hike-log .hl-prevnext-item.newer {
  align-items: flex-end;
  border-left: 0.5px solid var(--sh-border);
  padding-left: 1rem;
}
.hike-log .hl-prevnext-dir {
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--sh-amber);
  display: flex;
  align-items: center;
  gap: 4px;
}
.hike-log .hl-prevnext-context {
  font-size: 11px;
  color: var(--sh-text-muted);
}
.hike-log .hl-prevnext-label {
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--sh-text);
}
.hike-log .hl-prevnext-item:hover .hl-prevnext-label {
  color: var(--sh-amber);
}


/* ── 5. RESPONSES / COMMENTS ──────────────────── */

.hike-log #responses .hl-responses-head,
.hike-log .comments-title {
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sh-text);
  margin-bottom: 1rem;
}

/* Existing comments */
.hike-log .comment-author .fn a,
.hike-log .comment-author .fn {
  font-size: 14px;
  font-weight: 500;
  color: var(--sh-amber) !important;
  text-decoration: none;
}
.hike-log .comment-metadata a,
.hike-log .comment-metadata time {
  font-size: 12px;
  color: var(--sh-text-muted);
}
.hike-log .comment-content p {
  font-size: 14px;
  line-height: 1.6;
}

/* Comment form */
.hike-log #respond .comment-form-comment textarea,
.hike-log #respond input[type="text"],
.hike-log #respond input[type="email"],
.hike-log #respond input[type="url"] {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  border: 0.5px solid var(--sh-border);
  border-radius: var(--sh-radius-md);
  padding: 10px 12px;
  width: 100%;
  box-sizing: border-box;
}
.hike-log #respond input[type="submit"],
.hike-log .submit {
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--sh-amber);
  color: #fff;
  border: none;
  border-radius: var(--sh-radius-md);
  padding: 8px 22px;
  cursor: pointer;
}
.hike-log #respond input[type="submit"]:hover,
.hike-log .submit:hover {
  background: var(--sh-amber-dark);
}


/* ── 6. GLOBAL SITE ELEMENTS ──────────────────── */
/*
 * These apply site-wide, not just to hike logs.
 * They bring the homepage section headers and
 * navigation into the same type system.
 */

/* Primary navigation */
.main-navigation a,
#site-navigation a,
.nav-menu a {
  font-family: 'Fira Sans Condensed', sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* Homepage / page section headers (h2) */
.site-main h2,
.elementor-widget-heading h2,
.page-section-title {
  font-family: 'Fira Sans Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Sidebar widget titles */
.widget-title {
  font-family: 'Fira Sans Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 14px;
  color: var(--sh-text);
  border-bottom: 2px solid var(--sh-amber-light);
  padding-bottom: 6px;
  margin-bottom: 12px;
}

/* Global button style */
.wp-block-button__link,
.button,
.btn,
input[type="submit"] {
  font-family: 'Fira Sans Condensed', sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Amber button variant */
.btn-amber,
.button-primary {
  background: var(--sh-amber);
  color: #fff;
  border-radius: var(--sh-radius-md);
  padding: 8px 22px;
  text-decoration: none;
  display: inline-block;
}
.btn-amber:hover,
.button-primary:hover {
  background: var(--sh-amber-dark);
  color: #fff;
  text-decoration: none;
}

