:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #16232e;
  --muted: #5b6b78;
  --line: #e4e9ee;
  --accent: #0d9488;
  --accent-2: #0f766e;
  --accent-soft: #e6f4f2;
  --gold: #b58a2f;
  --shadow-sm: 0 1px 2px rgba(22, 35, 46, .05);
  --shadow-md: 0 10px 30px rgba(22, 35, 46, .07);
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .01em;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent) 0%, #115e59 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}

.lang-toggle button {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 8px 13px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.lang-toggle button:hover { color: var(--accent-2); }

.lang-toggle button.active {
  background: var(--accent);
  color: #fff;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-2);
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}

.back-link:hover {
  border-color: var(--accent);
  transform: translateX(-2px);
  box-shadow: var(--shadow-sm);
}

.back-link svg { flex: 0 0 auto; }

/* ---------- Hero ---------- */
.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 24px 40px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: var(--accent-soft);
  border: 1px solid #cde9e5;
  border-radius: 999px;
  padding: 6px 14px;
}

.kicker .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

h1 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 18px 0 14px;
}

h1 .thin { color: var(--muted); font-weight: 600; }

.lede {
  max-width: 720px;
  font-size: clamp(15.5px, 2vw, 17.5px);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 12px;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 6px 18px rgba(13, 148, 136, .28);
}

.btn-primary:hover { box-shadow: 0 10px 24px rgba(13, 148, 136, .34); }

.btn-ghost {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.btn-ghost:hover { border-color: #c9d4dd; box-shadow: var(--shadow-sm); }

/* ---------- Screenshot frame ---------- */
.shot-wrap {
  max-width: 1080px;
  margin: 8px auto 0;
  padding: 0 24px;
}

.shot {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.shot-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.shot-bar .d { width: 10px; height: 10px; border-radius: 50%; }
.shot-bar .d1 { background: #f87171; }
.shot-bar .d2 { background: #fbbf24; }
.shot-bar .d3 { background: #34d399; }

.shot-bar .url {
  margin-left: 10px;
  font-size: 12px;
  color: var(--muted);
  background: #f1f4f6;
  border-radius: 7px;
  padding: 4px 12px;
  display: inline-block;
}

.shot img { display: block; width: 100%; height: auto; }

/* ---------- Sections ---------- */
.section { max-width: 1080px; margin: 0 auto; padding: 56px 24px 0; }

.section-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(20px, 3vw, 26px);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.section-sub { color: var(--muted); font-size: 15px; margin-bottom: 26px; }

/* ---------- Feature grid ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d5e6e3;
}

.card .num {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .1em;
}

.card h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 10px 0 8px;
  letter-spacing: -0.01em;
}

.card p { font-size: 13.5px; color: var(--muted); }

/* ---------- Architecture ---------- */
.arch { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.panel h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.panel ul { list-style: none; display: grid; gap: 11px; }

.panel li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  color: #33414d;
}

.panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .58em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  opacity: .55;
}

.panel li b { color: var(--ink); }

/* ---------- Tech stack ---------- */
.stack { display: flex; flex-wrap: wrap; gap: 9px; }

.chip {
  font-size: 13px;
  font-weight: 600;
  color: #24333f;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: border-color .15s ease, color .15s ease;
}

.chip:hover { border-color: var(--accent); color: var(--accent-2); }

.chip .c { width: 8px; height: 8px; border-radius: 50%; }

/* ---------- Highlights ---------- */
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.hl {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.hl .big {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hl .lbl { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------- Screenshots slider ---------- */
.slider {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.slides { position: relative; }

.slide { display: none; margin: 0; }

.slide.active { display: block; }

.slide-inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(260px, 3fr);
  align-items: stretch;
}

.slide-img {
  cursor: zoom-in;
  background: #fbfcfd;
  border-right: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}

.slide-img img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  object-position: top center;
  transition: transform .3s ease;
}

.slide-img:hover img { transform: scale(1.015); }

.slide-info {
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slide-info .num {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .1em;
}

.slide-info h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.slide-info .desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.7;
}

/* Arrows */
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
  color: var(--accent-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.slider-nav:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.slider-nav.prev { left: 14px; }
.slider-nav.next { right: 14px; }

/* Progress bar (10s autoplay) */
.slider-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: transparent;
}

.slider-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

.slider-progress span.run { animation: slideProgress 10s linear forwards; }

@keyframes slideProgress {
  from { width: 0; }
  to { width: 100%; }
}

/* Dots */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 16px;
}

.slider-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: #c7d4dc;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}

.slider-dots button:hover { background: var(--accent); }

.slider-dots button.active { background: var(--accent); transform: scale(1.25); }

@media (prefers-reduced-motion: reduce) {
  .slide-img img { transition: none; }
  .slider-progress span.run { animation: none; width: 100%; background: transparent; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  background: rgba(13, 27, 33, .82);
  backdrop-filter: blur(6px);
  padding: 4vh 4vw;
  cursor: zoom-out;
}

.lightbox.open { display: flex; flex-direction: column; align-items: center; justify-content: center; }

.lightbox img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}

.lightbox figcaption {
  margin-top: 12px;
  text-align: center;
  color: #d7e7ea;
  font-size: 14px;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 101;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: none;
}

.lightbox.open ~ .lightbox-close { display: grid; place-items: center; }

/* ---------- CTA / footer ---------- */
.cta {
  max-width: 1080px;
  margin: 64px auto 0;
  padding: 0 24px 28px;
}

.cta-box {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 55%, #134e4a 100%);
  border-radius: 20px;
  padding: clamp(28px, 5vw, 48px);
  color: #eefbf9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-box h2 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: -0.01em;
}

.cta-box p { margin-top: 8px; color: #b8e5de; font-size: 15px; max-width: 560px; }

.cta-box .btn { background: #fff; color: #0f766e; }
.cta-box .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.25); }

.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

footer a { color: var(--accent-2); font-weight: 600; text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .arch { grid-template-columns: 1fr; }
  .highlights { grid-template-columns: 1fr; }
  .slide-inner { grid-template-columns: 1fr; }
  .slide-img { border-right: 0; border-bottom: 1px solid var(--line); }
  .slide-img img { max-height: 380px; }
  .cta-box { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .topbar-inner { padding: 12px 16px; }
  .hero { padding: 44px 16px 32px; }
  .shot-wrap, .section, .cta, footer { padding-left: 16px; padding-right: 16px; }
  .section { padding-top: 44px; }
  .brand span { display: none; }      /* hide brand text, keep mark */
  .back-link { font-size: 12.5px; padding: 7px 12px; }
  .back-link span { display: none; }  /* arrow-only back button on small screens */
  .lang-toggle button { padding: 7px 10px; font-size: 11.5px; }
  .shot-bar .url { max-width: 55vw; overflow: hidden; text-overflow: ellipsis; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .slide-img img { max-height: 300px; }
  .slide-info { padding: 18px 16px; }
  .slider-nav { width: 34px; height: 34px; }
  .slider-nav.prev { left: 10px; }
  .slider-nav.next { right: 10px; }
  .lightbox { padding: 3vh 3vw; }
}

@media (max-width: 420px) {
  .topbar-inner { flex-wrap: wrap; row-gap: 8px; }
  .topbar-actions { width: 100%; justify-content: flex-end; }
  h1 { font-size: clamp(26px, 8vw, 30px); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto; }
}
