/*
 * ARD Xuan Design - Full theme rewrite
 * Single source of truth: tokens, layout, components, RWD.
 * Compatible with: custom.js (tabs, Owl, Fancybox), translations.js (i18n).
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600&family=Outfit:wght@400;500;600&display=swap');

:root {
  --bg: #0a0a0a;
  --bg-section: #383838;
  --surface: #141414;
  --surface-hover: #1e1e1e;
  --text: #f0f0f0;
  --text-muted: #999;
  --accent: #e07a5f;
  --accent-hover: #c96a52;
  --graphic-bg: #f5f5f5;
  --graphic-bg-hover: var(--accent);
  --logo-row-bg: #f5f5f5;
  --light-bg: #f5f5f5;
  --light-bg-image: url("../images/background.png");
  /* Fixed background: subtle image blur + frosted glass overlay */
  --bg-image-blur: 0.75px;
  --bg-glass-scale: 1.015;
  --bg-glass-white: rgba(255, 255, 255, 0.1);
  --bg-glass-backdrop-blur: 3px;
  --text-on-light: #1a1a1a;
  --text-muted-on-light: #444;
  --border: rgba(255,255,255,0.08);
  --white: #fff;
  --font-sans: 'DM Sans', -apple-system, sans-serif;
  --font-display: 'Outfit', var(--font-sans);
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --shadow: 0 2px 12px rgba(0,0,0,0.3);
  --ease: 0.2s ease;
  --header-h: 64px;
  --header-h-mobile: 56px;
  --content-max: 1100px;
  /* Modern decor: chunky shapes + soft fills (no hairlines) */
  --decor-accent: #e07a5f;
  --decor-accent-soft: rgba(224, 122, 95, 0.14);
  --decor-accent-mid: rgba(224, 122, 95, 0.45);
  --decor-accent-strong: rgba(224, 122, 95, 0.82);
  --decor-ice: rgba(255, 255, 255, 0.08);
  --decor-ice-strong: rgba(255, 255, 255, 0.14);
  --decor-bar: 4px;
  --decor-radius-chunky: 12px;
}

/* Reset / base */
*, *::before, *::after { box-sizing: border-box; }
html {
  overflow-x: clip;
  overflow-y: visible;
  scroll-behavior: smooth;
  /* Reduce iOS/Android elastic overscroll showing gaps next to fixed UI */
  overscroll-behavior-y: none;
  /* Anchor scroll targets clear the fixed header + notch */
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
}
body {
  margin: 0;
  min-width: 0;
  width: 100%;
  overflow-x: clip;
  overflow-y: visible;
  background: var(--bg-section);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
/* Fixed background: blurred image layer + light white + glass (backdrop) layer */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--light-bg-image) center / cover no-repeat;
  filter: blur(var(--bg-image-blur));
  transform: scale(var(--bg-glass-scale));
  transform-origin: center center;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg-glass-white);
  backdrop-filter: blur(var(--bg-glass-backdrop-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--bg-glass-backdrop-blur)) saturate(160%);
}
/* clip: hide horizontal bleed without forcing overflow-y:auto (which clips vertical overflow e.g. hero__arrow-row) */
.wapper, .body-bg__row, .body-bg, .main {
  width: 100%;
  min-width: 0;
  overflow-x: clip;
  overflow-y: visible;
  position: relative;
  z-index: 1;
}
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; transition: color var(--ease), background var(--ease), transform var(--ease); }
h1, h2, h3, h4, h5, h6, p { margin: 0; font-weight: 400; }
img { max-width: 100%; height: auto; display: block; }

/* Tab visibility: jQuery .show()/.hide() on .hero-home */
.section .hero-home { display: none; }
.section .hero-home:first-of-type { display: block; }

/* Container: consistent width, no overflow */
.hero__footerbox .container,
.hero2__footerbox .container,
.hero-2__areasbox .container,
.hero-2__graphicbox .container,
.hero-2__animationbox .container,
.hero-2__introductionbox .container {
  width: 100%;
  max-width: 100%;
  padding-left: max(var(--space-md), env(safe-area-inset-left));
  padding-right: max(var(--space-md), env(safe-area-inset-right));
}
@media (min-width: 576px) {
  .hero__footerbox .container,
  .hero2__footerbox .container,
  .hero-2__areasbox .container,
  .hero-2__graphicbox .container,
  .hero-2__animationbox .container,
  .hero-2__introductionbox .container {
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
  }
}
@media (min-width: 1200px) {
  .hero__footerbox .container,
  .hero2__footerbox .container,
  .hero-2__areasbox .container,
  .hero-2__graphicbox .container,
  .hero-2__animationbox .container,
  .hero-2__introductionbox .container {
    max-width: var(--content-max);
    margin-left: auto;
    margin-right: auto;
  }
}

/* ========== HEADER: sticky top bar (CSS only; no JS) ========== */
/* #pad-header__title lives outside <header> (sibling in .main) so we can promote the bar
   to its own compositor layer on mobile without breaking the full-screen overlay’s fixed positioning. */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  min-height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  z-index: 1000;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: stretch;
  justify-content: center;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
}
.header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -24px;
  height: 24px;
  background: var(--surface);
  pointer-events: none;
}
.header__title {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--header-h);
}
.header__title .container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  /* Match section containers: avoid notch / home-indicator clipping */
  padding-left: max(var(--space-md), env(safe-area-inset-left, 0px));
  padding-right: max(var(--space-md), env(safe-area-inset-right, 0px));
}
.header__title-top { display: flex; align-items: center; }
.header__title-textrows { display: flex; align-items: center; gap: var(--space-sm); margin: 0; padding: 0; }
.header__title-textrow a {
  display: inline-block;
  padding: 8px 18px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.header__title-textrow a:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.header__title-textrow.active a { color: var(--white); background: var(--accent); }
.header__title-textrow.active a:hover { background: var(--accent-hover); }
.header__title-text h1 { font: inherit; font-size: inherit; font-weight: inherit; color: inherit; }

/* Mobile nav trigger */
.pad-header__title-top { display: none; }
.pad-header__title-icons { display: flex; justify-content: flex-end; padding-right: var(--space-md); }
.pad-header__title-togglerow {
  position: relative;
  width: 48px; height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-md);
  background: var(--surface-hover);
  cursor: pointer;
}
.pad-header__title-togglerow span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
.pad-header__title-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  min-height: 100svh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  box-sizing: border-box;
  margin: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.25s, opacity 0.25s;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overscroll-behavior: contain;
  /* Stack nav under the close control (same top offset + 48px hit area + small gap) */
  padding: calc(max(var(--space-lg), env(safe-area-inset-top)) + 48px + var(--space-xs)) var(--space-xl)
    max(var(--space-xl), env(safe-area-inset-bottom));
}
#pad-header__title:target { visibility: visible; opacity: 1; }
.pad-header__title-closerow {
  position: absolute;
  top: max(var(--space-lg), env(safe-area-inset-top));
  right: max(var(--space-lg), env(safe-area-inset-right));
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
}
.pad-header__title-closerow span { position: absolute; width: 20px; height: 2px; background: currentColor; }
.pad-header__title-closerow span:nth-child(1) { transform: rotate(45deg); }
.pad-header__title-closerow span:last-child { transform: rotate(-45deg); }
.pad-header__title-popuprow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pad-header__title-textrow a, .pad-header__title-textrow h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  padding: var(--space-xs) var(--space-xl);
  line-height: 1.15;
  white-space: nowrap;
}
.pad-header__title-textrow h1 { margin: 0; }

/* ========== HOME 1 - ARNOLD ========== */
.hero-home__row {
  position: relative;
  width: 100%;
  min-height: 100svh;
  min-height: 100dvh;
  overflow-x: clip;
  overflow-y: visible;
}
.hero-home__rows { position: relative; width: 100%; overflow: visible; }
.logo__row {
  position: relative;
  width: 100%;
  min-height: 85svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--space-md);
  background: transparent;
}
.logo__img {
  width: min(380px, 85vw);
  height: min(380px, 85vw);
  background: url("../images/home-1/logo.png") center/contain no-repeat;
  margin: 0 auto;
}

/* Footer block: top padding so arrow + skills sit below fixed header when in view */
.hero__footerbox {
  position: relative;
  z-index: 1;
  background: var(--bg-section);
  padding: 60px 0 var(--space-2xl);
  border-top: 1px solid var(--border);
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  overflow-y: visible;
}
.hero__footerbox .container {
  position: relative;
  z-index: 1;
  padding-top: var(--space-lg);
}

/* Down arrow: center on top edge of footerbox, half above / half below; stays above inner content */
.hero__arrow-row {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  z-index: 20;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-hover);
  border: 2px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}
.hero__arrow-row:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 6px 20px rgba(224,122,95,0.3);
}
.hero__arrow { width: 24px; height: 24px; }
.hero__arrow svg path { fill: var(--text); transition: fill var(--ease); }
.hero__arrow-row:hover .hero__arrow svg path { fill: var(--white); }

/* Skill row: large = full-width grid; medium/small = flex wrap (left only on small) */
.hero-footer__section-rows { max-width: 100%; overflow-x: clip; overflow-y: visible; }
.hero-footer__skill-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: var(--space-sm);
  width: 100%;
  max-width: 100%;
  margin: 0 0 var(--space-xl);
  box-sizing: border-box;
}
.hero-footer__skill {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  max-width: 52px;
  margin: 0 auto;
  width: 100%;
  border-radius: var(--radius-md);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 var(--decor-ice);
  transition:
    background var(--ease),
    border-color var(--ease),
    box-shadow var(--ease);
}
.hero-footer__skill:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 22px rgba(224, 122, 95, 0.28);
}
.hero-footer__skill svg { width: 100%; height: 100%; max-width: 28px; max-height: 28px; }
.hero-footer__skill svg path { fill: var(--text-muted); transition: fill var(--ease); }
.hero-footer__skill:hover svg path { fill: var(--white); }

/* Connect block: same width as content, no overflow */
.hero-footer__connect-row { max-width: 100%; overflow-x: clip; overflow-y: visible; }
.hero-footer__text-title { margin-bottom: var(--space-lg); }

.hero-footer__text-titlerow { display: flex; align-items: center; gap: var(--space-lg); justify-content: center; }
.hero-footer__text-titlerow hr { flex: 1; max-width: 80px; border: 0; height: 2px; background: var(--border); }
.hero-footer__text-toptitle h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text);
}
.hero-footer__information-row.row { margin-left: 0; margin-right: 0; max-width: 100%; }
.hero-footer__information-row,
.hero2-footer__information-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
  max-width: 100%;
}
.hero-footer__information-row > *,
.hero2-footer__information-row > * { min-width: 0; }
@media (min-width: 768px) {
  .hero-footer__information-row,
  .hero2-footer__information-row {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-lg);
  }
  .hero-footer__information-row > [class*="col-"],
  .hero2-footer__information-row > [class*="col-"] {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
  }
  .hero-footer__information-row > [class*="col-"]:first-child,
  .hero2-footer__information-row > [class*="col-"]:first-child {
    flex: 0 0 22%;
    max-width: 22%;
  }
  .hero-footer__information-row > [class*="col-"]:nth-child(2),
  .hero2-footer__information-row > [class*="col-"]:nth-child(2) {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 42%;
  }
  .hero-footer__information-row > [class*="col-"]:last-child,
  .hero2-footer__information-row > [class*="col-"]:last-child {
    flex: 0 0 30%;
    max-width: 30%;
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  .hero-footer__information-row > [class*="col-"]:last-child,
  .hero2-footer__information-row > [class*="col-"]:last-child {
    flex: 1 1 32%;
    max-width: 38%;
    min-width: 0;
  }
}
.hero-footer__information-intab a,
.hero-footer__information-call a,
.hero2-footer__information-intab a,
.hero2-footer__information-call a {
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
}
.hero-footer__information-call h4,
.hero2-footer__information-call h4 { white-space: nowrap; }
.hero-footer__information-intab a:hover h4,
.hero-footer__information-call a:hover h4,
.hero2-footer__information-intab a:hover h4,
.hero2-footer__information-call a:hover h4 { color: var(--accent); }
.hero-footer__information-call p,
.hero2-footer__information-call p { color: var(--text-muted); font-size: 0.875rem; margin-bottom: var(--space-xs); }
.hero-footer__information-call h4,
.hero2-footer__information-call h4 { font-size: 1rem; font-weight: 500; }
.hero-footer__information-icons,
.hero2-footer__information-icons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  row-gap: var(--space-sm);
  justify-content: flex-start;
  align-content: flex-start;
  align-items: center;
  max-width: 100%;
}
.hero-footer__information-icon,
.hero2-footer__information-icon {
  width: 44px; height: 44px;
  min-width: 44px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  transition: background var(--ease), border-color var(--ease);
}
.hero-footer__information-icon:hover,
.hero2-footer__information-icon:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.hero-footer__information-icon svg,
.hero2-footer__information-icon svg { width: 22px; height: 22px; }
.hero-footer__information-icon svg path,
.hero2-footer__information-icon svg path { fill: var(--text-muted); transition: fill var(--ease); }
.hero-footer__information-icon:hover svg path,
.hero2-footer__information-icon:hover svg path { fill: var(--white); }
.hero-footer__web-version { margin-top: var(--space-xl); text-align: right; }
.hero-footer__web-version a { font-size: 0.8125rem; color: var(--text-muted); }
.hero-footer__web-version a:hover p { color: var(--accent); }
#connect,
#hero-footer__connect,
#hero2-footer__web-version { scroll-margin-top: 60px; }

.hero-home__footer {
  position: relative;
  background: var(--light-bg);
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 8px var(--space-xl);
}
.hero-home__footer-row { text-align: center; }
.hero-home__footer-row p { font-size: 0.8125rem; color: var(--text-on-light); }

/* ========== HOME 2 - OVERVIEW ========== */
.hero-home-2__row {
  position: relative;
  width: 100%;
  min-height: 100svh;
  min-height: 100dvh;
  overflow-x: clip;
  overflow-y: visible;
}
.hero-home-2__rows { position: relative; width: 100%; }
.logo-2__row {
  position: relative;
  width: 100%;
  padding: var(--space-lg) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  background: transparent;
}
.logo-2__img {
  position: relative;
  z-index: 1;
  width: min(480px, 90vw);
  height: 120px;
  background: url("../images/home-2/logo_2.png") center/contain no-repeat;
}
.hero-2__areasbox,
.hero-2__graphicbox,
.hero-2__animationbox,
.hero-2__introductionbox {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}
.hero-2__areasbox,
.hero-2__animationbox {
  position: relative;
  background: var(--bg-section);
}
.hero-2__graphicbox {
  position: relative;
  padding-top: var(--space-2xl);
  background: transparent;
}
.hero-2__graphicbox .hero-2__graphic-text h4 {
  color: var(--text-on-light);
}
.hero-2__areas-text h4,
.hero-2__graphic-text h4,
.hero-2__animation-text h4,
.hero-2__introduction-text h4 {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: var(--space-sm);
  position: relative;
  display: inline-block;
  /* Tight gap so the rule sits almost flush under the title */
  padding-bottom: 0.1em;
}
/* Overview section titles: accent gradient underline (connect block is h2, not targeted) */
.hero-2__areas-text h4::after,
.hero-2__graphic-text h4::after,
.hero-2__animation-text h4::after,
.hero-2__introduction-text h4::after {
  content: "";
  position: absolute;
  left: 0;
  right: auto;
  bottom: 0;
  width: calc(100% + 2rem);
  height: 3px;
  border-radius: var(--radius-full);
  background: linear-gradient(
    90deg,
    var(--decor-accent) 0%,
    var(--decor-accent-mid) 50%,
    var(--decor-accent-strong) 100%
  );
  opacity: 0.9;
  box-shadow: 0 4px 12px rgba(224, 122, 95, 0.2);
  pointer-events: none;
}
/* Tighter gap: title to content below */
.hero-2__areas-icons,
.hero-2__graphic-text .owl-carousel-a,
.hero-2__animation-text .owl-carousel-b {
  margin-top: var(--space-md);
}
.hero-2__graphic-text .owl-carousel-a {
  margin-top: var(--space-lg);
  margin-bottom: 0;
}
.hero-2__animation-text .owl-carousel-b {
  margin-bottom: 0;
}
.hero-2__graphic-buttonrow,
.hero-2__animation-buttonrow,
.hero-2__introduction-buttonrow {
  margin-top: var(--space-2xl);
}
.hero-2__graphic-buttons,
.hero-2__animation-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.hero-2__introduction-buttonrow {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
}
.hero-2__introduction-buttonrow .hero-2__introduction-buttons {
  margin-top: 0;
}
.hero-2__areas-icons {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  /* Left-align inside container inset; desktop row uses space-evenly below */
  justify-content: flex-start;
  align-content: flex-start;
  gap: var(--space-lg);
  width: 100%;
  box-sizing: border-box;
}
.hero-2__areas-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm);
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}
.hero-2__areas-icon:hover { background: var(--accent); border-color: var(--accent); transform: scale(1.05); }
.hero-2__areas-icon svg { width: 32px; height: 32px; }
.hero-2__areas-icon svg path { fill: var(--text-muted); transition: fill var(--ease); }
.hero-2__areas-icon:hover svg path { fill: var(--white); }

.hero-2__box {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}
.hero-2__rowbox:hover .hero-2__box { border-color: var(--accent); transform: translateY(-2px); }
/* Graphic Work: card background near white only, section stays dark */
.hero-2__graphicbox .hero-2__box {
  background: var(--graphic-bg);
  border-color: rgba(0,0,0,0.08);
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}
.hero-2__graphicbox .hero-2__rowbox:hover .hero-2__box {
  background: var(--graphic-bg-hover);
  border-color: transparent;
}
/* Graphic Work + animation work: no upward shift on hover, stay in place */
.hero-2__graphicbox .hero-2__rowbox:hover .hero-2__box,
.hero-2__animationbox .hero-2__rowbox:hover .hero-2__box {
  transform: none;
}
.hero-2__image { width: 100%; height: auto; display: block; }
.hero-2__graphic-button,
.hero-2__animation-button,
.hero-2__introduction-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-md);
  min-height: 44px;
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}
.hero-2__graphic-button,
.hero-2__introduction-button { background: var(--accent); color: var(--white); border: 2px solid var(--accent); }
.hero-2__graphic-button:hover,
.hero-2__introduction-button:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-2px); }
.hero-2__animation-button { background: var(--surface-hover); color: var(--text); border: 2px solid var(--border); }
.hero-2__animation-button:hover { background: var(--accent); border-color: var(--accent); color: var(--white); transform: translateY(-2px); }
/* Introduction copy: soft frosted panel (matches decor, stays light/subtle) */
.hero-2__introduction-smalltext {
  margin-top: var(--space-md);
  max-width: 64ch;
  padding: clamp(1.125rem, 3.5vw, 1.75rem) clamp(1rem, 3vw, 1.5rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.28) 55%,
    rgba(224, 122, 95, 0.06) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 10px 36px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.hero-2__introduction-smalltext p { font-size: 1rem; line-height: 1.75; color: var(--text-muted); }
.hero-2__introductionbox {
  position: relative;
  background: transparent;
}
.hero-2__introductionbox .hero-2__introduction-text h4 {
  color: var(--text-on-light);
}
.hero-2__introductionbox .hero-2__introduction-smalltext p {
  color: var(--text-muted-on-light);
}

.hero2__footerbox {
  position: relative;
  background: var(--bg-section);
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border);
  width: 100%;
  max-width: 100%;
}
.hero2-footer__section-rows { max-width: 100%; overflow-x: hidden; }
.hero2-footer__connect-row { max-width: 100%; overflow-x: hidden; }
.hero2-footer__text-title { margin-bottom: var(--space-lg); }
.hero2-footer__text-titlerow { display: flex; align-items: center; gap: var(--space-lg); justify-content: center; }
.hero2-footer__text-titlerow hr { flex: 1; max-width: 80px; border: 0; height: 2px; background: var(--border); }
.hero2-footer__text-toptitle h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text);
}
.hero2-footer__web-version { margin-top: var(--space-xl); text-align: right; }
.hero2-footer__web-version a { font-size: 0.8125rem; color: var(--text-muted); }
.hero2-footer__web-version a:hover p { color: var(--accent); }
.hero2-home__footer { background: var(--light-bg); border-top: 1px solid rgba(0,0,0,0.08); padding: 8px var(--space-xl); }
.hero2-home__footer-row { text-align: center; }
.hero2-home__footer-row p { font-size: 0.8125rem; color: var(--text-on-light); }

/* Owl Carousel overrides */
.owl-carousel-a .owl-prev, .owl-carousel-b .owl-prev,
.owl-carousel-a .owl-next, .owl-carousel-b .owl-next {
  background: var(--surface-hover) !important;
  border: 1px solid var(--border);
  border-radius: 50%;
}
.owl-carousel-a .owl-prev:hover, .owl-carousel-b .owl-prev:hover,
.owl-carousel-a .owl-next:hover, .owl-carousel-b .owl-next:hover {
  background: var(--accent) !important;
  border-color: var(--accent);
}
.fancybox-navigation, .fancybox-navigation .fancybox-button { display: none !important; }

/* i18n */
[data-translate] { transition: opacity 0.3s ease; }
.translating [data-translate] { opacity: 0.6; }
[data-lang="zh"] .hero-2__introduction-smalltext p { font-weight: 500; font-size: 1rem; line-height: 2; }
[data-lang="en"] .hero-2__introduction-smalltext p { font-weight: 500; font-size: 1rem; line-height: 1.75; }
.language a { cursor: pointer; }

/* Accessibility */
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ========== RWD ========== */
@media (min-width: 992px) {
  .hero-2__areas-icons {
    justify-content: space-evenly;
    align-content: center;
    gap: var(--space-md) var(--space-lg);
  }
  .hero-footer__skill-row {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
  }
  .hero-footer__skill {
    margin: 0 auto;
  }
}
@media (max-width: 991px) {
  .header__title-textrow a { padding: 8px 14px; font-size: 12px; }
  .hero-footer__information-icons,
  .hero2-footer__information-icons {
    gap: var(--space-xs) var(--space-sm);
    row-gap: var(--space-xs);
  }
  /* Same as large screens: one row of 8 skill icons, full width */
  .hero-footer__skill-row {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    gap: var(--space-xs) var(--space-sm);
    margin-bottom: var(--space-lg);
    box-sizing: border-box;
  }
  .hero-footer__skill {
    margin: 0 auto;
    width: 100%;
    max-width: 52px;
    justify-self: center;
  }
  .hero-2__areas-icons {
    width: 100%;
    max-width: 100%;
    gap: var(--space-md) var(--space-lg);
    row-gap: var(--space-md);
    box-sizing: border-box;
  }
}
@media (min-width: 768px) {
  .pad-header__title-top { display: none; }
}
@media (max-width: 767px) {
  html {
    scroll-padding-top: calc(var(--header-h-mobile) + env(safe-area-inset-top, 0px));
  }
  .hero-footer__skill {
    max-width: 56px;
    padding: var(--space-sm);
  }
  .hero-footer__skill svg { max-width: 26px; max-height: 26px; }
  .header { min-height: calc(var(--header-h-mobile) + env(safe-area-inset-top, 0px)); }
  .header__title {
    justify-content: flex-end;
    min-height: var(--header-h-mobile);
  }
  .header__title .container {
    justify-content: flex-end;
    width: 100%;
  }
  .hero-footer__information-icons,
  .hero2-footer__information-icons {
    justify-content: flex-start;
    gap: var(--space-sm);
    row-gap: var(--space-sm);
  }
  .header__title-top { display: none; }
  .pad-header__title-top { display: flex; justify-content: flex-end; align-items: center; width: 100%; visibility: visible; opacity: 1; }
  .hero__footerbox { padding-top: 60px; }
  .logo__row { padding-top: var(--space-xl); min-height: 70svh; }
  .logo__img { width: min(260px, 78vw); height: min(260px, 78vw); }
  .logo-2__row { padding-top: var(--space-lg); min-height: 200px; }
  .logo-2__img { width: min(320px, 88vw); height: 80px; }
  .hero-footer__text-toptitle h2,
  .hero2-footer__text-toptitle h2 { font-size: 1.125rem; }
  .hero-2__graphic-button, .hero-2__animation-button, .hero-2__introduction-button { padding: 12px 20px; font-size: 0.875rem; }
  .hero-home__footer-row p,
  .hero2-home__footer-row p { font-size: 0.75rem; }
  .pad-header__title-textrow a, .pad-header__title-textrow h1 { font-size: 1.125rem; padding: var(--space-xs) var(--space-lg); }
}

/* Arc mobile only: add a fixed top paint mask to hide transient bg exposure during scroll */
@media (max-width: 767px) {
  html.is-arc-mobile .main::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--header-h-mobile) + env(safe-area-inset-top, 0px) + 44px);
    background: var(--surface);
    pointer-events: none;
    z-index: 9998;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
}

/* iPhone Safari only: force fixed header compositor path to reduce sticky jitter */
@supports (-webkit-touch-callout: none) {
  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
  .main {
    padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  }
  @media (max-width: 767px) {
    .main {
      padding-top: calc(var(--header-h-mobile) + env(safe-area-inset-top, 0px));
    }
  }
}
@media (max-width: 575px) {
  .logo__img { width: min(220px, 72vw); height: min(220px, 72vw); }
  .logo-2__img { width: min(280px, 85vw); height: 70px; }
  .hero-footer__skill-row { gap: var(--space-xs); }
  .hero-footer__skill { max-width: 48px; padding: 6px; }
  .hero-footer__skill svg { max-width: 22px; max-height: 22px; }
  .hero-footer__information-icon,
  .hero2-footer__information-icon { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }
}
@media (max-width: 380px) {
  .hero-footer__skill-row { gap: var(--space-xs); }
  .hero-footer__skill { max-width: 44px; }
  .hero-footer__skill svg { max-width: 20px; max-height: 20px; }
}
/* Skill row: inset, wrap to multiple rows, each row starts from the left; keep icon size (no 575/380 shrink) */
@media (max-width: 425px) {
  .hero-footer__skill-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: flex-start;
    align-items: flex-start;
    gap: var(--space-xs) var(--space-sm);
    row-gap: var(--space-xs);
    padding-inline: var(--space-md);
    box-sizing: border-box;
  }
  .hero-footer__skill-row > .hero-footer__skill {
    flex: 0 0 auto;
    width: 56px;
    max-width: 56px;
    min-width: 56px;
    margin: 0;
    padding: var(--space-sm);
  }
  .hero-footer__skill-row > .hero-footer__skill svg {
    max-width: 26px;
    max-height: 26px;
  }
}
/* Skill row only: step down icon size on very narrow viewports */
@media (max-width: 375px) {
  .hero-footer__skill-row > .hero-footer__skill {
    width: 50px;
    max-width: 50px;
    min-width: 50px;
    padding: 6px;
  }
  .hero-footer__skill-row > .hero-footer__skill svg {
    max-width: 24px;
    max-height: 24px;
  }
}
@media (max-width: 320px) {
  .hero-footer__skill-row > .hero-footer__skill {
    width: 44px;
    max-width: 44px;
    min-width: 44px;
    padding: 6px;
  }
  .hero-footer__skill-row > .hero-footer__skill svg {
    max-width: 22px;
    max-height: 22px;
  }
}

/* --------------------------------------------------------------------------
   Modern decor: soft surfaces + chunky rounded shapes (no hairline rules)
   Pointer-events none on overlays; .main > .section keeps content above back layers.
   -------------------------------------------------------------------------- */
.wapper::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 100% at 0% 0%, var(--decor-accent-soft) 0%, transparent 55%),
    radial-gradient(ellipse 100% 80% at 100% 100%, rgba(224, 122, 95, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 50% 30%, var(--decor-ice) 0%, transparent 60%);
  animation: none;
}

.wapper::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(255, 255, 255, 0.06) 0%,
    transparent 42%
  );
}

@keyframes site-decor-glow {
  from { opacity: 0.88; filter: saturate(1); }
  to { opacity: 1; filter: saturate(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .wapper::before {
    animation: none;
  }
}

/* Keep disabled on mobile and desktop to avoid repaint pressure while scrolling */

/* Header: chunky rounded accent bar (not a hairline) */
.header__title::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 0;
  height: var(--decor-bar);
  pointer-events: none;
  border-radius: 0 0 var(--decor-radius-chunky) var(--decor-radius-chunky);
  background: linear-gradient(
    90deg,
    transparent,
    var(--decor-accent-mid) 35%,
    var(--decor-accent-strong) 50%,
    var(--decor-accent-mid) 65%,
    transparent
  );
  opacity: 0.75;
}

.main > .section {
  position: relative;
  z-index: 1;
}

.section > .hero-home {
  position: relative;
  z-index: 1;
}

.hero-home {
  position: relative;
}

/* Logo bands: large soft glow only */
.logo__row::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(104%, 420px);
  height: min(104vw, 420px);
  max-height: 85vh;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    circle,
    var(--decor-accent-soft) 0%,
    transparent 68%
  );
}
.logo__img {
  position: relative;
  z-index: 1;
}

/* Footer blocks: short rounded accent bars */
.hero__footerbox::before,
.hero2__footerbox::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28%;
  right: 28%;
  height: var(--decor-bar);
  pointer-events: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: linear-gradient(
    90deg,
    transparent,
    var(--decor-accent-mid),
    var(--decor-accent-strong),
    var(--decor-accent-mid),
    transparent
  );
  opacity: 0.65;
}

/* Soft blobs behind main scroll area */
.body-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 50% 40% at 15% 20%, var(--decor-accent-soft) 0%, transparent 58%),
    radial-gradient(ellipse 45% 35% at 90% 15%, var(--decor-ice-strong) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 80% 90%, rgba(224, 122, 95, 0.1) 0%, transparent 58%);
  opacity: 0.9;
}

/* Connect headings: pill marker under title */
.hero-footer__text-toptitle h2,
.hero2-footer__text-toptitle h2 {
  position: relative;
  display: inline-block;
}
.hero-footer__text-toptitle h2::after,
.hero2-footer__text-toptitle h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.55em;
  transform: translateX(-50%);
  width: 56px;
  height: var(--decor-bar);
  border-radius: var(--radius-full);
  pointer-events: none;
  background: var(--decor-accent);
  opacity: 0.82;
  box-shadow: 0 6px 20px rgba(224, 122, 95, 0.25);
}

/* Section dividers beside title: soft rounded bars */
.hero-footer__text-titlerow hr,
.hero2-footer__text-titlerow hr {
  height: var(--decor-bar);
  max-width: 88px;
  border: 0;
  border-radius: var(--radius-full);
  background: linear-gradient(
    90deg,
    transparent,
    var(--decor-ice-strong) 45%,
    var(--decor-ice) 100%
  );
  opacity: 0.95;
}

/* Arrow control: soft glow only */
.hero__arrow-row::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: var(--radius-full);
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(
    circle,
    var(--decor-accent-soft) 0%,
    transparent 62%
  );
  opacity: 0.95;
}

.logo-2__row::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 520px);
  height: min(200px, 28vh);
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    var(--decor-accent-soft) 0%,
    transparent 72%
  );
}

/* Dark overview strips: bottom rounded bar */
.hero-2__areasbox::after,
.hero-2__animationbox::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 0;
  height: var(--decor-bar);
  pointer-events: none;
  border-radius: var(--radius-full);
  background: linear-gradient(
    90deg,
    transparent,
    var(--decor-ice-strong) 40%,
    var(--decor-ice) 100%
  );
  opacity: 0.55;
}

/* Light panels: left accent block (not full-width hairline) */
.hero-2__graphicbox::before,
.hero-2__introductionbox::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: min(42%, 200px);
  height: var(--decor-bar);
  pointer-events: none;
  border-radius: 0 0 var(--decor-radius-chunky) 0;
  background: linear-gradient(
    90deg,
    var(--decor-accent) 0%,
    var(--decor-accent-mid) 85%,
    transparent 100%
  );
  opacity: 0.75;
}

/* Media cards: centered chunky top cap */
.hero-2__box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: var(--decor-bar);
  pointer-events: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: linear-gradient(
    90deg,
    transparent,
    var(--decor-ice-strong) 25%,
    var(--decor-accent-mid) 50%,
    var(--decor-ice-strong) 75%,
    transparent
  );
  opacity: 0.75;
}

/* Icon cluster: soft tinted panel */
.hero-2__areas-icons::before {
  content: "";
  position: absolute;
  inset: -10px;
  z-index: 0;
  pointer-events: none;
  border-radius: var(--radius-lg);
  background: linear-gradient(
    145deg,
    var(--decor-accent-soft) 0%,
    transparent 55%
  );
  opacity: 0.85;
}
.hero-2__areas-icons > * {
  position: relative;
  z-index: 1;
}

/* Copyright strip: short dark rounded bar */
.hero-home__footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 32%;
  right: 32%;
  height: var(--decor-bar);
  pointer-events: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 0, 0, 0.14) 50%,
    transparent
  );
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  .hero__arrow-row::after {
    opacity: 0.75;
  }
}
