/* ════════════════════════════════════════════════════════
   Nam Anh — Personal Website
   Design system: LCT OS Clean (Emerald / Terracotta / Gold)
   Shared styles: tokens, base, nav, buttons, cards
   ════════════════════════════════════════════════════════ */

/* ───── FONTS ───── */
@font-face { font-family: 'SVN-Recoleta'; src: url('./fonts/SVN-Recoleta SemiBold.otf') format('opentype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'SVN-Recoleta'; src: url('./fonts/SVN-Recoleta Bold.otf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'SVN-Gilroy'; src: url('./fonts/SVN-Gilroy Regular.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'SVN-Gilroy'; src: url('./fonts/SVN-Gilroy Medium.otf') format('opentype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'SVN-Gilroy'; src: url('./fonts/SVN-Gilroy SemiBold.otf') format('opentype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'SVN-Gilroy'; src: url('./fonts/SVN-Gilroy Bold.otf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }

/* ───── TOKENS (LCT OS Clean) ───── */
:root {
  /* foreground — mực ấm, không bao giờ #000 cho chữ */
  --fg-1: #1B1624;
  --fg-2: #54505B;
  --fg-3: #76737C;
  --fg-4: #8D8A91;

  /* surface ladder */
  --bg-1: #FFFFFF;
  --bg-2: #F9F6F3;
  --bg-3: #F3EDE9;   /* nền trang */
  --bg-4: #ECE5E1;

  /* brand & accent — Editorial Warm Clean (chốt 2026-07-14, xem
     04_Resources/Nam-Anh-Marketing-Design-System.md). Vai trò khóa cứng: */
  --mint: #79D287;       /* CTA chính — text mực, không trắng */
  --coral: #FD976D;      /* nhấn editorial: underline keyword, squiggle */
  --yellow: #FDD46B;     /* nav/spotlight: carousel arrow, số tròn */
  --sky: #5DCDF1;        /* link hành động trong text */
  --lavender: #C9B1FB;   /* badge decorative */
  --mint-hover: #6BC77A;

  /* soft tints — nền tile/thumb */
  --soft-mint: #B3E8BB;
  --soft-coral: #FDC7B1;
  --soft-yellow: #FEE7A8;
  --soft-sky: #BFE7F7;
  --soft-lavender: #E3D6FD;

  /* aliases legacy (giai đoạn Clean) — trỏ về palette Warm */
  --emerald: var(--mint);
  --terracotta: var(--coral);
  --gold: var(--yellow);
  --cyan: var(--sky);
  --lilac: var(--lavender);
  --soft-emerald: var(--soft-mint);
  --soft-terra: var(--soft-coral);
  --soft-gold: var(--soft-yellow);
  --soft-lilac: var(--soft-lavender);

  /* semantic — chỉ trên con số/trạng thái */
  --positive: #00D084;
  --destructive: #CF2E2E;
  --warning: #FF6900;

  /* alpha ladder — màu cấu trúc */
  --hairline: rgba(27, 22, 36, 0.10);
  --hairline-soft: rgba(27, 22, 36, 0.06);
  --hover-row: rgba(27, 22, 36, 0.03);
  --label-45: rgba(27, 22, 36, 0.45);
  --label-55: rgba(27, 22, 36, 0.55);
  --body-65: rgba(27, 22, 36, 0.65);

  /* shadow — chỉ crisp */
  --shadow-crisp: 6px 6px 0 #000;
  --shadow-crisp-hover: 8px 8px 0 #000;
  --shadow-crisp-active: 2px 2px 0 #000;

  --serif: 'SVN-Recoleta', Georgia, serif;
  --sans: 'SVN-Gilroy', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

/* ───── BASE ───── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--sans);
  background: var(--bg-3);
  color: var(--fg-1);
  line-height: 1.6;
}
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}
.num { font-variant-numeric: tabular-nums; }

/* micro-caps label — chữ ký của hệ Clean */
.microcaps {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--label-45);
}

/* ───── ENTRY ANIMATION (function over flair) ───── */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise-in 0.5s ease-out both; }
.rise-1 { animation-delay: 80ms; }
.rise-2 { animation-delay: 160ms; }
.rise-3 { animation-delay: 240ms; }
@media (prefers-reduced-motion: reduce) {
  .rise, .rise-1, .rise-2, .rise-3 { animation: none; }
}

/* ───── NAVBAR ───── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 237, 233, 0.85);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}
.nav.scrolled {
  box-shadow: 0 1px 0 var(--hairline);
  background: rgba(243, 237, 233, 0.95);
}
.nav__inner {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  color: var(--fg-1);
  flex-shrink: 0;
}
.logo__mark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 23px;
  letter-spacing: -0.01em;
  line-height: 1;
  position: relative;
}
.logo__squiggle {
  position: absolute;
  bottom: -7px;
  left: 0;
  width: 100%;
  height: 8px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.5vw, 34px);
  list-style: none;
}
.nav__link {
  font-weight: 500;
  font-size: 15px;
  color: var(--fg-1);
  text-decoration: none;
  line-height: 1.4;
  position: relative;
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 2px;
  background: var(--fg-1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav__link:hover::after,
.nav__link:focus-visible::after { transform: scaleX(1); }
.nav__link .chev { width: 12px; height: 12px; }
.nav__burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--fg-1);
}
@media (max-width: 960px) {
  .nav__links, .nav .btn-primary { display: none; }
  .nav__burger { display: inline-flex; }
}

/* ───── BUTTONS ───── */
/* CTA chính — Mint pill, text mực, KHÔNG shadow (luật 1 shadow/trang) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--mint);
  color: var(--fg-1);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  padding: 13px 24px;
  border-radius: 9999px;
  text-decoration: none;
  border: 2px solid var(--fg-1);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn-primary:hover {
  background: var(--mint-hover);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(1px);
}
.btn-primary .arrow { width: 14px; height: 14px; transition: transform 0.15s ease; }
.btn-primary:hover .arrow { transform: translateX(2px); }

/* text link hành động — cyan */
.link-action {
  color: var(--cyan);
  font-weight: 600;
  text-decoration: none;
}
.link-action:hover { text-decoration: underline; }

/* ───── CARDS (kỷ luật Clean) ───── */
/* Anchor card — ĐÚNG 1 thẻ mỗi trang */
.card-anchor {
  background: var(--bg-1);
  border: 2px solid var(--fg-1);
  border-radius: 20px;
  box-shadow: var(--shadow-crisp);
}
/* Section card — mọi thẻ còn lại: hairline, không viền đậm, KHÔNG shadow */
.card-section {
  background: var(--bg-1);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  overflow: hidden;
}

/* ═══════════ SUBPAGE (directory list) — dùng chung cho các trang sản phẩm phụ ═══════════ */
.subpage-hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.subpage-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 500; color: var(--fg-3);
  text-decoration: none; margin-bottom: 22px;
  transition: color 0.15s ease;
}
.subpage-back:hover { color: var(--fg-1); }
.subpage-hero h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.1;
  letter-spacing: -0.015em; color: var(--fg-1);
  margin: 10px 0 18px; max-width: 18ch;
}
.subpage-hero h1 .em {
  text-decoration: underline; text-decoration-color: var(--coral);
  text-decoration-thickness: 5px; text-underline-offset: 8px; text-decoration-skip-ink: none;
}
.subpage-hero__sub { font-size: clamp(1rem, 1.5vw, 1.15rem); color: var(--fg-2); line-height: 1.6; max-width: 54ch; }

.subpage-list { padding-bottom: clamp(3rem, 7vw, 6rem); }
.dir-group-label { margin: clamp(1.75rem, 3.5vw, 2.75rem) 0 0; }
.dir-rows { border-top: 1px solid var(--hairline); }
.dir-row {
  display: flex; align-items: center; gap: 22px;
  padding: 26px 8px; border-bottom: 1px solid var(--hairline);
  text-decoration: none; color: inherit;
  transition: background 0.15s ease, padding-left 0.15s ease;
}
.dir-row:hover { background: var(--bg-1); padding-left: 16px; }
.dir-row__icon { width: 52px; height: 52px; flex-shrink: 0; }
.dir-row__main { flex: 1; min-width: 0; }
.dir-row__top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dir-row__name { font-family: var(--serif); font-weight: 600; font-size: clamp(1.25rem, 2vw, 1.55rem); color: var(--fg-1); }
.dir-row__badge {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--fg-1); background: var(--soft-mint); border-radius: 9999px; padding: 3px 10px; white-space: nowrap;
}
.dir-row__desc { font-size: 14.5px; color: var(--fg-2); line-height: 1.55; margin-top: 5px; max-width: 64ch; }
.dir-row__note { color: var(--fg-1); font-weight: 600; }
.dir-row__arrow {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--fg-1); background: var(--bg-3);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}
.dir-row:hover .dir-row__arrow { background: var(--yellow); transform: translate(2px,-2px); }

.subpage-foot { border-top: 1px solid var(--hairline); padding: 28px 0; text-align: center; }
.subpage-foot a { color: var(--sky); font-weight: 600; text-decoration: none; }
.subpage-foot a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .dir-row__desc { display: none; }
  .dir-row__icon { width: 44px; height: 44px; }
}

/* Secondary block trong subpage (heading + intro) */
.subpage-block { padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.subpage-block__title { font-family: var(--serif); font-weight: 700; font-size: clamp(1.5rem, 2.8vw, 2rem); line-height: 1.1; color: var(--fg-1); margin-bottom: 8px; }
.subpage-block__intro { font-size: 15px; color: var(--fg-2); line-height: 1.6; margin-bottom: 24px; max-width: 56ch; }
.subpage-note { font-size: 12.5px; color: var(--fg-3); margin-top: 22px; line-height: 1.5; }

/* Gear categorized (Đồ mình dùng) */
.gear-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
.gear-cat__h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.gear-cat__dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.gear-cat ul { list-style: none; }
.gear-cat li { border-bottom: 1px solid var(--hairline); }
.gear-cat a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; text-decoration: none; color: var(--fg-1);
  font-size: 14.5px; font-weight: 500; transition: color 0.15s ease;
}
.gear-cat a:hover { color: var(--fg-3); }
.gear-cat a .go { color: var(--label-45); transition: transform 0.15s ease, color 0.15s ease; }
.gear-cat a:hover .go { color: var(--coral); transform: translate(2px, -2px); }
