/* ==========================================================================
   Anphéra — style.css
   Một file CSS duy nhất. Sửa màu/chữ ở mục 1 (design tokens).
   ========================================================================== */

/* ---------- 0. Fonts (tự lưu trữ, giấy phép SIL OFL trong assets/fonts) ---------- */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/cormorant-garamond-vietnamese-500-normal.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap;
  src: url("../fonts/cormorant-garamond-vietnamese-500-italic.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/be-vietnam-pro-vietnamese-400-normal.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/be-vietnam-pro-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/be-vietnam-pro-vietnamese-500-normal.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/be-vietnam-pro-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- 1. Design tokens ---------- */
:root {
  /* Màu thương hiệu */
  --plum-900: #3a1733;   /* tím mận sâu: nền tối, chữ tiêu đề */
  --plum-700: #5a2850;   /* tím mận: nút, liên kết */
  --plum-500: #80456f;   /* tím mận sáng: hover, viền */
  --lilac-300: #d9c3d6;  /* tím hoa cà */
  --lilac-100: #efe5ee;  /* tím hoa cà nhạt: nền khối */
  --ivory: #f5eee8;      /* nền ngà ấm (trùng nền file logo gốc) */
  --ivory-50: #fbf8f4;   /* nền ngà sáng */
  --champagne: #c6a66b;  /* vàng champagne: chỉ dùng làm nét nhấn */
  --champagne-200: #e8d9b9;

  /* Chữ */
  --ink: #2a1d27;
  --ink-soft: #5e4c59;   /* tương phản ~7:1 trên nền ngà */
  --on-dark: #f7efe9;

  /* Trạng thái nội dung chờ xác nhận */
  --todo-bg: #fff6dc;
  --todo-line: #b7892d;
  --todo-ink: #5c4210;

  /* Chữ */
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  --fs-2xl: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --fs-3xl: clamp(2.4rem, 1.6rem + 3.6vw, 4.25rem);

  /* Khoảng cách */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: clamp(4.5rem, 3rem + 6vw, 8rem);

  --radius: 14px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 40px -24px rgba(58, 23, 51, 0.35);
  --container: 1120px;
  --measure: 38rem;
  --header-h: 68px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--plum-700); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--plum-500); }
:focus-visible { outline: 2px solid var(--plum-700); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--plum-900);
  margin: 0 0 var(--space-2);
  letter-spacing: 0.005em;
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
p { margin: 0 0 var(--space-2); }
ul, ol { padding-left: 1.25rem; margin: 0 0 var(--space-2); }
li + li { margin-top: 0.35rem; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--plum-900); color: var(--on-dark);
  padding: 0.6rem 1rem; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--on-dark); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.narrow { max-width: var(--measure); }
.center { text-align: center; margin-inline: auto; }
.section { padding-block: var(--space-6); position: relative; }
.section--tint { background: var(--lilac-100); }
.section--light { background: var(--ivory-50); }
.section--dark { background: var(--plum-900); color: var(--on-dark); padding-bottom: calc(var(--space-6) + clamp(60px, 8vw, 120px)); }
.section--dark h2, .section--dark h3 { color: var(--on-dark); }

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--plum-500);
  margin-bottom: var(--space-2);
}
.section--dark .eyebrow { color: var(--champagne-200); }
.lead { font-size: var(--fs-lg); color: var(--ink-soft); line-height: 1.7; }
.french {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--plum-700);
}
.rule {
  width: 56px; height: 1px; border: 0; margin: var(--space-3) 0;
  background: linear-gradient(90deg, transparent, var(--champagne), transparent);
}
.center .rule, .rule.center { margin-inline: auto; }

/* ---------- 3. Header & navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ivory); /* trùng màu nền file logo để logo hòa vào nền */
  border-bottom: 1px solid rgba(90, 40, 80, 0.08);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 34px; width: auto; }
.nav-toggle {
  display: none;
  appearance: none; border: 0; background: transparent; color: var(--plum-900);
  width: 44px; height: 44px; border-radius: 10px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-list {
  list-style: none; display: flex; gap: 0.25rem; margin: 0; padding: 0;
}
.nav-list li + li { margin-top: 0; }
.nav-list a {
  display: block; padding: 0.55rem 0.85rem; border-radius: var(--radius-pill);
  color: var(--ink); text-decoration: none; font-size: var(--fs-sm);
}
.nav-list a:hover { background: var(--lilac-100); color: var(--plum-900); }
.nav-list a[aria-current="page"] { color: var(--plum-700); background: var(--lilac-100); }

/* Mobile nav: chỉ thu gọn khi có JS */
@media (max-width: 860px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--ivory-50);
    border-bottom: 1px solid rgba(90, 40, 80, 0.1);
    box-shadow: var(--shadow-soft);
    display: none;
  }
  .js .site-nav.is-open { display: block; }
  .js .nav-list { flex-direction: column; padding: 0.75rem 1.25rem 1.25rem; }
  .js .nav-list a { padding: 0.85rem 1rem; font-size: var(--fs-base); }
  html:not(.js) .site-header__inner { flex-wrap: wrap; padding-block: 0.5rem; }
  html:not(.js) .nav-list { flex-wrap: wrap; }
}

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.75rem 1.6rem;
  border-radius: var(--radius-pill); border: 1px solid transparent;
  font: 500 var(--fs-sm)/1.2 var(--font-body); letter-spacing: 0.04em;
  text-decoration: none; cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.btn--primary { background: var(--plum-700); color: var(--on-dark); }
.btn--primary:hover { background: var(--plum-900); color: var(--on-dark); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--plum-700); border-color: rgba(90, 40, 80, 0.35); }
.btn--ghost:hover { border-color: var(--plum-700); color: var(--plum-900); }
.section--dark .btn--ghost { color: var(--on-dark); border-color: rgba(247, 239, 233, 0.45); }
.section--dark .btn--ghost:hover { border-color: var(--champagne-200); color: #fff; }
.btn[aria-disabled="true"] {
  background: transparent; color: var(--ink-soft);
  border: 1px dashed rgba(90, 40, 80, 0.4); cursor: not-allowed; transform: none;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.center .btn-row { justify-content: center; }

/* ---------- 5. Dải lụa (SVG + CSS, chuyển động chậm) ---------- */
.silk {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0;
}
.silk svg { position: absolute; max-width: none; left: -20%; width: 140%; height: 100%; }
.silk--hero { top: auto; height: clamp(110px, 16vw, 230px); }
.silk--hero svg { bottom: 0; }
.silk--band { top: auto; height: clamp(90px, 12vw, 170px); opacity: .5; }
.silk--band svg { bottom: 0; }
.silk__layer { transform-box: fill-box; transform-origin: 50% 50%; }
.silk__layer--a { animation: silk-drift-a 26s ease-in-out infinite alternate; }
.silk__layer--b { animation: silk-drift-b 34s ease-in-out infinite alternate; opacity: .75; }
.silk__layer--c { animation: silk-drift-c 42s ease-in-out infinite alternate; opacity: .45; }
@keyframes silk-drift-a {
  0%   { transform: translate3d(-2%, 0, 0) rotate(-1deg) scaleY(1); }
  100% { transform: translate3d(3%, -3%, 0) rotate(1.2deg) scaleY(1.08); }
}
@keyframes silk-drift-b {
  0%   { transform: translate3d(3%, 2%, 0) rotate(1deg) scaleY(.95); }
  100% { transform: translate3d(-3%, -1%, 0) rotate(-1.5deg) scaleY(1.06); }
}
@keyframes silk-drift-c {
  0%   { transform: translate3d(-1%, -2%, 0) rotate(0deg); }
  100% { transform: translate3d(2%, 2%, 0) rotate(2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .silk__layer { animation: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- 6. Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) calc(clamp(110px, 16vw, 230px) + 1.5rem);
  background: var(--ivory);
  text-align: center;
}
.hero > .container { position: relative; z-index: 1; }
.hero__logo {
  width: min(78vw, 440px); margin: 0 auto var(--space-3);

}
.hero__lead { max-width: 34rem; margin: 0 auto var(--space-4); color: var(--ink-soft); font-size: var(--fs-lg); }
.hero .btn-row { justify-content: center; }

.page-hero {
  position: relative; overflow: hidden;
  padding-block: clamp(3rem, 2rem + 5vw, 6rem) clamp(4rem, 3rem + 5vw, 7rem);
  background: var(--ivory);
}
.page-hero:has(.silk) { padding-bottom: calc(clamp(110px, 16vw, 230px) + 1.5rem);
}
.page-hero > .container { position: relative; z-index: 1; }
.page-hero h1 { max-width: 18ch; }
.page-hero .lead { max-width: 36rem; }

/* ---------- 7. Layout blocks ---------- */
.split {
  display: grid; gap: var(--space-4); align-items: center;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--space-5); }
  .split--reverse > :first-child { order: 2; }
  .split .grid--stack { grid-template-columns: 1fr; }
}
.grid {
  display: grid; gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.card {
  background: var(--ivory-50);
  border: 1px solid rgba(90, 40, 80, 0.1);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.section--tint .card { background: rgba(251, 248, 244, .85); }
.card h3 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.card p:last-child { margin-bottom: 0; }
.card__num {
  font-family: var(--font-display); font-style: italic;
  color: var(--champagne); font-size: 1.5rem; display: block; margin-bottom: .25rem;
}

.quote {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.3rem); line-height: 1.4;
  color: var(--plum-900); margin: 0 auto; max-width: 30ch;
}
.section--dark .quote { color: var(--on-dark); }
.quote-cite { display: block; margin-top: var(--space-2); font-size: var(--fs-sm); font-family: var(--font-body); font-style: normal; color: var(--ink-soft); letter-spacing: .04em; }
.section--dark .quote-cite { color: var(--champagne-200); }

.mark-frame {
  background: var(--ivory); border-radius: 50% 50% var(--radius) var(--radius);
  padding: var(--space-4) var(--space-3) var(--space-3);
  display: grid; place-items: center;
  border: 1px solid rgba(198, 166, 107, .35);
  max-width: 380px; margin-inline: auto;
}
.mark-frame img { width: 62%; }

/* Danh sách giải nghĩa (logo, triết lý) */
.meaning { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.meaning li { margin: 0; padding-left: var(--space-3); border-left: 1px solid var(--champagne); }
.meaning strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.45rem; color: var(--plum-900); line-height: 1.3; margin-bottom: .25rem; }

/* Chương câu chuyện */
.chapter + .chapter { margin-top: var(--space-5); }
.chapter__label { font-family: var(--font-display); font-style: italic; color: var(--plum-500); font-size: 1.2rem; display: block; margin-bottom: .25rem; }

/* Sản phẩm */
.product-visual {
  aspect-ratio: 4 / 5; border-radius: var(--radius);
  background:
    radial-gradient(70% 60% at 50% 40%, rgba(255,255,255,.85), transparent 70%),
    linear-gradient(160deg, var(--lilac-100), var(--ivory));
  border: 1px dashed rgba(90, 40, 80, .3);
  display: grid; place-items: center; text-align: center; padding: var(--space-3);
  color: var(--ink-soft); font-size: var(--fs-sm);
}
.spec { border-top: 1px solid rgba(90, 40, 80, .12); }
.spec details { border-bottom: 1px solid rgba(90, 40, 80, .12); }
.spec summary {
  list-style: none; cursor: pointer; padding: 1.1rem 0;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-family: var(--font-display); font-size: 1.45rem; color: var(--plum-900);
  min-height: 48px;
}
.spec summary::-webkit-details-marker { display: none; }
.spec summary::after { content: "+"; font-family: var(--font-body); font-size: 1.25rem; color: var(--plum-500); transition: transform .25s; }
.spec details[open] summary::after { transform: rotate(45deg); }
.spec .spec__body { padding-bottom: 1.25rem; }

/* Liên hệ */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.contact-list li { margin: 0; display: grid; grid-template-columns: 7.5rem 1fr; gap: .75rem; align-items: baseline; padding-bottom: var(--space-2); border-bottom: 1px solid rgba(90, 40, 80, .1); }
.contact-list .label { font-size: var(--fs-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--plum-500); }
@media (max-width: 480px) { .contact-list li { grid-template-columns: 1fr; gap: .15rem; } }

/* Trang văn bản (chính sách) */
.prose { max-width: var(--measure); }
.prose h2 { font-size: 1.9rem; margin-top: var(--space-4); }
.prose h2:first-child { margin-top: 0; }

/* ---------- 8. Nội dung chờ xác nhận ---------- */
.todo {
  display: inline;
  background: var(--todo-bg);
  color: var(--todo-ink);
  border-bottom: 1px dashed var(--todo-line);
  padding: 0.05em 0.3em;
  border-radius: 3px;
  font-size: 0.92em;
  font-family: var(--font-body); font-style: normal;
}
.todo-block {
  background: var(--todo-bg);
  border: 1px dashed var(--todo-line);
  color: var(--todo-ink);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  font-size: var(--fs-sm);
}
.todo-block p:last-child { margin-bottom: 0; }
.notice {
  border-left: 2px solid var(--champagne);
  background: var(--ivory-50);
  padding: var(--space-2) var(--space-3);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: var(--fs-sm); color: var(--ink-soft);
}

/* ---------- 9. Footer ---------- */
.site-footer { background: var(--plum-900); color: var(--on-dark); padding-block: var(--space-5) var(--space-3); position: relative; overflow: hidden; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--champagne-200); text-decoration: underline; }
.footer-grid { display: grid; gap: var(--space-4); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-slogan { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.35; margin: 0 0 .25rem; }
.footer-slogan + .french { color: var(--champagne-200); font-size: 1.2rem; }
.footer-title { font-size: var(--fs-xs); letter-spacing: .2em; text-transform: uppercase; color: var(--champagne-200); margin-bottom: var(--space-2); }
.footer-links { list-style: none; padding: 0; margin: 0; font-size: var(--fs-sm); }
.footer-links li + li { margin-top: .5rem; }
.footer-bottom { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid rgba(247, 239, 233, .15); font-size: var(--fs-xs); color: rgba(247, 239, 233, .75); }
.site-footer .todo { background: rgba(255, 246, 220, .12); color: #f4dfae; border-bottom-color: #d8b56a; }

/* ---------- 10. Hiện dần khi cuộn (chỉ khi có JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform .9s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 11. In ấn ---------- */
@media print {
  .site-header, .silk, .nav-toggle { display: none !important; }
  body { background: #fff; }
}
