/* SAGSINs — the page reads like a cross-section: sky and sea (hero), under water (buoy), under ground (soil),
   the network (data path), daylight (the app). One family, Archivo variable: wide for display, normal for text. */
@font-face { font-family: "Archivo"; src: url("fonts/archivo-var.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }

:root {
  --sky: #06172B;
  --sea: #071E31;
  --deep: #04131F;
  --umber: #1B1109;
  --umber-2: #2A1B10;
  --slate: #0B1A2A;
  --day: #EEF4F3;
  --day-2: #FFFFFF;
  --ink: #0B1B2B;
  --ink-soft: #3B5566;
  --text: #E7F5FC;
  --soft: #BCD6E3;
  --muted: #8EB0C3;
  --dim: #5D7F93;
  --teal: #3EE6C4;
  --teal-soft: #9CF6E6;
  --orange: #F26B21;
  --orange-hi: #F5894F;
  --ochre: #C98A3B;
  --line: rgba(156, 246, 230, .14);
  --line-strong: rgba(156, 246, 230, .32);
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --sans: "Archivo", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--sky); color-scheme: dark; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--text); background: var(--sky); line-height: 1.65; font-size: 17px;
       -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
::selection { background: rgba(62, 230, 196, .3); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.display { font-stretch: 112%; font-weight: 640; letter-spacing: -.012em; line-height: 1.08; }
:lang(zh-CN) .display { font-stretch: 100%; letter-spacing: 0; line-height: 1.18; }
.ico { flex: none; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--text); color: var(--sky);
        padding: 10px 16px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 26px; border-radius: 14px;
       font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer; border: 0; white-space: nowrap;
       transition: background .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.btn-primary { background: var(--orange); color: #1B0B02; box-shadow: 0 10px 30px -12px rgba(242, 107, 33, .8); }
.btn-primary:hover { background: var(--orange-hi); transform: translateY(-1px); }
.btn-ghost { color: var(--text); background: rgba(8, 32, 50, .5); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: rgba(62, 230, 196, .7); }
.btn.is-soon { opacity: .55; cursor: default; box-shadow: none; pointer-events: none; }

/* ---------------------------------------------------------------- header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; border-bottom: 1px solid transparent;
               transition: background .3s, border-color .3s; }
.site-header.is-scrolled { background: rgba(6, 23, 43, .78); border-bottom-color: var(--line);
                           -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }
.brand img { display: block; height: 40px; width: auto; }
.site-nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 30px); }
.site-nav a { color: var(--soft); text-decoration: none; font-size: 15px; transition: color .2s; }
.site-nav a:hover { color: #fff; }
.nav-login { display: inline-flex; align-items: center; gap: 6px; }
.site-nav .lang-switch { border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 13px; font-size: 13px; letter-spacing: .04em;
                         background: none; color: var(--soft); cursor: pointer; font-family: var(--sans); }
.site-nav .lang-switch:hover { border-color: rgba(62, 230, 196, .6); }
.site-nav .nav-cta { color: #1B0B02; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; min-height: max(100svh, 720px); display: flex; flex-direction: column; justify-content: flex-end;
        overflow: hidden; isolation: isolate; background: var(--sky); }
.hero-art { position: absolute; inset: 0; z-index: 0; }
.hero-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-scene--mobile { display: none; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(6, 23, 43, .88) 0%, rgba(6, 23, 43, .62) 32%, rgba(6, 23, 43, .1) 58%, rgba(6, 23, 43, 0) 72%),
              linear-gradient(180deg, rgba(6, 23, 43, .55) 0%, rgba(6, 23, 43, 0) 20%, rgba(6, 23, 43, 0) 70%, var(--deep) 100%); }
.hero-content { position: relative; z-index: 2; padding: 160px 0 56px; }
.eyebrow { margin: 0; font-size: 15px; color: var(--teal-soft); font-weight: 500; }
.hero h1 { margin: 18px 0 24px; font-size: clamp(42px, 6.6vw, 98px); max-width: 11em;
           background: linear-gradient(180deg, #FFFFFF 15%, #DDFBF4 60%, #8CEBD6 100%);
           -webkit-background-clip: text; background-clip: text; color: transparent; }
html[lang="en"] .hero h1 { font-size: clamp(40px, 5.6vw, 84px); max-width: 12em; }
.lead { margin: 0 0 36px; max-width: 30em; font-size: clamp(17px, 1.3vw, 20px); color: var(--soft); }
html[lang="en"] .lead { max-width: 40em; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; }
.facts { position: relative; z-index: 2; list-style: none; margin: 0 auto; padding: 22px 0 34px; display: flex; flex-wrap: wrap; gap: 14px 40px;
         border-top: 1px solid var(--line); color: var(--soft); font-size: 15px; }
.facts li { display: flex; align-items: center; gap: 10px; }
.facts .ico { color: var(--teal); }

/* hero motion (CSS); packets use SMIL inside the SVG */
.w1 { animation: drift 14s linear infinite; }
.w2 { animation: drift 22s linear infinite reverse; }
.w3 { animation: drift 34s linear infinite; }
@keyframes drift { to { transform: translateX(-220px); } }
.hero-scene--mobile .w1 { animation-duration: 12s; } .hero-scene--mobile .w2 { animation-duration: 18s; }
.bob { animation: bob 5.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(7px) rotate(1.5deg); } }
.sway { animation: sway 5.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 0; }
@keyframes sway { 0%, 100% { transform: rotate(1.2deg); } 50% { transform: rotate(-1.2deg); } }
.arc { animation: arc 2.1s ease-out infinite; }
@keyframes arc { 0% { opacity: .15; } 30% { opacity: 1; } 100% { opacity: .15; } }
.led { animation: led 2.1s ease-in-out infinite; }
@keyframes led { 50% { opacity: .35; } }
.pulse { animation: pulse 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { 50% { opacity: .55; transform: scale(1.06); } }
.twinkle { animation: twinkle 4.5s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .15; } }

/* ---------------------------------------------------------------- sections */
.section { position: relative; }
.section-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; }
.section-head h2, .app-text h2, .contact h2 { font-size: clamp(34px, 4.4vw, 60px); }
.section-intro { color: var(--muted); font-size: 18px; max-width: 28em; }
.section-head .section-intro { justify-self: end; text-align: right; }

/* products: two spec sheets, under water then under ground */
.products { background: var(--deep); padding-top: clamp(64px, 7vw, 100px); }
.products .section-head { margin-bottom: clamp(40px, 5vw, 72px); }
.sheet { padding: clamp(40px, 5vw, 80px) 0; }
.sheet--buoy { background: linear-gradient(180deg, var(--deep), var(--sea)); }
.sheet--soil { background: linear-gradient(180deg, var(--umber-2), var(--umber)); position: relative; }
.sheet--soil::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 72px; pointer-events: none;
  background: var(--sea);
  clip-path: polygon(0 0, 100% 0, 100% 20%, 86% 58%, 70% 30%, 52% 70%, 36% 38%, 20% 72%, 8% 45%, 0 70%); }
.sheet--soil .sheet-inner { padding-top: 40px; }
.sheet-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.sheet--flip .sheet-art { order: 2; }
.sheet-art { margin: 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--line);
             box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8); }
.sheet--soil .sheet-art { border-color: rgba(201, 138, 59, .3); }
.sheet-art img { display: block; width: 100%; height: auto; }
.sheet-text h3 { font-size: clamp(28px, 3vw, 40px); margin-bottom: 14px; }
.sheet-lead { color: var(--soft); font-size: 17px; margin-bottom: 30px; max-width: 34em; }
.specs { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.spec { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
html[lang="en"] .spec { grid-template-columns: 7.5em minmax(0, 1fr); }
.spec dt { color: var(--teal); font-weight: 600; font-size: 15px; }
.sheet--soil .spec dt { color: var(--ochre); }
.spec dd { margin: 0; color: var(--soft); font-size: 15.5px; }

/* data path */
.flow { background: var(--slate); padding: clamp(72px, 8vw, 116px) 0; border-top: 1px solid rgba(201, 138, 59, .25); }
.flow .section-head { margin-bottom: clamp(32px, 4vw, 56px); }
.flow-diagram { display: block; width: 100%; height: auto; margin: 0 auto 24px; max-width: 1000px; font-family: var(--sans); }
.flow-diagram--mobile { display: none; max-width: 420px; }
.flow-diagram text { fill: var(--soft); font-size: 17px; }
.flow-diagram .fnode text { fill: var(--text); font-weight: 600; font-size: 18px; }
.flow-diagram .flabel--sync { fill: var(--orange-hi); font-size: 15px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px;
         border-top: 1px solid var(--line); padding-top: 32px; }
.step-no { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong);
           color: var(--teal); font-weight: 600; font-size: 15px; margin-bottom: 14px; }
.steps h3 { font-size: 19px; margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 15.5px; }

/* app: daylight */
.app { background: var(--day); color: var(--ink); padding: clamp(72px, 8vw, 120px) 0; }
.app::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 56px; background: var(--slate);
               clip-path: ellipse(60% 100% at 50% 0); }
.app-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.phone { margin: 0; filter: drop-shadow(0 40px 60px rgba(11, 27, 43, .35)); }
.phone img { display: block; width: 100%; height: auto; }
.app-text h2 { color: var(--ink); }
.app .section-intro { color: var(--ink-soft); margin: 10px 0 30px; }
.features { list-style: none; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 32px; }
.features li { display: flex; gap: 14px; align-items: flex-start; }
.features .ico { color: var(--orange); margin-top: 2px; }
.features h3 { font-size: 18px; margin-bottom: 4px; color: var(--ink); }
.features p { color: var(--ink-soft); font-size: 15.5px; }
.dl-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 32px; align-items: start; padding: 24px 28px;
           border-radius: 20px; background: var(--day-2); border: 1px solid rgba(11, 27, 43, .1); box-shadow: 0 30px 60px -40px rgba(11, 27, 43, .35); }
.dl-app { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; }
.dl-icon { width: 56px; height: 56px; border-radius: 14px; }
.dl-name { font-weight: 600; font-size: 19px; }
.dl-tagline { color: var(--ink-soft); font-size: 14.5px; }
.dl-stores { display: grid; gap: 18px; }
.dl-store + .dl-store { border-top: 1px solid rgba(11, 27, 43, .1); padding-top: 18px; }
.dl-title { font-weight: 600; margin-bottom: 10px; }
.app .btn-ghost { color: var(--ink); background: #F5F8F8; border-color: rgba(11, 27, 43, .18); }
.app .btn-ghost:hover { border-color: var(--orange); }
.dl-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.dl-meta b { font-weight: 600; margin-right: 2px; }
.dl-meta:empty { display: none; }
.dl-note { margin-top: 10px; color: var(--ink-soft); font-size: 13.5px; }
.dl-qr { margin: 0; text-align: center; }
.qr { width: 124px; height: 124px; padding: 8px; border-radius: 12px; background: var(--ink); }
.qr svg { display: block; width: 100%; height: 100%; }
.dl-qr figcaption { margin-top: 8px; max-width: 10.5em; margin-inline: auto; color: var(--ink-soft); font-size: 12.5px; line-height: 1.4; }

/* contact */
.contact { background: var(--sky); padding: clamp(72px, 8vw, 120px) 0 clamp(48px, 6vw, 80px); }
.contact-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px 64px; align-items: center; }
.contact-lead { margin-top: 16px; color: var(--soft); font-size: 18px; max-width: 26em; }
.contact-card { padding: clamp(28px, 4vw, 44px); border-radius: 22px; border: 1px solid var(--line);
                background: linear-gradient(180deg, rgba(9, 34, 52, .7), rgba(4, 19, 31, .9)); }
.contact-email { display: inline-flex; align-items: center; gap: 12px; font-size: clamp(20px, 2.4vw, 30px); font-weight: 600; text-decoration: none;
                 color: var(--teal-soft); overflow-wrap: anywhere; }
.contact-email .ico { color: var(--teal); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }
.company { margin: 26px 0 0; color: var(--dim); font-size: 14px; }

/* footer */
.site-footer { background: var(--sky); border-top: 1px solid var(--line); padding: 30px 0 calc(30px + env(safe-area-inset-bottom)); }
.footer-inner { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.footer-inner img { height: 32px; width: auto; display: block; }
.legal { color: var(--dim); font-size: 14px; }
.footer-links { margin-left: auto; display: flex; gap: 24px; font-size: 14px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ---------------------------------------------------------------- console */
.console-page { background: var(--sky); }
.console { padding: 120px 0 80px; min-height: 100svh; }
.auth-panel { max-width: 440px; margin: 6vh auto 0; padding: 36px; border-radius: 22px; border: 1px solid var(--line);
              background: linear-gradient(180deg, rgba(9, 34, 52, .7), rgba(4, 19, 31, .9)); }
.auth-panel h1 { font-size: 34px; margin-bottom: 8px; }
.auth-lead { color: var(--muted); margin-bottom: 24px; font-size: 15.5px; }
.auth-form label { display: block; margin-bottom: 16px; font-size: 14px; color: var(--soft); }
.auth-form input, .chart-head select { display: block; width: 100%; margin-top: 6px; height: 48px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: rgba(4, 19, 31, .7); color: var(--text); font: 16px var(--sans); }
.auth-form input:focus { outline: 2px solid var(--teal); outline-offset: 0; border-color: transparent; }
.form-error { color: #F7A0A0; font-size: 14px; margin: -6px 0 14px; }
.auth-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 0; }
.auth-actions .btn { flex: 1 1 auto; }
.console-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.console-head h1 { font-size: clamp(30px, 4vw, 44px); }
.console-user { color: var(--muted); font-size: 15px; }
.empty { color: var(--muted); padding: 40px 0; }
.device-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.device-list a { display: block; padding: 22px 24px; border-radius: 18px; border: 1px solid var(--line); text-decoration: none;
                 background: linear-gradient(180deg, rgba(9, 34, 52, .6), rgba(4, 19, 31, .85)); transition: border-color .2s; }
.device-list a:hover { border-color: rgba(62, 230, 196, .6); }
.device-list h2 { font-size: 20px; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); flex: none; }
.dot.on { background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.device-list p { color: var(--muted); font-size: 14.5px; }
.back { color: var(--teal-soft); text-decoration: none; font-size: 15px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.tile { padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line); background: rgba(9, 34, 52, .55); }
.tile p { color: var(--muted); font-size: 14px; }
.tile b { display: block; font-size: 32px; font-weight: 640; font-stretch: 108%; color: var(--teal-soft); line-height: 1.1; margin: 4px 0 2px; }
.tile small { color: var(--dim); font-size: 13px; }
.chart-card { padding: 20px 22px; border-radius: 18px; border: 1px solid var(--line); background: rgba(9, 34, 52, .45); margin-bottom: 20px; }
.chart-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: end; margin-bottom: 14px; }
.chart-head label { font-size: 13.5px; color: var(--muted); }
.chart-head select { width: auto; min-width: 150px; height: 40px; margin-top: 4px; }
.chart-head .btn { margin-left: auto; }
#chart { display: block; width: 100%; height: auto; }
.chart-note { color: var(--dim); font-size: 13.5px; margin-top: 8px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.records { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.records th, .records td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.records th { color: var(--muted); font-weight: 500; }
.records td { color: var(--soft); font-variant-numeric: tabular-nums; }
.more { text-align: center; margin: 20px 0 0; }

/* 404 */
.notfound { min-height: 100svh; display: grid; place-items: center; text-align: center; }
.notfound-inner { padding: 40px 24px; }
.notfound-inner img { height: 56px; width: auto; margin-bottom: 36px; }
.notfound h1 { font-size: 40px; margin-bottom: 14px; }
.notfound p { color: var(--muted); margin: 8px 0; }
.notfound a { color: var(--teal-soft); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .app-grid { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .section-head { grid-template-columns: minmax(0, 1fr); }
  .section-head .section-intro { justify-self: start; text-align: left; }
  .sheet-inner { grid-template-columns: minmax(0, 1fr); }
  .sheet--flip .sheet-art { order: 0; }
  .app-grid { grid-template-columns: minmax(0, 1fr); }
  .phone { max-width: 300px; margin-inline: auto; }
  .contact-inner { grid-template-columns: minmax(0, 1fr); }
  .site-nav a:not(.lang-switch):not(.nav-cta) { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .header-inner { height: 64px; }
  .brand img { height: 34px; }
  .nav-cta { display: none; }
  .hero { min-height: max(100svh, 640px); }
  .hero-scene--desktop { display: none; }
  .hero-scene--mobile { display: block; }
  .hero::before { background: linear-gradient(180deg, rgba(6, 23, 43, .5) 0%, rgba(6, 23, 43, .05) 25%, rgba(6, 23, 43, .3) 48%, rgba(6, 23, 43, .92) 68%, var(--deep) 100%); }
  .hero-content { padding: 120px 0 28px; }
  .hero h1 { margin: 14px 0 16px; font-size: clamp(36px, 10.5vw, 44px); }
  .lead { margin-bottom: 26px; }
  .actions .btn { flex: 1 1 auto; }
  .facts { gap: 10px; padding: 18px 0 28px; font-size: 14px; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .dl-card { grid-template-columns: minmax(0, 1fr); }
  .dl-qr { justify-self: center; }
  .dl-store .btn { width: 100%; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .flow-diagram--desktop { display: none; }
  .flow-diagram--mobile { display: block; }
  .flow-diagram text { font-size: 21px; }
  .flow-diagram .fnode text { font-size: 22px; }
  .flow-diagram .flabel--sync { font-size: 19px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-links { margin: 0; }
  .console { padding-top: 96px; }
  .auth-panel { padding: 28px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
