/* ==========================================================================
   Impact Marketing KY — v2 design system
   Brand canon: anthropic-skills:impact-marketing-ky-brand
   Palette, type and gradient are NOT design choices here — they are canon.
   ========================================================================== */

:root{
  /* ---- Brand canon (do not improvise) ---- */
  --blue:#00bfff;
  --purple:#6a5acd;
  --bg:#070709;
  --bg-deep:#050505;
  --white:#ffffff;
  --muted:#8a8a9a;
  --card:rgba(255,255,255,.03);
  --line:rgba(255,255,255,.08);
  --grad:linear-gradient(135deg,var(--blue),var(--purple));
  --grad-90:linear-gradient(90deg,var(--purple),var(--blue));

  /* ---- Derived, still on-palette ---- */
  --line-strong:rgba(255,255,255,.16);
  --card-hi:rgba(255,255,255,.055);
  --text-dim:#b6b6c4;          /* 8.2:1 on --bg — for body copy that must stay readable */
  --glow-blue:rgba(0,191,255,.15);
  --glow-purple:rgba(106,90,205,.15);

  /* ---- Fluid type scale ---- */
  --step--1:clamp(.82rem,.79rem + .14vw,.9rem);
  --step-0:clamp(1rem,.96rem + .2vw,1.125rem);
  --step-1:clamp(1.2rem,1.12rem + .4vw,1.5rem);
  --step-2:clamp(1.45rem,1.3rem + .75vw,2.05rem);
  --step-3:clamp(1.75rem,1.5rem + 1.3vw,2.85rem);
  --step-4:clamp(2.1rem,1.65rem + 2.2vw,4rem);
  --step-5:clamp(2.5rem,1.7rem + 3.6vw,5.5rem);

  /* ---- Space ---- */
  --gutter:clamp(1.15rem,.9rem + 1.4vw,2.5rem);
  --section-y:clamp(4rem,3rem + 6vw,9rem);
  --measure:68ch;
  --radius:14px;
  --radius-lg:22px;

  --ease:cubic-bezier(.22,.61,.36,1);
}

/* ---- Reset ---- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body,h1,h2,h3,h4,p,figure,blockquote,ul,ol,dl,dd{margin:0}
ul[class],ol[class]{list-style:none;padding:0}
img,picture,video,svg{max-width:100%;display:block;height:auto}
button,input,select,textarea{font:inherit;color:inherit}
:where(a){color:inherit}

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

body{
  background:var(--bg);
  color:var(--white);
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  font-size:var(--step-0);
  line-height:1.65;
  font-weight:400;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

/* Focus — visible, on-brand, never removed */
:focus-visible{outline:2px solid var(--blue);outline-offset:3px;border-radius:4px}

/* ==========================================================================
   Layout
   ========================================================================== */
.wrap{width:min(1200px,100% - (var(--gutter) * 2));margin-inline:auto}
.wrap-narrow{width:min(760px,100% - (var(--gutter) * 2));margin-inline:auto}
.section{padding-block:var(--section-y);position:relative}
.section-deep{background:var(--bg-deep)}

/* ==========================================================================
   Type
   ========================================================================== */
h1,h2,h3,h4{line-height:1.08;font-weight:800;letter-spacing:-.02em;text-wrap:balance}
h1{font-size:var(--step-5);font-weight:900}
h2{font-size:var(--step-3)}
h3{font-size:var(--step-1)}
p{text-wrap:pretty}
.lede{font-size:var(--step-1);color:var(--text-dim);line-height:1.55;max-width:var(--measure)}
.body-dim{color:var(--text-dim)}
.measure{max-width:var(--measure)}

/* All-caps eyebrow — brand signature */
.eyebrow{
  font-size:clamp(.68rem,.66rem + .1vw,.78rem);
  font-weight:700;
  letter-spacing:.22em;
  text-transform:uppercase;
  color:var(--blue);
  display:flex;align-items:center;gap:.7rem;
  margin-bottom:1rem;
}
.eyebrow::before{content:"";width:26px;height:2px;background:var(--grad-90);flex:none;border-radius:2px}
/* When the label wraps on a narrow screen the little rule strands itself on a
   line of its own, which reads as a broken element. Drop it and centre instead. */
@media (max-width:560px){
  .eyebrow{flex-wrap:wrap;justify-content:center;text-align:center;line-height:1.5}
  .eyebrow::before{display:none}
}

.grad-text{
  background:var(--grad);
  -webkit-background-clip:text;background-clip:text;
  color:transparent;
  /* fallback for any engine that ignores background-clip */
  -webkit-text-fill-color:transparent;
}
@supports not ((-webkit-background-clip:text) or (background-clip:text)){
  .grad-text{color:var(--blue);-webkit-text-fill-color:currentColor}
}

/* ==========================================================================
   Buttons — 44px minimum touch target (WCAG / Web Designer L-017)
   ========================================================================== */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.55rem;
  min-height:48px;padding:.85rem 1.6rem;
  border-radius:999px;border:1px solid transparent;
  font-weight:700;font-size:var(--step-0);line-height:1.1;
  text-decoration:none;cursor:pointer;
  transition:transform .18s var(--ease),box-shadow .18s var(--ease),background-color .18s var(--ease);
}
.btn-primary{background:var(--grad);color:#04040a;box-shadow:0 6px 26px rgba(0,191,255,.22)}
.btn-primary:hover{transform:translateY(-2px);box-shadow:0 10px 34px rgba(0,191,255,.32)}

/* Nav "Free Blueprint" button — Jeff, 2026-07-27: white text, and it must not
   change at all on hover. Deeper gradient stops so white actually passes
   contrast; the brand blue→purple read is unchanged. */
.nav-cta,
.nav-cta:hover,
.nav-cta:focus-visible{
  background:linear-gradient(135deg,#007ea8,#5b4db0);   /* 4.62:1 → 6.70:1 with white */
  color:#fff;
  transform:none;
  box-shadow:0 6px 22px rgba(0,191,255,.18);
}
.nav-cta:hover .arr{transform:none}
.btn-ghost{background:var(--card);border-color:var(--line-strong);color:var(--white)}
.btn-ghost:hover{background:var(--card-hi);transform:translateY(-2px)}
.btn .arr{transition:transform .18s var(--ease)}
.btn:hover .arr{transform:translateX(4px)}
@media (prefers-reduced-motion:reduce){
  .btn,.btn .arr{transition:none}
  .btn:hover{transform:none}
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:clamp(1.4rem,1.1rem + 1vw,2.2rem);
  position:relative;
  transition:border-color .25s var(--ease),background-color .25s var(--ease),transform .25s var(--ease);
}
.card:hover{border-color:var(--line-strong);background:var(--card-hi)}
.grid{display:grid;gap:clamp(1rem,.8rem + .8vw,1.6rem)}
.grid-2{grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr))}
.grid-3{grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr))}
/* Exactly two columns. auto-fit would give three at desktop width, which
   leaves a four-card set with one orphan sitting alone on the second row. */
.grid-2up{grid-template-columns:1fr}
@media (min-width:760px){.grid-2up{grid-template-columns:1fr 1fr}}

/* ==========================================================================
   Ambient glow — sparing, per brand canon
   ========================================================================== */
.glow{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:0}
.glow::before,.glow::after{
  content:"";position:absolute;width:44vmax;height:44vmax;border-radius:50%;
  filter:blur(80px);opacity:.85;
}
.glow::before{background:var(--glow-blue);top:-18vmax;left:-12vmax}
.glow::after{background:var(--glow-purple);bottom:-22vmax;right:-14vmax}
.section > .wrap{position:relative;z-index:1}

/* ==========================================================================
   Scroll-driven reveal
   Native CSS scroll timelines (Chrome/Edge 115+, Safari 18+, Firefox 132+).
   Runs on the compositor, needs ZERO JavaScript, and degrades to the finished
   layout automatically — which is L-013's rule satisfied by construction:
   nothing is hidden unless the engine can also un-hide it.
   ========================================================================== */
@supports (animation-timeline:view()){
  @media (prefers-reduced-motion:no-preference){
    @keyframes rise{
      from{opacity:0;transform:translateY(34px)}
      to{opacity:1;transform:none}
    }
    .reveal{
      animation:rise linear both;
      /* animation-timeline MUST come after any `animation` shorthand —
         the shorthand resets it to auto. (MDN, verified 2026-07-27) */
      animation-timeline:view();
      animation-range:entry 8% cover 32%;
    }
    .reveal-stagger > *{
      animation:rise linear both;
      animation-timeline:view();
      animation-range:entry 4% cover 30%;
    }
  }
}

/* ==========================================================================
   Skip link + a11y helpers
   ========================================================================== */
.skip{
  position:absolute;left:-9999px;top:0;z-index:999;
  background:var(--blue);color:#04040a;padding:.8rem 1.2rem;font-weight:700;border-radius:0 0 8px 0;
}
.skip:focus{left:0}
.vh{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header{
  position:sticky;top:0;z-index:100;
  background:rgba(7,7,9,.72);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}
.site-header .wrap{display:flex;align-items:center;gap:1.2rem;min-height:68px}
.brand{display:flex;align-items:center;gap:.65rem;text-decoration:none;font-weight:900;letter-spacing:-.02em;flex:none}
.brand svg{width:32px;height:32px;flex:none}
.brand-txt{display:flex;flex-direction:column;line-height:1}
.brand-txt b{font-size:1.02rem}
.brand-txt span{font-size:.6rem;letter-spacing:.18em;color:var(--muted);font-weight:600;text-transform:uppercase;margin-top:3px}

.site-nav{margin-left:auto;display:flex;align-items:center;gap:.35rem}
.site-nav a{
  text-decoration:none;color:var(--text-dim);font-weight:600;font-size:.94rem;
  padding:.65rem .8rem;border-radius:8px;min-height:44px;display:inline-flex;align-items:center;
  transition:color .18s var(--ease),background-color .18s var(--ease);
}
.site-nav a:hover,.site-nav a[aria-current="page"]{color:var(--white);background:var(--card)}
.nav-cta{margin-left:.5rem}

.nav-toggle{
  display:none;margin-left:auto;
  width:48px;height:48px;              /* 44px+ — L-017 */
  align-items:center;justify-content:center;
  background:var(--card);border:1px solid var(--line);border-radius:10px;cursor:pointer;
}
.nav-toggle span{display:block;width:19px;height:2px;background:var(--white);position:relative}
.nav-toggle span::before,.nav-toggle span::after{content:"";position:absolute;left:0;width:19px;height:2px;background:var(--white)}
.nav-toggle span::before{top:-6px}
.nav-toggle span::after{top:6px}

@media (max-width:900px){
  .nav-toggle{display:inline-flex}
  .site-nav{
    position:absolute;top:100%;left:0;right:0;
    flex-direction:column;align-items:stretch;gap:.2rem;
    background:rgba(7,7,9,.98);border-bottom:1px solid var(--line);
    padding:.8rem var(--gutter) 1.4rem;
  }
  .site-nav a{padding:.85rem .5rem}
  .nav-cta{margin:.6rem 0 0}
  /* No-JS failsafe (L-013): without JS the menu is permanently open,
     never stranded behind a dead button. */
  html.js .site-nav{display:none}
  html.js .site-nav.open{display:flex}
}

/* ==========================================================================
   Sticky mobile call bar — Jeff's law #3, reachable at EVERY scroll position
   (O-024 requires this survives the scroll effects)
   ========================================================================== */
.callbar{
  position:fixed;left:0;right:0;bottom:0;z-index:200;
  display:none;gap:.6rem;padding:.6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom));
  background:rgba(5,5,5,.94);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  border-top:1px solid var(--line);
}
.callbar .btn{flex:1;min-height:50px;padding-inline:.75rem;font-size:.92rem;white-space:nowrap}
.callbar .btn:first-child{flex:1.6}   /* the call button earns the extra room */
@media (max-width:380px){.callbar .btn{font-size:.85rem;padding-inline:.55rem}}
@media (max-width:760px){
  .callbar{display:flex}
  body{padding-bottom:76px}
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{background:var(--bg-deep);border-top:1px solid var(--line);padding-block:clamp(3rem,2rem + 4vw,5rem) 2rem}
.footer-grid{display:grid;gap:2rem;grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr))}
.site-footer h4,.site-footer .foot-h{font-size:.76rem;letter-spacing:.18em;text-transform:uppercase;color:var(--muted);font-weight:700;margin-bottom:.9rem}
.site-footer a{color:var(--text-dim);text-decoration:none;display:inline-flex;align-items:center;min-height:34px;transition:color .18s var(--ease)}
.site-footer a:hover{color:var(--blue)}
.site-footer li{margin-bottom:.1rem}
.footer-bottom{margin-top:3rem;padding-top:1.6rem;border-top:1px solid var(--line);display:flex;flex-wrap:wrap;gap:1rem;justify-content:space-between;color:var(--muted);font-size:var(--step--1)}

/* A bare display:* on an element beats the [hidden] attribute, so hidden
   stops working and the panel refuses to close. Catch every one of them here
   rather than per-element — this bit me twice. */
[hidden]{display:none!important}

/* ==========================================================================
   Site assistant — scripted, never invents a number (assets/js/assistant.js)
   ========================================================================== */
.ia-launch{
  position:fixed;right:clamp(.7rem,1.6vw,1.15rem);bottom:clamp(.7rem,1.6vw,1.15rem);z-index:300;
  display:inline-flex;align-items:center;justify-content:center;gap:0;
  width:46px;height:46px;padding:0;border:0;border-radius:999px;cursor:pointer;
  background:linear-gradient(135deg,#007ea8,#5b4db0);color:#fff;
  font-weight:700;font-size:.85rem;white-space:nowrap;overflow:hidden;
  box-shadow:0 8px 24px rgba(0,0,0,.45),0 0 0 1px rgba(255,255,255,.08) inset;
  opacity:.9;
  transition:width .22s var(--ease),gap .22s var(--ease),padding .22s var(--ease),opacity .18s var(--ease);
}
.ia-launch svg{flex:none}
/* Label is hidden by default so the button stays out of the way, and slides
   out on hover or keyboard focus so it's still discoverable. */
.ia-launch span{max-width:0;opacity:0;transition:max-width .22s var(--ease),opacity .18s var(--ease)}
.ia-launch:hover,.ia-launch:focus-visible{
  width:auto;padding:0 1.05rem 0 .9rem;gap:.5rem;opacity:1;
}
.ia-launch:hover span,.ia-launch:focus-visible span{max-width:9rem;opacity:1}
.ia-launch[aria-expanded="true"]{opacity:1}
@media (prefers-reduced-motion:reduce){
  .ia-launch,.ia-launch span{transition:none}
}
@media (max-width:760px){
  .ia-launch{bottom:calc(76px + .55rem);width:42px;height:42px;opacity:.82}
  .ia-launch:hover,.ia-launch:focus-visible{width:42px;padding:0;gap:0}
  .ia-launch span{display:none}                  /* no room for it next to the call bar */
}

.ia-panel{
  position:fixed;right:clamp(.9rem,2vw,1.5rem);bottom:calc(clamp(.7rem,1.6vw,1.15rem) + 54px);z-index:301;
  width:min(390px,calc(100vw - 1.8rem));max-height:min(74vh,620px);
  display:flex;flex-direction:column;overflow:hidden;
  background:#0c0c14;border:1px solid var(--line-strong);border-radius:18px;
  box-shadow:0 30px 90px rgba(0,0,0,.7);
}
@media (max-width:760px){.ia-panel{bottom:calc(76px + 42px + 1rem);max-height:60vh}}

.ia-head{display:flex;align-items:center;gap:.65rem;padding:.85rem 1rem;border-bottom:1px solid var(--line);background:#10101a}
.ia-head b{display:block;font-size:.92rem}
.ia-head i{display:block;font-style:normal;font-size:.72rem;color:var(--muted);margin-top:1px}
.ia-dot{width:9px;height:9px;border-radius:50%;background:var(--blue);flex:none;box-shadow:0 0 10px var(--blue)}
.ia-close{margin-left:auto;width:40px;height:40px;border:0;background:transparent;color:var(--muted);font-size:1.5rem;line-height:1;cursor:pointer;border-radius:8px}
.ia-close:hover{color:#fff;background:var(--card)}

.ia-log{flex:1;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:.7rem;font-size:.9rem;line-height:1.55}
.ia-msg{max-width:88%;padding:.7rem .9rem;border-radius:14px}
.ia-bot{background:var(--card);border:1px solid var(--line);align-self:flex-start;border-bottom-left-radius:4px}
.ia-me{background:linear-gradient(135deg,#007ea8,#5b4db0);color:#fff;align-self:flex-end;border-bottom-right-radius:4px}
.ia-dim{color:var(--muted);font-size:.84em}

.ia-chips{display:flex;flex-wrap:wrap;gap:.4rem}
.ia-chip{
  border:1px solid var(--line-strong);background:var(--card);color:var(--text-dim);
  padding:.5rem .8rem;border-radius:999px;font-size:.82rem;font-weight:600;cursor:pointer;min-height:38px;
  transition:border-color .16s var(--ease),color .16s var(--ease)
}
.ia-chip:hover{border-color:var(--blue);color:#fff}

.ia-actions{display:flex;flex-wrap:wrap;gap:.45rem}
.ia-action{
  display:inline-flex;align-items:center;min-height:42px;padding:.55rem 1rem;border-radius:999px;
  background:linear-gradient(135deg,#007ea8,#5b4db0);color:#fff;text-decoration:none;
  font-weight:700;font-size:.84rem
}
.ia-action:hover{filter:brightness(1.1)}

.ia-form{display:flex;gap:.5rem;padding:.7rem;border-top:1px solid var(--line);background:#10101a}
.ia-input{flex:1;min-height:44px;padding:.6rem .85rem;border-radius:10px;border:1px solid var(--line-strong);background:#07070d;color:#fff}
.ia-input:focus{outline:2px solid var(--blue);outline-offset:1px}
.ia-send{min-height:44px;padding:.6rem 1rem;border:0;border-radius:10px;background:linear-gradient(135deg,#007ea8,#5b4db0);color:#fff;font-weight:700;cursor:pointer}
