/* Micro Art Technology — site styles. Mobile-first; no framework. */

:root {
  --navy: #1d3f6e;
  --navy-ink: #10243f;
  --lime: #7fb51f;
  --lime-soft: #eef6df;
  --teal: #6fb3ae;
  --ink: #1b2430;
  --muted: #5b6676;
  --line: #e2e7ee;
  --surface: #f5f7fa;
  --bg: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(16 36 63 / 6%), 0 8px 24px rgb(16 36 63 / 6%);
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-ink); }
h1, h2, h3 { line-height: 1.2; color: var(--navy-ink); margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); letter-spacing: -.01em; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: clamp(48px, 8vw, 96px); }
.section--tint { background: var(--surface); }
.eyebrow { font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); margin-bottom: .75em; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 60ch; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 32px; }
.section-head h2 { margin: 0; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--bg); padding: 8px 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s; cursor: pointer; font: inherit; font-weight: 600; }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-ink); color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--navy); background: var(--bg); }
.btn--ghost:hover { border-color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / 92%); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.brand { margin-right: auto; }
.brand img { width: 120px; height: auto; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-switch { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .875rem; font-weight: 600; text-decoration: none; color: var(--navy); white-space: nowrap; }
.lang-switch:hover { border-color: var(--navy); }
@media (min-width: 860px) { .header-actions { order: 2; margin-left: 20px; } }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 18px; height: 2px; background: var(--navy-ink); position: relative; transition: transform .2s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
.site-nav { display: none; position: absolute; inset: 68px 0 auto; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 8px var(--gutter) 16px; }
.site-nav a { display: block; padding: 12px 0; text-decoration: none; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); }
.site-nav a[aria-current="page"] { color: var(--navy); }
.site-nav .nav-cta { margin-top: 12px; border: 0; text-align: center; color: #fff; }

@media (min-width: 860px) {
  .header-actions { display: flex; align-items: center; gap: 8px; }
.lang-switch { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .875rem; font-weight: 600; text-decoration: none; color: var(--navy); white-space: nowrap; }
.lang-switch:hover { border-color: var(--navy); }
@media (min-width: 860px) { .header-actions { order: 2; margin-left: 20px; } }
.nav-toggle { display: none; }
  .site-nav { display: block; position: static; box-shadow: none; border: 0; background: none; }
  .site-nav ul { display: flex; align-items: center; gap: 28px; padding: 0; }
  .site-nav a { padding: 6px 0; border: 0; font-size: .9375rem; }
  .site-nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--lime); }
  .site-nav .nav-cta { margin: 0; padding: 9px 18px; }
}

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 88px); background: linear-gradient(180deg, var(--surface), var(--bg)); overflow: hidden; }
.hero .wrap { display: grid; gap: 32px; align-items: center; }
.hero h1 { max-width: 16ch; }
.hero-media { position: relative; justify-self: center; width: min(62%, 340px); }
@media (min-width: 860px) { .hero-media { width: min(100%, 340px); } }
.hero-media img { mix-blend-mode: multiply; } /* product renders sit on white; let the hero tint show through */
.hero-media::before { content: ""; position: absolute; inset: -12%; border-radius: 50%; background: radial-gradient(closest-side, var(--lime-soft), transparent); z-index: -1; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; padding: 0; list-style: none; color: var(--muted); font-size: .9375rem; }
.hero-badges li::before { content: "✓ "; color: var(--lime); font-weight: 700; }
@media (min-width: 860px) { .hero .wrap { grid-template-columns: 1.1fr 1fr; } }

/* Product cards */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.card { position: relative; display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media { display: grid; place-items: center; height: 200px; padding: 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.card-media img { max-height: 100%; width: auto; object-fit: contain; }
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.25rem; }
.card-body h3 a { text-decoration: none; color: inherit; }
.card-body h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.card-body p { margin: 0; color: var(--muted); font-size: .9375rem; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 559px) {
  .grid { gap: 12px; }
  .card { flex-direction: row; }
  .card-media { width: 112px; height: auto; min-height: 120px; flex: none; padding: 10px; border-bottom: 0; border-right: 1px solid var(--line); }
  .card-body { padding: 14px 16px; gap: 2px; }
  .card-body h3 { font-size: 1.125rem; }
  .card-body p { font-size: .875rem; line-height: 1.5; }
  .badge-new { top: 8px; left: 8px; font-size: .625rem; padding: 2px 7px; }
}
.badge-new { position: absolute; top: 12px; left: 12px; background: var(--lime); color: #fff; font-size: .6875rem; font-weight: 700; letter-spacing: .06em; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; }

/* Strengths */
.features { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); counter-reset: f; }
.feature { padding: 28px; background: var(--bg); border-radius: var(--radius); border: 1px solid var(--line); }
.feature::before { counter-increment: f; content: "0" counter(f); display: block; font-weight: 700; color: var(--lime); margin-bottom: 12px; }
.feature p { color: var(--muted); margin: 0; }

/* Banner band */
.band { display: block; position: relative; border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); }
.band img { width: 100%; }
.band-cta { display: grid; gap: 20px; align-items: center; margin-top: 28px; }
@media (min-width: 760px) { .band-cta { grid-template-columns: 1fr auto; } }

/* Breadcrumb */
.crumbs { font-size: .875rem; color: var(--muted); padding-top: 24px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--muted); }

/* Product detail */
.product { display: grid; gap: 40px; padding-block: 24px 64px; }
@media (min-width: 900px) { .product { grid-template-columns: 1.15fr 1fr; align-items: start; } .product-gallery { position: sticky; top: 92px; } }
.gallery-main { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 16px; overflow: hidden; }
.gallery-main img { max-height: 100%; width: auto; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; padding: 0; list-style: none; overflow-x: auto; }
.gallery-thumbs button { width: 84px; height: 64px; padding: 4px; border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; flex: none; }
.gallery-thumbs button[aria-pressed="true"] { border-color: var(--navy); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.product-info .tag { margin-bottom: 8px; }
.product-info h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: .25em; }
.product-tagline { font-size: 1.125rem; color: var(--muted); margin-bottom: 1.5em; }
.checklist { list-style: none; padding: 0; margin: 0 0 1.5em; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 16px; border-radius: 50%; background: var(--lime-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.5l2.2 2.2 4.8-5' fill='none' stroke='%237fb51f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.spec-box { background: var(--surface); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 1.5em; }
.spec-box h2 { font-size: 1rem; margin-bottom: .25em; }
.spec-box p { margin: 0; }

/* Prescription table */
.rx { margin-top: 8px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.rx table { border-collapse: collapse; width: 100%; min-width: 640px; font-variant-numeric: tabular-nums; }
.rx th, .rx td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.rx thead th { background: var(--teal); color: #fff; font-weight: 600; font-size: .875rem; }
.rx tbody th { text-align: left; color: var(--muted); font-weight: 600; padding-left: 16px; white-space: nowrap; }
.rx tr.arch-split th, .rx tr.arch-split td { border-top: 3px solid var(--line); }
.rx details { margin-top: 16px; }
.rx summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.rx details img { margin-top: 12px; border-radius: var(--radius); border: 1px solid var(--line); }

/* Groups on products page */
.group + .group { margin-top: 56px; }
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 20px; }
.group-head h2 { margin: 0; }
.group-head p { margin: 0; color: var(--muted); }

/* News */
.news-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.news-item { display: grid; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
@media (min-width: 640px) { .news-item { grid-template-columns: 240px 1fr; align-items: center; } }
.news-item img { border-radius: 8px; border: 1px solid var(--line); }
.news-item time { font-size: .875rem; color: var(--muted); font-weight: 600; }
.news-item h2 { font-size: 1.25rem; margin: 4px 0 6px; }
.news-item p { margin: 0; color: var(--muted); }

/* Forms */
.form-layout { display: grid; gap: 40px; }
@media (min-width: 900px) { .form-layout { grid-template-columns: 1fr 1.4fr; } }
.form { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 36px); }
.field { display: grid; gap: 6px; grid-column: span 2; }
@media (min-width: 560px) { .field--half { grid-column: span 1; } }
.field label { font-weight: 600; font-size: .9375rem; }
.field .req { color: #b42318; }
.field input, .field textarea, .field select { font: inherit; padding: 11px 14px; border: 1px solid #c9d1dc; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.field input:focus, .field textarea:focus { outline: 3px solid rgb(127 181 31 / 35%); border-color: var(--lime); }
.field textarea { min-height: 130px; resize: vertical; }
.form .hp { position: absolute; left: -9999px; }
.form-note { grid-column: span 2; font-size: .875rem; color: var(--muted); margin: 0; }
.form .btn { grid-column: span 2; justify-self: start; }
.notice { border-radius: 10px; padding: 14px 18px; margin-bottom: 20px; font-weight: 600; }
.notice--ok { background: var(--lime-soft); color: #3b5a0b; }
.notice--err { background: #fde8e7; color: #8a1c13; }

/* Contact */
.contact-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.contact-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.contact-card h2 { font-size: 1.0625rem; margin-bottom: 12px; }
.contact-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.contact-card strong { display: block; }
.contact-card address { font-style: normal; }

/* Footer */
.site-footer { background: var(--navy-ink); color: #c4cfde; padding-block: 56px 32px; font-size: .9375rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.site-footer h2 { color: #fff; font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer ul a { color: #c4cfde; text-decoration: none; }
.site-footer ul a:hover { color: #fff; }
.site-footer address { font-style: normal; }
.footer-logo { background: #fff; display: inline-block; padding: 8px 12px; border-radius: 10px; margin-bottom: 12px; }
.footer-logo img { width: 110px; }
.footer-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / 12%); font-size: .8125rem; }

/* Page header (inner pages) */
.page-head { padding-block: 40px 8px; }
.page-head .lede { margin-bottom: 0; }

/* Traditional Chinese: CJK needs more leading; uppercase/tracking don't apply. */
:lang(zh) { line-height: 1.75; }
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3 { letter-spacing: 0; line-height: 1.35; }
:lang(zh) .hero h1 { max-width: none; word-break: keep-all; } /* break only at <wbr> */
:lang(zh) .eyebrow, :lang(zh) .tag, :lang(zh) .site-footer h2 { letter-spacing: .04em; }
:lang(zh) .lede { line-height: 1.8; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
