/* iemygadgets.com — one stylesheet for every page.
   Colours follow the IEMY app palette (app/src/pixel.rs) and the K01 sales pages. */

:root {
  --ink: #153d3b;
  --ink-2: #3f5f5b;
  --ink-3: #5b7773;
  --accent: #257f76;
  --accent-deep: #1d6f66;
  --mint: #dcefe9;
  --mint-2: #e9f3ee;
  --paper: #f5f7f5;
  --card: #ffffff;
  --line: #d5e5dd;
  --pine: #1c4540;
  --pine-2: #183b37;
  --pine-card: #24524b;
  --pine-line: #3a6a61;
  --on-pine: #eef8f4;
  --on-pine-2: #b9d2c9;
  --lime: #d9d43a;

  --working: #2fae98;
  --attention: #d9a53c;
  --success: #8fbf55;
  --error: #d9755f;
  --idle: #a9bab5;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(21, 61, 59, .05), 0 12px 32px -12px rgba(21, 61, 59, .18);
  --wrap: 1180px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Noto Sans SC", "Source Han Sans SC",
          "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
html[lang="en"] { --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 3px solid #2c5a8c; outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 12px; color: #fff; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 247, 245, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(213, 229, 221, .7);
}
.site-head .wrap { display: flex; align-items: center; gap: 28px; height: 62px; }
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.brand svg { height: 17px; width: auto; }
.nav { display: flex; gap: 26px; margin-left: auto; align-items: center; font-size: 15px; }
.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav .lang {
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font-size: 13px; letter-spacing: .04em;
}
@media (max-width: 560px) {
  .site-head .wrap { gap: 14px; }
  .nav { gap: 16px; font-size: 14px; }
  .nav .hide-sm { display: none; }
}

/* ---------- type ---------- */
.eyebrow {
  margin: 0 0 14px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow .n { opacity: .7; margin-right: .4em; }
h1, h2, h3 { margin: 0; line-height: 1.18; letter-spacing: -.01em; }
html[lang="zh-Hans"] h1, html[lang="zh-Hans"] h2 { letter-spacing: .01em; }
.display { font-size: clamp(40px, 6.4vw, 76px); font-weight: 800; }
.h2 { font-size: clamp(30px, 4.2vw, 50px); font-weight: 800; }
.h3 { font-size: 21px; font-weight: 700; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); margin: 18px 0 0; max-width: 40em; }
.small { font-size: 13px; color: var(--ink-3); }
.note { font-size: 12.5px; color: var(--ink-3); margin-top: 18px; }

/* ---------- buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-size: 15.5px; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: rgba(255, 255, 255, .6); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }

/* ---------- sections ---------- */
section { padding: clamp(72px, 10vw, 128px) 0; }
.sec-head { max-width: 720px; margin-bottom: 44px; }
.tint { background: linear-gradient(180deg, var(--paper) 0%, var(--mint-2) 100%); }
.pine { background: radial-gradient(1200px 600px at 85% -10%, #26564f 0%, transparent 60%), var(--pine-2); color: var(--on-pine); }
.pine .eyebrow { color: #8fd8c8; }
.pine .lede, .pine .small, .pine .note { color: var(--on-pine-2); }
.pine a { color: #a5e4d5; }

.card {
  background: var(--card); border: 1px solid rgba(213, 229, 221, .8); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.photo { border-radius: var(--radius); overflow: hidden; background: #eef0ef; }
.photo img { width: 100%; height: 100%; object-fit: cover; }

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .g2, .g4 { grid-template-columns: 1fr; } }

.tile { padding: 26px 26px 24px; }
.tile .ico { width: 26px; height: 26px; color: var(--accent); margin-bottom: 18px; }
.tile h3 { font-size: 19px; font-weight: 700; }
.tile p { margin: 8px 0 0; color: var(--ink-3); font-size: 15px; }

/* ---------- hero ---------- */
.hero { padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 8vw, 104px); background: radial-gradient(900px 520px at 90% 0%, #dcefe9 0%, transparent 70%), linear-gradient(180deg, #eef5f1 0%, var(--paper) 100%); overflow: hidden; }
.hero-top { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: end; }
.hero-badge { justify-self: end; padding: 22px 28px; min-width: 210px; }
.hero-badge .big { font-size: 64px; line-height: 1; font-weight: 800; color: var(--accent); }
.hero-badge .big small { font-size: 18px; font-weight: 600; margin-left: 6px; }
.hero-badge p { margin: 10px 0 0; font-weight: 600; }
.hero-badge .small { margin-top: 4px; font-weight: 400; }
.hero-shot { margin-top: 44px; position: relative; aspect-ratio: 3 / 2; width: 100%; }
.hero-shot img { object-position: 50% 66%; }
.hero-chip {
  position: absolute; left: 22px; top: 22px; background: rgba(255, 255, 255, .9); border-radius: 999px;
  padding: 7px 16px; font-size: 13.5px; font-weight: 600; color: var(--accent-deep);
}
.hero-bar {
  display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; background: var(--card); border-radius: var(--radius-sm);
  border: 1px solid rgba(213, 229, 221, .8);
  box-shadow: var(--shadow);
}
.hero-bar div { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 16px 10px; font-weight: 600; font-size: 15.5px; }
.hero-bar div + div { border-left: 1px solid var(--line); }
.hero-bar svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
@media (max-width: 800px) {
  .hero-top { grid-template-columns: 1fr; }
  .hero-badge { justify-self: start; }
  .hero-shot { aspect-ratio: 4 / 4; }
  .hero-bar { grid-template-columns: 1fr; }
  .hero-bar div { justify-content: flex-start; padding: 13px 18px; }
  .hero-bar div + div { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- lanes demo ---------- */
.lanes { display: grid; grid-template-columns: .95fr 1.05fr; gap: 28px; align-items: center; }
@media (max-width: 900px) { .lanes { grid-template-columns: 1fr; } }
.board { position: relative; border-radius: var(--radius); overflow: hidden; background: #eceeed; aspect-ratio: 1; }
.board img { width: 100%; height: 100%; }
/* Clear-key centres measured on the top-view render (see site-iemy/README.md). */
.glow {
  position: absolute; top: 41.1%; width: 16.4%; height: 16.4%; transform: translate(-50%, -50%);
  border-radius: 14%; pointer-events: none;
  background: var(--c, transparent); mix-blend-mode: multiply; opacity: 0;
  transition: opacity .5s ease, background-color .5s ease;
}
.glow::after {
  content: ""; position: absolute; inset: -18%; border-radius: 30%;
  background: radial-gradient(closest-side, var(--c, transparent), transparent); mix-blend-mode: screen; opacity: .55;
}
.glow.on { opacity: .62; }
.glow.breathe { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .38; } 50% { opacity: .72; } }
.glow:nth-of-type(1) { left: 23.4%; }
.glow:nth-of-type(2) { left: 41.2%; }
.glow:nth-of-type(3) { left: 58.8%; }
.glow:nth-of-type(4) { left: 76.4%; }

.lane-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.lane {
  appearance: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
  background: var(--pine-card); border: 1px solid var(--pine-line); border-radius: 18px; padding: 18px 18px 16px;
  transition: border-color .3s, background .3s, transform .2s;
}
.lane:hover { border-color: #5d8a80; }
.lane:active { transform: translateY(1px); }
.lane .tag { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--on-pine-2); }
.lane .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }
.lane .state { display: block; margin-top: 10px; font-size: 25px; font-weight: 800; }
.lane .what { display: block; font-size: 14px; color: var(--on-pine-2); margin-top: 2px; }
.lane .bar { display: block; height: 3px; border-radius: 3px; margin-top: 14px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.lane .bar i { display: block; height: 100%; width: var(--p, 10%); background: var(--c); transition: width .6s ease, background .5s; }
.lane .hint { display: block; font-size: 12.5px; color: var(--on-pine-2); margin-top: 10px; }
.lane[data-s="attention"] { border-color: color-mix(in srgb, var(--attention) 60%, transparent); }

.flow { display: flex; align-items: center; gap: 20px; margin-top: 36px; padding-top: 26px; border-top: 1px solid var(--pine-line); flex-wrap: wrap; font-size: 19px; font-weight: 600; }
.flow span { color: var(--on-pine-2); font-weight: 400; font-size: 14px; margin-right: 8px; }
.flow .arr { color: var(--on-pine-2); font-weight: 300; }
.mode-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 28px; }
.mode { border: 1px solid var(--pine-line); border-radius: 16px; padding: 18px 20px; }
.mode b { display: block; font-size: 16px; }
.mode p { margin: 6px 0 0; font-size: 14px; color: var(--on-pine-2); }
@media (max-width: 640px) { .mode-row, .lane-cards { grid-template-columns: 1fr; } }

/* ---------- split media ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.media-card { display: flex; flex-direction: column; overflow: hidden; }
.media-card .photo { border-radius: 0; aspect-ratio: 4 / 3; }
.media-card .body { padding: 24px 26px 26px; }
.media-card h3 { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.media-card h3 svg { width: 22px; height: 22px; color: var(--accent); }
.media-card p { margin: 8px 0 0; color: var(--ink-3); }

.voice { display: grid; grid-template-columns: .9fr 1.1fr; gap: 18px; }
@media (max-width: 800px) { .voice { grid-template-columns: 1fr; } }
.voice .card { padding: 34px; display: flex; flex-direction: column; justify-content: center; }
.wave { display: flex; align-items: center; gap: 6px; height: 54px; }
.wave i { width: 3px; border-radius: 2px; background: var(--accent); height: 30%; animation: wave 1.6s ease-in-out infinite; }
.wave i:nth-child(n+14) { background: #a7d3c9; }
@keyframes wave { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
.quote { margin: 24px 0; padding: 16px 20px; border-radius: 14px; background: var(--mint); font-size: 18px; font-weight: 600; }
.voice .seq { margin-top: 18px; color: var(--accent-deep); font-weight: 600; }

/* ---------- desk ---------- */
.desk { position: relative; aspect-ratio: 3 / 2; }
.desk .hero-chip { top: 22px; }

/* ---------- works with ---------- */
.agents { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 800px) { .agents { grid-template-columns: repeat(2, 1fr); } }
.agent { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.agent img { width: 34px; height: 34px; flex: none; object-fit: contain; }
.agent b { display: block; font-size: 15.5px; }
.agent span { font-size: 12.5px; color: var(--ink-3); }
.agent .lit { color: var(--accent-deep); }

/* ---------- specs ---------- */
.specs { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.specs th, .specs td { text-align: left; vertical-align: top; padding: 16px 0; border-bottom: 1px solid var(--line); }
.specs th { width: 30%; font-weight: 600; color: var(--ink-2); padding-right: 20px; }
.specs td { color: var(--ink); }

/* ---------- steps ---------- */
.steps { counter-reset: step; }
.step { padding: 26px; position: relative; }
.step .num { font-size: 26px; font-weight: 300; color: var(--accent); opacity: .75; }
.step h3 { font-size: 21px; font-weight: 800; margin-top: 10px; }
.step p { margin: 8px 0 0; color: var(--ink-3); font-size: 15px; }

/* ---------- downloads ---------- */
.dl { padding: 26px; display: flex; flex-direction: column; }
.dl .os { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; }
.dl .os svg { width: 22px; height: 22px; }
.dl .req { margin: 6px 0 18px; color: var(--ink-3); font-size: 14.5px; }
.dl .btn { align-self: flex-start; margin-top: auto; }
.dl .meta { margin-top: 14px; font-size: 12px; color: var(--ink-3); word-break: break-all; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.install { margin-top: 22px; padding: 26px 28px; }
.install h3 { font-size: 17px; }
.install ol { margin: 10px 0 0; padding-left: 20px; color: var(--ink-2); }
.install li + li { margin-top: 4px; }

/* ---------- faq ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 36px 20px 0; position: relative; font-weight: 600; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .a { padding: 0 0 22px; color: var(--ink-2); max-width: 46em; }
.faq .a p { margin: 0 0 10px; }

/* ---------- home ---------- */
.manifesto { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.manifesto p { font-size: 19px; color: var(--ink-2); margin: 0 0 18px; }
@media (max-width: 800px) { .manifesto { grid-template-columns: 1fr; gap: 20px; } }
.product-card { display: grid; grid-template-columns: 1.1fr .9fr; overflow: hidden; }
.product-card .photo { border-radius: 0; min-height: 380px; }
.product-card .body { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; }
.product-card .model { font-size: 15px; font-weight: 600; color: var(--accent); letter-spacing: .1em; }
@media (max-width: 800px) { .product-card { grid-template-columns: 1fr; } .product-card .photo { min-height: 0; aspect-ratio: 4 / 3; } }

/* ---------- footer ---------- */
.site-foot { background: var(--pine-2); color: var(--on-pine-2); padding: 56px 0 40px; font-size: 14px; }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-foot .brand { color: var(--on-pine); }
.site-foot .brand svg { height: 20px; }
.site-foot h4 { margin: 0 0 12px; color: var(--on-pine); font-size: 14px; font-weight: 600; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li + li { margin-top: 8px; }
.site-foot a { color: var(--on-pine-2); text-decoration: none; }
.site-foot a:hover { color: var(--on-pine); }
.site-foot .legal { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--pine-line); font-size: 12.5px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
@media (max-width: 700px) { .site-foot .cols { grid-template-columns: 1fr 1fr; } .site-foot .cols > :first-child { grid-column: 1 / -1; } }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .wave i, .glow.breathe { animation: none; }
  .glow, .lane .bar i { transition: none; }
}
