/*
Theme Name: Canyon Utility
Theme URI: https://canyonriggingpro.com/
Author: Canyon Rigging Pro
Description: A lightweight everyday carry, securing and storage journal theme.
Version: 0.1.0
Text Domain: canyon-utility
*/

:root {
  --paper: #f4f0e7;
  --paper-deep: #e9e1d1;
  --ink: #142b35;
  --ink-soft: #48606a;
  --sage: #71816d;
  --sage-pale: #dce1d4;
  --amber: #d77943;
  --line: rgba(20, 43, 53, .18);
  --white: #fffdf8;
  --shadow: 0 24px 70px rgba(20, 43, 53, .12);
  --display: "Baskervville", Georgia, serif;
  --sans: "Instrument Sans", "Inter", Arial, sans-serif;
  --wide: min(1380px, calc(100% - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
.screen-reader-text {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}
.skip-link {
  background: var(--amber);
  color: var(--white);
  left: 12px;
  padding: 8px 12px;
  position: fixed;
  top: -50px;
  z-index: 20;
}
.skip-link:focus { top: 12px; }

.site-header {
  align-items: center;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin: 0 auto;
  min-height: 86px;
  width: var(--wide);
}
.brand {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.brand-mark {
  border: 2px solid var(--ink);
  display: inline-block;
  height: 23px;
  position: relative;
  transform: rotate(45deg);
  width: 23px;
}
.brand-mark::after {
  background: var(--amber);
  content: "";
  height: 8px;
  position: absolute;
  right: -5px;
  top: -5px;
  width: 8px;
}
.brand-name { font-size: .78rem; font-weight: 700; }
.desktop-nav { align-items: center; display: flex; gap: 24px; }
.desktop-nav a, .mobile-nav a {
  color: var(--ink-soft);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.desktop-nav a:hover, .desktop-nav a:focus-visible,
.mobile-nav a:hover, .mobile-nav a:focus-visible { color: var(--amber); }
.menu-toggle { background: transparent; border: 1px solid var(--line); display: none; padding: 9px; }
.menu-toggle span { background: var(--ink); display: block; height: 2px; margin: 4px; width: 19px; }
.mobile-nav { display: none; }

.hero-stack { margin: 0 auto; width: 100%; }
.hero-panel {
  min-height: min(76vh, 760px);
  overflow: hidden;
  position: relative;
}
.hero-panel img { height: 100%; object-fit: cover; position: absolute; inset: 0; width: 100%; }
.hero-panel::after {
  background: linear-gradient(90deg, rgba(8, 27, 35, .78), rgba(8, 27, 35, .18) 58%, rgba(8, 27, 35, .04));
  content: "";
  inset: 0;
  position: absolute;
}
.hero-panel:nth-child(2)::after { background: linear-gradient(90deg, rgba(16, 37, 42, .1), rgba(16, 37, 42, .68)); }
.hero-panel:nth-child(3)::after { background: linear-gradient(90deg, rgba(24, 42, 39, .65), rgba(24, 42, 39, .08)); }
.hero-copy {
  color: var(--white);
  left: max(24px, calc((100% - 1380px) / 2));
  max-width: 700px;
  padding: 12vh 24px 12vh 0;
  position: relative;
  z-index: 1;
}
.hero-panel:nth-child(2) .hero-copy { margin-left: auto; margin-right: max(24px, calc((100% - 1380px) / 2)); padding-left: 24px; padding-right: 0; }
.hero-panel:nth-child(3) .hero-copy { padding-top: 16vh; }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .17em; margin: 0 0 18px; text-transform: uppercase; }
.hero-copy h1, .hero-copy h2 {
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 7.8rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .92;
  margin: 0;
  max-width: 720px;
}
.hero-copy h2 { font-size: clamp(2.6rem, 5.5vw, 6.3rem); }
.hero-copy p { font-size: clamp(1rem, 1.5vw, 1.25rem); max-width: 440px; }
.hero-link {
  border-bottom: 1px solid currentColor;
  display: inline-block;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .12em;
  margin-top: 18px;
  padding-bottom: 5px;
  text-transform: uppercase;
}
.hero-index { bottom: 28px; color: rgba(255,255,255,.75); font-size: .7rem; letter-spacing: .14em; position: absolute; right: 28px; z-index: 2; }

.section-shell { margin: 0 auto; width: var(--wide); }
.topic-index { padding: 110px 0 88px; }
.section-kicker { color: var(--amber); font-size: .72rem; font-weight: 700; letter-spacing: .17em; margin: 0 0 14px; text-transform: uppercase; }
.section-title { font-family: var(--display); font-size: clamp(2.7rem, 5vw, 5.6rem); font-weight: 400; letter-spacing: -.045em; line-height: .98; margin: 0; max-width: 720px; }
.section-intro { color: var(--ink-soft); font-size: 1.08rem; margin: 20px 0 48px; max-width: 560px; }
.topic-grid { border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.topic-card { border-bottom: 1px solid var(--line); min-height: 186px; padding: 28px 26px 30px 0; }
.topic-card:nth-child(even) { border-left: 1px solid var(--line); padding-left: 26px; }
.topic-card h3 { font-size: 1.2rem; margin: 0 0 10px; }
.topic-card p { color: var(--ink-soft); margin: 0; max-width: 430px; }
.topic-card a { align-items: center; display: inline-flex; gap: 10px; margin-top: 17px; }
.topic-card a::after { color: var(--amber); content: "↗"; font-size: 1.2rem; }

.use-strip { background: var(--ink); color: var(--white); padding: 58px 0; }
.use-strip-inner { align-items: end; display: grid; gap: 48px; grid-template-columns: .8fr 1.2fr; }
.use-strip .section-kicker { color: #e5a67d; }
.use-strip p { color: rgba(255,255,255,.74); margin: 0; max-width: 520px; }
.use-list { border-top: 1px solid rgba(255,255,255,.24); }
.use-list p { border-bottom: 1px solid rgba(255,255,255,.24); color: var(--white); display: flex; gap: 18px; justify-content: space-between; padding: 13px 0; }
.use-list span:last-child { color: #e5a67d; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }

.latest { padding: 100px 0 120px; }
.empty-state { background: var(--paper-deep); border: 1px solid var(--line); margin-top: 34px; padding: clamp(30px, 6vw, 84px); }
.empty-state h2 { font-family: var(--display); font-size: clamp(2.2rem, 4vw, 4.5rem); font-weight: 400; letter-spacing: -.04em; line-height: 1; margin: 0 0 16px; }
.empty-state p { color: var(--ink-soft); margin: 0; max-width: 520px; }

.content-header { padding: 80px 0 40px; }
.content-header h1 { font-family: var(--display); font-size: clamp(3rem, 7vw, 7rem); font-weight: 400; letter-spacing: -.05em; line-height: .95; margin: 0; }
.search-form { display: flex; gap: 10px; margin-top: 30px; max-width: 620px; }
.search-form label { flex: 1; }
.search-field { background: var(--white); border: 1px solid var(--line); color: var(--ink); padding: 13px 15px; width: 100%; }
.search-submit { background: var(--ink); border: 1px solid var(--ink); color: var(--white); cursor: pointer; padding: 13px 18px; }
.search-submit:hover, .search-submit:focus-visible { background: var(--amber); border-color: var(--amber); }
.story-grid { display: grid; gap: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 100px; }
.story-card { border-top: 1px solid var(--line); padding-top: 18px; }
.story-card h2 { font-size: 1.2rem; line-height: 1.2; margin: 0 0 8px; }
.story-card p { color: var(--ink-soft); margin: 0; }
.story-image { display: block; margin-bottom: 18px; }
.story-image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.pagination { margin: 0 0 70px; }
.pagination ul { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.pagination a, .pagination .current { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); }
.pagination .current { background: var(--ink); color: var(--white); }
.post-content a { text-decoration: underline; text-underline-offset: 3px; }
.post-content img { height: auto; }
.post-content table { display: block; max-width: 100%; overflow-x: auto; }
.post-shell, .topic-card { overflow-wrap: anywhere; }
.post-image { margin-top: 30px; }
.post-image img { height: auto; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }
.post-shell { margin: 0 auto; max-width: 900px; padding: 80px 24px 120px; }
.post-shell h1 { font-family: var(--display); font-size: clamp(3rem, 7vw, 6.8rem); font-weight: 400; letter-spacing: -.05em; line-height: .96; margin: 0 0 26px; }
.post-meta { color: var(--ink-soft); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.post-content { font-size: 1.1rem; margin-top: 48px; }
.post-content h2, .post-content h3 { line-height: 1.15; margin-top: 42px; }

.site-footer { background: var(--paper-deep); border-top: 1px solid var(--line); padding: 56px 0 30px; }
.footer-grid { display: grid; gap: 46px; grid-template-columns: 1fr 1.3fr; }
.footer-brand p { color: var(--ink-soft); max-width: 300px; }
.footer-links { display: grid; gap: 12px 26px; grid-template-columns: repeat(3, 1fr); }
.footer-links a { font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--amber); }
.footer-bottom { border-top: 1px solid var(--line); color: var(--ink-soft); display: flex; font-size: .72rem; justify-content: space-between; margin-top: 46px; padding-top: 17px; }

@media (max-width: 760px) {
  :root { --wide: min(100% - 32px, 1380px); }
  .site-header { min-height: 72px; }
  .desktop-nav { display: none; }
  .menu-toggle { display: block; }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav { background: var(--paper); border-bottom: 1px solid var(--line); display: grid; gap: 15px; padding: 16px; }
  .hero-panel { min-height: 72vh; }
  .hero-copy, .hero-panel:nth-child(2) .hero-copy { left: 0; margin: 0; max-width: none; padding: 30vh 22px 44px; right: 0; }
  .hero-panel:nth-child(2) .hero-copy { padding-left: 22px; }
  .hero-panel:nth-child(3) .hero-copy { padding-top: 30vh; }
  .hero-copy h1, .hero-copy h2 { font-size: clamp(2.8rem, 14vw, 5.4rem); }
  .topic-index, .latest { padding: 76px 0; }
  .topic-grid, .use-strip-inner, .story-grid, .footer-grid { grid-template-columns: 1fr; }
  .topic-card:nth-child(even) { border-left: 0; padding-left: 0; }
  .topic-card { min-height: 0; padding: 24px 0; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { display: grid; gap: 6px; }
  .search-form { display: grid; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
