/* KaddieIQ News — hero, chyron and carousel.
 *
 * Tokens come from kiq-tokens.css, which every page shares. Nothing here
 * redeclares a colour: that is what let the homepage and BallFIT drift apart.
 */

:root{
  --nx-gap:18px; --nx-card:clamp(260px,78vw,360px);
  /* Carnoustie's 18th, so the news page is not wearing BallFIT's hole. */
  --bp-land:url("../images/holes/carnoustie-land.svg");
  --bp-port:url("../images/holes/carnoustie-port.svg");
}

*,*::before,*::after{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font:400 17px/1.65 var(--body)}

/* ---------- hero ---------- */
.nx-hero{position:relative;isolation:isolate;min-height:clamp(130px,21vw,230px);display:grid;align-items:end;overflow:hidden}
.nx-hero img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2}
/* The scrim is what keeps the title legible whatever the photograph does. */
.nx-hero::after{content:"";position:absolute;inset:0;z-index:-1;
  background:linear-gradient(to bottom,color-mix(in srgb,var(--bg) 10%,transparent) 0%,
             color-mix(in srgb,var(--bg) 55%,transparent) 55%,var(--bg) 100%)}
.nx-hero-inner{width:min(1180px,92vw);margin:0 auto;padding:0 0 clamp(20px,3vw,34px)}
.nx-kicker{margin:0 0 .35em;font:var(--fw-label) 12px/1.4 var(--head);letter-spacing:.16em;text-transform:uppercase;color:var(--gold)}
.nx-hero h1{margin:0;font:var(--fw-display) clamp(34px,6.4vw,66px)/1.02 var(--head);letter-spacing:-.02em}
.nx-hero h1 .g{color:var(--gold)}

/* ---------- chyron ---------- */
/* A news ticker, so the type is deliberately large and the motion slow enough
   to read. It duplicates the headline list; the copy is hidden from assistive
   tech so nothing is announced twice, and the archive below is the accessible
   route to every story. */
.nx-chyron{position:relative;border-top:1px solid var(--hair);border-bottom:1px solid var(--hair);
  background:var(--bg-2);overflow:hidden;--nx-speed:80s}
.nx-chyron-track{display:flex;width:max-content;animation:nx-scroll var(--nx-speed) linear infinite}
.nx-chyron:hover .nx-chyron-track,.nx-chyron:focus-within .nx-chyron-track{animation-play-state:paused}
.nx-chyron-group{display:flex;flex:0 0 auto}
.nx-chyron a{display:inline-flex;align-items:center;gap:.7em;padding:clamp(5px,.72vw,9px) clamp(16px,2vw,28px);
  text-decoration:none;color:var(--ink);white-space:nowrap;
  font:var(--fw-title) clamp(11px,1.5vw,20px)/1.15 var(--head);letter-spacing:-.01em}
.nx-chyron a::after{content:"";width:6px;height:6px;border-radius:50%;background:var(--gold);opacity:.75}
.nx-chyron a:hover,.nx-chyron a:focus-visible{color:var(--gold-hi)}
@keyframes nx-scroll{from{transform:translate3d(0,0,0)}to{transform:translate3d(-50%,0,0)}}

/* ---------- carousel ---------- */
.nx-wrap{position:relative;isolation:isolate;width:min(1180px,92vw);margin:clamp(14px,2.4vw,26px) auto 0;
  padding:clamp(24px,4vw,40px) 0 clamp(10px,2vw,18px)}
/* Ambient colour for the glass tiles to catch. Glassmorphism needs something
   behind the glass or the blur has nothing to do — a flat page colour blurs
   into itself and the effect disappears. Two soft, brand-coloured blooms
   (gold and the product green) sit behind the track; the blueprint's own
   lines read through them too, since this is above .bg-bp but the wrap
   itself is transparent. */
.nx-wrap::before{content:"";position:absolute;inset:-10% -6% 10%;z-index:-1;pointer-events:none;
  background:
    radial-gradient(480px 300px at 12% 8%,color-mix(in srgb,var(--gold) 26%,transparent),transparent 72%),
    radial-gradient(440px 340px at 88% 78%,color-mix(in srgb,var(--wm) 24%,transparent),transparent 72%);
  filter:blur(8px);opacity:.6}
.nx-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin:0 0 16px}
.nx-head h2{margin:0;font:var(--fw-title) clamp(20px,2.3vw,26px)/1.2 var(--head);letter-spacing:-.01em}
.nx-nav{display:flex;gap:8px}
.nx-nav button{width:40px;height:40px;border-radius:50%;cursor:pointer;background:var(--surface);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  border:1px solid var(--rule);color:var(--ink);font-size:17px;line-height:1;
  transition:border-color .2s ease,color .2s ease,background-color .2s ease}
.nx-nav button:hover:not(:disabled){border-color:var(--gold);color:var(--gold)}
.nx-nav button:disabled{opacity:.35;cursor:default}

/* Native scrolling with snap points: keyboard, trackpad and touch all work
   without JavaScript. The buttons and dots below are an enhancement, not the
   mechanism — kiq-news.js adds autoplay and keeps the dots in sync, but the
   track scrolls and snaps with that script absent too. */
.nx-track{display:flex;gap:var(--nx-gap);overflow-x:auto;scroll-snap-type:x mandatory;
  scroll-behavior:smooth;scrollbar-width:none;padding:4px 4px 14px}
.nx-track::-webkit-scrollbar{display:none}

/* Glass tiles: a translucent surface over the blooms above, blurred and
   saturated so colour behind the card still reads through it, a hairline
   border, and an inset top highlight standing in for a light catching the
   edge of real glass. */
.nx-card{scroll-snap-align:start;flex:0 0 var(--nx-card);display:flex;flex-direction:column;
  padding:20px;border:1px solid var(--hair);border-radius:var(--r,14px);
  background:linear-gradient(165deg,color-mix(in srgb,var(--ink) 5%,var(--surface)) 0%,var(--surface) 100%);
  -webkit-backdrop-filter:blur(18px) saturate(150%);backdrop-filter:blur(18px) saturate(150%);
  box-shadow:inset 0 1px 0 color-mix(in srgb,#fff 18%,transparent),0 18px 34px -22px rgba(0,0,0,.55);
  text-decoration:none;color:inherit;transition:border-color .2s ease,background-color .2s ease,transform .2s ease,box-shadow .2s ease}
/* Gold on hover, matching .cta.ghost elsewhere: a faint gold wash, a gold
   border and the headline lifting to gold-hi. A border alone was too quiet. */
.nx-card:hover,.nx-card:focus-visible{border-color:var(--gold);
  background:linear-gradient(165deg,color-mix(in srgb,var(--gold) 16%,var(--surface)) 0%,color-mix(in srgb,var(--gold) 8%,var(--surface)) 100%);
  transform:translateY(-3px);
  box-shadow:inset 0 1px 0 color-mix(in srgb,#fff 22%,transparent),0 22px 40px -20px rgba(0,0,0,.6)}
.nx-card:hover h3,.nx-card:focus-visible h3{color:var(--gold-hi)}
.nx-meta{display:flex;gap:.6em;font:var(--fw-label) 12px/1.4 var(--head);letter-spacing:.08em;
  text-transform:uppercase;color:var(--muted);margin:0 0 10px}
.nx-card h3{margin:0 0 .5em;font:var(--fw-title) 19px/1.25 var(--head);letter-spacing:-.01em}
.nx-card p{margin:0;color:var(--soft);font-size:15px;line-height:1.55}
.nx-card .nx-more{margin-top:auto;padding-top:14px;color:var(--gold);font:var(--fw-title) 14px/1 var(--head)}

/* Progress dots, one per card. Autoplay in kiq-news.js advances the track and
   these together; clicking a dot jumps straight to that card. */
.nx-dots{display:flex;justify-content:center;gap:9px;margin-top:18px}
.nx-dots button{width:8px;height:8px;padding:0;border:0;border-radius:50%;cursor:pointer;
  background:var(--rule);transition:background-color .25s ease,transform .25s ease}
.nx-dots button[aria-current="true"]{background:var(--gold);transform:scale(1.35)}
.nx-dots button:hover{background:var(--gold-hi)}

/* ---------- archive ---------- */
/* Every headline in plain markup. The carousel is a way of looking at this
   list, not a replacement for it — which matters for search and for anyone
   who never sees the motion. */
.nx-archive{width:min(1180px,92vw);margin:clamp(16px,2.4vw,28px) auto clamp(40px,6vw,72px)}
.nx-archive h2{margin:0 0 14px;font:var(--fw-title) clamp(20px,2.3vw,26px)/1.2 var(--head)}
.nx-archive ol{list-style:none;margin:0;padding:0;border-top:1px solid var(--rule)}
.nx-archive li{border-bottom:1px solid var(--rule)}
.nx-archive a{display:grid;grid-template-columns:110px 1fr auto;gap:16px;align-items:baseline;
  padding:15px 4px;text-decoration:none;color:inherit}
.nx-archive a:hover .nx-t,.nx-archive a:focus-visible .nx-t{color:var(--gold-hi)}
.nx-d{font:var(--fw-label) 12px/1.6 var(--head);letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.nx-t{font:var(--fw-title) 17px/1.35 var(--head)}
.nx-r{font:var(--fw-label) 12px/1.6 var(--head);color:var(--muted);white-space:nowrap}
@media (max-width:620px){ .nx-archive a{grid-template-columns:1fr;gap:4px} .nx-r{display:none} }

@media (prefers-reduced-motion:reduce){
  .nx-chyron-track{animation:none;transform:none}
  .nx-track{scroll-behavior:auto}
  .nx-card:hover{transform:none}
  .nx-dots button{transition:none}
}

/* Fly-out-tab clearance fix — see the comment in kiq-page.css's
   .pg-wrap rule for the full reasoning. */
@media (min-width:641px){
  .nx-hero-inner{width:min(1180px,calc(100vw - 192px))}
  .nx-wrap{width:min(1180px,calc(100vw - 192px))}
  .nx-archive{width:min(1180px,calc(100vw - 192px))}
}
