/* ==========================================================
   GiaHao One — Apple / Google inspired design system
   ========================================================== */
:root {
  --bg: #ffffff;
  --gray: #f5f5f7;
  --gray-2: #e8e8ed;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --link: #0066cc;
  --dark: #000000;
  --dark-card: #1d1d1f;
  --radius-lg: 28px;
  --radius: 18px;
  --ease: cubic-bezier(.28, .11, .32, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --nav-h: 52px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  font-size: 17px; line-height: 1.47; letter-spacing: -.022em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, p { margin: 0; }

.wrap { width: min(1080px, 100% - 44px); margin-inline: auto; }
.section { padding: clamp(80px, 12vw, 140px) 0; }
.section--gray { background: var(--gray); }
.section--dark { background: var(--dark); color: #f5f5f7; }
.section__head { margin-bottom: clamp(40px, 6vw, 64px); }
.section__head--center { text-align: center; max-width: 760px; margin-inline: auto; margin-bottom: clamp(48px, 7vw, 80px); }

.eyebrow { font-size: 21px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; letter-spacing: .009em; }
.section--dark .eyebrow { color: #86868b; }
.headline { font-size: clamp(32px, 5vw, 48px); font-weight: 700; letter-spacing: -.015em; line-height: 1.08; }
.display { font-size: clamp(40px, 7vw, 80px); font-weight: 700; letter-spacing: -.025em; line-height: 1.05; }
.lead { font-size: clamp(19px, 2.2vw, 24px); color: var(--text-2); line-height: 1.38; font-weight: 500; margin-top: 16px; letter-spacing: .005em; }
.section--dark .lead { color: #a1a1a6; }
.section__head .lead { max-width: 640px; }
.section__head--center .lead { margin-inline: auto; }

/* ---------- Buttons & links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border-radius: 980px; font-size: 17px; font-weight: 500; transition: background .2s, transform .2s; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-hover); }
.btn--primary:active { transform: scale(.97); }
.btn--secondary { border: 1px solid var(--blue); color: var(--blue); }
.btn--secondary:hover { background: var(--blue); color: #fff; }
.link-chevron { color: var(--link); font-size: 17px; display: inline-flex; align-items: center; gap: 2px; }
.link-chevron::after { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-top: 1.6px solid currentColor; transform: rotate(45deg); margin-left: 6px; transition: transform .2s; }
.link-chevron:hover { text-decoration: underline; }
.link-chevron:hover::after { transform: translateX(3px) rotate(45deg); }
.link-chevron--light { color: #fff; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 100; height: var(--nav-h); background: rgba(255, 255, 255, .72); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); transition: box-shadow .3s; }
.nav.is-scrolled { box-shadow: 0 1px 0 rgba(0, 0, 0, .08); }
.nav__inner { width: min(1080px, 100% - 44px); margin-inline: auto; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 19px; letter-spacing: -.02em; }
.wordmark svg { width: 22px; height: 22px; }
.wordmark--sm { font-size: 17px; }
.nav__links { display: flex; gap: 32px; }
.nav__links a { font-size: 13px; color: rgba(0, 0, 0, .8); transition: color .2s; letter-spacing: -.01em; }
.nav__links a:hover, .nav__links a.is-active { color: #000; }
.nav__links a.is-active { font-weight: 600; }
.nav__right { display: flex; align-items: center; gap: 8px; }

.lang { position: relative; }
.lang__btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 7px 12px; border-radius: 980px; color: rgba(0, 0, 0, .8); transition: background .2s; }
.lang__btn:hover { background: rgba(0, 0, 0, .05); }
.lang__menu { position: absolute; right: 0; top: calc(100% + 8px); list-style: none; margin: 0; padding: 6px; min-width: 170px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, .14), 0 0 0 1px rgba(0, 0, 0, .04); opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none; transition: opacity .2s, transform .2s var(--ease); }
.lang.is-open .lang__menu { opacity: 1; transform: none; pointer-events: auto; }
.lang__menu button { width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px; font-size: 14px; display: flex; justify-content: space-between; }
.lang__menu button:hover { background: var(--gray); }
.lang__menu button[aria-selected="true"]::after { content: "✓"; color: var(--blue); }

.burger { display: none; width: 36px; height: 36px; position: relative; }
.burger span { position: absolute; left: 10px; width: 16px; height: 1.5px; background: #1d1d1f; transition: transform .3s var(--ease); }
.burger span:first-child { top: 14px; }
.burger span:last-child { top: 21px; }
.burger.is-open span:first-child { transform: translateY(3.5px) rotate(45deg); }
.burger.is-open span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: clamp(48px, 8vw, 88px) 22px 56px; overflow: hidden; }
.hero__eyebrow { font-size: clamp(17px, 2vw, 21px); font-weight: 600; color: #bf4800; margin-bottom: 8px; }
.hero__title { font-size: clamp(56px, 12vw, 128px); font-weight: 700; letter-spacing: -.04em; line-height: 1; background: linear-gradient(180deg, #1d1d1f 30%, #4a4a4f); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.hero__sub { font-size: clamp(21px, 2.8vw, 28px); font-weight: 500; color: var(--text); margin: 14px auto 0; max-width: 680px; line-height: 1.25; letter-spacing: .004em; }
.hero__cta { display: flex; justify-content: center; align-items: center; gap: 28px; margin-top: 28px; flex-wrap: wrap; }

.stage { position: relative; width: min(900px, 100%); height: clamp(360px, 55vw, 620px); margin: 12px auto 0; cursor: grab; touch-action: pan-y; }
.stage:active { cursor: grabbing; }
.stage canvas { width: 100%; height: 100%; display: block; }
.stage__fallback { position: absolute; inset: 0; display: none; place-items: center; }
.stage__fallback img { max-height: 100%; width: auto; mix-blend-mode: multiply; }
.stage.is-fallback canvas { display: none; }
.stage.is-fallback .stage__fallback { display: grid; }

.swatchbar { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.swatchbar__dots { display: flex; gap: 14px; }
.swatchbar__dots button { width: 26px; height: 26px; border-radius: 50%; position: relative; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); transition: transform .2s; }
.swatchbar__dots button::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid transparent; transition: border-color .2s; }
.swatchbar__dots button.is-active::after { border-color: var(--blue); }
.swatchbar__dots button:hover { transform: scale(1.1); }
.swatchbar__label { font-size: 14px; color: var(--text-2); }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 300px; gap: 16px; margin-top: 40px; }
.bento__tile { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--gray); cursor: pointer; text-align: left; display: flex; flex-direction: column; isolation: isolate; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.bento__tile:hover { transform: scale(1.012); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .25); }
.bento__tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform 1.2s var(--ease); }
.bento__tile:hover img { transform: scale(1.05); }
.bento__text { padding: 28px 30px; }
.bento__text h3 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; letter-spacing: -.015em; line-height: 1.12; }
.bento__text p { font-size: 15px; color: var(--text-2); margin-top: 6px; max-width: 320px; }
.bento__tile--a { grid-column: span 4; grid-row: span 2; }
.bento__tile--a .bento__text h3 { font-size: clamp(28px, 3.6vw, 40px); }
.bento__tile--b { grid-column: span 2; grid-row: span 1; }
.bento__tile--c { grid-column: span 2; grid-row: span 1; }
.bento__tile--d { grid-column: span 3; }
.bento__tile--e { grid-column: span 3; }
.bento__tile--d img, .bento__tile--e img { left: auto; width: 58%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); }
.bento__tile--d .bento__text, .bento__tile--e .bento__text { max-width: 50%; margin-top: auto; }
.bento__tile--a img { object-position: center 65%; }
.bento__tile--a .bento__text { text-align: center; align-self: center; }
.bento__tile--a .bento__text p { margin-inline: auto; }
.bento__tile--b .bento__text, .bento__tile--c .bento__text { padding: 22px 24px; }
.bento__tile--b h3, .bento__tile--c h3 { font-size: 21px !important; }
.bento__tile--b p, .bento__tile--c p { display: none; }

/* ---------- Segmented control ---------- */
.segmented { position: relative; display: inline-flex; padding: 3px; background: var(--gray-2); border-radius: 980px; margin-bottom: 40px; }
.segmented button { position: relative; z-index: 1; padding: 8px 20px; font-size: 14px; font-weight: 500; border-radius: 980px; color: var(--text-2); transition: color .25s; }
.segmented button.is-active { color: var(--text); }
.segmented__pill { position: absolute; top: 3px; bottom: 3px; left: 0; border-radius: 980px; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .04); transition: transform .4s var(--ease), width .4s var(--ease); }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; text-align: left; cursor: pointer; display: flex; flex-direction: column; transition: transform .5s var(--ease), box-shadow .5s var(--ease), opacity .4s; box-shadow: 2px 4px 12px rgba(0, 0, 0, .04); }
.card:hover { transform: translateY(-4px) scale(1.01); box-shadow: 2px 12px 32px rgba(0, 0, 0, .1); }
.card[hidden] { display: none; }
.card.is-in { animation: cardIn .6s var(--ease) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(24px); } }
.card__media { aspect-ratio: 1; background: var(--gray); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: 22px 26px 26px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card__tag { font-size: 12px; font-weight: 600; color: #bf4800; letter-spacing: .01em; }
.card__tag--wood { color: #8a5a2b; }
.card__tag--multi { background: linear-gradient(90deg, #e3462c, #f5a623, #2f9e44, #1c7ed6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card__body h3 { font-size: 21px; font-weight: 700; letter-spacing: -.012em; }
.card__body p { font-size: 15px; color: var(--text-2); flex: 1; }
.card__dots { display: flex; gap: 6px; margin: 12px 0 4px; }
.card__dots span { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.card .link-chevron { font-size: 15px; margin-top: 8px; }
.noimg { background: linear-gradient(135deg, #f5f5f7, #e8e8ed); }
.noimg img { opacity: 0; }

/* ---------- Craft ---------- */
.craft { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.craft__card { background: var(--dark-card); border-radius: var(--radius-lg); padding: 40px 34px 44px; transition: transform .5s var(--ease); }
.craft__card:hover { transform: translateY(-6px); }
.craft__icon { width: 56px; height: 56px; margin-bottom: 28px; }
.craft__icon svg { width: 100%; height: 100%; fill: none; stroke: #ff9f0a; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.craft__icon--multi svg circle:nth-child(1) { stroke: #ff453a; } .craft__icon--multi svg circle:nth-child(2) { stroke: #ffd60a; }
.craft__icon--multi svg circle:nth-child(3) { stroke: #30d158; } .craft__icon--multi svg circle:nth-child(4) { stroke: #0a84ff; }
.craft__icon--wood svg { stroke: #d4a373; }
.craft__label { font-size: 14px; font-weight: 600; color: #86868b; margin-bottom: 4px; }
.craft__card h3 { font-size: 28px; font-weight: 700; letter-spacing: -.015em; margin-bottom: 14px; color: #f5f5f7; }
.craft__card p:last-child { color: #a1a1a6; font-size: 17px; }

/* ---------- Values ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; text-align: center; }
.value svg { width: 52px; height: 52px; fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin: 0 auto 20px; }
.value h3 { font-size: 24px; font-weight: 700; letter-spacing: -.012em; margin-bottom: 10px; }
.value p { color: var(--text-2); max-width: 300px; margin-inline: auto; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tile { background: #fff; border-radius: var(--radius-lg); padding: 36px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
a.tile:hover { transform: scale(1.015); box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .2); }
.tile__icon { margin-bottom: 18px; display: grid; place-items: center; }
.tile__icon--round { width: 48px; height: 48px; border-radius: 50%; background: var(--gray); color: var(--text); }
.tile__k { font-size: 17px; font-weight: 600; color: var(--text-2); }
.tile__v { font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin-bottom: 14px; }
.tile__v--sm { font-size: clamp(20px, 2.2vw, 24px); line-height: 1.3; letter-spacing: -.01em; }
.tile--zalo { background: linear-gradient(135deg, #0068ff, #0a84ff 60%, #3aa0ff); color: #fff; }
.tile--zalo .tile__k { color: rgba(255, 255, 255, .8); }
.tile--map { grid-column: 1 / -1; flex-direction: row; padding: 0; overflow: hidden; align-items: stretch; }
.tile--map .tile__text { padding: 36px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; flex: 0 0 40%; }
.tile--map iframe { flex: 1; border: 0; min-height: 340px; filter: grayscale(.2); }

/* ---------- Footer ---------- */
.footer { background: var(--gray); color: var(--text-2); font-size: 12px; padding: 20px 0 28px; }
.footer__top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid #d2d2d7; color: var(--text); }
.footer__domains { color: var(--text-2); }
.footer__bottom { display: flex; justify-content: space-between; padding-top: 14px; gap: 12px; flex-wrap: wrap; }

/* ---------- Sheet (product modal) ---------- */
.sheet { border: 0; padding: 0; width: min(1000px, 94vw); max-height: 92vh; border-radius: var(--radius-lg); background: #fff; color: var(--text); box-shadow: 0 40px 100px rgba(0, 0, 0, .3); overflow: auto; }
.sheet::backdrop { background: rgba(0, 0, 0, .45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.sheet[open] { animation: sheetIn .5s var(--ease); }
.sheet[open]::backdrop { animation: fade .4s; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(40px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
.sheet__close { position: sticky; top: 16px; float: right; margin: 16px 16px -52px 0; width: 36px; height: 36px; border-radius: 50%; background: rgba(232, 232, 237, .9); display: grid; place-items: center; z-index: 2; color: #6e6e73; transition: background .2s; }
.sheet__close:hover { background: #dcdce1; color: #1d1d1f; }
.sheet__body { display: grid; grid-template-columns: 1.1fr 1fr; }
.sheet__media { background: var(--gray); aspect-ratio: 1; }
.sheet__media img { width: 100%; height: 100%; object-fit: cover; }
.sheet__info { padding: 56px 44px 44px; display: flex; flex-direction: column; }
.sheet__info h2 { font-size: clamp(30px, 3.6vw, 40px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: 4px 0 12px; }
.sheet__info .tagline { font-size: 21px; font-weight: 500; color: var(--text); line-height: 1.3; margin-bottom: 16px; }
.sheet__info .desc { color: var(--text-2); margin-bottom: 24px; }
.specs { margin: 0 0 28px; border-top: 1px solid var(--gray-2); }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--gray-2); font-size: 15px; }
.specs dt { color: var(--text-2); }
.specs dd { margin: 0; font-weight: 500; text-align: right; }
.sheet__actions { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: auto; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 260px; }
  .bento__tile--a { grid-column: span 2; grid-row: span 2; }
  .bento__tile--b, .bento__tile--c { grid-column: span 1; }
  .bento__tile--d, .bento__tile--e { grid-column: span 2; }
  .craft { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .sheet__body { grid-template-columns: 1fr; }
  .sheet__info { padding: 32px 28px 36px; }
}
@media (max-width: 820px) {
  .burger { display: block; }
  .nav__links { position: fixed; top: var(--nav-h); left: 0; right: 0; height: calc(100dvh - var(--nav-h)); flex-direction: column; gap: 0; padding: 20px 44px; background: rgba(255, 255, 255, .97); backdrop-filter: blur(20px); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
  .nav__links.is-open { opacity: 1; visibility: visible; }
  .nav__links a { font-size: 28px; font-weight: 600; padding: 10px 0; color: var(--text); transform: translateY(-8px); transition: transform .4s var(--ease); }
  .nav__links.is-open a { transform: none; }
  .values { grid-template-columns: 1fr; gap: 56px; }
  .contact { grid-template-columns: 1fr; }
  .tile--map { flex-direction: column; }
  .tile--map .tile__text { flex: none; }
  .tile--map iframe { min-height: 280px; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: 320px; }
  .bento__tile--a, .bento__tile--b, .bento__tile--c, .bento__tile--d, .bento__tile--e { grid-column: span 1; grid-row: span 1; }
  .bento__tile--b p, .bento__tile--c p { display: block; }
  .bento__tile--d img, .bento__tile--e img { width: 100%; left: 0; -webkit-mask-image: none; mask-image: none; }
  .bento__tile--d .bento__text, .bento__tile--e .bento__text { max-width: none; margin-top: 0; }
  .grid { grid-template-columns: 1fr; }
  .tile { padding: 28px; }
}
