/* ==========================================================================
   VNlocalization — theme layer (loaded after style.css)
   Design tokens, typography, buttons, section rhythm, footer, mobile CTA.
   To roll back the redesign, remove the <link> to this file.
   ========================================================================== */

:root {
  --ink: #0b2321;
  --paper: #ffffff;
  --surface: #f3f7f6;
  --line: #dbe4e1;
  --text: #29393b;
  --muted: #526669;
  --accent: #0e8a76;
  --accent-ink: #0a6b5c;
  --accent-soft: #e0f2ee;
  --green: #ead9bb; /* sand, used by existing rules */
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-lift: 0 18px 40px -22px rgba(11, 35, 33, 0.35);
}

/* ---- Base typography ---------------------------------------------------- */
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 90px;
}
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,
h2,
h3,
.logo,
.brand-word {
  font-family: var(--font);
  color: var(--ink);
}
h1 {
  letter-spacing: -0.035em;
  font-weight: 700;
}
h2 {
  letter-spacing: -0.03em;
  font-weight: 600;
  line-height: 1.12;
}
h3 {
  letter-spacing: -0.015em;
  font-weight: 600;
  line-height: 1.3;
}
html:lang(zh) body,
html:lang(ja) body,
html:lang(ko) body {
  font-family:
    var(--font), "Noto Sans CJK SC", "Noto Sans CJK JP", "Noto Sans CJK KR", "Microsoft YaHei",
    "Yu Gothic", "Malgun Gothic", sans-serif;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
button:focus-visible,
a:focus-visible,
.language-picker summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

/* ---- Labels (eyebrows) --------------------------------------------------- */
.eyebrow,
.home-page .next-heading .eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--accent-ink);
}
.dot {
  background: var(--accent);
}

/* ---- Header -------------------------------------------------------------- */
header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
}
nav {
  height: 72px;
}
.logo {
  font-size: 24px;
  letter-spacing: -0.04em;
  font-weight: 700;
}
.navlinks {
  font-size: 15px;
  font-weight: 500;
  gap: 28px;
}
.navlinks a:not(.btn) {
  color: var(--text);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.navlinks a:not(.btn):hover,
.navlinks a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.language-picker > summary {
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  min-height: 40px;
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  gap: 18px;
  background: var(--ink);
  border-color: var(--ink);
  transition:
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}
.btn:hover {
  transform: none;
  background: var(--accent-ink);
  border-color: var(--accent-ink);
  box-shadow: var(--shadow-lift);
}
.btn.light,
.cta .btn {
  background: var(--green);
  border-color: var(--green);
  color: var(--ink);
}
.btn.light:hover,
.cta .btn:hover {
  background: #f4e8d0;
  border-color: #f4e8d0;
}
.cta .btn {
  padding: 16px 26px;
  font-size: 16px;
}
.btn.outline,
.hero-secondary {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 20px;
}
.btn.outline:hover,
.hero-secondary:hover {
  border-color: var(--ink);
  background: #fff;
  box-shadow: none;
}
.textlink {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-ink);
  border-bottom-color: currentColor;
}

/* ---- Hero ---------------------------------------------------------------- */
main {
  overflow-x: clip;
}
.home-hero {
  position: relative;
  padding-top: 72px;
  padding-bottom: 72px;
}
.home-hero::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 92%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 92%);
}
.home-hero h1 {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.06;
  margin: 20px 0 22px;
}
html:lang(vi) .home-hero h1 {
  font-size: clamp(38px, 4.4vw, 56px);
}
.hero-services {
  font-size: 15px;
  font-weight: 500;
  color: var(--accent-ink);
}
.hero-intro {
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 500px;
}
.hero-proof {
  font-size: 14px;
  color: var(--muted);
}
.hero-proof > span:before {
  color: var(--accent);
}

/* ---- Section rhythm ------------------------------------------------------ */
.section {
  padding-top: 88px;
  padding-bottom: 40px;
}
.sectionhead h2,
.home-page .sectionhead h2 {
  font-size: clamp(30px, 3.3vw, 44px);
}
.sectionhead p,
.home-page .next-heading > p,
.examples-copy p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
}
.home-page .next-heading h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  color: #fff;
  margin-top: 10px;
}
.home-page .next-heading .eyebrow {
  color: var(--green);
}

/* Full-bleed alternating bands */
.examples-section {
  position: relative;
  padding: 88px 0;
  margin-top: 56px;
  background: var(--surface);
  box-shadow: 0 0 0 100vmax var(--surface);
  clip-path: inset(0 -100vmax);
}
.quality {
  background: var(--surface);
  margin-top: 56px;
}

/* ---- Cards --------------------------------------------------------------- */
.service {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  transition:
    border-color 0.15s,
    box-shadow 0.2s;
}
.service:hover {
  transform: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-lift);
}
.service h3 {
  font-size: 21px;
  line-height: 1.25;
}
.service p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}
.service > a {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-ink);
}
.industry {
  border-radius: var(--radius-md);
}
.industry h3 {
  font-size: 22px;
}
.industry p {
  font-size: 15px;
  color: var(--muted);
}
.industry .bigicon {
  color: var(--accent);
  opacity: 0.2;
}
.home-page .next-section {
  border-radius: var(--radius-lg);
}
.home-page .next-card {
  border-radius: var(--radius-md);
}
.workbench,
.qa-demo {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
}
.bench-tabs button {
  font-size: 15px;
  font-weight: 600;
}
.ticks li:before {
  color: var(--accent);
}
.ticks li {
  font-size: 16px;
}

/* Process + FAQ */
.step p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}
.aboutband p {
  font-size: 17px;
  line-height: 1.7;
}
.faq h2 {
  font-size: clamp(28px, 3vw, 38px);
}
summary {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  padding-top: 22px;
  padding-bottom: 22px;
}
details p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---- CTA band ------------------------------------------------------------ */
.cta {
  border-radius: var(--radius-lg);
  padding: 56px 60px;
  background: var(--ink);
}
.cta h2 {
  color: #fff;
  font-size: clamp(28px, 3.2vw, 42px);
}
.cta p {
  font-size: 17px;
  color: #c6d6d3;
}

/* ---- Footer -------------------------------------------------------------- */
footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 56px 0 28px;
  font-size: 15px;
  color: var(--muted);
}
.footerlinks b,
.footer-contact b {
  color: var(--ink);
}
.footerlinks a {
  font-size: 15px;
  color: var(--text);
}
.footerlinks a:hover {
  color: var(--accent-ink);
  text-decoration: underline;
}
.copyright {
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 8px 24px;
}
.copyright .image-note {
  flex-basis: 100%;
}

/* ---- Forms --------------------------------------------------------------- */
input,
select,
textarea {
  border-radius: 10px;
  font-size: 16px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid var(--accent-soft);
  border-color: var(--accent);
}

/* ---- Mobile quick-quote bar (created by main.js) ------------------------- */
.sticky-quote {
  display: none;
}
@media (max-width: 768px) {
  body.has-sticky-quote {
    padding-bottom: 76px;
  }
  .sticky-quote {
    display: flex;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 30;
    justify-content: center;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    border-radius: 14px;
    background: var(--ink);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 14px 30px -10px rgba(11, 35, 33, 0.55);
  }
  .menu {
    min-width: 44px;
    min-height: 44px;
    font-size: 22px;
  }
  .home-hero {
    padding-top: 40px;
    padding-bottom: 48px;
  }
  .hero-intro {
    font-size: 17px;
  }
  .section {
    padding-top: 64px;
  }
  .examples-section {
    padding: 56px 0;
  }
  .cta {
    padding: 36px 26px;
  }
}

/* ---- Fixes: more specific rules from style.css that fought the theme ----- */
.hero-copy .eyebrow,
.quality .eyebrow,
.examples-copy .eyebrow,
.sectionhead .eyebrow,
.aboutband .eyebrow,
.home-page .examples-copy .eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--accent-ink);
}
.home-page .next-heading .eyebrow {
  color: var(--green);
}

/* Dark "next story" band: keep text light after the global heading colour */
.home-page .next-heading > p {
  color: #c6d6d3;
}
.home-page .next-card-text h3 {
  color: #fff;
}
.home-page .next-card-text p {
  color: #c6d6d3;
}

/* Workbench mock UIs: let content grow instead of clipping it */
.app-example,
.issue-example,
.voice-example {
  height: auto;
  min-height: 247px;
}
.subtitle-example {
  height: auto;
  min-height: 193px;
}
.bench-panel {
  min-height: 0;
}

/* FAQ rows */
details {
  padding: 0;
}
summary {
  padding: 20px 0;
  line-height: 1.4;
}
details p {
  margin: 0 0 22px;
}

/* Footer contact */
.footer-contact a,
.footer-contact b {
  color: var(--ink);
}

/* ==========================================================================
   v3 — bolder look: dark hero, bento services, dark quality band, motion
   ========================================================================== */

/* ---- Dark hero ----------------------------------------------------------- */
.home-hero::before {
  background-color: var(--ink);
  background-image:
    radial-gradient(60% 70% at 78% 40%, rgba(14, 138, 118, 0.28), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size:
    auto,
    56px 56px,
    56px 56px;
  opacity: 1;
  -webkit-mask-image: none;
  mask-image: none;
}
.home-hero {
  padding-top: 88px;
  padding-bottom: 96px;
}
.home-hero h1,
.home-hero h1 > span {
  color: #fff;
}
.home-hero .hero-copy .eyebrow,
.home-hero .hero-services {
  color: #7fe0cd;
}
.home-hero .hero-intro {
  color: #b9cdc9;
}
.home-hero .hero-proof,
.home-hero .hero-proof > span {
  color: #a3bbb6;
}
.home-hero .hero-proof > span:before {
  color: #7fe0cd;
}
.home-hero .herobuttons .btn {
  background: var(--green);
  border-color: var(--green);
  color: var(--ink);
}
.home-hero .herobuttons .btn:hover {
  background: #f6ebd3;
  border-color: #f6ebd3;
  box-shadow: 0 14px 36px -16px rgba(234, 217, 187, 0.6);
}
.home-hero .hero-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.home-hero .hero-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #fff;
}
.home-hero .hero-copy > div[class*="proof"],
.home-hero .hero-proof {
  border-top-color: rgba(255, 255, 255, 0.14);
}
.home-hero .hero-collage > * {
  translate: calc(var(--px, 0) * 10px) calc(var(--py, 0) * 10px);
  transition: translate 0.25s ease-out;
}
.home-hero .hero-collage > :nth-child(odd) {
  translate: calc(var(--px, 0) * -8px) calc(var(--py, 0) * -8px);
}

/* ---- Marquee strip (created by main.js) ---------------------------------- */
.marquee {
  position: relative;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  overflow: hidden;
  background: #071a19;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-item {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-right: 32px;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
  color: #9db8b3;
}
.marquee-item::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---- Services as a 2x2 bento -------------------------------------------- */
.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.service {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  align-items: start;
  padding: 0;
}
.service > .service-art {
  grid-column: 1;
  grid-row: 1 / -1;
  height: 100%;
  min-height: 300px;
  border-radius: 0;
  margin: 0;
}
.service > .icon,
.service > h3,
.service > p,
.service > a {
  grid-column: 2;
  margin-left: 0;
  margin-right: 0;
  padding-left: 30px;
  padding-right: 30px;
}
.service > .icon {
  padding-top: 28px;
}
.service > a {
  align-self: end;
  padding-top: 18px;
  padding-bottom: 26px;
}
.service .photo-crop,
.service .service-art img {
  height: 100%;
}
.service .service-art img {
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.service:hover .service-art img {
  transform: scale(1.06);
}

/* Cursor spotlight on interactive cards (position set by main.js) */
.service::before,
.industry::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
  background: radial-gradient(
    380px circle at var(--mx, 50%) var(--my, 50%),
    rgba(14, 138, 118, 0.13),
    transparent 62%
  );
}
.service:hover::before,
.industry:hover::before {
  opacity: 1;
}
.industry {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.industry:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}
.home-page .next-card .photo-crop img {
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.home-page .next-card:hover .photo-crop img {
  transform: scale(1.05);
}

/* ---- Quality band goes dark ---------------------------------------------- */
.quality {
  background: var(--ink);
  color: #c3d3cf;
  border: 0;
}
.quality h2 {
  color: #fff;
}
.quality p,
.quality .ticks li {
  color: #c3d3cf;
}
.quality .ticks li:before {
  color: #7fe0cd;
}
.quality .eyebrow {
  color: #7fe0cd;
}
.quality .btn {
  background: var(--green);
  border-color: var(--green);
  color: var(--ink);
}
.quality .qa-caption {
  color: #9db8b3;
}

/* ---- Process timeline ---------------------------------------------------- */
.steps {
  gap: 28px;
}
.step {
  position: relative;
  border-top: 0;
  padding-top: 38px;
}
.step::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  right: -28px;
  height: 2px;
  background: var(--line);
}
.step:last-child::before {
  right: 0;
  background: linear-gradient(90deg, var(--line), transparent);
}
.step::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.step strong {
  color: var(--accent-ink);
  font-size: 13px;
}

/* ---- CTA aurora ---------------------------------------------------------- */
.cta::before {
  content: "";
  position: absolute;
  inset: -60%;
  z-index: 0;
  background: conic-gradient(
    from 0deg,
    transparent 0 62%,
    rgba(14, 138, 118, 0.32) 80%,
    transparent 100%
  );
  animation: spin 18s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Page chrome: scroll progress + header state -------------------------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  pointer-events: none;
}
header {
  transition: box-shadow 0.25s;
}
header.scrolled {
  box-shadow: 0 10px 30px -22px rgba(11, 35, 33, 0.5);
}

/* ---- Scroll reveal (class added by main.js only when motion is allowed) --- */
.has-reveal .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--i, 0) * 90ms),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--i, 0) * 90ms);
}
.has-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1000px) {
  .services {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .service {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .service > .service-art {
    grid-row: auto;
    min-height: 190px;
  }
  .service > .icon,
  .service > h3,
  .service > p,
  .service > a {
    grid-column: 1;
    padding-left: 22px;
    padding-right: 22px;
  }
  .step::before {
    right: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track,
  .cta::before {
    animation: none;
  }
  .home-hero .hero-collage > * {
    translate: none;
  }
}

/* ---- Bento card fixes (beat the older, more specific padding rules) ------ */
.services .service {
  padding: 0 !important;
}
.services .service > .service-art {
  padding: 0;
  margin: 0;
}
.services .service > .icon {
  height: auto;
  line-height: 1.2;
  padding-top: 30px;
  padding-bottom: 10px;
  border-bottom: 0;
}
.services .service > h3 {
  margin-top: 0;
}

.services .service {
  grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
}
.services .service .mini-browser,
.services .service [class*="art-"] > div:first-child {
  max-width: 100%;
}

/* Illustration cards: keep the padded, vertically centred sheet */
.services .service > .art-localization,
.services .service > .art-review {
  padding: 28px;
  display: grid;
  align-content: center;
}

.services .service .mini-browser {
  height: auto;
  min-height: 145px;
}

/* Quality band: force the dark treatment, keep the demo card readable */
section.quality,
.home-page section.quality {
  background: var(--ink) !important;
  color: #c3d3cf;
}
.quality .qa-demo {
  color: var(--text);
}
.quality .qa-demo p {
  color: var(--muted);
}
.quality .qa-demo .source {
  color: var(--ink);
}

/* ---- Responsive layout refinements ------------------------------------- */
img,
video {
  max-width: 100%;
}

.wrap {
  width: 100%;
}

@media (max-width: 800px) {
  .wrap {
    padding-left: clamp(20px, 4vw, 32px);
    padding-right: clamp(20px, 4vw, 32px);
  }

  .home-page .hero-visual,
  .home-page .hero-copy,
  .home-page .section,
  .home-page .service {
    min-width: 0;
  }

  .home-page .hero-collage {
    width: min(100%, 580px);
  }

  .sectionhead,
  .footertop,
  .footerlinks {
    min-width: 0;
  }

  .footerlinks {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding-left: 18px;
    padding-right: 18px;
  }

  .home-page .hero-copy h1 {
    font-size: clamp(36px, 10vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.04em;
  }

  .home-page .hero-services {
    overflow-wrap: anywhere;
  }

  .home-page .hero-intro,
  .home-page .sectionhead p,
  .home-page .service p {
    overflow-wrap: anywhere;
  }

  .home-page .hero-collage {
    height: 435px;
  }

  .home-page .hero-review {
    gap: 9px;
  }

  .home-page .sectionhead h2,
  .home-page .next-heading h2 {
    font-size: clamp(27px, 8vw, 34px);
  }

  .home-page .service > .icon,
  .home-page .service > h3,
  .home-page .service > p,
  .home-page .service > a {
    min-width: 0;
  }

  .cta {
    padding: 28px 20px;
  }

  .cta h2 {
    font-size: clamp(26px, 8vw, 31px);
  }
}
