/*
Theme Name: W INSIGHT
Theme URI: https://winsight.com.my
Author: W INSIGHT
Author URI: https://winsight.com.my
Description: W INSIGHT marketing site — Apple-inspired clean white design with sticky scroll storytelling and stacking cards. Child theme of Extendable.
Template: extendable
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: winsight
*/

/* =========================================================================
   Design tokens
   ========================================================================= */
:root {
  --bg: #fbfbfd;
  --bg-soft: #f5f5f7;
  --bg-dark: #000;

  --ink: #1d1d1f;
  --ink-2: #424245;
  --ink-dim: #6e6e73;
  --ink-faint: #86868b;

  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);

  --accent: #ff375f;
  --accent-warm: linear-gradient(135deg, #ff5e62 0%, #ff9966 100%);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --container: 1200px;
}

/* =========================================================================
   Reset (scoped to the W INSIGHT homepage)
   ========================================================================= */
.winsight-page,
.winsight-page * {
  box-sizing: border-box;
}

.winsight-page {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.47059;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.winsight-page :where(a) {
  color: inherit;
  text-decoration: none;
}

.winsight-page button {
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

.winsight-page h1,
.winsight-page h2,
.winsight-page h3 {
  margin: 0;
  font-weight: 600;
}

.winsight-page p {
  margin: 0;
}

.winsight-page ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* =========================================================================
   Helpers
   ========================================================================= */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, 'Courier New', monospace;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
}

.gradient {
  background: var(--accent-warm);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}

.tag {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, 'Courier New', monospace;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px;
  color: var(--ink-2);
}

.dark-section .tag {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

/* =========================================================================
   Reveal-on-scroll
   ========================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================================
   Scroll progress bar
   ========================================================================= */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--ink);
  z-index: 200;
  transition: width 0.1s linear;
}

/* =========================================================================
   Nav
   ========================================================================= */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(251, 251, 253, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.site-nav.scrolled {
  border-bottom-color: var(--line);
}
.site-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  line-height: 0;
}
.logo img {
  height: 32px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links li:not(.nav-cta-wrap) a {
  font-size: 14px;
  color: var(--ink-2);
  transition: color 0.3s var(--ease);
}
.nav-links li:not(.nav-cta-wrap) a:hover {
  color: var(--ink);
}

/* =========================================================================
   Buttons
   ========================================================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--ink);
  color: var(--bg);
  padding: 14px 28px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  transition: gap 0.3s var(--ease);
}
.btn-secondary .arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}
.btn-secondary:hover {
  gap: 12px;
}
.btn-secondary:hover .arrow {
  transform: translateX(4px);
}
.dark-section .btn-secondary {
  color: var(--bg);
}
.dark-section .btn-primary {
  background: var(--bg);
  color: var(--ink);
}
.dark-section .btn-primary:hover {
  background: var(--accent);
  color: var(--bg);
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative;
  padding: 200px 0 200px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-bg::before,
.hero-bg::after {
  content: '';
  position: absolute;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.22;
  animation: float 24s ease-in-out infinite;
}
.hero-bg::before {
  background: radial-gradient(circle, #ff5e62, transparent 60%);
  top: -200px;
  left: -100px;
}
.hero-bg::after {
  background: radial-gradient(circle, #ff9966, transparent 60%);
  top: 100px;
  right: -100px;
  animation-delay: -10s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(40px, -30px) scale(1.1); }
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 980px;
}
.hero h1 {
  font-size: clamp(48px, 8.5vw, 112px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.05;
  margin: 24px 0 32px;
}
.hero-sub {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--ink-dim);
  max-width: 640px;
  margin-bottom: 48px;
  line-height: 1.5;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.scroll-cue {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, 'Courier New', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  z-index: 1;
}

/* TikTok Official Partner badge under the hero CTAs */
.partner-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, 'Courier New', monospace;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-2);
}
.partner-badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-warm);
  flex-shrink: 0;
}

/* Platform-experience row inside each service card */
.platforms {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, 'Courier New', monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.5;
}
.platforms .partner-flag {
  color: var(--ink-2);
  font-weight: 500;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero .eyebrow      { animation: fadeUp 0.8s var(--ease-out) 0.1s forwards; opacity: 0; }
.hero h1            { animation: fadeUp 1s   var(--ease-out) 0.2s forwards; opacity: 0; }
.hero-sub           { animation: fadeUp 1s   var(--ease-out) 0.4s forwards; opacity: 0; }
.hero .actions      { animation: fadeUp 1s   var(--ease-out) 0.6s forwards; opacity: 0; }

/* =========================================================================
   Statement band
   ========================================================================= */
.statement {
  padding: 160px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.statement-text {
  max-width: 1080px;
  margin: 0 auto;
  font-size: clamp(36px, 5.5vw, 72px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--ink-dim);
}
.statement-text .ink {
  color: var(--ink);
}

/* =========================================================================
   Sticky scroll story (Services)
   ========================================================================= */
.story {
  padding: 160px 0;
}
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.story-left {
  position: sticky;
  top: 120px;
  padding: 40px 0;
}
.story-left h2 {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 24px 0 24px;
}
.story-left p {
  font-size: 18px;
  color: var(--ink-dim);
  line-height: 1.55;
  max-width: 460px;
}
.story-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px 0 200px;
}
.story-card {
  background: var(--bg);
  border-radius: 24px;
  padding: 48px;
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.story-card:hover {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 24px 48px -16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.story-card-num {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, 'Courier New', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-bottom: 24px;
}
.story-card h3 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}
.story-card p {
  color: var(--ink-dim);
  font-size: 16px;
  line-height: 1.6;
}

/* =========================================================================
   Stacking cards (process)
   ========================================================================= */
.process {
  padding: 160px 0 0;
}
.process-head {
  text-align: center;
  margin-bottom: 80px;
}
.process-head h2 {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 24px 0 16px;
}
.process-head p {
  font-size: 18px;
  color: var(--ink-dim);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.55;
}
.stack-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px 200px;
}
.stack-card {
  position: sticky;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 56px;
  margin-bottom: 24px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 24px 48px -16px rgba(0, 0, 0, 0.12);
}
.stack-card:nth-child(1) { top: 100px; }
.stack-card:nth-child(2) { top: 116px; }
.stack-card:nth-child(3) { top: 132px; }
.stack-card:nth-child(4) { top: 148px; }
.stack-card-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: start;
}
.stack-card-step {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, 'Courier New', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-bottom: 16px;
}
.stack-card h3 {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stack-card .stack-body p {
  font-size: 18px;
  color: var(--ink-dim);
  line-height: 1.6;
  margin-bottom: 16px;
}
.stack-card .stack-body p:last-child {
  margin-bottom: 0;
}

/* =========================================================================
   Self-serve band (between services and process)
   ========================================================================= */
.self-serve {
  background: var(--bg-soft);
  padding: 160px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.self-serve-head {
  text-align: center;
  margin-bottom: 64px;
}
.self-serve-head h2 {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 24px auto 16px;
  max-width: 900px;
}
.self-serve-head p {
  font-size: 18px;
  color: var(--ink-dim);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.55;
}
.self-serve-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto 64px;
}
.self-serve-feature {
  background: var(--bg);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.self-serve-feature .step {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
}
.self-serve-feature h4 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.self-serve-feature p {
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.55;
  margin: 0;
}
.self-serve-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
@media (max-width: 900px) {
  .self-serve { padding: 120px 0; }
  .self-serve-features { grid-template-columns: 1fr; gap: 16px; }
}

/* =========================================================================
   Dark contrast section
   ========================================================================= */
.dark-section {
  background: #000;
  color: #fbfbfd;
  padding: 160px 0;
  position: relative;
  overflow: hidden;
}
.dark-section::before {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255, 55, 95, 0.18), transparent 60%);
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  filter: blur(40px);
  pointer-events: none;
}
.dark-inner {
  position: relative;
  z-index: 1;
}
.dark-section h2 {
  font-size: clamp(36px, 5.5vw, 72px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
  max-width: 900px;
  margin: 24px 0 80px;
}
.dark-section h2:has(+ .dark-sub) {
  margin-bottom: 24px;
}
.dark-section .dark-sub {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  max-width: 780px;
  margin: 0 0 64px;
  line-height: 1.55;
  letter-spacing: -0.022em;
}
.dark-section .dark-sub strong {
  color: #fff;
  font-weight: 500;
}
.dark-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
  margin-top: 80px;
}
.dark-stat-num {
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 200;
  background: var(--accent-warm);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 16px;
}
.dark-stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

/* =========================================================================
   CTA
   ========================================================================= */
.cta {
  padding: 200px 0;
  text-align: center;
}
.cta h2 {
  font-size: clamp(48px, 7.5vw, 96px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  max-width: 980px;
  margin: 24px auto 32px;
}
.cta-sub {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--ink-dim);
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.5;
}
.cta .actions {
  justify-content: center;
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 80px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 80px;
}
.footer-brand h4 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.footer-brand p {
  font-size: 14px;
  color: var(--ink-dim);
  max-width: 320px;
  line-height: 1.55;
}
.footer-col h5 {
  margin: 0 0 20px;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, 'Courier New', monospace;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}
.footer-col ul li {
  margin-bottom: 12px;
}
.footer-col a {
  font-size: 14px;
  color: var(--ink-2);
  transition: color 0.3s var(--ease);
}
.footer-col a:hover {
  color: var(--ink);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-faint);
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 900px) {
  .container { padding: 0 22px; }
  .stack-wrap { padding: 0 22px 160px; }
  .hero { padding: 160px 0 160px; }
  .statement, .story, .process { padding: 120px 0; }
  .dark-section { padding: 120px 0; }
  .cta { padding: 160px 0; }

  .story-grid { grid-template-columns: 1fr; gap: 40px; }
  .story-left { position: static; padding: 0; }
  .story-right { padding: 0; gap: 16px; }
  .story-card { padding: 32px; }

  .stack-card { padding: 40px; }
  .stack-card-inner { grid-template-columns: 1fr; gap: 24px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .nav-links li:not(.nav-cta-wrap) { display: none; }
  .dark-stats { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .stack-card { padding: 32px; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn-primary,
  .actions .btn-secondary { justify-content: center; }
}
