/*
Theme Name: WellOwnerGuide
Template: twentytwentyfive
Description: Field-manual style child theme for WellOwnerGuide. Steel, limestone and iron palette; depth-ruler motif.
Version: 1.1.0
License: GPL-2.0-or-later
Text Domain: wellownerguide
*/

/* Design language: a well owner's field manual.
   - Depth ruler: tick-mark rule (like depth markings on drop pipe) under the header and as section dividers.
   - Data plates: small mono uppercase labels in a hairline box, like the rating plate on a pump.
   - Quiet surfaces: limestone ground, white panels, one steel accent, iron orange only for emphasis. */
:root{
  --wog-ink:var(--wp--preset--color--contrast);
  --wog-muted:var(--wp--preset--color--muted);
  --wog-line:var(--wp--preset--color--line);
  --wog-steel:var(--wp--preset--color--steel);
  --wog-iron:var(--wp--preset--color--iron);
  --wog-surface:var(--wp--preset--color--surface);
  --wog-mono:var(--wp--preset--font-family--mono);
  --wog-display:var(--wp--preset--font-family--display);
  --wog-gutter:max(20px, env(safe-area-inset-left, 0px));
}
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
:where(.wp-site-blocks) > *{margin-block-start:0}
::selection{background:var(--wp--preset--color--steel-soft)}
:focus-visible{outline:2px solid var(--wog-iron);outline-offset:2px}

/* ---------- Motifs ---------- */
.wog-ruler{height:9px;background:
  repeating-linear-gradient(90deg,var(--wog-ink) 0 1px,transparent 1px 12px) bottom/100% 5px no-repeat,
  repeating-linear-gradient(90deg,var(--wog-ink) 0 1px,transparent 1px 60px) bottom/100% 9px no-repeat;
  opacity:.35;border-bottom:1px solid var(--wog-ink)}
.wog-ruler--light{opacity:.4;filter:invert(1)}
.wog-plate,.wog-plate-link a,.wog-plate-link{font-family:var(--wog-mono);font-size:.68rem;font-weight:500;letter-spacing:.1em;text-transform:uppercase;line-height:1}
.wog-plate{display:inline-block;padding:.38rem .55rem;border:1px solid currentColor;border-radius:3px;color:var(--wog-muted)}
.wog-plate-link{display:flex;flex-wrap:wrap;gap:.4rem;margin:0}
.wog-plate-link a{display:inline-block;padding:.38rem .55rem;border:1px solid var(--wog-line);border-radius:3px;color:var(--wog-steel);text-decoration:none;background:var(--wog-surface)}
.wog-plate-link a:hover{border-color:var(--wog-steel)}
.wog-plate-link .wp-block-post-terms__separator{display:none}

/* ---------- Header ---------- */
.wog-header{background:var(--wog-surface);position:sticky;top:env(safe-area-inset-top,0px);z-index:20}
.wog-header__inner{max-width:1080px;margin:0 auto;padding:14px var(--wog-gutter);gap:1rem;align-items:center}
.wog-brand{display:inline-flex;align-items:center;gap:.55rem;color:var(--wog-ink);text-decoration:none;font-family:var(--wog-display);font-weight:600;font-size:1.22rem;letter-spacing:-.02em}
.wog-brand b{font-weight:800;color:var(--wog-steel)}
.wog-brand:hover{color:var(--wog-ink)}
.wog-nav{font-weight:600;font-size:.95rem;gap:1.6rem}
.wog-nav a{text-decoration:none;color:var(--wog-ink)}
.wog-nav a:hover{color:var(--wog-steel);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:6px;text-decoration-color:var(--wog-iron)}
.wog-nav .wp-block-navigation-item:last-child a{color:var(--wog-steel)}

/* ---------- Main ---------- */
.wog-main{padding:clamp(2rem,5vw,3.5rem) var(--wog-gutter) clamp(3rem,6vw,5rem)}

/* ---------- Article ---------- */
.wog-article-head{display:grid;gap:1rem;padding-bottom:1.6rem;margin-bottom:2rem;border-bottom:1px solid var(--wog-line)}
.wog-article-head h1{margin:0;font-size:clamp(2rem,4.6vw,2.85rem);text-wrap:balance}
.wog-dek,.wog-dek p{font-size:1.18rem;line-height:1.5;color:var(--wog-muted);margin:0;max-width:60ch}
.wog-dek .wp-block-post-excerpt__more-link{display:none}
.wog-meta{gap:.4rem 1.1rem;font-size:.88rem;color:var(--wog-muted);font-family:var(--wog-mono);text-transform:uppercase;letter-spacing:.06em}
.wog-meta > *{margin:0}
.wog-meta .wp-block-post-author-name a{color:var(--wog-ink);text-decoration:none;font-weight:500}
.wog-meta .wp-block-post-author-name::before{content:"By "}
.wog-meta .wp-block-post-date::before{content:"Updated ";}
.wog-prose{font-size:1.08rem}
.wog-prose > * + *{margin-block-start:1.15em}
.wog-prose h2{margin-block-start:2.4em;padding-top:1.1em;border-top:1px solid var(--wog-line);font-size:1.55rem;position:relative}
.wog-prose h2::before{content:"";position:absolute;top:-1px;left:0;width:48px;height:3px;background:var(--wog-steel)}
.wog-prose h3{margin-block-start:1.8em;font-size:1.18rem}
.wog-prose ul,.wog-prose ol{padding-left:1.25em}
.wog-prose li + li{margin-top:.4em}
.wog-prose ol > li::marker{font-family:var(--wog-mono);font-weight:500;color:var(--wog-steel)}
.wog-prose ul > li::marker{color:var(--wog-iron)}
.wog-prose a{text-decoration-thickness:1px;text-underline-offset:3px}
.wog-prose a:hover{text-decoration-color:var(--wog-iron)}
.wog-prose em{color:var(--wog-muted)}
.wog-prose h3:has(+ ul a[target="_blank"]){font-family:var(--wog-mono);font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;color:var(--wog-muted);margin-top:3em;padding-top:1.2em;border-top:1px solid var(--wog-line)}
.wog-prose h3:has(+ ul a[target="_blank"]) + ul{font-size:.9rem;color:var(--wog-muted);list-style:none;padding:0}

/* Tables: data sheet */
.wp-block-table{margin-inline:0;overflow-x:auto}
.wp-block-table table{border-collapse:collapse;width:100%;background:var(--wog-surface);border:1px solid var(--wog-line);border-radius:6px;font-size:.95rem}
.wp-block-table thead{border-bottom:2px solid var(--wog-ink)}
.wp-block-table th{font-family:var(--wog-mono);font-size:.68rem;font-weight:500;letter-spacing:.09em;text-transform:uppercase;color:var(--wog-muted);text-align:left;background:var(--wp--preset--color--base)}
.wp-block-table th,.wp-block-table td{border:0;border-bottom:1px solid var(--wog-line);padding:.7rem .85rem;vertical-align:top}
.wp-block-table tr:last-child td{border-bottom:0}
.wp-block-table td:first-child{font-weight:600}

/* Author box */
.wog-author{margin-top:3.5rem;padding:1.4rem;border:1px solid var(--wog-line);border-radius:8px;background:var(--wog-surface);display:grid;gap:.8rem}
.wog-author .wp-block-post-author__name{font-family:var(--wog-display);font-weight:700;font-size:1.1rem}
.wog-author .wp-block-post-author__name a{text-decoration:none;color:var(--wog-ink)}
.wog-author .wp-block-post-author__bio{color:var(--wog-muted);font-size:.95rem;margin-top:.3rem}
.wog-author .wp-block-post-author__content{margin:0}

/* ---------- Cards ---------- */
.wog-section-title{font-size:1.35rem;display:flex;align-items:center;gap:1rem;margin-bottom:1.25rem}
.wog-section-title::after{content:"";flex:1;height:9px;background:
  repeating-linear-gradient(90deg,var(--wog-line) 0 1px,transparent 1px 12px) bottom/100% 5px no-repeat;border-bottom:1px solid var(--wog-line)}
.wog-cards .wp-block-post-template{gap:1rem}
.wog-card{height:100%;box-sizing:border-box;display:flex;flex-direction:column;gap:.7rem;padding:1.25rem;background:var(--wog-surface);border:1px solid var(--wog-line);border-radius:8px;transition:border-color .15s,transform .15s}
.wog-card:hover{border-color:var(--wog-steel)}
.wog-card h3{margin:0;font-size:1.12rem;line-height:1.25}
.wog-card h3 a{text-decoration:none;color:var(--wog-ink)}
.wog-card h3 a::after{content:"";position:absolute;inset:0}
.wog-card{position:relative}
.wog-card .wog-plate-link{position:relative;z-index:1}
.wog-card .wp-block-post-excerpt{margin:0;color:var(--wog-muted);font-size:.93rem}
.wog-card .wp-block-post-excerpt__excerpt{margin:0}
.wog-card .wp-block-post-excerpt__more-link{display:none}
.wog-related{padding:0 var(--wog-gutter) clamp(3rem,6vw,4.5rem)}
@media (prefers-reduced-motion:no-preference){.wog-card:hover{transform:translateY(-2px)}}

/* ---------- Archive ---------- */
.wog-archive-head{display:grid;gap:.9rem;padding-bottom:1.6rem;margin-bottom:2rem;border-bottom:1px solid var(--wog-line)}
.wog-archive-head h1{margin:0;font-size:clamp(2rem,4.5vw,2.7rem)}
.wog-archive-head .wp-block-term-description{color:var(--wog-muted);font-size:1.1rem;max-width:60ch;margin:0}
.wog-archive-head .wp-block-term-description p{margin:0}
.wp-block-query-pagination{margin-top:2rem;font-family:var(--wog-mono);font-size:.85rem}

/* ---------- Front page ---------- */
.wog-hero{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:clamp(1.5rem,4vw,3.5rem);align-items:center;padding-bottom:clamp(2rem,5vw,3.5rem);margin-bottom:clamp(2rem,4vw,3rem);border-bottom:1px solid var(--wog-line)}
.wog-hero h1{font-size:clamp(2.2rem,5.2vw,3.5rem);letter-spacing:-.03em;margin:.9rem 0 0;text-wrap:balance}
.wog-hero h1 em{font-style:normal;color:var(--wog-steel)}
.wog-lede{font-size:1.2rem;line-height:1.5;color:var(--wog-muted);margin:1rem 0 0;max-width:46ch}
.wog-hero .wp-block-buttons{display:flex;flex-wrap:wrap;margin-top:1.6rem;gap:.7rem}
.wog-hero .wp-block-button__link{display:inline-block;text-decoration:none;background:var(--wog-steel);color:var(--wog-surface)}
.wog-hero .wp-block-button__link:hover{background:var(--wog-ink);color:var(--wog-surface)}
.wog-hero-art{background:var(--wog-surface);border:1px solid var(--wog-line);border-radius:10px;padding:1rem}
.wog-hero-art svg{display:block;width:100%;height:auto}
.wog-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin-top:1.8rem;border-top:1px solid var(--wog-line)}
.wog-stats div{padding:.8rem 1rem .2rem 0}
.wog-stats b{display:block;font-family:var(--wog-display);font-size:1.5rem;font-weight:800;color:var(--wog-ink);font-variant-numeric:tabular-nums}
.wog-stats span{font-size:.82rem;color:var(--wog-muted)}
.wog-block{margin-top:clamp(2.5rem,5vw,3.5rem)}
.wog-chips{display:flex;flex-wrap:wrap;gap:.5rem;margin:0}
.wog-chips a{padding:.45rem .9rem;border:1px solid var(--wog-line);border-radius:999px;background:var(--wog-surface);text-decoration:none;color:var(--wog-ink);font-size:.95rem}
.wog-chips a:hover{border-color:var(--wog-iron);color:var(--wog-iron)}
.wog-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.wog-tool-card{position:relative;padding:1.3rem;border-radius:8px;background:var(--wog-steel);color:var(--wog-surface);display:grid;gap:.5rem;align-content:start}
.wog-tool-card .wog-plate{color:rgba(255,255,255,.7);justify-self:start}
.wog-tool-card h3{margin:.4rem 0 0;font-size:1.15rem;color:var(--wog-surface)}
.wog-tool-card h3 a{color:inherit;text-decoration:none}
.wog-tool-card h3 a::after{content:"";position:absolute;inset:0}
.wog-tool-card p{margin:0;font-size:.93rem;opacity:.85}
.wog-tool-card:hover{background:var(--wog-ink)}
.wog-trust{margin-top:clamp(2.5rem,5vw,3.5rem);padding:1.2rem 1.4rem;border:1px dashed var(--wog-line);border-radius:8px;color:var(--wog-muted);font-size:.95rem}

/* Buttons */
.wp-element-button,.wp-block-button__link{border-radius:6px;padding:.8rem 1.25rem;font-weight:600;font-size:1rem}
.is-style-outline .wp-block-button__link{border:1px solid var(--wog-ink);color:var(--wog-ink);background:transparent}
.is-style-outline .wp-block-button__link:hover{background:var(--wog-ink);color:var(--wog-surface)}

/* ---------- Footer ---------- */
.wog-footer{background:var(--wog-ink);color:#c9d3d9;margin-top:0}
.wog-footer a{color:#e7edf0;text-decoration:none}
.wog-footer a:hover{color:#fff;text-decoration:underline;text-decoration-color:var(--wog-iron)}
.wog-footer__inner{max-width:1080px;margin:0 auto;padding:3rem var(--wog-gutter) 2rem;display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr;gap:2rem}
.wog-footer__about p{font-size:.93rem;line-height:1.55;margin:.9rem 0 0;max-width:34ch}
.wog-brand--light{color:#fff}
.wog-brand--light b{color:#8cc0d8}
.wog-footer__col{display:grid;gap:.55rem;align-content:start;font-size:.93rem}
.wog-footer__col .wog-plate{color:#8fa1ab;justify-self:start;margin-bottom:.3rem}
.wog-footer__base{max-width:1080px;margin:0 auto;padding:1.2rem var(--wog-gutter) 2rem;border-top:1px solid rgba(255,255,255,.12);display:flex;flex-wrap:wrap;justify-content:space-between;gap:.8rem;font-size:.8rem;color:#8fa1ab}
.wog-footer__base p{margin:0;max-width:70ch}

/* ---------- Responsive ---------- */
@media (max-width:900px){
  .wog-hero{grid-template-columns:1fr}
  .wog-footer__inner{grid-template-columns:1fr 1fr}
  .wog-footer__about{grid-column:1/-1}
}
@media (max-width:781px){
  .wog-cards .wp-block-post-template{grid-template-columns:1fr!important}
  .wog-tools{grid-template-columns:1fr}
}
@media (max-width:520px){
  .wog-stats{grid-template-columns:1fr 1fr 1fr}
  .wog-stats b{font-size:1.2rem}
  .wog-footer__inner{grid-template-columns:1fr}
}
