/* ==========================================================================
   Edukacy — Homepage
   Standalone stylesheet. Does not interact with assets/css/styles.css used
   by services/portfolio/about pages.
   ========================================================================== */

/* ---------- Tokens ------------------------------------------------------- */

:root {
  /* Brand */
  --primary: #2197BC;
  --primary-hi: #43B0D4;
  --primary-deep: #155E78;
  --primary-light: #E8F4F8;
  --primary-50: #F3FAFC;

  /* Accents */
  --amber: #F59E0B;
  --amber-hi: #FBBF24;
  --pink: #EC4899;
  --green: #22D66F;

  /* Light theme neutrals */
  --bg: #FAFBFC;
  --bg-soft: #F3F5F9;
  --bg-card: #FFFFFF;
  --border: #F1F3F5;
  --border-strong: #E5E7EB;
  --text-900: #1F2937;
  --text-700: #374151;
  --text-500: #6B7280;
  --text-400: #9CA3AF;

  /* Type */
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;

  /* Radii */
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 13px;
  --r-xl: 18px;
  --r-2xl: 22px;
  --r-3xl: 28px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-lifted: 0 4px 8px rgba(0, 0, 0, 0.06), 0 12px 24px rgba(0, 0, 0, 0.08);
  --shadow-brand: 0 10px 24px -6px rgba(33, 151, 188, 0.45), 0 4px 8px rgba(33, 151, 188, 0.25);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 150ms;
  --dur: 220ms;
  --dur-slow: 320ms;

  /* Layout */
  --content-max: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #060814;
    --bg-soft: #0B0E1D;
    --bg-card: #131626;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --text-900: #F5F7FA;
    --text-700: #B9BEC9;
    --text-500: #7A8096;
    --text-400: #5C6275;
    --primary-light: rgba(33, 151, 188, 0.12);
    --primary-50: rgba(33, 151, 188, 0.06);
    --shadow-card: 0 10px 20px -6px rgba(0, 0, 0, 0.4);
    --shadow-lifted: 0 14px 32px -10px rgba(0, 0, 0, 0.55);
    --shadow-brand: 0 12px 28px -8px rgba(33, 151, 188, 0.55);
  }
}

/* ---------- Reset / base ------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-900);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font: inherit; cursor: pointer; }

ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-900);
}

p { margin: 0; color: var(--text-700); }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(64px, 9vw, 112px) 0;
  position: relative;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
}

.section-head {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(28px, 4.2vw, 40px);
  font-weight: 800;
  margin-top: 12px;
  letter-spacing: -0.025em;
}

.section-head p {
  margin-top: 14px;
  color: var(--text-500);
  font-size: clamp(15px, 1.6vw, 17px);
}

/* ---------- Buttons ------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r-xl);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out),
              background-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out);
  white-space: nowrap;
}

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

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-brand);
}

.btn--primary:hover {
  background: var(--primary-deep);
}

.btn--secondary {
  background: var(--bg-card);
  color: var(--text-900);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.btn--secondary:hover {
  background: var(--bg-soft);
}

.btn--ghost {
  color: var(--primary);
  background: transparent;
}

.btn--ghost:hover {
  background: var(--primary-light);
}

.btn--gradient {
  position: relative;
  color: #fff;
  background: linear-gradient(108deg, #2197BC 0%, #43B0D4 38%, #F59E0B 75%, #FBBF24 100%);
  background-size: 200% 200%;
  animation: gradientDrift 9s ease-in-out infinite;
  box-shadow: 0 14px 28px -10px rgba(33, 151, 188, 0.55),
              0 8px 22px -10px rgba(245, 158, 11, 0.4);
}

@keyframes gradientDrift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .btn--gradient { animation: none; }
}

/* ---------- Navigation --------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo img {
  height: 44px;
  width: auto;
  display: block;
}

@media (max-width: 600px) {
  .nav-logo img { height: 38px; }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-menu a:not(.btn) {
  padding: 8px 14px;
  border-radius: var(--r-lg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-700);
  transition: color var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out);
}

.nav-menu a:not(.btn):hover {
  color: var(--text-900);
  background: var(--bg-soft);
}

.nav-menu a.active {
  color: var(--primary);
}

.nav-menu .btn {
  padding: 9px 18px;
  font-size: 13.5px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-900);
  align-items: center;
  justify-content: center;
}

.nav-toggle:hover { background: var(--bg-soft); }

.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }

  .nav-menu {
    position: fixed;
    inset: 64px 16px auto 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-2xl);
    box-shadow: var(--shadow-lifted);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--dur-slow) var(--ease-out),
                opacity var(--dur) var(--ease-out),
                visibility var(--dur) linear;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu a:not(.btn) {
    padding: 12px 14px;
    font-size: 15px;
  }

  .nav-menu .btn {
    justify-content: center;
    padding: 12px 18px;
    font-size: 14.5px;
  }
}

/* ---------- Hero --------------------------------------------------------- */

.hero {
  position: relative;
  padding: clamp(72px, 12vw, 140px) 0 clamp(80px, 11vw, 130px);
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.hero::before {
  top: -120px;
  left: -100px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(33, 151, 188, 0.30), transparent 70%);
}

.hero::after {
  bottom: -160px;
  right: -120px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(67, 176, 212, 0.22), transparent 70%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(34px, 5.6vw, 60px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero-text h1 .gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hi) 60%, var(--amber) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text .lead {
  margin-top: 22px;
  max-width: 560px;
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.55;
  color: var(--text-500);
}

.hero-cta {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-trust {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--text-500);
}

.hero-trust .dots {
  display: inline-flex;
  gap: -6px;
}

.hero-trust .dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  background: linear-gradient(135deg, var(--primary), var(--primary-hi));
  margin-right: -8px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
}
.hero-trust .dot:nth-child(2) { background: linear-gradient(135deg, #8B5CF6, #A78BFA); }
.hero-trust .dot:nth-child(3) { background: linear-gradient(135deg, #F59E0B, #FBBF24); color: #7c3a00; }
.hero-trust .dot:nth-child(4) { background: linear-gradient(135deg, #22D66F, #0E9F6E); }

/* Hero phone */

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 500px;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 10% 14%;
  background: radial-gradient(ellipse at center, rgba(33, 151, 188, 0.45), transparent 65%);
  filter: blur(60px);
  z-index: 0;
}

/* Phone mockup */
.phone {
  position: relative;
  width: clamp(220px, 28vw, 300px);
  aspect-ratio: 9 / 19.5;
  background: #0a0d1a;
  border-radius: 38px;
  padding: 7px;
  box-shadow:
    0 30px 60px -20px rgba(33, 151, 188, 0.35),
    0 20px 40px -10px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  z-index: 1;
}

.phone--tilt { transform: rotate(-3deg); }

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: #0d1020;
  position: relative;
}

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

.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 22px;
  background: #000;
  border-radius: 14px;
  z-index: 2;
}

/* Floating mini-badges around hero phone */
.float {
  position: absolute;
  z-index: 2;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  padding: 10px 14px;
  box-shadow: var(--shadow-lifted);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-900);
  animation: floatBob 3.6s ease-in-out infinite;
}

.float--xp {
  top: 10%;
  left: -4%;
  animation-delay: 0s;
}

.float--xp .float-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-hi));
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 4px 12px -2px rgba(33, 151, 188, 0.6);
}

.float--streak {
  bottom: 12%;
  right: -2%;
  animation-delay: 1.4s;
}

.float--streak .float-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
  display: grid; place-items: center;
  box-shadow: 0 4px 12px -2px rgba(245, 158, 11, 0.55);
  font-size: 14px;
}

.float-num { color: var(--primary); }
.float--streak .float-num { color: #B45309; }

@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  .float { animation: none; }
}

@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-text .lead { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-trust { justify-content: center; }
  .hero-visual { min-height: 420px; margin-top: 12px; }
}

/* ---------- App showcase ------------------------------------------------- */

.showcase {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.showcase-text h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.showcase-text > .eyebrow + h2 { margin-top: 12px; }
.showcase-text .lead {
  margin-top: 14px;
  font-size: clamp(15px, 1.6vw, 17px);
  color: var(--text-500);
  max-width: 540px;
}

.feature-list {
  margin-top: 28px;
  display: grid;
  gap: 14px;
}

.feature-list li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  transition: transform var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}

.feature-list li:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  box-shadow: var(--shadow-soft);
}

.feature-list .feature-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--primary-light);
  color: var(--primary);
}

.feature-list .feature-icon svg { width: 18px; height: 18px; }

.feature-list h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-900);
}

.feature-list p {
  margin-top: 2px;
  font-size: 13.5px;
  color: var(--text-500);
  line-height: 1.5;
}

.showcase-cta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Phones cluster */
.phones {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 600px;
}

.phones::before {
  content: "";
  position: absolute;
  inset: 8% 4%;
  background: radial-gradient(ellipse at center, rgba(33, 151, 188, 0.28), transparent 70%);
  filter: blur(60px);
  z-index: 0;
}

.phones .phone {
  position: absolute;
  z-index: 1;
}

.phones .phone--back {
  transform: translate(-32%, -6%) rotate(-7deg);
  z-index: 1;
  opacity: 0.95;
}

.phones .phone--front {
  transform: translate(28%, 8%) rotate(5deg);
  z-index: 2;
}

@media (max-width: 880px) {
  .showcase-grid {
    grid-template-columns: 1fr;
  }
  .showcase-text { text-align: center; }
  .showcase-text .lead { margin-left: auto; margin-right: auto; }
  .feature-list li { text-align: left; }
  .showcase-cta { justify-content: center; }
  .phones { min-height: 520px; order: -1; }
  .phones .phone--back  { transform: translate(-22%, -4%) rotate(-7deg); }
  .phones .phone--front { transform: translate(22%, 6%)  rotate(5deg); }
}

@media (max-width: 480px) {
  .phones { min-height: 460px; }
  .phones .phone { width: clamp(180px, 52vw, 240px); }
}

/* ---------- Services ----------------------------------------------------- */

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

@media (max-width: 980px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 26px;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(33, 151, 188, 0.08), transparent 50%);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
  box-shadow: var(--shadow-lifted);
}

.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-light), color-mix(in srgb, var(--primary) 14%, var(--bg-card)));
  color: var(--primary);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
}

.service-icon svg { width: 24px; height: 24px; }

.service-card h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.service-card p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-500);
  line-height: 1.55;
}

/* ---------- How we deliver ---------------------------------------------- */

.deliver {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.deliver-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.2fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: start;
}

.deliver-intro {
  position: sticky;
  top: 100px;
}

.deliver-intro h2 {
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.deliver-intro .lead {
  margin-top: 16px;
  font-size: clamp(15px, 1.6vw, 17px);
  color: var(--text-500);
  max-width: 420px;
}

.deliver-intro .btn { margin-top: 28px; }

.steps { display: grid; gap: 16px; }

.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  align-items: start;
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  position: relative;
  transition: transform var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}

.step:hover {
  transform: translateX(4px);
  border-color: color-mix(in srgb, var(--primary) 25%, var(--border));
}

.step-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 38px;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--primary-hi));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.step h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.step p {
  margin-top: 6px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-500);
}

@media (max-width: 880px) {
  .deliver-grid { grid-template-columns: 1fr; }
  .deliver-intro { position: static; }
  .step { padding: 18px 18px; }
  .step-num { font-size: 30px; }
}

/* ---------- Footer ------------------------------------------------------- */

.footer {
  padding: 64px 0 32px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand img {
  height: 48px;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-500);
  line-height: 1.6;
  max-width: 360px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-500);
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-col ul { display: grid; gap: 10px; }

.footer-col a {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-700);
  transition: color var(--dur) var(--ease-out);
}

.footer-col a:hover { color: var(--primary); }

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-500);
}

.footer-bottom a { color: var(--text-500); }
.footer-bottom a:hover { color: var(--primary); }

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

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

/* ---------- WhatsApp floating button ------------------------------------- */

.whatsapp-fab {
  position: fixed;
  right: 18px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px -8px rgba(37, 211, 102, 0.55),
              0 4px 12px rgba(0, 0, 0, 0.18);
  z-index: 60;
  transition: transform var(--dur) var(--ease-out),
              bottom var(--dur-slow) var(--ease-out);
}

body.has-cookie-banner .whatsapp-fab {
  bottom: 110px;
}

@media (max-width: 600px) {
  body.has-cookie-banner .whatsapp-fab { bottom: 168px; }
}

.whatsapp-fab:hover { transform: scale(1.05); }

.whatsapp-fab svg { width: 28px; height: 28px; color: #fff; }

/* ---------- Page hero (sub-pages: services / about) --------------------- */

.page-hero {
  position: relative;
  padding: clamp(80px, 10vw, 130px) 0 clamp(40px, 5vw, 60px);
  text-align: center;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -100px; left: 50%;
  width: 700px; height: 500px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(33, 151, 188, 0.18), transparent 65%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.page-hero h1 {
  margin-top: 14px;
  font-size: clamp(34px, 5.4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.page-hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hi) 60%, var(--amber) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-hero .lead {
  margin-top: 18px;
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--text-500);
  line-height: 1.6;
}

/* ---------- Why Edukacy (services page) --------------------------------- */

.why {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

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

.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}

.why-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
  box-shadow: var(--shadow-lifted);
}

.why-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  margin-bottom: 18px;
}

.why-icon.icon--teal    { background: linear-gradient(135deg, #2197BC, #43B0D4); box-shadow: 0 8px 18px -6px rgba(33, 151, 188, 0.55); }
.why-icon.icon--purple  { background: linear-gradient(135deg, #8B5CF6, #A78BFA); box-shadow: 0 8px 18px -6px rgba(139, 92, 246, 0.55); }
.why-icon.icon--amber   { background: linear-gradient(135deg, #F59E0B, #FBBF24); box-shadow: 0 8px 18px -6px rgba(245, 158, 11, 0.55); }
.why-icon.icon--green   { background: linear-gradient(135deg, #22D66F, #0E9F6E); box-shadow: 0 8px 18px -6px rgba(34, 214, 111, 0.55); }
.why-icon.icon--pink    { background: linear-gradient(135deg, #EC4899, #F59E0B); box-shadow: 0 8px 18px -6px rgba(236, 72, 153, 0.5); }

.why-icon svg { width: 28px; height: 28px; }

.why-card h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.why-card p {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--text-500);
  line-height: 1.6;
}

/* ---------- App Promo Popup --------------------------------------------- */

body.no-scroll {
  overflow: hidden;
}

.app-promo {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 8, 20, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-out);
  overflow-y: auto;
}

.app-promo.open { opacity: 1; }

.app-promo[hidden] { display: none; }

.app-promo-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-3xl);
  padding: 32px 28px 28px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5),
              0 12px 40px -16px rgba(33, 151, 188, 0.4);
  text-align: center;
  transform: translateY(16px) scale(0.96);
  transition: transform var(--dur-slow) var(--ease-pop);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.app-promo.open .app-promo-card {
  transform: translateY(0) scale(1);
}

.app-promo-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 130px;
  background: radial-gradient(ellipse at top, rgba(33, 151, 188, 0.18), transparent 70%);
  border-radius: var(--r-3xl) var(--r-3xl) 0 0;
  pointer-events: none;
}

.app-promo-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  color: var(--text-700);
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  transition: background-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out);
  z-index: 2;
}

.app-promo-close:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.app-promo-logo {
  height: 56px;
  width: auto;
  margin: 0 auto 18px;
  display: block;
  position: relative;
  z-index: 1;
}

.app-promo .eyebrow {
  position: relative;
  z-index: 1;
}

.app-promo h2 {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.app-promo h2 .gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--primary-hi) 60%, var(--amber) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.app-promo > .app-promo-card > p {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--text-500);
  line-height: 1.55;
  position: relative;
  z-index: 1;
}

.app-promo-features {
  margin: 22px 0 24px;
  display: grid;
  gap: 10px;
  text-align: left;
  position: relative;
  z-index: 1;
}

.app-promo-features li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-700);
}

.app-promo-features .check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22D66F, #0E9F6E);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 4px 10px -3px rgba(34, 214, 111, 0.55);
}
.app-promo-features .check svg { width: 13px; height: 13px; }

.app-promo-buttons {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.app-promo-buttons .btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 14.5px;
}

.btn--play {
  background: #1F2937;
  color: #fff;
  border: 1px solid #1F2937;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: left;
}

.btn--play:hover {
  background: #111827;
}

.btn--play .play-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.btn--play .play-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}

.btn--play .play-text small {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.85;
  letter-spacing: 0.04em;
}

.btn--play .play-text strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.app-promo-ios {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  background: var(--primary-50);
  border: 1px dashed color-mix(in srgb, var(--primary) 35%, transparent);
  font-size: 12.5px;
  color: var(--text-700);
  line-height: 1.55;
  display: none;
  text-align: left;
  position: relative;
  z-index: 1;
}

.app-promo-ios.is-ios,
.app-promo-ios { display: block; } /* keep visible for everyone — note is helpful */

.app-promo-ios strong { color: var(--text-900); font-weight: 700; }

.app-promo-ios a {
  color: var(--primary);
  font-weight: 700;
}

@media (max-width: 480px) {
  .app-promo { padding: 12px; }
  .app-promo-card { padding: 28px 22px 24px; border-radius: var(--r-2xl); }
  .app-promo-logo { height: 48px; margin-bottom: 14px; }
  .app-promo h2 { font-size: 21px; }
}

/* ---------- Small-screen polish ---------------------------------------- */

@media (max-width: 600px) {
  .nav-inner { padding: 12px var(--gutter); }
  .nav-menu .btn { padding: 11px 16px; }

  .hero { padding: 56px 0 64px; }
  .hero-text h1 { font-size: 34px; line-height: 1.08; }
  .hero-text .lead { font-size: 15.5px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .hero-trust { flex-direction: column; gap: 10px; text-align: center; }
  .hero-visual { min-height: 380px; }
  .phone { width: clamp(200px, 64vw, 260px); }

  .float--xp     { left: 0%; top: 6%; }
  .float--streak { right: 0%; bottom: 8%; }
  .float { padding: 8px 12px; font-size: 12px; }

  .section { padding: 56px 0; }
  .section-head { margin-bottom: 36px; }
  .section-head h2 { font-size: 26px; }

  .feature-list li { padding: 12px 14px; }
  .showcase-cta { flex-direction: column; align-items: stretch; }
  .showcase-cta .btn { width: 100%; }

  .service-card { padding: 22px; }

  .step { padding: 18px 16px; grid-template-columns: 50px 1fr; gap: 14px; }
  .step-num { font-size: 28px; }

  .footer { padding: 48px 0 24px; }
}

/* Ensure the hero phone doesn't crowd content on narrow desktops */
@media (min-width: 881px) and (max-width: 1100px) {
  .phone { width: clamp(220px, 24vw, 270px); }
}

/* ---------- Portfolio (Work) ------------------------------------------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 980px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .work-grid { grid-template-columns: 1fr; } }

.work-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
  text-decoration: none;
  color: inherit;
}

.work-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--primary) 32%, var(--border));
  box-shadow: var(--shadow-lifted);
}

.work-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-50));
  overflow: hidden;
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}

.work-card:hover .work-thumb img { transform: scale(1.05); }

.work-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 11px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary-deep);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

.work-body h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.work-body p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-500);
  line-height: 1.6;
  flex: 1;
}

.work-cta {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
  align-self: flex-start;
  letter-spacing: -0.005em;
}

.work-cta svg {
  width: 16px;
  height: 16px;
  transition: transform var(--dur) var(--ease-out);
}

.work-card:hover .work-cta svg { transform: translateX(4px); }

/* ---------- About page (split intro card) ------------------------------- */

.about-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 880px) { .about-split { grid-template-columns: 1fr; } }

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: clamp(28px, 3.6vw, 44px);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.about-card h2 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.about-card > p {
  margin-top: 16px;
  color: var(--text-500);
  font-size: 15px;
  line-height: 1.7;
}

.about-card .btn { margin-top: 24px; align-self: flex-start; }

.about-card--accent {
  background:
    radial-gradient(circle at 100% 0%, rgba(33, 151, 188, 0.10), transparent 55%),
    var(--bg-card);
  border-color: color-mix(in srgb, var(--primary) 26%, var(--border));
}

.about-block + .about-block { margin-top: 28px; }

.about-card--accent .about-block .eyebrow {
  display: block;
  margin-bottom: 6px;
}

.about-card--accent .about-block h3 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--primary), var(--primary-hi));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.about-card--accent .about-block p {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--text-500);
  line-height: 1.65;
}

/* ---------- Stats strip (about page) ------------------------------------ */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 36px;
}

@media (max-width: 880px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 22px 20px;
  text-align: center;
}

.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3.4vw, 36px);
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--primary), var(--primary-hi));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-500);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ---------- Team grid --------------------------------------------------- */

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

@media (max-width: 980px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .team-grid { grid-template-columns: 1fr; } }

/* ---------- Contact section -------------------------------------------- */

.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 880px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .contact-cards { grid-template-columns: 1fr; }
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 32px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}

.contact-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 32%, var(--border));
  box-shadow: var(--shadow-lifted);
}

.contact-card .why-icon { margin-bottom: 18px; }

.contact-card .eyebrow { display: block; }

.contact-card h3 {
  margin-top: 6px;
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--primary), var(--primary-hi));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  word-break: break-word;
  line-height: 1.2;
}

.contact-card p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-500);
  line-height: 1.6;
}

.contact-meta {
  margin-top: 28px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-500);
}

.contact-meta strong { color: var(--text-700); font-weight: 700; }

/* ---------- Cookie consent banner -------------------------------------- */

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px 14px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-2xl);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.04),
              0 16px 36px -12px rgba(0, 0, 0, 0.18);
  transform: translateY(140%);
  opacity: 0;
  transition: transform 420ms var(--ease-out),
              opacity 280ms var(--ease-out);
  /* leave room on the right for the WhatsApp FAB on desktop */
  max-width: calc(100% - 32px);
}

.cookie-banner.show {
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner[hidden] { display: none; }

.cookie-banner p {
  margin: 0;
  flex: 1;
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-700);
}

.cookie-banner a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner a:hover { color: var(--primary-deep); }

.cookie-banner .btn {
  flex-shrink: 0;
  padding: 10px 22px;
  font-size: 13.5px;
}

@media (min-width: 601px) {
  /* keep banner clear of the WhatsApp FAB */
  .cookie-banner { right: 90px; }
}

@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    bottom: 12px;
    left: 12px;
    right: 12px;
    padding: 16px 16px 14px;
    gap: 12px;
  }

  .cookie-banner .btn { width: 100%; }
}
