/* Home page only. Shared styles live in styles.css. */

/* Scroll reveal: content only hides when JavaScript is running */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

.btns { display: flex; flex-wrap: wrap; gap: .75rem; }
.lede { max-width: 40rem; margin: 0 0 3rem; color: var(--muted); font-size: 1.1rem; }
.alt { background: var(--beige); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 3.75rem 0 4.25rem; background: linear-gradient(135deg, var(--midnight) 0%, var(--ocean) 100%); color: var(--white); }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.3fr .7fr; gap: 4rem; align-items: center; }
.hero h1 { margin-bottom: 1rem; color: var(--white); font-size: clamp(2.1rem, 4.4vw, 3.3rem); text-wrap: balance; }
.hero h1 em { font-style: italic; color: var(--sky); }
.hero .hero-ms { margin: 0 0 2rem; color: var(--sky); font-size: 1.2rem; }

.proof { margin: 0 0 0 -.25rem; padding: 0 0 0 2.25rem; list-style: none; display: grid; gap: 1.75rem; border-left: 1px solid rgba(200, 217, 230, .35); }
.proof strong { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; line-height: 1.2; color: var(--white); font-variant-numeric: lining-nums; }
.proof span { color: var(--sky); font-size: .9rem; }

.hero-globe { position: absolute; right: -9rem; top: 50%; width: 38rem; height: 38rem; margin-top: -19rem; color: var(--sky); opacity: .08; pointer-events: none; }
.hero-globe * { vector-effect: non-scaling-stroke; }
.hero-globe .m { transform-box: fill-box; transform-origin: center; }
.hero-globe .m1 { transform: scaleX(.3); }
.hero-globe .m2 { transform: scaleX(.65); }
.hero-globe .m3 { transform: scaleX(1); }

/* Selected clients strip */
.clients-strip { padding: 2rem 0; background: var(--white); border-bottom: 1px solid var(--line); }
.strip-label { display: flex; align-items: center; gap: 1.25rem; margin: 0 0 1.25rem; color: var(--muted); font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.strip-label::before, .strip-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.strip-names { display: flex; justify-content: center; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.strip-names li { padding: .25rem 1.75rem; border-left: 1px solid var(--line); font-family: var(--serif); font-size: 1.3rem; color: var(--ocean); opacity: .85; transition: opacity .2s; }
.strip-names li:first-child { border-left: 0; }
.strip-names li:hover { opacity: 1; }

/* Services: five columns, drawn line, staggered entrance */
#services h2 { margin-bottom: 2rem; }
.svc { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 2rem; margin: 0; padding: 2rem 0 0; list-style: none; }
.svc::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--teal); transform-origin: left; }
.svc .num { display: block; margin-bottom: .75rem; font-family: var(--serif); font-size: 1.1rem; color: var(--teal); }
.svc h3 { margin: 0 0 .5rem; font-size: 1.15rem; line-height: 1.25; }
.svc p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; text-align: justify; text-justify: inter-word; hyphens: auto; }

/* One movement only: the line draws, then the items follow */
.js #services .reveal { opacity: 1; transform: none; }
.js .reveal .svc::before { transform: scaleX(0); }
.js .reveal.in .svc::before { transform: scaleX(1); transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
.js .reveal .svc li { opacity: 0; transform: translateY(14px); }
.js .reveal.in .svc li { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in .svc li:nth-child(1) { transition-delay: .25s; }
.js .reveal.in .svc li:nth-child(2) { transition-delay: .35s; }
.js .reveal.in .svc li:nth-child(3) { transition-delay: .45s; }
.js .reveal.in .svc li:nth-child(4) { transition-delay: .55s; }
.js .reveal.in .svc li:nth-child(5) { transition-delay: .65s; }

/* Why Malaylingua: compact two-column block */
.why .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 4rem; align-items: center; }
.why h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); }
.why-copy p { margin: 0; max-width: 34rem; color: var(--muted); font-size: 1.05rem; }
.cap-label { margin: 0; color: var(--muted); font-weight: 600; }
.cap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin: .75rem 0 0; padding: 1.25rem 0 0; list-style: none; border-top: 1px solid #d8d2c4; }
.cap strong { display: block; font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 600; line-height: 1.1; color: var(--midnight); font-variant-numeric: lining-nums; }
.cap span { color: var(--muted); font-size: .9rem; }

/* Technology ticker */
.tech { padding: 3.5rem 0; background: var(--midnight); }
.tech h2 { margin: 0 0 2rem; color: var(--white); font-size: clamp(1.5rem, 2.6vw, 2rem); }
.ticker { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: flex; width: max-content; animation: tick 120s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker ul { display: flex; gap: 3.5rem; margin: 0; padding: 0 1.75rem; list-style: none; }
.ticker li { font-family: var(--serif); font-size: 1.5rem; color: var(--sky); white-space: nowrap; }
@keyframes tick { to { transform: translateX(-50%); } }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; margin: 0; padding: 0; list-style: none; counter-reset: st; }
.steps li { counter-increment: st; padding-top: 1.25rem; border-top: 2px solid var(--teal); }
.steps li::before { content: "Step " counter(st); display: block; margin-bottom: .5rem; color: var(--teal); font-size: .9rem; font-weight: 600; }
.steps h3 { margin-bottom: .5rem; }
.steps p { margin: 0; color: var(--muted); }

/* Quote band */
.quote-band { padding: 4rem 0; background: var(--haze); text-align: center; }
.pull-center { max-width: 46rem; margin: 0 auto; font-family: var(--serif); font-size: clamp(1.4rem, 2.8vw, 2rem); line-height: 1.35; color: var(--midnight); }
.pull-center::before { content: ""; display: block; width: 3rem; height: 2px; margin: 0 auto 1.5rem; background: var(--teal); }

/* Final call to action, with a slowly turning ring of English / Malay words */
.cta { position: relative; overflow: hidden; background: var(--midnight); color: var(--white); text-align: center; }
.cta .wrap { position: relative; z-index: 1; }
.cta h2 { color: var(--white); }
.cta p { max-width: 34rem; margin: 0 auto 2rem; color: var(--sky); font-size: 1.1rem; }
.cta .btns { justify-content: center; }
.wheel { position: absolute; right: -7rem; bottom: -9rem; width: 28rem; color: rgba(200, 217, 230, .3); pointer-events: none; }
.wheel svg { display: block; width: 100%; height: auto; }
.wheel text { font-family: var(--serif); font-size: 18px; fill: currentColor; }

/* Motion (only for visitors who have not asked for reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .hero-globe .m { animation: spin 42s ease-in-out infinite; }
  .hero-globe .m2 { animation-delay: -14s; }
  .hero-globe .m3 { animation-delay: -28s; }
  @keyframes spin { 0%, 100% { transform: scaleX(.06); } 50% { transform: scaleX(1); } }

  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  .hero h1, .hero .hero-ms, .hero .btns, .proof li { animation: rise .8s ease both; }
  .hero h1 { animation-delay: .05s; }
  .hero .hero-ms { animation-delay: .5s; }
  .hero .btns { animation-delay: .85s; }
  .proof li:nth-child(1) { animation-delay: .9s; }
  .proof li:nth-child(2) { animation-delay: 1.05s; }
  .proof li:nth-child(3) { animation-delay: 1.2s; }

  .wheel svg { animation: wheel 80s linear infinite; }
  @keyframes wheel { to { transform: rotate(360deg); } }
}

/* Tablet and phone */
@media (max-width: 1000px) {
  .svc { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}
@media (max-width: 860px) {
  .hero { padding: 2.5rem 0 3rem; }
  .hero .wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .proof { margin-left: 0; padding: 1.5rem 0 0; border-left: 0; border-top: 1px solid rgba(200, 217, 230, .35); }
  .hero-globe { right: -8rem; width: 24rem; height: 24rem; margin-top: -12rem; opacity: .1; }
  .strip-names li { width: 50%; padding: .6rem .5rem; border-left: 0; text-align: center; }
  .why { padding: 2.5rem 0; }
  .why .wrap { grid-template-columns: 1fr; gap: 2rem; }
  .cap { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .wheel { display: none; }
}
@media (max-width: 700px) {
  .svc { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* Reduced motion: show everything in its final state */
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .reveal .svc::before { transform: none; }
  .js .reveal .svc li { opacity: 1; transform: none; transition: none; }
  .ticker { -webkit-mask-image: none; mask-image: none; }
  .ticker-track { width: auto; animation: none; }
  .ticker ul { flex-wrap: wrap; gap: 1rem 3rem; }
  .ticker ul[aria-hidden="true"] { display: none; }
}
