/* ==========================================================================
   Astra — brand site
   ========================================================================== */

:root {
  --ink: #0e1b3a;          /* deep navy, logo letters on light */
  --night: #0b1530;        /* dark sections */
  --sky: #6a8fbf;          /* orbit ring blue */
  --cream: #f4eee3;        /* logo letters on dark */
  --paper: #f7f5f1;        /* page background */
  --tile: #ebe8e2;         /* product tile background */
  --muted: #5d6578;
  --line: rgba(14, 27, 58, 0.12);

  --radius: 14px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }

h1, h2, h3 {
  margin: 0;
  text-wrap: balance;
  font-stretch: 118%;
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.2rem; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }

/* ---------- Shared bits ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 0.78rem;
  font-weight: 600;
  font-stretch: 115%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow-light { color: var(--sky); }

/* four-point star, echoing the embroidered mark */
.spark {
  width: 12px; height: 12px; flex: none;
  background: var(--sky);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}

.lead { font-size: 1.12rem; color: var(--muted); max-width: 34em; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1b2d5c; }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 0.88rem; }

/* product image tile: multiply blends white photo backgrounds into the tile tone */
.tile {
  position: relative;
  aspect-ratio: 1;
  background: var(--tile);
  border-radius: var(--radius);
  overflow: hidden;
}
.tile img {
  width: 100%; height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-alt { background: #efece6; }
.section-alt .tile { background: #e3dfd7; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(247, 245, 241, 0.86);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}
.brand img { height: 48px; width: auto; }

.nav { display: flex; gap: 30px; margin-left: auto; }
.nav a {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--muted);
  transition: color .2s;
}
.nav a:hover { color: var(--ink); }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px;
  background: var(--sky); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }

/* EN / VI switch */
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.lang-switch button {
  min-width: 38px; height: 30px; padding: 0 10px;
  border: 0; border-radius: 999px;
  background: transparent;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em;
  color: var(--muted);
  transition: background .2s, color .2s;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  position: relative;
}
.menu-toggle span {
  position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink);
  transition: transform .3s var(--ease);
}
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 8vw, 104px); }
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.hero h1 { margin-bottom: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero-media { margin: 0; }
.hero-media .tile img { transition: opacity .35s var(--ease); }
.hero-media .tile img.is-fading { opacity: 0; }
.hero-media figcaption {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 16px;
}
.hero-picks { display: flex; gap: 10px; }
.pick {
  width: 60px; height: 60px; padding: 0;
  border: 1.5px solid transparent;
  border-radius: 10px;
  background: var(--tile);
  overflow: hidden;
  transition: border-color .2s;
}
.pick img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.pick:hover { border-color: var(--line); }
.pick.is-active { border-color: var(--ink); }
.hero-label { font-size: 0.85rem; color: var(--muted); text-align: right; }

/* ---------- Strip ---------- */

.strip { background: var(--night); color: var(--cream); }
.strip-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 32px;
  padding-top: 22px; padding-bottom: 22px;
}
.strip p {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0;
  font-size: 0.82rem; font-weight: 600; font-stretch: 115%;
  letter-spacing: 0.14em; text-transform: uppercase;
}

/* ---------- Collection ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 38px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent;
  font-size: 0.88rem; font-weight: 500;
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px 20px;
}
.grid li[hidden] { display: none; }

.card { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; }
.card .tile img { position: absolute; inset: 0; transition: opacity .45s var(--ease), transform .6s var(--ease); }
.card .img-alt { opacity: 0; }
.card:hover .img-main, .card:focus-visible .img-main { opacity: 0; }
.card:hover .img-alt, .card:focus-visible .img-alt { opacity: 1; }
.card:hover .tile img { transform: scale(1.03); }
.card-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 14px; }
.card-name { font-size: 1.05rem; font-weight: 650; font-stretch: 115%; }
.card-code { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.06em; white-space: nowrap; }
.card-color { margin-top: 2px; font-size: 0.9rem; color: var(--muted); }

.card-swatches { display: flex; gap: 6px; margin-top: 10px; }
.dot {
  width: 16px; height: 16px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
  background: var(--c1);
}
.dot.split { background: linear-gradient(135deg, var(--c1) 50%, var(--c2) 50%); }

/* closing brand tile that fills the last grid slot */
.card-brand .tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 24px; text-align: center;
  background: var(--night); color: var(--cream);
}
.card-brand .tile img { position: static; width: 62%; height: auto; mix-blend-mode: normal; }
.card-brand p { margin: 0; font-size: 0.78rem; font-weight: 600; font-stretch: 115%; letter-spacing: 0.16em; text-transform: uppercase; }

/* ---------- Details ---------- */

.details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.detail h3 { margin: 22px 0 8px; }
.detail p { margin: 0; color: var(--muted); }

/* ---------- Story ---------- */

.story {
  background: var(--night);
  color: var(--cream);
  padding: clamp(72px, 10vw, 128px) 0;
  overflow: hidden;
}
.story-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
}
.story-emblem img { width: 100%; max-width: 460px; border-radius: 50%; margin: 0 auto; }
.story h2 { margin-bottom: 26px; }
.story h2 em { font-style: normal; color: var(--sky); }
.story-copy p { color: rgba(244, 238, 227, 0.78); max-width: 34em; }
.principles {
  list-style: none; margin: clamp(56px, 8vw, 96px) 0 0; padding: 40px 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  border-top: 1px solid rgba(244, 238, 227, 0.14);
}
.principles li { display: grid; gap: 10px; align-content: start; }
.principles h3 { color: var(--cream); }
.principles p { margin: 0; color: rgba(244, 238, 227, 0.7); }
.story-copy .signature {
  margin-top: 30px;
  font-size: 0.82rem; font-weight: 600; font-stretch: 118%;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--cream);
}

/* ---------- Contact ---------- */

.contact {
  display: grid; grid-template-columns: 1.7fr 1fr; gap: 40px; align-items: end;
  padding: clamp(32px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 1.5);
  background: #fff;
}
.contact h2 { margin-bottom: 16px; }
.contact .lead { margin: 0; }
.contact-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.contact-label {
  font-size: 0.78rem; font-weight: 600; font-stretch: 115%;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.contact-email {
  margin-top: -12px;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem); font-weight: 600; font-stretch: 112%;
  text-decoration: none; overflow-wrap: anywhere; user-select: all;
}
.contact-email:hover { color: var(--sky); }
.contact-buttons { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Footer ---------- */

.site-footer { background: var(--night); color: rgba(244, 238, 227, 0.7); padding: 56px 0 40px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.footer-logo { height: 46px; width: auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 26px; }
.site-footer nav a { text-decoration: none; font-size: 0.92rem; }
.site-footer nav a:hover { color: var(--cream); }
.fineprint { width: 100%; margin: 16px 0 0; padding-top: 24px; border-top: 1px solid rgba(244,238,227,.12); font-size: 0.82rem; }

/* ---------- Modal ---------- */

.modal {
  width: min(1040px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: calc(var(--radius) * 1.4);
  background: var(--paper);
  color: var(--ink);
  overflow: auto;
}
.modal::backdrop { background: rgba(11, 21, 48, 0.55); backdrop-filter: blur(4px); }
.modal[open] { animation: modal-in .35s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px); } }

.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: #fff;
  font-size: 1.6rem; line-height: 1;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.modal-body { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; padding: 28px; }
.thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 10px; }
.thumb {
  padding: 0; border: 1.5px solid transparent; border-radius: 8px;
  background: var(--tile); overflow: hidden; aspect-ratio: 1;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.thumb.is-active { border-color: var(--ink); }

.modal-info { padding: 24px 12px 12px 0; align-self: center; }
.modal-info h3 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.modal-color { margin: 6px 0 20px; color: var(--muted); font-weight: 500; }
.modal-info > p:not(.eyebrow):not(.modal-color) { margin: 0 0 22px; }
.modal-info .btn { margin-top: 10px; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.swatches:empty { display: none; }
.swatch {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 0 14px 0 8px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-size: 0.88rem;
}
.swatch.is-active { border-color: var(--ink); }

.specs { display: grid; gap: 0; margin: 0 0 22px; border-top: 1px solid var(--line); }
.specs div {
  display: grid; grid-template-columns: 92px 1fr; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem;
}
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.modal-note { margin: 18px 0 0; font-size: 0.82rem; color: var(--muted); }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; padding: 0; }
.tags li {
  padding: 4px 10px; border-radius: 6px; background: var(--tile);
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .brand img { height: 34px; }
  .header-cta { display: none; }
  .menu-toggle { display: block; margin-left: 4px; }
  .lang-switch { margin-left: auto; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s, transform .25s var(--ease), visibility .25s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 0; font-size: 1.05rem; color: var(--ink); border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }

  .hero-inner, .story-inner, .contact, .modal-body { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 28px 14px; }
  .details, .principles { grid-template-columns: 1fr; gap: 44px; }
  .principles { gap: 28px; }
  .story-emblem img { max-width: 300px; }
  .modal-body { padding: 16px; gap: 8px; }
  .modal-info { padding: 12px 4px 8px; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero-media figcaption { flex-direction: column; align-items: flex-start; }
  .hero-label { text-align: left; }
  .pick { width: 52px; height: 52px; }
  .card-meta { flex-direction: column; gap: 0; }
  .strip-inner { justify-content: flex-start; }
  .thumbs { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Vietnamese headlines run longer and carry stacked diacritics */
html[lang="vi"] h1 { font-size: clamp(2.3rem, 4.8vw, 4rem); line-height: 1.12; }
