/* LOTUSLAMP — content site
   Design tokens match the LOTUSLAMP brand site (elklotus/styles.css):
   near-black ground, cyan→purple→pink accent gradient, 20px radii,
   translucent blurred panels. Tuned here for long-form reading:
   narrower measure, larger body text, quieter rules. */

:root {
  --bg: #06070d;
  --bg-2: #0a0d18;
  --panel: rgba(17, 20, 34, .78);
  --panel-solid: #101421;
  --line: rgba(153, 178, 255, .16);
  --line-soft: rgba(255, 255, 255, .06);
  --text: #f4f7ff;
  --dim: #d9dce6;
  --muted: #9098ad;
  --cyan: #21e6e6;
  --blue: #4577ff;
  --purple: #8b4dff;
  --pink: #ff3fbf;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .38);
  --measure: 44rem;
  --container: 1200px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Noto Sans SC", "Noto Sans TC", "Microsoft YaHei",
               "Microsoft JhengHei", "PingFang SC", "PingFang TC",
               -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.72;
  overflow-x: hidden;
}

/* ambient glows, as on the brand site */
body::before,
body::after {
  content: "";
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: .12;
  pointer-events: none;
  z-index: -1;
}
body::before { top: 6%; right: -240px; background: var(--purple); }
body::after  { top: 62%; left: -260px; background: var(--cyan); }

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

/* ---------- layout ---------- */

.wrap { width: min(calc(100% - 40px), var(--measure)); margin-inline: auto; }
.wrap-wide { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(5, 7, 13, .72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.site-header > .wrap {
  width: min(calc(100% - 40px), var(--container));
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.01em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
/* Width and height are both fixed so the header never reflows while the
   stylesheet is still loading. */
.brand-mark { flex: none; width: 29px; height: 22px; }
.brand em {
  font-style: normal;
  background: linear-gradient(100deg, var(--pink), var(--purple) 45%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.site-nav { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.site-nav a {
  position: relative;
  color: #c8ccda;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 0;
  transition: color .2s ease;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--purple), var(--pink));
  transition: width .2s ease;
}
.site-nav a:hover { color: #fff; }
.site-nav a:hover::after { width: 100%; }

.language-switcher {
  display: flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
}
.language-switcher a {
  padding: .25rem .55rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}
.language-switcher a:hover { color: var(--text); }
.language-switcher a[aria-current="page"] {
  color: #fff;
  background: linear-gradient(100deg, rgba(139, 77, 255, .7), rgba(33, 230, 230, .45));
}

main { padding: 3rem 0 4.5rem; }

.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-2);
  color: var(--muted);
  font-size: .9rem;
  padding: 2.75rem 0;
}
.site-footer > .wrap { width: min(calc(100% - 40px), var(--container)); }
.site-footer > .wrap > * + * { margin-top: .9rem; }
.site-footer nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.site-footer a { color: #b6bccd; text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }

/* ---------- typography ---------- */

h1 {
  margin: 0 0 .7rem;
  font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -.03em;
  font-weight: 800;
}
h2 {
  margin: 3rem 0 .9rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-soft);
  font-size: 1.42rem;
  line-height: 1.3;
  letter-spacing: -.015em;
  font-weight: 700;
}
h3 {
  margin: 2rem 0 .55rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #e8ebf5;
}
p, ul, ol { margin: 0 0 1.15rem; }
ul, ol { padding-left: 1.4rem; }
li + li { margin-top: .45rem; }
li::marker { color: var(--muted); }
strong { font-weight: 650; color: #fff; }
em { color: var(--dim); }

a { color: var(--cyan); text-decoration-color: rgba(33, 230, 230, .35); }
a:hover { text-decoration-color: var(--cyan); }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line-soft);
  padding: .1em .4em;
  border-radius: 6px;
}

.lede {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--dim);
  margin-bottom: 1.6rem;
}
.meta { font-size: .86rem; color: var(--muted); }
p.meta { margin-bottom: 2rem; }

.kicker {
  display: inline-block;
  color: var(--cyan);
  letter-spacing: .22em;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: .9rem;
}

.crumbs { font-size: .84rem; color: var(--muted); margin-bottom: 1.4rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--cyan); }

/* ---------- components ---------- */

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  margin: 0 0 1.1rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color .18s ease, transform .18s ease;
}
.card-thumb {
  display: block;
  width: calc(100% + 3rem);
  margin: -1.3rem -1.5rem 1.1rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}
.card h3 { margin-top: 0; }
.card h3 a { text-decoration: none; color: var(--text); }
.card h3 a:hover {
  background: linear-gradient(100deg, var(--pink), var(--purple) 45%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Whole card is the click target: the title link is stretched over the card box.
   Cards without a title link (the explainer cards inside articles) are unaffected. */
.card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  z-index: 1;
}
/* Any other link inside a card still has to be clickable on its own. */
.card p a, .card ul a, .card ol a, .card figcaption a, .card table a, .card .answer a {
  position: relative;
  z-index: 2;
}
.card:has(h3 a):hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
}
.card:has(h3 a:focus-visible) { border-color: var(--cyan); }
.card h3 a:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:has(h3 a):hover { transform: none; }
}
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.answer {
  border-left: 2px solid transparent;
  border-image: linear-gradient(180deg, var(--cyan), var(--purple)) 1;
  background: rgba(69, 119, 255, .09);
  padding: .95rem 1.2rem;
  margin: 1rem 0 1.4rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.answer p { margin: 0; }
.answer .app { font-weight: 750; color: var(--cyan); }

.note {
  background: rgba(139, 77, 255, .1);
  border: 1px solid rgba(139, 77, 255, .3);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: .97rem;
}
.note p:last-child, .note ul:last-child { margin-bottom: 0; }

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(16, 20, 33, .5);
}
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
th, td {
  text-align: left;
  padding: .68rem .85rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
tr:last-child td { border-bottom: 0; }
th {
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, .04);
  white-space: nowrap;
}

.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: 1.15rem;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: .12rem;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  background: linear-gradient(100deg, #8b40ff, #534cff 48%, #1fdbe3);
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

figure {
  margin: 1.75rem 0;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 20, 33, .45);
}
figure img { border-radius: 12px; width: 100%; }
figcaption {
  margin-top: .7rem;
  padding: 0 .5rem .2rem;
  font-size: .86rem;
  line-height: 1.55;
  color: var(--muted);
}
figcaption strong { color: var(--dim); }

.shots { display: grid; gap: 1rem; margin: 1.75rem 0; }
@media (min-width: 620px) {
  .shots { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
}
.shots figure { margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 48px;
  padding: 0 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(100deg, #8b40ff, #534cff 48%, #1fdbe3);
  box-shadow: 0 12px 36px rgba(79, 89, 255, .24);
  transition: transform .2s ease;
}
.btn:hover { transform: translateY(-2px); }

.actions { display: flex; gap: .9rem; flex-wrap: wrap; margin: 1.6rem 0 2rem; }

hr { border: 0; border-top: 1px solid var(--line-soft); margin: 2.5rem 0; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  h2 { margin-top: 2.4rem; }
  .site-header > .wrap { min-height: 64px; padding-block: .5rem; }
  .site-nav { gap: 1rem; }
}

/* ---------- video ---------- */

figure video {
  width: 100%;
  border-radius: 12px;
  background: #000;
  display: block;
}
.vid-grid { display: grid; gap: 1rem; margin: 1.75rem 0; }
@media (min-width: 700px) {
  .vid-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
.vid-grid figure { margin: 0; }

/* ---------- illustration gallery ---------- */

.illus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: .75rem;
  margin: 1.5rem 0;
}
.illus-grid figure {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--panel-solid);
}
.illus-grid img {
  border-radius: 0;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.illus-grid figcaption {
  margin: 0;
  padding: .5rem .6rem .55rem;
  font-size: .78rem;
  line-height: 1.4;
  color: var(--dim);
}
.illus-note {
  font-size: .84rem;
  color: var(--muted);
  border-left: 2px solid var(--line);
  padding-left: .9rem;
  margin: 1.25rem 0 1.75rem;
}

.illus-grid figcaption strong { color: var(--text); }
.app-tag {
  display: inline-block;
  margin-top: .3rem;
  padding: .1rem .45rem;
  border-radius: 999px;
  background: rgba(33, 230, 230, .12);
  border: 1px solid rgba(33, 230, 230, .3);
  color: var(--cyan);
  font-size: .72rem;
  font-weight: 600;
}

/* ---------- app icon grid ---------- */

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.1rem;
  margin: 1.6rem 0 2rem;
  text-align: center;
}
.icon-grid img {
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 22%;
  margin: 0 auto .6rem;
}
.icon-grid strong {
  display: block;
  font-size: .88rem;
  color: var(--text);
}
.icon-grid span {
  display: block;
  font-size: .76rem;
  color: var(--muted);
  margin-top: .15rem;
}

.app-icon-inline {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 22%;
  vertical-align: middle;
  margin-right: .55rem;
}
