/* ==========================================================================
   HalisAnteo — premium layer (additive only, never overrides base motion)
   Loaded AFTER style.css. Everything here is extra; base curtain/reveal/nav
   in style.css + main.js stays untouched.
   ========================================================================== */

/* header gains a soft shadow once scrolled (JS toggles .scrolled) */
.site-header { transition: box-shadow .35s ease, background .35s ease; }
.site-header.scrolled { box-shadow: 0 10px 30px rgba(21,14,13,.12); }

/* buttons: light sweep layered UNDER the text (background-image, so labels stay crisp).
   On signal-red backgrounds solid buttons hover to ink — never red-on-red. */
.btn {
  position: relative; isolation: isolate;
  background-image: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.28) 50%, transparent 58%);
  background-size: 280% 100%;
  background-position: 130% 0;
  background-repeat: no-repeat;
  transition: background-color .2s, background-position .9s cubic-bezier(.16,1,.3,1), color .2s, border-color .2s, transform .45s cubic-bezier(.16,1,.3,1);
}
.btn:hover { background-position: -130% 0; }
.hero .btn-solid:hover, .svc-lead .btn-solid:hover {
  background-color: var(--ink); border-color: var(--ink); color: var(--paper);
}

/* rows: arrow glides, background sweeps in */
.row { position: relative; }
.row .go svg { transition: transform .35s cubic-bezier(.16,1,.3,1); }
.row:hover .go svg, .row:focus-visible .go svg { transform: translate(4px,-4px) scale(1.15); }
.row .n { transition: transform .35s cubic-bezier(.16,1,.3,1); }
.row:hover .n { transform: translateX(6px); }

/* cards lift softly */
.pair-item, .lang-tile, .skill-col, .svc-lead { transition: transform .45s cubic-bezier(.16,1,.3,1), box-shadow .45s ease; }
.pair-item:hover { transform: translateY(-4px); }
.lang-tile:hover { transform: translateY(-4px); }

/* hero: floating ambient orbs (no layout shift) */
.hero { position: relative; }
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(70px); opacity: .5;
}
.hero::before { width: 420px; height: 420px; right: -120px; top: -140px; background: rgba(255,255,255,.35); }
.hero::after { width: 300px; height: 300px; left: -100px; bottom: -120px; background: rgba(21,14,13,.18); }

/* portrait: subtle tilt-ready + glow on hover */
.portrait img { transition: transform .5s cubic-bezier(.16,1,.3,1), box-shadow .5s ease; will-change: transform; }
.portrait:hover img { box-shadow: 18px 18px 0 var(--ink), 0 24px 60px rgba(21,14,13,.25); }
[data-tilt] { transform: perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)); }

/* marquee strip */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ink); color: var(--bone); }
.marquee-track { display: flex; gap: 0; width: max-content; padding: 14px 0; }
.marquee-track span { padding: 0 28px; font-family: var(--display); font-variation-settings: 'wdth' 118; font-weight: 750; font-size: 1.05rem; letter-spacing: .02em; white-space: nowrap; }
.marquee-track span i { color: var(--signal-text); font-style: normal; padding-right: 28px; }

/* facts counter pop */
.facts-row b { display: inline-block; }
.facts-row b.tick { animation: tick .5s cubic-bezier(.16,1,.3,1); }
@keyframes tick { 30% { transform: scale(1.18); } }

/* skill fill shimmer once revealed */
.skill-fill { position: relative; overflow: hidden; }
.skill-col.shown .skill-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%);
  transform: translateX(-100%); animation: shimmer 1.6s ease .9s 1 forwards;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* faq open animation (no JS) */
.faq details > p, .faq details > div { display: grid; }
.faq details::details-content { transition: height .4s ease; }

/* cursor glow removed per user request — no follower styles */

/* section-head accent bar grows when revealed */
.section-head { position: relative; }
.section-head::before {
  content: ''; display: block; width: 44px; height: 4px; background: var(--signal);
  margin-bottom: 18px; transform: scaleX(0); transform-origin: left;
  transition: transform .8s cubic-bezier(.16,1,.3,1) .1s;
}
.section-head.shown::before, .js .section-head.shown::before { transform: scaleX(1); }

/* night fix: pair cards had no dark-theme colors in the base stylesheet,
   so their text was invisible on dark backgrounds (skills, home, journey, about) */
.night .pair-item { border-top-color: var(--bone); }
.night .pair-item p { color: var(--bone-dim); }
.night .pair-item .link { color: var(--bone); }

/* world coverage map */
.map-wrap { border: 1px solid var(--line-strong); background: var(--paper-2); padding: clamp(12px, 2.5vw, 28px); }
.map-canvas { position: relative; }
.map-canvas svg { display: block; width: 100%; height: auto; }
.map-canvas .region path { stroke-linejoin: round; transition: fill .25s ease, filter .25s ease; }
.map-canvas .region.live path { fill: var(--signal); stroke: #a3150e; stroke-width: .8; }
.map-canvas .region.grey path { fill: rgba(21,14,13,.22); stroke: rgba(21,14,13,.4); stroke-width: .6; }
.map-canvas .region.weak path { fill: rgba(236,59,44,.45); stroke: #a3150e; stroke-width: .7; }
.map-canvas .region.weak path:hover { fill: rgba(236,59,44,.7); filter: drop-shadow(0 4px 10px rgba(236,59,44,.5)); }
.map-legend .sw.weak { background: rgba(236,59,44,.45); }
.map-canvas .region.live path:hover { fill: #ff5a4c; filter: drop-shadow(0 4px 10px rgba(236,59,44,.5)); }
#worldmap-svg .region { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .9s cubic-bezier(.16,1,.3,1); }
#worldmap-svg.shown .region { opacity: 1; transform: none; }
#worldmap-svg.shown .region:nth-child(2) { transition-delay: .08s; }
#worldmap-svg.shown .region:nth-child(3) { transition-delay: .16s; }
#worldmap-svg.shown .region:nth-child(4) { transition-delay: .24s; }
#worldmap-svg.shown .region:nth-child(5) { transition-delay: .32s; }
#worldmap-svg.shown .region:nth-child(6) { transition-delay: .4s; }
.pulse { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--signal); }
.pulse::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--signal); animation: ping 2.2s cubic-bezier(.2,.7,.2,1) infinite; }
.pulse:nth-of-type(2)::after { animation-delay: .7s; }
.pulse:nth-of-type(3)::after { animation-delay: 1.4s; }
@keyframes ping { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.map-legend { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 18px; font-weight: 600; font-size: .98rem; }
.map-legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 10px; vertical-align: baseline; }
.map-legend .sw.live { background: var(--signal); }
.map-legend .sw.soon { background: rgba(21,14,13,.28); }
.map-stats { margin-top: 26px; }

/* ── richness pass: texture + refined details (still calm) ── */

/* film grain over everything */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 2500; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* themed scrollbar */
html { scrollbar-width: thin; scrollbar-color: var(--ink) var(--paper-2); }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--ink); border: 2px solid var(--paper-2); }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* hairline grid on big color blocks */
.hero, .cta {
  background-image:
    linear-gradient(rgba(21,14,13,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21,14,13,.07) 1px, transparent 1px);
  background-size: 44px 44px;
}
.marquee {
  background-image:
    linear-gradient(rgba(240,236,230,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240,236,230,.055) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* portraits: offset frame draws in on hover */
.portrait img {
  outline: 2px solid transparent; outline-offset: 4px;
  transition: transform .5s cubic-bezier(.16,1,.3,1), box-shadow .5s ease, outline-color .3s ease, outline-offset .45s cubic-bezier(.16,1,.3,1);
}
.portrait:hover img { outline-color: var(--signal); outline-offset: 12px; }

/* inline links: underline thickens toward you on hover */
.prose a, .link {
  transition: color .2s ease, text-decoration-thickness .25s ease, text-underline-offset .25s ease;
}
.prose a:hover, .link:hover { text-decoration-thickness: 3px; text-underline-offset: 5px; }

/* back to top */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 2600;
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--paper); font-size: 1.3rem; line-height: 1;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .3s ease, transform .4s cubic-bezier(.16,1,.3,1), background-color .2s ease;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--red); color: #fff; }

/* ── section visuals: every block gets something to look at ── */

/* eyebrow labels above page titles */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px; font-weight: 700; font-size: .82rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--red-text);
}
.eyebrow::before { content: ''; width: 34px; height: 2px; background: var(--signal); flex-shrink: 0; }

/* journey timeline: rail + dots */
.tl { position: relative; }
.tl::before {
  content: ''; position: absolute; left: 5px; top: 34px; bottom: 34px;
  width: 2px; background: var(--line-strong); pointer-events: none;
}
.tl li { position: relative; padding-left: 34px; }
.tl li::after {
  content: ''; position: absolute; left: 0; top: 36px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--signal);
}
.tl li.now::after { background: var(--signal); box-shadow: 0 0 0 6px rgba(236,59,44,.18); }

/* care rows: ghost numerals + hover wash */
.care { counter-reset: care; }
.care > div { counter-increment: care; position: relative; transition: background-color .3s ease; }
.care > div::after {
  content: counter(care, decimal-leading-zero);
  position: absolute; right: 0; top: 14px; pointer-events: none;
  font-family: var(--display); font-weight: 850; line-height: 1;
  font-size: clamp(3.6rem, 7vw, 6rem);
  color: transparent; -webkit-text-stroke: 2px rgba(21,14,13,.22);
}
.night .care > div::after { -webkit-text-stroke-color: rgba(240,236,230,.28); }
@supports not (-webkit-text-stroke: 1px black) {
  .care > div::after { color: rgba(21,14,13,.14); }
  .night .care > div::after { color: rgba(240,236,230,.16); }
}
@media (max-width: 720px) {
  .care > div::after { font-size: 2.6rem; opacity: .7; }
}
.care > div:hover { background-color: rgba(21,14,13,.045); }
.night .care > div:hover { background-color: rgba(240,236,230,.05); }
.care > div:hover::after { color: var(--signal); -webkit-text-stroke-color: transparent; }
.night .care > div:hover::after { color: var(--signal); }

/* pair cards: small red index above each title */
.pair { counter-reset: pair; }
.pair-item { counter-increment: pair; }
.pair-item::before {
  content: counter(pair, decimal-leading-zero);
  display: block; margin-bottom: 14px;
  font-family: var(--display); font-weight: 800; font-size: .95rem; letter-spacing: .1em;
  color: var(--red-text);
}
.night .pair-item::before { color: var(--signal-text); }

/* services: numbered entries */
.block { counter-reset: svc; }
.svc { counter-increment: svc; }
.svc > div:first-child::before {
  content: counter(svc, decimal-leading-zero);
  display: block; margin-bottom: 14px;
  font-family: var(--display); font-weight: 800; font-size: .95rem; letter-spacing: .1em;
  color: var(--red-text);
}

/* faq: numbered questions */
.faq { counter-reset: faq; }
.faq details { counter-increment: faq; }
.faq summary::before {
  content: counter(faq, decimal-leading-zero);
  font-family: var(--display); font-weight: 800; font-size: .95rem; color: var(--red-text);
  flex-shrink: 0;
}

/* spec rows: hover wash */
.meta div { transition: background-color .25s ease; }
.meta div:hover { background-color: rgba(21,14,13,.045); }
.night .meta div:hover { background-color: rgba(240,236,230,.06); }

/* page-head quick chips + cta alt line */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.chip {
  display: inline-block; padding: 9px 18px; border: 2px solid var(--ink);
  font-weight: 600; font-size: .95rem; text-decoration: none;
  transition: background-color .25s ease, color .25s ease, transform .35s cubic-bezier(.16,1,.3,1);
}
.chip:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }
.cta-alt { margin-top: 22px; font-weight: 600; font-size: 1.02rem; }
.cta-alt button { font-weight: 700; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.cta-alt button:hover { text-decoration-thickness: 3px; }

/* quote strips: fill the gaps between sections with voice, not whitespace */
.quote-strip { padding: clamp(48px, 6vw, 84px) 0; text-align: center; }
.quote-strip.plain { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quote-strip .q-label {
  font-weight: 700; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red-text); margin-bottom: 16px;
}
.quote-strip p {
  font-family: var(--display); font-variation-settings: 'wdth' 118; font-weight: 780;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1.2; letter-spacing: -.01em;
  max-width: 24ch; margin: 0 auto;
}
.quote-strip.night { background: var(--night); color: var(--bone); }
.quote-strip.night .q-label { color: var(--signal-text); }

/* quote strips breathe with whatever follows them */
.quote-strip + .block { padding-top: clamp(40px, 5vw, 72px); }

/* tighter rhythm between stacked content blocks (no more dead gaps) */
.block + .block { padding-top: clamp(40px, 5vw, 72px); }
.block:has(+ .block) { padding-bottom: clamp(40px, 5vw, 72px); }

/* guard: paper section after a dark band always breathes (no glued headings) */
.block.night + .block { padding-top: clamp(56px, 7vw, 104px); }

* { -webkit-tap-highlight-color: transparent; }

/* ── mobile polish: perf + alignment on small screens ── */
@media (max-width: 960px) {
  .hero-grid .portrait, .about-snip .portrait { margin-left: auto; margin-right: auto; }
}
@media (max-width: 720px) {
  body::after { display: none; }
  .hero::before, .hero::after { display: none; }
  .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(236,235,231,.97); }
  .map-legend { font-size: .9rem; gap: 8px 18px; }
  .to-top { right: 14px; bottom: 14px; width: 44px; height: 44px; }
  .chips { gap: 8px; }
  .chip { padding: 8px 14px; font-size: .9rem; }
}

/* turnstile robot check: reserve space so the form never jumps */
.cf-turnstile { justify-self: start; min-height: 65px; }

/* only animate when the user is OK with motion */
@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: drift 11s ease-in-out infinite alternate; }
  .hero::after { animation: drift 14s ease-in-out infinite alternate-reverse; }
  .marquee-track { animation: slide 26s linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
}
@keyframes drift { to { transform: translate(30px, 40px) scale(1.1); } }
@keyframes slide { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .hero::before, .hero::after { display: none; }
  .btn { background-image: none; }
  .skill-col.shown .skill-fill::after { display: none; }
  .pulse, .pulse::after { animation: none; }
  .pulse::after { display: none; }
}
