/* Anvi Technologies — static site */
:root {
  --bg: #0a1220;
  --bg-2: #0f1a2e;
  --card: #132038;
  --card-2: #1a2b47;
  --line: #243652;
  --accent: #2f8cff;
  --accent-2: #4ad1c5;
  --accent-soft: rgba(47, 140, 255, 0.16);
  --text: #eef3fb;
  --muted: #9aadc8;
  --dim: #8aa0b8;
  --ink: #ffffff;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: "Segoe UI", "PingFang HK", "Noto Sans TC", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  letter-spacing: 0.01em;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

.nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(10, 18, 32, 0.86);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.brand img { height: 40px; width: auto; max-width: min(220px, 55vw); }
.brand span { font-size: 15px; letter-spacing: 0.02em; }
.nav-links { display: flex; gap: 22px; align-items: center; color: var(--muted); font-size: 14px; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.menu-btn {
  display: none; background: transparent; border: 1px solid var(--line);
  color: var(--text); padding: 8px 12px; border-radius: 10px;
}

.hero {
  position: relative;
  padding: 88px 0 64px;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(47,140,255,0.22), transparent 60%),
    radial-gradient(700px 360px at 90% 10%, rgba(74,209,197,0.10), transparent 55%);
}
.hero-bg {
  position: absolute; inset: 0; opacity: 0.22;
  background-size: cover; background-position: center;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.kicker {
  color: var(--accent-2); font-size: 12px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; margin: 0 0 14px;
}
h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.12; margin: 0 0 18px; letter-spacing: -0.03em; }
h2 { font-size: clamp(26px, 3.2vw, 34px); margin: 0 0 14px; letter-spacing: -0.02em; }
h3 { font-size: 20px; margin: 0 0 10px; }
.lede { font-size: 18px; color: var(--muted); max-width: 720px; margin: 0 0 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 7px 12px; font-size: 13px; color: var(--muted);
}
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; border-radius: 999px; padding: 12px 20px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; transition: 0.18s ease;
}
.btn-primary { background: linear-gradient(135deg, #1f6fd6, #185bb0); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--ink); }

.section { padding: 72px 0; }
.section.alt { background: var(--bg-2); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p { color: var(--muted); margin: 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.card.soft { background: var(--card-2); }
.card h3 { color: var(--ink); }
.card p { color: var(--muted); margin: 0; font-size: 15px; }
.card .icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 14px;
  font-size: 14px;
}

.feature-row {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; align-items: center;
}
.feature-row.reverse { grid-template-columns: 0.9fr 1.1fr; }
.feature-row img, .media-frame img {
  border-radius: var(--radius); border: 1px solid var(--line); width: 100%;
  object-fit: cover; max-height: 420px;
}
.media-frame-diagram {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
}
.media-frame-diagram img {
  border: none;
  border-radius: 12px;
  object-fit: contain;
  max-height: none;
  background: transparent;
}
.feature-list { list-style: none; padding: 0; margin: 18px 0 0; }
.feature-list li {
  position: relative; padding: 10px 0 10px 28px; color: var(--muted);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: 18px;
  width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.quote {
  border-left: 3px solid var(--accent);
  padding: 8px 0 8px 16px; color: var(--muted); font-style: italic; margin: 12px 0 0;
}

.gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.gallery img {
  width: 100%; height: 180px; object-fit: cover;
  border-radius: 12px; border: 1px solid var(--line);
}

.page-hero {
  padding: 56px 0 28px;
  background:
    radial-gradient(700px 280px at 10% 0%, rgba(47,140,255,0.16), transparent 60%);
}
.page-hero p { color: var(--muted); max-width: 680px; margin: 8px 0 0; }

.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.contact-card dt { color: var(--dim); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 16px; }
.contact-card dd { margin: 4px 0 0; color: var(--text); font-size: 16px; }
.contact-card a { color: var(--accent-2); }

.cta-band {
  margin: 24px 0 0; border-radius: 24px; overflow: hidden; position: relative;
  border: 1px solid var(--line);
}
.cta-band .bg {
  position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.28;
}
.cta-band .inner {
  position: relative; padding: 42px 36px;
  background: linear-gradient(120deg, rgba(10,18,32,0.92), rgba(19,32,56,0.78));
}
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { color: var(--muted); margin: 0 0 20px; max-width: 560px; }

.footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 40px 0 28px; color: var(--dim); font-size: 13px;
}
.footer-inner {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.footer strong { color: var(--muted); }
.footer a:hover { color: var(--accent-2); }

.badge {
  display: inline-block; margin-top: 10px; padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--line); color: var(--muted); font-size: 12px;
}


.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 18px 20px;
}
.trust-item { display: flex; flex-direction: column; gap: 4px; }
.trust-item strong { color: var(--ink); font-size: 15px; }
.trust-item span { color: var(--dim); font-size: 13px; }

@media (max-width: 900px) {
  .grid-3, .grid-4, .feature-row, .feature-row.reverse, .contact-grid, .gallery, .trust-strip {
    grid-template-columns: 1fr;
  }
  .grid-2 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0;
    background: rgba(10,18,32,0.97); padding: 16px 20px 24px; border-bottom: 1px solid var(--line);
    align-items: flex-start;
  }
  .menu-btn { display: inline-flex; }
  .gallery img { height: 220px; }
}

/* v0.2+ — optional 2-col trust strip (v0.3 restores default 3-col); version marker; case placeholders */
.trust-strip-2 {
  grid-template-columns: repeat(2, 1fr);
}
.site-version {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--dim);
  opacity: 0.75;
  letter-spacing: 0.02em;
}
.case-frames {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.case-frame {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.case-frame-inner {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  border: 1px dashed rgba(154, 173, 200, 0.35);
  background:
    linear-gradient(145deg, rgba(19, 32, 56, 0.9), rgba(26, 43, 71, 0.55)),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 10px,
      rgba(47, 140, 255, 0.03) 10px,
      rgba(47, 140, 255, 0.03) 20px
    );
  display: grid;
  place-items: center;
  overflow: hidden;
}
.case-frame-inner::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}
.case-frame-label {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.case-frame figcaption {
  font-size: 13px;
  color: var(--muted);
  padding-left: 2px;
}
.case-frame--filled {
  margin: 0;
}
.case-frame--filled img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(19, 32, 56, 0.9);
}
@media (max-width: 900px) {
  .case-frame--filled img {
    aspect-ratio: 16 / 10;
  }
}
@media (max-width: 900px) {
  .trust-strip-2,
  .case-frames {
    grid-template-columns: 1fr;
  }
  .case-frame-inner {
    aspect-ratio: 16 / 10;
  }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .case-frames {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* v0.18 — a11y: skip link + focus-visible */
.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  transition: top 0.15s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 12px;
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}
.btn:focus-visible { outline-offset: 3px; }

/* i18n lang-switch v0.28 */
.lang-switch {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 12px; color: var(--dim); margin-left: 4px;
}
.lang-switch a {
  color: var(--muted); padding: 2px 4px; border-radius: 4px;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.lang-active {
  color: var(--ink); font-weight: 700;
  background: var(--accent-soft);
}
.lang-sep { color: var(--line); user-select: none; }
.footer .lang-switch { margin-left: 0; }
@media (max-width: 860px) {
  .lang-switch { margin: 8px 0 0; }
}

/* i18n lang-switch v0.29 */
.lang-switch {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 12px; color: var(--dim); margin-left: 4px;
}
.lang-switch a {
  color: var(--muted); padding: 2px 4px; border-radius: 4px;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.lang-active {
  color: var(--ink); font-weight: 700;
  background: var(--accent-soft);
}
.lang-sep { color: var(--line); user-select: none; }
.footer .lang-switch { margin-left: 0; }
@media (max-width: 860px) {
  .lang-switch { margin: 8px 0 0; }
}

/* i18n lang-switch v0.30 */
.lang-switch {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 12px; color: var(--dim); margin-left: 4px;
}
.lang-switch a {
  color: var(--muted); padding: 2px 4px; border-radius: 4px;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.lang-active {
  color: var(--ink); font-weight: 700;
  background: var(--accent-soft);
}
.lang-sep { color: var(--line); user-select: none; }
.footer .lang-switch { margin-left: 0; }
@media (max-width: 860px) {
  .lang-switch { margin: 8px 0 0; }
}
