/*
Theme Name: HTS Child
Theme URI: https://www.hts-i.com
Description: Child theme of GeneratePress for Hayashi Technology Solutions. Holds all site-specific styling and template overrides.
Author: Hayashi Technology Solutions
Template: generatepress
Version: 0.5.0
License: GPL-2.0-or-later
Text Domain: hts-child
*/

/* ===== Design tokens: neutral, sophisticated, deliberately NOT MSP-blue ===== */
:root{
  --hts-ink:#16202B;
  --hts-ink-2:#22323F;
  --hts-bg:#FBFAF7;
  --hts-surface:#FFFFFF;
  --hts-surface-alt:#F1F0EA;
  --hts-text:#1C232B;
  --hts-muted:#586471;
  --hts-accent:#0E7C7B;
  --hts-accent-dark:#0A5F5E;
  --hts-border:#E4E2D9;
  --hts-radius:10px;
  --hts-wrap:1200px;
  --hts-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}

body{background:var(--hts-bg);color:var(--hts-text);font-family:var(--hts-font);line-height:1.65;-webkit-font-smoothing:antialiased;}
h1,h2,h3,h4{color:var(--hts-ink);font-weight:700;line-height:1.16;letter-spacing:-.012em;}
h1{font-size:clamp(2.15rem,1.4rem + 3vw,3.4rem);}
h2{font-size:clamp(1.6rem,1.1rem + 2vw,2.35rem);margin-bottom:.5em;}
h3{font-size:clamp(1.15rem,1rem + .5vw,1.35rem);}
a{color:var(--hts-accent);text-underline-offset:3px;}
a:hover{color:var(--hts-accent-dark);}
:where(a,button,input,summary):focus-visible{outline:3px solid var(--hts-accent);outline-offset:2px;border-radius:4px;}
img{height:auto;}

/* ===== Layout helpers ===== */
.entry-content .alignfull{margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);max-width:100vw;}
.hts-wrap{max-width:var(--hts-wrap);margin-inline:auto;padding-inline:1.25rem;}
.hts-section{padding-block:clamp(2.75rem,2rem + 4vw,5.5rem);}
.hts-section--alt{background:var(--hts-surface-alt);}
.hts-section h2{max-width:24ch;}
.hts-lead{font-size:1.15rem;color:var(--hts-muted);max-width:60ch;}

/* ===== Header / wordmark / nav ===== */
.site-header{background:var(--hts-surface);border-bottom:1px solid var(--hts-border);}
.main-title,.site-title{font-weight:800;letter-spacing:-.02em;}
.main-title a,.site-title a{color:var(--hts-ink);}
.site-description{color:var(--hts-muted);font-size:.8rem;}
.main-navigation .main-nav ul li a{color:var(--hts-ink);font-weight:600;}
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li.current-menu-item a{color:var(--hts-accent);}
.main-navigation .main-nav ul li.hts-nav-cta a{background:var(--hts-accent);color:#fff;border-radius:var(--hts-radius);margin:6px 0 6px 14px;padding-inline:18px;}
.main-navigation .main-nav ul li.hts-nav-cta a:hover{background:var(--hts-accent-dark);color:#fff;}
.main-navigation .main-nav ul li.hts-nav-phone a{color:var(--hts-ink);font-weight:700;}

/* ===== Buttons ===== */
.wp-block-button__link,.wp-element-button{border-radius:var(--hts-radius);font-weight:600;padding:.85em 1.6em;}
.hts-btn-primary .wp-block-button__link{background:var(--hts-accent);color:#fff;}
.hts-btn-primary .wp-block-button__link:hover{background:var(--hts-accent-dark);}
.hts-btn-ghost .wp-block-button__link{background:transparent;color:#fff;box-shadow:inset 0 0 0 2px rgba(255,255,255,.6);}
.hts-btn-ghost .wp-block-button__link:hover{box-shadow:inset 0 0 0 2px #fff;background:rgba(255,255,255,.08);}
.hts-on-light .hts-btn-ghost .wp-block-button__link{color:var(--hts-ink);box-shadow:inset 0 0 0 2px var(--hts-border);}

/* ===== Hero ===== */
.hts-hero{background:linear-gradient(180deg,var(--hts-ink) 0%,var(--hts-ink-2) 100%);color:#fff;}
.hts-hero h1{color:#fff;max-width:18ch;}
.hts-hero p{color:rgba(255,255,255,.86);}
.hts-hero .hts-lead{color:rgba(255,255,255,.82);font-size:1.2rem;max-width:62ch;}
.hts-hero .wp-block-buttons{margin-top:1.6rem;gap:.85rem;}
.hts-trustbar{margin-top:2.2rem;padding-top:1.2rem;border-top:1px solid rgba(255,255,255,.16);color:rgba(255,255,255,.7);font-size:.85rem;letter-spacing:.02em;}

/* ===== Cards / columns ===== */
.hts-card{background:var(--hts-surface);border:1px solid var(--hts-border);border-radius:var(--hts-radius);padding:1.6rem;height:100%;}
.hts-card h3{margin-top:0;}
.hts-card p{color:var(--hts-muted);}
.hts-why .wp-block-column{background:var(--hts-surface);border:1px solid var(--hts-border);border-radius:var(--hts-radius);padding:1.5rem;}
.hts-why h3{margin-top:0;color:var(--hts-accent-dark);}
.hts-steps .wp-block-column{border-left:3px solid var(--hts-accent);padding:.2rem 0 .2rem 1.1rem;}
.hts-steps h3{margin:0 0 .35rem;}
.hts-steps p{color:var(--hts-muted);margin:0;}

/* ===== Industries list ===== */
.hts-industries ul{columns:2;gap:2rem;max-width:760px;padding-left:1.1rem;}
.hts-industries li{margin:.4rem 0;}
.hts-note{color:var(--hts-muted);font-size:.85rem;font-style:italic;}

/* ===== Placeholder logos + testimonial ===== */
.hts-logos .wp-block-column{display:flex;}
.hts-logo-ph{flex:1;display:flex;align-items:center;justify-content:center;text-align:center;background:repeating-linear-gradient(45deg,#ECEAE2,#ECEAE2 10px,#E4E2D9 10px,#E4E2D9 20px);color:var(--hts-muted);font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;border:1px dashed #C9C6BA;border-radius:8px;padding:1.6rem .5rem;min-height:64px;}
.hts-quote{border-left:4px solid var(--hts-accent);background:var(--hts-surface);padding:1.6rem 1.8rem;border-radius:var(--hts-radius);max-width:780px;margin-top:1.5rem;}
.hts-quote p{font-size:1.15rem;color:var(--hts-ink);}
.hts-quote cite{color:var(--hts-muted);font-style:normal;}

/* ===== Final CTA band ===== */
.hts-cta-band{background:var(--hts-accent);color:#fff;text-align:center;}
.hts-cta-band h2{color:#fff;margin-inline:auto;}
.hts-cta-band p{color:rgba(255,255,255,.9);max-width:60ch;margin-inline:auto;}
.hts-cta-band .wp-block-buttons{justify-content:center;margin-top:1.4rem;}
.hts-cta-band .hts-btn-primary .wp-block-button__link{background:#fff;color:var(--hts-accent-dark);}
.hts-cta-band .hts-btn-primary .wp-block-button__link:hover{background:var(--hts-ink);color:#fff;}

/* ===== Footer ===== */
.site-footer .inside-site-info{width:100%;max-width:none;}
.hts-footer{max-width:var(--hts-wrap);margin-inline:auto;padding:2.5rem 1.25rem 1rem;text-align:left;}
.hts-footer a{color:rgba(255,255,255,.82);text-decoration:none;}
.hts-footer a:hover{color:#fff;text-decoration:underline;}
.hts-footer h4{color:#fff;font-size:.95rem;margin:0 0 .7rem;text-transform:uppercase;letter-spacing:.06em;}
.hts-footer .wp-block-column{color:rgba(255,255,255,.72);font-size:.92rem;}
.hts-footer ul{list-style:none;padding:0;margin:0;}
.hts-footer li{margin:.3rem 0;}
.site-info{background:var(--hts-ink);color:rgba(255,255,255,.72);}
.hts-footer-legal{border-top:1px solid rgba(255,255,255,.14);margin-top:1.5rem;padding:1rem 1.25rem;max-width:var(--hts-wrap);margin-inline:auto;font-size:.83rem;color:rgba(255,255,255,.6);}

/* ===== Responsive ===== */
@media (max-width:768px){
  .hts-industries ul{columns:1;}
  .main-navigation .main-nav ul li.hts-nav-cta a{margin:6px 0;}
}
@media (max-width:480px){
  .hts-hero .wp-block-buttons{flex-direction:column;align-items:flex-start;}
}

/* ===== Contact / Consultation form ===== */
.hts-contact-grid > .wp-block-group__inner-container{display:grid;grid-template-columns:1fr;gap:2rem;align-items:start;}
.hts-contact-info h2{font-size:1.25rem;}
.hts-contact-info p{color:var(--hts-muted);}
.hts-contact-info a{font-weight:600;}
.hts-hp{position:absolute !important;left:-9999px !important;top:auto;width:1px;height:1px;overflow:hidden;}
.hts-form{background:var(--hts-surface);border:1px solid var(--hts-border);border-radius:var(--hts-radius);padding:1.75rem;display:grid;grid-template-columns:1fr 1fr;gap:1.15rem 1.25rem;}
.hts-field{margin:0;}
.hts-form > .hts-checkboxes,.hts-form > .hts-field:has(textarea),.hts-form > .hts-field:has(.hts-submit),.hts-form > .hts-form-notice,.hts-form > .hts-privacy-note{grid-column:1 / -1;}
@media (max-width:600px){.hts-form{grid-template-columns:1fr;}}
.hts-form label{display:block;font-weight:600;color:var(--hts-ink);margin-bottom:.35rem;}
.hts-form input[type=text],.hts-form input[type=email],.hts-form input[type=tel],.hts-form select,.hts-form textarea{
  width:100%;padding:.7rem .85rem;border:1px solid var(--hts-border);border-radius:8px;
  font:inherit;color:var(--hts-text);background:#fff;}
.hts-form input:focus,.hts-form select:focus,.hts-form textarea:focus{outline:3px solid var(--hts-accent);outline-offset:1px;border-color:var(--hts-accent);}
.hts-checkboxes{border:1px solid var(--hts-border);border-radius:8px;padding:.9rem 1rem;}
.hts-checkboxes legend{font-weight:600;color:var(--hts-ink);padding:0 .35rem;}
.hts-checkbox{display:flex;align-items:center;gap:.5rem;font-weight:400;margin:.3rem 0;}
.hts-checkbox input{width:auto;}
.hts-submit{background:var(--hts-accent);color:#fff;border:0;border-radius:var(--hts-radius);
  font-weight:600;padding:.85rem 1.7rem;cursor:pointer;font-size:1rem;}
.hts-submit:hover{background:var(--hts-accent-dark);}
.hts-field-error{display:block;color:#b3261e;font-size:.85rem;margin-top:.3rem;}
.hts-form-notice{background:#fdecea;border:1px solid #f5c6c0;color:#7a1c14;padding:.7rem .9rem;border-radius:8px;}
.hts-privacy-note{color:var(--hts-muted);font-size:.82rem;margin:.8rem 0 0;}
.hts-thankyou{text-align:center;max-width:640px;margin-inline:auto;}
@media (max-width:768px){
  .hts-contact-grid > .wp-block-group__inner-container{gap:1.5rem;}
}

/* ===== Card icons (injected by hts-icons mu-plugin) ===== */
.hts-card .hts-icn{width:38px;height:38px;color:var(--hts-accent);display:block;margin:0 0 .75rem;}
.hts-card:hover .hts-icn{color:var(--hts-accent-dark);}
.hts-logo-ph .hts-icn,.hts-cta-band .hts-icn{display:none;}

/* ===== Clearly-marked, swappable image placeholders ===== */
.hts-ph{margin:1.5rem 0;}
.hts-ph img{width:100%;height:auto;display:block;border:2px dashed #C9C6BA;border-radius:var(--hts-radius);background:var(--hts-surface-alt);}
.hts-ph figcaption{font-size:.82rem;color:var(--hts-muted);font-style:italic;margin-top:.5rem;text-align:center;}

/* ===== Real content images (provided photos) ===== */
.hts-fig{margin:0;}
.hts-fig img{width:100%;height:auto;display:block;border:1px solid var(--hts-border);border-radius:var(--hts-radius);box-shadow:0 12px 32px -20px rgba(20,32,43,.5);}
.hts-fig figcaption{font-size:.82rem;color:var(--hts-muted);text-align:center;margin-top:.5rem;}

/* ===== Sticky header ===== */
.site-header{position:sticky;top:0;z-index:100;background:rgba(255,255,255,.92);backdrop-filter:saturate(140%) blur(8px);-webkit-backdrop-filter:saturate(140%) blur(8px);}
@supports not (backdrop-filter:blur(1px)){.site-header{background:var(--hts-surface);}}
:target,h1[id],h2[id],h3[id],section[id]{scroll-margin-top:88px;}

/* ===== Motion & micro-interactions (CSS-only, accessibility-aware) ===== */
html{scroll-behavior:smooth;}
.hts-card,.hts-fig img,.wp-block-button__link,.wp-element-button,.main-navigation .main-nav ul li a{
  transition:transform .25s ease, box-shadow .25s ease, color .2s ease, background-color .2s ease, border-color .2s ease;
}
.hts-card{will-change:transform;}
.hts-card:hover{transform:translateY(-3px);box-shadow:0 18px 40px -22px rgba(20,32,43,.32);border-color:var(--hts-accent);}
.hts-card .hts-icn{transition:transform .25s ease, color .2s ease;}
.hts-card:hover .hts-icn{transform:translateY(-1px) scale(1.04);}
.hts-fig{overflow:hidden;border-radius:var(--hts-radius);}
.hts-fig img{transition:transform .6s ease;}
.hts-fig:hover img{transform:scale(1.025);}
.wp-block-button__link:hover,.wp-element-button:hover{transform:translateY(-1px);box-shadow:0 10px 22px -14px rgba(14,124,123,.55);}
.hts-cta-band .wp-block-button__link:hover{box-shadow:0 10px 22px -14px rgba(0,0,0,.35);}
.entry-content a:not(.wp-block-button__link){
  background-image:linear-gradient(var(--hts-accent),var(--hts-accent));
  background-size:0% 1.5px;background-repeat:no-repeat;background-position:0 100%;
  text-decoration:none;transition:background-size .25s ease, color .2s ease;
  padding-bottom:1px;
}
.entry-content a:not(.wp-block-button__link):hover{background-size:100% 1.5px;}

/* Scroll-driven section reveal (modern browsers; ignored gracefully elsewhere). */
@supports (animation-timeline: view()) {
  .hts-section:not(.hts-hero) .hts-wrap{
    animation:hts-reveal both linear;
    animation-timeline:view();
    animation-range:entry 0% entry 40%;
  }
  @keyframes hts-reveal{
    from{opacity:0;transform:translateY(18px);}
    to{opacity:1;transform:translateY(0);}
  }
}

/* Respect users who prefer less motion. */
@media (prefers-reduced-motion: reduce) {
  html{scroll-behavior:auto;}
  *,*::before,*::after{transition-duration:.001ms !important;animation-duration:.001ms !important;animation-iteration-count:1 !important;}
  .hts-section .hts-wrap{animation:none !important;transform:none !important;opacity:1 !important;}
  .hts-card:hover,.hts-fig:hover img,.wp-block-button__link:hover{transform:none !important;}
}

/* ===== Density tuning: shorter pages, no content removed ===== */
.hts-section{padding-block:clamp(1.8rem, 1.2rem + 2vw, 3.5rem);}
.hts-section h2{margin:0 0 .35em;}
.hts-section h2 + p,
.hts-section h2 + .hts-lead{margin-top:0;}
.hts-section .wp-block-columns{margin-top:1rem;gap:1.1rem;}
.hts-section .wp-block-list{margin:.4rem 0 0;}
.hts-section .wp-block-list li{margin:.2rem 0;}
.hts-section p{margin:.5rem 0;}

.hts-card{padding:1.2rem;}
.hts-card h3{font-size:1.08rem;margin:0 0 .35rem;}
.hts-card p{font-size:.95rem;margin:0;}
.hts-card .hts-icn{width:32px;height:32px;margin:0 0 .55rem;}

.hts-why .wp-block-column{padding:1.1rem;}
.hts-why h3{margin-top:0;font-size:1.05rem;}
.hts-steps .wp-block-column{padding:.15rem 0 .15rem 1rem;}
.hts-steps h3{font-size:1.02rem;margin:0 0 .25rem;}
.hts-steps p{margin:0;}

/* FAQ accordions: compact closed state */
.hts-section .wp-block-details{padding:.2rem 0;border-top:1px solid var(--hts-border);}
.hts-section .wp-block-details:last-of-type{border-bottom:1px solid var(--hts-border);}
.hts-section .wp-block-details summary{padding:.55rem .25rem;font-weight:600;cursor:pointer;}
.hts-section .wp-block-details[open] summary{color:var(--hts-accent-dark);}
.hts-section .wp-block-details > *:not(summary){margin:.25rem .25rem .55rem;}

/* Hero + CTA: lower vertical air */
.hts-hero{padding-block:clamp(2.25rem, 1.8rem + 2vw, 4rem);}
.hts-hero h1{margin:0 0 .55rem;}
.hts-hero .hts-lead{margin:0 0 1.1rem;}
.hts-hero .wp-block-buttons{margin-top:1rem;}
.hts-trustbar{margin-top:1.5rem;padding-top:.9rem;}
.hts-cta-band{padding-block:clamp(1.75rem, 1.3rem + 1.5vw, 3rem);}

/* Cap image-band height so photos don't dominate the scroll */
.hts-fig img{max-height:360px;object-fit:cover;}
@media (max-width:768px){.hts-fig img{max-height:240px;}}

/* Industries 2-col list keeps tighter rhythm */
.hts-industries ul{margin:.5rem 0 0;}
.hts-industries li{margin:.25rem 0;}

/* ===== 3x5 photo-card sizing + slide-in (overrides earlier .hts-fig sizing) ===== */
.hts-fig{max-width:560px;margin-inline:auto;}
.hts-fig img{
  width:100%;
  height:auto;
  aspect-ratio:5 / 3;
  max-height:none;
  object-fit:cover;
}
@media (max-width:768px){.hts-fig img{max-height:none;}}

@supports (animation-timeline: view()) {
  .hts-fig{
    animation:hts-fig-slide both linear;
    animation-timeline:view();
    animation-range:entry 0% cover 30%;
  }
  @keyframes hts-fig-slide{
    from{opacity:0;transform:translateX(-48px) scale(.96);}
    to  {opacity:1;transform:translateX(0)     scale(1);}
  }
}
@media (prefers-reduced-motion: reduce){
  .hts-fig{animation:none !important;transform:none !important;opacity:1 !important;}
}

/* ===== "What's Included" accordion: 2-column landscape layout on desktop/tablet ===== */
@media (min-width: 820px) {
  .hts-included .hts-wrap{
    display:grid;
    grid-template-columns:1fr 1fr;
    column-gap:1.6rem;
    row-gap:0;
    align-items:start;
  }
  .hts-included .hts-wrap > h2,
  .hts-included .hts-wrap > .wp-block-heading{
    grid-column:1 / -1;
  }
  .hts-included .wp-block-details{
    break-inside:avoid;
  }
}

/* ===== Wide variant: 9-item lists fit in 2 rows at desktop (5 columns) ===== */
@media (min-width: 1024px) {
  .hts-included--wide .hts-wrap{
    grid-template-columns:repeat(5, 1fr);
    column-gap:1rem;
  }
  .hts-included--wide .wp-block-details summary{font-size:.95rem;line-height:1.25;}
}

/* ===== Comparison table (Cloud VoIP vs. Traditional PBX) ===== */
.hts-compare{margin:1rem 0 0;}
.hts-compare table{width:100%;border-collapse:collapse;}
.hts-compare th,.hts-compare td{
  padding:.8rem 1rem;
  border:1px solid var(--hts-border);
  vertical-align:top;
  text-align:left;
  font-size:.95rem;
  line-height:1.5;
  color:var(--hts-text);
}
.hts-compare thead th{background:var(--hts-ink);color:#fff;font-weight:600;}
.hts-compare tbody tr:nth-child(odd) td{background:#fff;}
.hts-compare tbody tr:nth-child(even) td{background:var(--hts-surface-alt);}
.hts-compare td:first-child{font-weight:600;color:var(--hts-ink);}
@media (max-width:720px){
  .hts-compare table,.hts-compare tbody,.hts-compare tr,.hts-compare td{display:block;width:100%;}
  .hts-compare thead{display:none;}
  .hts-compare tr{margin-bottom:1rem;border:1px solid var(--hts-border);border-radius:var(--hts-radius);overflow:hidden;}
  .hts-compare td{border:0;border-bottom:1px solid var(--hts-border);padding:.75rem 1rem;}
  .hts-compare td:last-child{border-bottom:0;}
  .hts-compare td:first-child{background:var(--hts-ink) !important;color:#fff;}
  .hts-compare td[data-label]::before{content:attr(data-label);display:block;font-weight:700;font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;color:var(--hts-accent-dark);margin:0 0 .2rem;}
}

/* ===== Executive headshot card (CEO portrait) ===== */
.hts-ceo{margin:1rem auto 0;max-width:340px;text-align:center;}
.hts-ceo img{
  width:240px;height:240px;
  border-radius:50%;
  object-fit:cover;
  object-position:center 28%;
  display:block;margin:0 auto;
  border:4px solid #fff;
  box-shadow:0 18px 44px -22px rgba(20,32,43,.5);
}
.hts-ceo figcaption{margin-top:.85rem;color:var(--hts-ink);line-height:1.3;}
.hts-ceo .hts-name{display:block;font-weight:700;font-size:1.1rem;letter-spacing:-.005em;}
.hts-ceo .hts-title{display:block;color:var(--hts-muted);font-size:.92rem;margin-top:.15rem;}
@supports (animation-timeline: view()) {
  .hts-ceo{
    animation:hts-ceo-rise both linear;
    animation-timeline:view();
    animation-range:entry 0% cover 30%;
  }
  @keyframes hts-ceo-rise{
    from{opacity:0;transform:translateY(18px) scale(.96);}
    to{opacity:1;transform:translateY(0) scale(1);}
  }
}
@media (prefers-reduced-motion: reduce){
  .hts-ceo{animation:none !important;transform:none !important;opacity:1 !important;}
}

/* ===== Photographic hero (dekind-style overlay; ink+teal layered over a real photo) ===== */
.hts-hero--photo{
  background:
    linear-gradient(135deg, rgba(20,32,43,.88) 0%, rgba(34,50,63,.55) 55%, rgba(20,32,43,.86) 100%),
    var(--hero-bg-img, none) center/cover no-repeat;
  isolation:isolate;
}
.hts-hero--photo h1,
.hts-hero--photo .hts-lead,
.hts-hero--photo p{
  text-shadow:0 1px 14px rgba(8,12,18,.55);
}
.hts-hero--photo .hts-trustbar{border-top-color:rgba(255,255,255,.22);}

/* Team band: heading sits above the figure, both on the alt-warm background */
.hts-team-band{}
.hts-team-band .hts-wrap > .wp-block-image{margin-top:1rem;}

/* ===== Whole-card click target on service cards (home Core Services + Resources cards) ===== */
.hts-card{position:relative;}
/* Stretch any link inside the card to cover the whole card */
.hts-card a[href]{position:relative;}
.hts-card a[href]:where(:not(.wp-block-button__link))::before{
  content:"";
  position:absolute;
  inset:-1.2rem;        /* matches card padding so the hit area = the full card */
  z-index:1;
}
.hts-card a[href]:where(:not(.wp-block-button__link)){text-decoration:none;}
/* Hover affordance: the whole card responds, not just the link */
.hts-card:hover h3{color:var(--hts-accent-dark);}
.hts-card a[href]:where(:not(.wp-block-button__link)){
  font-weight:600;color:var(--hts-accent);
}
.hts-card a[href]:where(:not(.wp-block-button__link)):hover{color:var(--hts-accent-dark);}
.hts-card a[href]:where(:not(.wp-block-button__link))::after{
  content:" \2192"; /* arrow */
}
