:root {
  --ink: #0a1628;
  --ink-soft: #243447;
  --navy: #071525;
  --deep: #04101c;
  --teal: #1ec8b0;
  --teal-deep: #0d8f7c;
  --amber: #ffb020;
  --amber-ink: #1a1200;
  --fog: #e8eef5;
  --mist: #f4f7fb;
  --line: rgba(255, 255, 255, 0.12);
  --line-dark: #d0dae6;
  --glow: rgba(30, 200, 176, 0.35);
  --font-display: "Sora", "Noto Sans TC", sans-serif;
  --font-body: "Noto Sans TC", "Sora", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--mist);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a { color: var(--teal-deep); }

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

/* —— Topbar —— */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
  border-bottom: 1px solid transparent;
  background: transparent;
}

.topbar.is-solid {
  background: rgba(4, 16, 28, 0.88);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .12em;
  font-size: 1.15rem;
  color: #fff;
  text-decoration: none;
}

.nav-main {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem .75rem;
  align-items: center;
}

.lang {
  display: flex;
  gap: .65rem;
  margin-right: .25rem;
}

.lang a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: .9rem;
}

.lang a[aria-current="page"] {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.btn-mkt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  border-radius: 10px;
  padding: .55rem 1.05rem;
  font-weight: 700;
  font-family: var(--font-display);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.btn-mkt:hover { transform: translateY(-1px); }

.btn-mkt-amber {
  background: var(--amber);
  color: var(--amber-ink);
  box-shadow: 0 8px 24px rgba(255, 176, 32, 0.28);
}

.btn-mkt-amber:hover { background: #ffc14d; color: var(--amber-ink); }

.btn-mkt-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.btn-mkt-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-mkt-ink {
  background: var(--ink);
  color: #fff;
}

.btn-mkt-ink:hover { background: #132338; color: #fff; }

.btn-mkt-lg {
  padding: .85rem 1.35rem;
  font-size: 1.02rem;
}

.btn-nav-quiet {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
  padding: .35rem .2rem;
}

.btn-nav-quiet:hover { color: #fff; }

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: center;
  color: #fff;
  background: #04101c;
  overflow: hidden;
  padding: 6.5rem 0 4rem;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Crop DeeVid free-tier watermark (top-right) out of frame */
  object-position: 32% 62%;
  transform: scale(1.18);
  transform-origin: center center;
}

.hero-media-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 35% 55%;
  display: none;
}

.hero-media.is-static .hero-video { display: none; }
.hero-media.is-static .hero-media-fallback { display: block; }

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(105deg, rgba(2, 8, 16, 0.82) 0%, rgba(2, 8, 16, 0.55) 42%, rgba(2, 8, 16, 0.35) 70%, rgba(2, 8, 16, 0.55) 100%),
    linear-gradient(180deg, rgba(2, 8, 16, 0.45) 0%, transparent 28%, transparent 70%, rgba(2, 8, 16, 0.72) 100%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 15%, transparent 75%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .hero-media-fallback { display: block; }
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1;
  margin: 0 0 .85rem;
  background: linear-gradient(105deg, #fff 30%, var(--teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 1rem;
  max-width: 18ch;
}

.hero-lead {
  font-size: 1.08rem;
  color: rgba(232, 244, 250, 0.9);
  max-width: 36rem;
  margin: 0 0 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.hero-visual {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 540px;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 12% -8% -8% 8%;
  background: radial-gradient(circle at 50% 40%, var(--glow), transparent 65%);
  filter: blur(8px);
  z-index: 0;
}

.hero-frame {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 28px 60px rgba(0, 0, 0, 0.45);
  animation: hero-float 7s ease-in-out infinite;
  cursor: zoom-in;
}

.hero-frame img {
  display: block;
  width: 100%;
  border-radius: 18px;
}

@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  z-index: 2;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.55);
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  z-index: 2;
}

.hero-scroll span {
  display: block;
  width: 1px;
  height: 28px;
  margin: .45rem auto 0;
  background: linear-gradient(#fff, transparent);
  animation: scroll-pulse 1.8s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: .3; transform: scaleY(.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* —— Reveal —— */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* —— Sections —— */
.section {
  padding: 4.5rem 0;
}

.section-dark {
  background: var(--deep);
  color: #e6eef6;
}

.section-tint {
  background:
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(30, 200, 176, 0.08), transparent 55%),
    linear-gradient(180deg, #eef5f4 0%, var(--mist) 100%);
}

.section-ink {
  background: linear-gradient(180deg, #0a1c2e 0%, #071525 100%);
  color: #e6eef6;
}

.kicker {
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin: 0 0 .65rem;
}

.section-dark .kicker,
.section-ink .kicker { color: var(--teal); }

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0 0 .75rem;
  letter-spacing: -.01em;
}

.section-lead {
  max-width: 40rem;
  margin: 0 0 2rem;
  color: var(--ink-soft);
}

.section-dark .section-lead,
.section-ink .section-lead { color: rgba(230, 238, 246, 0.78); }

.scope-body {
  max-width: 48rem;
  font-size: 1.02rem;
  color: rgba(230, 238, 246, 0.86);
  margin: 0;
}

/* Who — no heavy cards */
.who-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .who-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}

.who-item {
  padding: 0 0 0 1rem;
  border-left: 3px solid var(--teal);
}

.who-item:nth-child(2) { border-left-color: #3d8bfd; }
.who-item:nth-child(3) { border-left-color: var(--amber); }

.who-item h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 .45rem;
}

.who-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .98rem;
}

/* Features bento */
.feature-bento {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .feature-bento {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-cell {
  padding: 1.35rem 1.25rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(16, 35, 58, 0.06);
  transition: border-color .2s ease, transform .2s ease;
}

.feature-cell:hover {
  border-color: rgba(30, 200, 176, 0.45);
  transform: translateY(-2px);
}

.feature-cell h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 .4rem;
}

.feature-cell p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .94rem;
}

/* Solutions */
.solution-panels {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .solution-panels { grid-template-columns: repeat(3, 1fr); }
}

.solution-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.5rem 1.35rem;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line-dark);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.solution-panel:hover {
  transform: translateY(-4px);
  border-color: var(--teal);
  box-shadow: 0 18px 40px rgba(7, 21, 37, 0.1);
  color: inherit;
}

.solution-num {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--teal-deep);
  margin-bottom: .75rem;
}

.solution-panel h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 .55rem;
}

.solution-panel p {
  flex: 1;
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: .95rem;
}

.solution-more {
  font-weight: 700;
  color: var(--teal-deep);
  font-size: .92rem;
}

/* Screens */
.screen-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .screen-grid { grid-template-columns: repeat(2, 1fr); }
}

.shot-frame {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  transition: transform .25s ease;
}

.shot-frame:hover { transform: scale(1.015); }

.shot-frame img {
  display: block;
  width: 100%;
}

.screen-grid figcaption {
  margin-top: .7rem;
  font-size: .92rem;
  color: rgba(230, 238, 246, 0.75);
}

.screen-grid figcaption strong {
  color: #fff;
  font-weight: 700;
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .85rem;
  counter-reset: step;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
  }
}

.steps li {
  position: relative;
  padding: 1.15rem 1rem 1.15rem 1rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line-dark);
  counter-increment: step;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .08em;
  color: var(--teal-deep);
  margin-bottom: .55rem;
}

.steps li strong {
  display: block;
  font-family: var(--font-display);
  margin-bottom: .25rem;
}

.steps-note {
  margin: 1.25rem 0 0;
  color: var(--ink-soft);
  font-size: .95rem;
}

/* Demo */
.demo-stage {
  display: grid;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(30, 200, 176, 0.25), transparent 50%),
    linear-gradient(135deg, #0c2740 0%, #0d5c55 100%);
  color: #fff;
  box-shadow: 0 24px 50px rgba(7, 21, 37, 0.25);
}

@media (min-width: 768px) {
  .demo-stage {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    padding: 2.5rem;
  }
}

.demo-stage h2 {
  color: #fff;
  margin-bottom: .65rem;
}

.demo-stage p { color: rgba(255, 255, 255, 0.88); }

.demo-creds {
  display: grid;
  gap: .65rem;
}

.cred-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: .2rem .5rem;
}

.btn-copy {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  border-radius: 8px;
  padding: .25rem .65rem;
  font-size: .85rem;
  cursor: pointer;
}

.btn-copy:hover { background: rgba(255, 255, 255, 0.22); }

/* Contact */
.contact-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 992px) {
  .contact-layout {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
  }
}

.form-panel label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .35rem;
}

.form-panel .form-control,
.form-panel .form-select {
  border-radius: 10px;
  border-color: var(--line-dark);
  padding: .65rem .8rem;
}

.form-panel .form-control:focus,
.form-panel .form-select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 .2rem rgba(30, 200, 176, 0.2);
}

.contact-aside {
  padding: 1.5rem;
  border-radius: 16px;
  background: linear-gradient(160deg, #fff8e8, #fff);
  border: 1px solid rgba(255, 176, 32, 0.35);
  align-self: start;
}

.contact-aside p { margin: 0; color: var(--ink-soft); }

/* Footer */
.site-footer {
  background: var(--navy);
  color: #b8c9da;
  padding: 1.75rem 0;
}

.site-footer .shell {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.site-footer a { color: #fff; text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--teal); }

/* Dialog */
#shotDialog {
  border: 0;
  border-radius: 16px;
  padding: .75rem;
  max-width: 960px;
  width: calc(100% - 2rem);
  background: #0a1628;
}

#shotDialog::backdrop { background: rgba(2, 8, 16, 0.78); }

#shotDialog .btn-close-shot {
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  color: #fff;
  border-radius: 8px;
  padding: .35rem .75rem;
  margin-bottom: .5rem;
  cursor: pointer;
}

@media (max-width: 767px) {
  .hero { min-height: auto; padding-top: 5.5rem; padding-bottom: 3.5rem; }
  .hero h1 { max-width: none; }
  .hero-scroll { display: none; }
  .nav-main .btn-nav-quiet:not(.btn-mkt) { display: none; }
}
