/* Li Xiao An Boutique — shared stylesheet (plain CSS, no build) */
:root {
  --bg: #fdf8f3;
  --surface: #ffffff;
  --tint: #f6ebe1;
  --ink: #2d2420;
  --muted: #5e514a;
  --accent: #a4473a;
  --accent-dark: #833529;
  --accent-soft: #f3dcd4;
  --line: #e7d8cb;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(70, 40, 25, .07);
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC",
    "Microsoft JhengHei", "Heiti TC", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 8.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-dark); text-underline-offset: .18em; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { line-height: 1.3; margin: 0 0 .5rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 .9rem; }

[lang="en"] { color: var(--muted); }
.en-title { display: block; font-size: .7em; font-weight: 600; color: var(--muted); letter-spacing: .02em; }

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

.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 248, 243, .96);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .25rem 1rem;
  padding: .55rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.2;
}
.brand img { width: 34px; height: 34px; }
.brand small { display: block; font-weight: 500; font-size: .75rem; color: var(--muted); }
.site-nav { flex: 1 1 100%; min-width: 0; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: .1rem .15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: .3rem .5rem;
  font-size: .9rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 999px;
}
.site-nav a:hover { background: var(--accent-soft); color: var(--accent-dark); }
.site-nav span[lang="en"] { font-size: .8em; }

/* ---------- Sections ---------- */
section { padding: 3.5rem 0; }
section:nth-of-type(even) { background: var(--tint); }
.section-head { max-width: 46rem; margin-bottom: 2rem; }
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: .4rem;
}

/* ---------- Hero ---------- */
.hero {
  padding: 3.5rem 0 3rem;
  background:
    radial-gradient(circle at 85% 15%, var(--accent-soft) 0, transparent 45%),
    radial-gradient(circle at 10% 90%, #f5e6c8 0, transparent 40%),
    var(--bg);
}
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero h1 { font-size: clamp(2rem, 7vw, 3.2rem); letter-spacing: .02em; }
.hero h1 .en-title { font-size: .5em; margin-top: .3rem; }
.hero .lead { font-size: 1.15rem; max-width: 36rem; }
.hero-collage { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.hero-collage img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 1; object-fit: cover; }
.hero-collage img:nth-child(2) { transform: translateY(1.2rem); }
.badge {
  display: inline-block;
  margin-top: 1.2rem;
  padding: .3rem .8rem;
  font-size: .85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.2rem; }
.btn {
  display: inline-block;
  padding: .7rem 1.3rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid var(--accent);
  line-height: 1.3;
  text-align: center;
}
.btn small { display: block; font-weight: 500; font-size: .78rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--accent-dark); }
.btn-secondary:hover { background: var(--accent-soft); }
.btn-primary [lang="en"] { color: rgba(255, 255, 255, .85); }
.btn-secondary [lang="en"] { color: var(--accent-dark); }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 1.25rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card ul { padding-left: 1.2rem; margin: .4rem 0 .9rem; }
.card li { margin-bottom: .3rem; }
.icon { font-size: 1.6rem; line-height: 1; margin-bottom: .5rem; display: block; }

.two-col { display: grid; gap: 2rem; }
.two-col > * { min-width: 0; }

/* Products */
.product-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.product-card .media {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 2px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--line);
}
.product-card .media img { width: 100%; height: 100%; object-fit: cover; }
.product-card .media-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-card .media-3 { grid-template-columns: 3fr 2fr; grid-template-rows: repeat(2, minmax(0, 1fr)); }
.product-card .media-3 img:first-child { grid-row: span 2; }
.product-card .body { padding: 1.2rem 1.4rem 1.4rem; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: .6rem 0 0; }
.tags li { font-size: .8rem; padding: .15rem .6rem; background: var(--tint); border-radius: 999px; margin: 0; }
.center { text-align: center; margin-top: 2rem; }
.note { font-size: .9rem; color: var(--muted); }

/* Facts table */
.facts { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.facts th, .facts td { text-align: left; vertical-align: top; padding: .75rem 1rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts th { width: 38%; background: #fbf3ec; font-weight: 700; }
.facts th span, .facts td span[lang="en"] { display: block; font-weight: 400; font-size: .85rem; }

/* AI section */
.ai-highlight { border-left: 5px solid var(--accent); }
.flow { display: grid; gap: .75rem; list-style: none; padding: 0; margin: 2rem 0; counter-reset: step; }
.flow li {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--accent-soft);
  border-radius: var(--radius);
  padding: 1.2rem 1.2rem 1.2rem 3.6rem;
  counter-increment: step;
}
.flow li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1.1rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.flow strong { display: block; }

.principles { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.principles li { padding: .45rem .9rem; background: var(--surface); border: 1px solid var(--accent); color: var(--accent-dark); border-radius: 999px; font-weight: 600; font-size: .9rem; }
.principles li span { font-weight: 400; }

/* Contact */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.contact-list li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.contact-list strong { display: block; }
.contact-list a { word-break: break-all; font-weight: 600; }

/* Prose pages (privacy, 404) */
.prose { max-width: 46rem; padding: 3rem 0; }
.prose h1 { font-size: 2rem; }
.prose h2 { font-size: 1.25rem; margin-top: 2rem; }
.prose .pair { margin-bottom: 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #f1e6dc; padding: 2rem 0; font-size: .9rem; }
.site-footer [lang="en"] { color: #d9c9bb; }
.site-footer a { color: #ffd9cc; }
.site-footer a:hover { color: #fff; }
.site-footer p { margin: .3rem 0; }

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .contact-list { grid-template-columns: repeat(3, 1fr); }
  .products { grid-template-columns: repeat(4, 1fr); }
  .products > * { grid-column: span 2; }
  .products > :last-child:nth-child(odd) { grid-column: 2 / span 2; }
}
@media (min-width: 900px) {
  html { scroll-padding-top: 4.5rem; }
  section { padding: 5rem 0; }
  h2 { font-size: 2rem; }
  .hero { padding: 5rem 0 4.5rem; }
  .site-nav { flex: 0 1 auto; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .hero-collage { grid-template-columns: 3fr 2fr; gap: .9rem; }
  .hero-collage img:first-child { grid-row: span 2; height: 100%; aspect-ratio: auto; }
  .hero-collage img:nth-child(2) { transform: none; }
  .two-col { grid-template-columns: 1fr 1fr; align-items: start; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .products { grid-template-columns: repeat(6, 1fr); }
  .products > *, .products > :last-child:nth-child(odd) { grid-column: span 2; }
  .products > :nth-child(4) { grid-column: 2 / span 2; }
  .flow { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .flow li:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent);
  }
}

.facts caption { caption-side: bottom; text-align: left; padding-top: .75rem; }
.subhead { margin-top: 2.5rem; }
