/* ==========================================================================
   WEBSOL — shared styles
   ========================================================================== */

:root {
  --bg: #10141a;
  --bg-elevated: #161b23;
  --bg-elevated-2: #1c222c;
  --border: #262e3a;
  --border-bright: #354152;

  --text: #e7edf3;
  --text-dim: #93a1b3;
  --text-faint: #5d6a7c;

  --accent: #6fd8bd;
  --accent-dim: rgba(111, 216, 189, 0.14);
  --accent-line: rgba(111, 216, 189, 0.35);

  --caution: #e8b76a;
  --bg-rgb: 16, 20, 26;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", "SFMono-Regular", "JetBrains Mono", Consolas, monospace;

  --container: 1120px;
  --radius: 10px;
  --ease: cubic-bezier(0.16, 0.8, 0.24, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.hud-bg {
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  background-attachment: fixed;
  background-color: var(--bg);
  opacity-transition: none;
}

body.hud-bg::before { content: none; }

h1, h2, h3, h4 { font-family: var(--font-mono); font-weight: 600; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.section-heading {
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: 12px;
}

.section-sub {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 560px;
  margin-top: 12px;
}

section { padding: 88px 0; }
@media (max-width: 640px) { section { padding: 64px 0; } }

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #a6f0dd);
  box-shadow: 0 0 10px var(--accent-line);
  z-index: 100;
  transition: width 0.1s linear;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(var(--bg-rgb), 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.nav.is-scrolled {
  background: rgba(var(--bg-rgb), 0.88);
  border-bottom-color: var(--border);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand .dot { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--text-dim);
}

.nav-links a {
  position: relative;
  padding-bottom: 3px;
  transition: color 0.15s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right 0.25s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { right: 0; }
.nav-links a.btn::after { content: none; }
.nav-links a.btn:hover { color: inherit; }

@media (max-width: 560px) {
  .nav-links { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border-bright);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--accent);
  color: #08110e;
  border-color: var(--accent);
}
.btn-primary:hover { background: #85e3cb; }

.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent-line); color: var(--accent); }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover {
  border-color: var(--border-bright);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.55);
}

/* ==========================================================================
   HOME — hero
   ========================================================================== */

.home-hero {
  padding: 96px 0 72px;
  text-align: center;
}

.home-hero h1 {
  font-size: clamp(40px, 8vw, 76px);
  letter-spacing: -0.02em;
}

.home-hero .tagline {
  margin: 20px auto 0;
  max-width: 560px;
  color: var(--text-dim);
  font-size: 18px;
}

/* ---------- Work grid ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.work-grid--single {
  grid-template-columns: minmax(280px, 420px);
  justify-content: center;
}

.work-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; position: relative; }

.work-thumb {
  display: flex;
  justify-content: center;
  padding: 32px 24px 0;
  background: linear-gradient(160deg, #141a22, #0d1015);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.work-thumb .phone {
  max-width: 190px;
  margin: 0;
}

.work-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }

.work-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 5px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-line);
}

.work-title { font-size: 20px; }
.work-desc { color: var(--text-dim); font-size: 14.5px; flex: 1; }

.work-link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.work-link svg { transition: transform 0.15s ease; }
.work-card:hover .work-link svg { transform: translateX(3px); }

/* ---------- About strip ---------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.about-item .num {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 10px;
  display: block;
}

.about-item h3 { font-size: 17px; margin-bottom: 8px; }
.about-item p { color: var(--text-dim); font-size: 14.5px; }

/* ---------- Contact ---------- */
.contact-box {
  text-align: center;
  padding: 56px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 0%, var(--bg-elevated-2), var(--bg-elevated));
}

.contact-box .btn { margin-top: 20px; }

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--accent); }

/* ==========================================================================
   SAAS THEME — Websol homepage (bold, light, flat color blocks)
   ========================================================================== */

body.saas-theme {
  --bg-rgb: 246, 247, 251;
  --bg: #f6f7fb;
  --bg-elevated: #ffffff;
  --bg-elevated-2: #eef0f6;
  --border: #e7e9f2;
  --border-bright: #d8dbe8;

  --text: #14151a;
  --text-dim: #5b5f70;
  --text-faint: #9498a8;

  --accent: #0ea983;
  --accent-dim: rgba(14, 169, 131, 0.12);
  --accent-line: rgba(14, 169, 131, 0.4);

  --accent-2: #5b57f0;
  --accent-2-dim: rgba(91, 87, 240, 0.12);
  --accent-2-line: rgba(91, 87, 240, 0.4);

  --radius: 20px;
  font-family: "Manrope", var(--font-sans);
}

body.saas-theme h1,
body.saas-theme h2,
body.saas-theme h3,
body.saas-theme h4 {
  font-family: "Manrope", var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.02em;
}

body.saas-theme .eyebrow {
  font-family: "Manrope", var(--font-sans);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
}

body.saas-theme .btn { border-radius: 999px; }

/* ---------- Hero ---------- */
.hero-blob {
  position: absolute;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  height: 420px;
  max-width: 140vw;
  background:
    radial-gradient(circle at 30% 30%, var(--accent-dim), transparent 60%),
    radial-gradient(circle at 75% 60%, var(--accent-2-dim), transparent 55%);
  filter: blur(10px);
  z-index: 0;
  pointer-events: none;
}

body.saas-theme .home-hero {
  position: relative;
  overflow: hidden;
}

.chip-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  position: relative;
}

.chip {
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  color: #fff;
}
.chip-teal { background: var(--accent); }
.chip-indigo { background: var(--accent-2); }

/* ---------- Work card ---------- */
body.saas-theme .work-thumb {
  background: linear-gradient(150deg, var(--accent), #0a7c62);
}

body.saas-theme .work-title { font-size: 24px; }

/* ---------- About tiles ---------- */
body.saas-theme .about-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

body.saas-theme .about-item {
  border-radius: var(--radius);
  padding: 32px;
  color: #fff;
}

body.saas-theme .about-item:nth-child(1) { background: var(--accent); }
body.saas-theme .about-item:nth-child(2) { background: var(--accent-2); }

body.saas-theme .about-item .num {
  font-family: "Manrope", var(--font-sans);
  color: rgba(255, 255, 255, 0.7);
  font-weight: 800;
  font-size: 15px;
}

body.saas-theme .about-item h3 { color: #fff; }
body.saas-theme .about-item p { color: rgba(255, 255, 255, 0.85); }

/* ---------- Contact ---------- */
body.saas-theme .contact-box {
  background: var(--text);
  border: none;
}

body.saas-theme .contact-box .eyebrow {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
body.saas-theme .contact-box .eyebrow::before { background: #fff; box-shadow: none; }
body.saas-theme .contact-box h2 { color: #fff; }
body.saas-theme .contact-box .section-sub { color: rgba(255, 255, 255, 0.7); }

body.saas-theme .contact-box .btn-primary {
  background: #fff;
  border-color: #fff;
  color: var(--text);
}
body.saas-theme .contact-box .btn-primary:hover { background: var(--accent-dim); }

/* ==========================================================================
   SKYPANE page
   ========================================================================== */

.sky-nav .brand { color: var(--text); }
.sky-nav .brand .dot { color: var(--accent); }

.sky-hero {
  padding: 72px 0 40px;
}

.sky-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 860px) {
  .sky-hero-grid { grid-template-columns: 1fr; }
  .sky-hero-copy { order: 1; text-align: center; }
  .sky-hero-phone { order: 2; }
}

.sky-hero-copy h1 {
  font-size: clamp(34px, 5.6vw, 54px);
  margin-top: 18px;
  letter-spacing: -0.01em;
  background: linear-gradient(120deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sky-hero-copy .lede {
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 17px;
  max-width: 460px;
}

@media (max-width: 860px) { .sky-hero-copy .lede { margin-inline: auto; } }

.sky-cta-row {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 860px) { .sky-cta-row { justify-content: center; } }

/* Google Play style badge (custom-built button, matches the store badge layout) */
.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000;
  color: #fff;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  padding: 10px 18px 10px 14px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.play-badge:hover { transform: translateY(-1px); border-color: var(--accent); }
.play-badge svg { flex: none; }
.play-badge .play-text { display: flex; flex-direction: column; line-height: 1.15; }
.play-badge .play-text .small { font-size: 10px; letter-spacing: 0.04em; color: #cfd3d8; }
.play-badge .play-text .big { font-family: var(--font-sans); font-size: 17px; font-weight: 600; }

.sky-hero-note {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- Phone mockup ---------- */
.sky-hero-phone {
  perspective: 1200px;
}

.phone {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  aspect-ratio: 9 / 19.5;
  background: #05070a;
  border: 3px solid #2a323e;
  border-radius: 38px;
  padding: 10px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6), 0 0 0 1px rgba(111,216,189,0.06);
  transform-style: preserve-3d;
  will-change: transform;
}

.gallery-item .phone {
  will-change: auto;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, #1c2f3a 0%, #101820 45%, #0a0d12 100%);
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Screenshot gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

.gallery-item { text-align: center; }

.gallery-item .phone {
  max-width: 220px;
  margin-bottom: 18px;
}

.gallery-caption strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 4px;
}

.gallery-caption span {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- Features grid ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.feature-card .icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 18px;
}

.feature-card h3 { font-size: 16.5px; margin-bottom: 8px; }
.feature-card p { color: var(--text-dim); font-size: 14px; }

/* ---------- Privacy section ---------- */
.privacy-section {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.privacy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 32px;
}

@media (max-width: 860px) { .privacy-grid { grid-template-columns: 1fr; } }

.privacy-points { display: flex; flex-direction: column; gap: 18px; margin-top: 24px; }

.privacy-point {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.privacy-point svg { flex: none; margin-top: 2px; color: var(--accent); }
.privacy-point .t { font-size: 15px; margin-bottom: 2px; }
.privacy-point .d { font-size: 13.5px; color: var(--text-dim); }

.code-box {
  background: #0a0d12;
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.9;
  overflow-x: auto;
}

.code-box .filename {
  color: var(--text-faint);
  font-size: 11px;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.code-box .tag-ok { color: var(--text-dim); }
.code-box .attr { color: #8fb8d6; }
.code-box .val { color: var(--accent); }
.code-box .comment { color: #5d6a7c; }
.code-box .comment .strike { text-decoration: line-through; opacity: 0.7; }
.code-box .missing { color: var(--caution); }

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 44px;
  counter-reset: step;
}

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
}

.step {
  position: relative;
  padding-top: 8px;
}

.step .step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  background: var(--accent-dim);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 14px; }

.step-connector {
  display: none;
}
@media (min-width: 761px) {
  .steps { position: relative; }
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 16px;
    left: calc(100% - 6px);
    width: calc(28px * 2);
    border-top: 1px dashed var(--border-bright);
  }
}

/* ---------- Skypane footer CTA ---------- */
.sky-final-cta {
  text-align: center;
}
.sky-final-cta .btn-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* ---------- Fade-in on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ---------- Scroll cue ---------- */
.scroll-cue {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 40px 0 0;
  width: fit-content;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  animation: cue-bounce 2.2s ease-in-out infinite;
}

@media (max-width: 860px) { .scroll-cue { margin-inline: auto; } }

@keyframes cue-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(6px); opacity: 1; }
}
