/* ========================================================================
   Speakora — szkoła językowa, Katowice
   Stylesheet
   Design: "żywy rozmównik" — paper + electric indigo + coral
   ===================================================================== */

:root {
  /* Color */
  --paper:      #FBF8F3;
  --paper-2:    #F2EBDD;
  --paper-3:    #EBE2D2;
  --ink:        #1E1B2E;
  --ink-soft:   #4C4660;
  --ink-mute:   #6E6880;
  --indigo:     #5B43F5;
  --indigo-deep:#3A28B8;
  --indigo-soft:#ECE9FE;
  --coral:      #FF5D73;
  --coral-deep: #E63E57;
  --green:      #168F66;
  --green-soft: #E1F2EB;
  --line:       rgba(30, 27, 46, 0.12);
  --line-2:     rgba(30, 27, 46, 0.07);
  --shadow-sm:  0 1px 2px rgba(30,27,46,.06), 0 2px 6px rgba(30,27,46,.05);
  --shadow-md:  0 10px 30px -12px rgba(30,27,46,.22);
  --shadow-lg:  0 30px 60px -24px rgba(58,40,184,.30);

  /* Type */
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, monospace;

  /* Layout */
  --maxw: 1180px;
  --gut: clamp(20px, 5vw, 56px);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 30px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; padding: 0; }
:focus-visible {
  outline: 3px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.section { padding-block: clamp(64px, 9vw, 128px); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--indigo-deep);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--coral);
  display: inline-block;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -.02em; }
.h-sec { font-size: clamp(30px, 4.4vw, 50px); margin-top: 18px; max-width: 18ch; }
.sec-head { margin-bottom: clamp(36px, 5vw, 60px); max-width: 720px; }
.sec-head p { color: var(--ink-soft); font-size: 18px; margin-top: 16px; max-width: 56ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -.01em;
  transition: transform .18s ease, box-shadow .25s ease, background-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--indigo); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover { background: var(--indigo-deep); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); background: rgba(30,27,46,.03); }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; }

/* ========================================================================
   Header
   ===================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background-color .25s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; height: 74px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand img { height: 34px; width: auto; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -.03em; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 15.5px; font-weight: 500; color: var(--ink-soft);
  position: relative; padding-block: 6px;
  transition: color .18s ease;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--coral); transition: width .22s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

.header-cta .btn { padding: 11px 20px; font-size: 15px; }

/* Language switcher */
.lang {
  position: relative;
}
.lang-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 13px; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  transition: box-shadow .2s ease, background-color .2s ease;
}
.lang-btn:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.lang-btn .globe { width: 16px; height: 16px; color: var(--indigo); }
.lang-btn .chev { width: 12px; height: 12px; transition: transform .2s ease; }
.lang[aria-expanded="true"] .lang-btn .chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-md);
  padding: 7px; min-width: 188px;
  display: none; flex-direction: column; gap: 2px;
}
.lang[aria-expanded="true"] .lang-menu { display: flex; }
.lang-menu button {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 9px; text-align: left;
  font-size: 15px; transition: background-color .15s ease;
}
.lang-menu button:hover { background: var(--paper-2); }
.lang-menu button[aria-current="true"] { background: var(--indigo-soft); color: var(--indigo-deep); font-weight: 600; }
.lang-menu .code {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em;
  color: var(--ink-mute); margin-left: auto; text-transform: uppercase;
}
.lang-menu button[aria-current="true"] .code { color: var(--indigo-deep); }

/* Burger */
.burger { display: none; width: 44px; height: 44px; border-radius: 11px; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1.5px var(--line); }
.burger span, .burger span::before, .burger span::after {
  content: ""; display: block; width: 19px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.burger span { position: relative; }
.burger span::before { position: absolute; top: -6px; }
.burger span::after { position: absolute; top: 6px; }
body.menu-open .burger span { background: transparent; }
body.menu-open .burger span::before { transform: translateY(6px) rotate(45deg); }
body.menu-open .burger span::after { transform: translateY(-6px) rotate(-45deg); }

/* ========================================================================
   Hero
   ===================================================================== */
.hero { padding-block: clamp(52px, 8vw, 104px); position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1.06fr .94fr; gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-eyebrow { margin-bottom: 26px; }

/* Signature: rotating multilingual greeting card */
.greet {
  display: inline-flex; align-items: baseline; gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 5px;
  padding: 14px 20px;
  box-shadow: var(--shadow-md);
  margin-bottom: 26px;
  position: relative;
  min-height: 64px;
}
.greet::after {
  content: ""; position: absolute; left: 26px; bottom: -9px;
  width: 18px; height: 18px; background: #fff;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
}
.greet-word {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3.4vw, 34px);
  letter-spacing: -.02em; color: var(--ink);
}
.greet-ipa { font-family: var(--font-mono); font-size: 14px; color: var(--coral-deep); }
.greet-code {
  margin-left: 4px; align-self: flex-end;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em;
  color: var(--ink-mute); text-transform: uppercase;
  padding: 3px 7px; border-radius: 6px; background: var(--paper-2);
}
.greet.is-swap .greet-word, .greet.is-swap .greet-ipa { opacity: 0; transform: translateY(6px); }
.greet-word, .greet-ipa { transition: opacity .28s ease, transform .28s ease; }

.hero h1 { font-size: clamp(38px, 6vw, 68px); margin-bottom: 22px; max-width: 14ch; }
.hero h1 .accent { color: var(--indigo); }
.hero-sub { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-soft); max-width: 46ch; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }

.hero-langs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero-langs .lab { font-size: 13.5px; color: var(--ink-mute); margin-right: 4px; }
.chip {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
  padding: 6px 12px; border-radius: 999px;
  background: var(--paper-2); color: var(--ink-soft);
}

/* Hero visual */
.hero-media { position: relative; }
.hero-media .frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 5;
  background: var(--paper-2);
}
.hero-media .frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute; left: -22px; bottom: 32px;
  background: var(--ink); color: #fff;
  border-radius: 16px; padding: 16px 20px;
  box-shadow: var(--shadow-md); max-width: 230px;
}
.hero-badge .big { font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: -.02em; }
.hero-badge .small { font-size: 13px; color: rgba(255,255,255,.72); margin-top: 2px; }
.hero-badge .dot { color: var(--coral); }

/* ========================================================================
   Marquee divider
   ===================================================================== */
.marquee {
  border-block: 1px solid var(--line);
  background: var(--paper-2);
  overflow: hidden;
  padding-block: 16px;
}
.marquee-track {
  display: flex; gap: 48px; width: max-content;
  animation: scroll 32s linear infinite;
}
.marquee-track span {
  font-family: var(--font-mono); font-size: 14px; letter-spacing: .05em;
  color: var(--ink-soft); display: inline-flex; gap: 14px; align-items: center;
}
.marquee-track span::after { content: "·"; color: var(--coral); }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ========================================================================
   Courses
   ===================================================================== */
.course-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.course-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px 24px; position: relative; overflow: hidden;
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
  display: flex; flex-direction: column; min-height: 100%;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.course-card .flag {
  font-family: var(--font-mono); font-weight: 600; font-size: 15px; letter-spacing: .04em;
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--indigo-soft); color: var(--indigo-deep);
  margin-bottom: 18px;
}
.course-card h3 { font-size: 22px; margin-bottom: 8px; }
.course-card .lvl {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .05em;
  color: var(--coral-deep); text-transform: uppercase; margin-bottom: 12px;
}
.course-card p { color: var(--ink-soft); font-size: 15.5px; flex-grow: 1; }
.course-card .fmt {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2);
  display: flex; gap: 8px; flex-wrap: wrap;
}
.course-card .fmt .tag {
  font-size: 12.5px; padding: 5px 10px; border-radius: 999px;
  background: var(--paper-2); color: var(--ink-soft);
}

/* ========================================================================
   Why us
   ===================================================================== */
.why { background: var(--ink); color: var(--paper); }
.why .eyebrow { color: #fff; }
.why .eyebrow::before { background: var(--coral); }
.why .h-sec { color: #fff; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(255,255,255,.1); border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,.1); }
.feature {
  background: var(--ink); padding: 34px 30px;
  transition: background-color .25s ease;
}
.feature:hover { background: #261F38; }
.feature .ic {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(91,67,245,.22); color: #fff;
}
.feature .ic svg { width: 23px; height: 23px; }
.feature h3 { font-size: 20px; color: #fff; margin-bottom: 9px; }
.feature p { color: rgba(255,255,255,.66); font-size: 15.5px; }

/* ========================================================================
   How it works
   ===================================================================== */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding-top: 30px; }
.step .no {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .1em;
  color: var(--indigo); font-weight: 600; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.step .no::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 15px; }

/* ========================================================================
   Reviews
   ===================================================================== */
.reviews { background: var(--paper-2); }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.review {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; display: flex; flex-direction: column;
}
.review .quote { font-size: 16.5px; color: var(--ink); line-height: 1.62; flex-grow: 1; }
.review .quote::before { content: "“"; font-family: var(--font-display); font-size: 46px; line-height: 0; color: var(--coral); display: block; height: 22px; }
.review .who { display: flex; align-items: center; gap: 13px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-2); }
.review .who img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--paper-3); }
.review .who .nm { font-weight: 600; font-size: 15px; }
.review .who .rl { font-size: 13.5px; color: var(--ink-mute); }

/* ========================================================================
   Contact
   ===================================================================== */
.contact-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(30px, 5vw, 64px); align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 4px; }
.info-card {
  display: flex; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line);
}
.info-card:first-of-type { padding-top: 8px; }
.info-card .ic {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--indigo-soft); color: var(--indigo-deep);
}
.info-card .ic svg { width: 21px; height: 21px; }
.info-card .lab { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 5px; }
.info-card .val { font-size: 16px; color: var(--ink); line-height: 1.5; }
.info-card .val a:hover { color: var(--indigo); }

/* Form */
.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 40px); box-shadow: var(--shadow-md);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field label .req { color: var(--coral-deep); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 15.5px;
  padding: 13px 15px; border-radius: 11px;
  border: 1.5px solid var(--line); background: var(--paper);
  color: var(--ink); transition: border-color .18s ease, background-color .18s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--indigo); background: #fff;
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--coral-deep); }
.field .err { display: none; color: var(--coral-deep); font-size: 13px; margin-top: 6px; }
.field.invalid .err { display: block; }

.consent { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 22px; }
.consent input { width: 19px; height: 19px; margin-top: 2px; flex: none; accent-color: var(--indigo); }
.consent label { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.consent.invalid label { color: var(--coral-deep); }
.consent a { color: var(--indigo); text-decoration: underline; }

.form-success {
  display: none; text-align: center; padding: 18px 10px;
}
.form-success.show { display: block; animation: pop .4s ease; }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
.form-success .check {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 18px;
  background: var(--green-soft); color: var(--green);
  display: flex; align-items: center; justify-content: center;
}
.form-success .check svg { width: 30px; height: 30px; }
.form-success h3 { font-size: 23px; margin-bottom: 8px; }
.form-success p { color: var(--ink-soft); }

/* ========================================================================
   Footer
   ===================================================================== */
.site-footer { background: var(--ink); color: var(--paper); padding-block: clamp(54px, 7vw, 84px) 28px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { color: rgba(255,255,255,.6); font-size: 15px; margin-top: 16px; max-width: 32ch; }
.footer-col h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-bottom: 18px; font-weight: 500; }
.footer-col a, .footer-col .ftxt { display: block; color: rgba(255,255,255,.78); font-size: 15px; padding-block: 6px; transition: color .18s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 26px; }
.footer-bottom p { color: rgba(255,255,255,.5); font-size: 13.5px; }
.footer-bottom .made { font-family: var(--font-mono); font-size: 12px; color: rgba(255,255,255,.4); letter-spacing: .04em; }

/* ========================================================================
   Legal pages
   ===================================================================== */
.legal-hero { padding-block: clamp(48px, 7vw, 88px) clamp(24px, 3vw, 40px); }
.legal-hero .h-sec { margin-top: 14px; }
.legal-updated { font-family: var(--font-mono); font-size: 13px; color: var(--ink-mute); margin-top: 16px; }
.legal-body { padding-bottom: clamp(64px, 9vw, 110px); max-width: 760px; }
.legal-body h2 { font-size: 23px; margin-top: 42px; margin-bottom: 12px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p { color: var(--ink-soft); margin-bottom: 14px; }
.legal-body ul.bul { list-style: disc; padding-left: 22px; margin-bottom: 16px; color: var(--ink-soft); }
.legal-body ul.bul li { margin-bottom: 8px; }
.legal-body a { color: var(--indigo); text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 13px; letter-spacing: .04em; color: var(--indigo-deep); margin-bottom: 8px; }
.back-link svg { width: 15px; height: 15px; }
.back-link:hover { gap: 12px; }

/* ========================================================================
   Mobile nav drawer
   ===================================================================== */
.mobile-nav {
  position: fixed; inset: 74px 0 0; z-index: 55;
  background: var(--paper); padding: 24px var(--gut);
  transform: translateX(100%); transition: transform .3s ease;
  display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
}
body.menu-open .mobile-nav { transform: translateX(0); }
.mobile-nav a { font-family: var(--font-display); font-size: 26px; font-weight: 600; padding-block: 12px; border-bottom: 1px solid var(--line-2); }
.mobile-nav .btn { margin-top: 22px; }

/* ========================================================================
   Responsive
   ===================================================================== */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 460px; }
  .hero-media .frame { aspect-ratio: 16 / 11; }
  .hero-badge { left: auto; right: 18px; }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 30px 22px; }
  .review-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  .nav-links, .header-cta { display: none; }
  .burger { display: flex; }
  .feature-grid { grid-template-columns: 1fr; }
  .course-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 30px; }
  .hero-badge { position: static; margin-top: 16px; max-width: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
}
