/* ============================================================
   NB Skola — styles
   Palette & feel from the design brief:
   sage green (dominant) · navy (structure) · caramel (accent)
   · warm off-white background · rounded corners · Montserrat/Inter
   ============================================================ */

:root {
  /* Core palette */
  --sage-50:  #eef3ee;
  --sage-100: #dde7df;
  --sage-200: #c4d6c8;
  --sage:     #7e9a86;
  --sage-deep:#5f7c6c;

  --navy:      #233044;
  --navy-deep: #18212f;

  --caramel:      #cc8552;
  --caramel-deep: #b56f3b;
  --caramel-soft: #f3e3d4;

  --cream:   #f7f3ec;  /* page background (wool white) */
  --cream-2: #fcfaf5;  /* cards / raised surfaces */
  --ink:     #2b3a35;  /* body text */
  --muted:   #6c7a73;

  --line: #e6ddd0;

  --radius:    18px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 10px rgba(35, 48, 68, .06);
  --shadow:    0 14px 38px rgba(35, 48, 68, .10);
  --shadow-lg: 0 24px 60px rgba(35, 48, 68, .14);

  --header-h: 72px;

  --ff-display: "Montserrat", system-ui, sans-serif;
  --ff-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .display {
  font-family: var(--ff-display);
  color: var(--navy);
  letter-spacing: -.01em;
  line-height: 1.15;
}

a { color: var(--caramel-deep); text-decoration: none; }
a:hover { color: var(--caramel); }

.container-x { width: min(1140px, 92vw); margin-inline: auto; }

/* Scroll offset so anchors clear the sticky header */
section[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

/* ---------- Section rhythm ---------- */
.section { padding: 84px 0; }
.section--tint { background: var(--sage-50); }
.section--sage {
  background:
    radial-gradient(120% 80% at 85% -10%, rgba(126,154,134,.18), transparent 60%),
    var(--sage-50);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--ff-display);
  font-weight: 600; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: .75rem;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; border-radius: 2px;
  background: var(--caramel); display: inline-block;
}
.section-title { font-size: clamp(1.7rem, 1.1rem + 2.2vw, 2.6rem); font-weight: 700; margin: 0 0 .6rem; }
.section-lead { color: var(--muted); max-width: 56ch; margin: 0 0 2.2rem; }

/* ---------- Buttons ---------- */
.btn-nb {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--ff-display); font-weight: 600; font-size: 1rem;
  padding: .8rem 1.5rem; border-radius: var(--radius-pill);
  border: 1.5px solid transparent; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn-primary { background: var(--caramel); color: #fff; box-shadow: 0 8px 20px rgba(204,133,82,.28); }
.btn-primary:hover { background: var(--caramel-deep); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(181,111,59,.34); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--sage); }
.btn-ghost:hover { background: var(--sage); color: #fff; transform: translateY(-2px); }
.btn-nb:focus-visible { outline: 3px solid var(--sage-200); outline-offset: 2px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1030;
  height: var(--header-h);
  background: rgba(247,243,236,.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.nav-inner { min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .35rem; }

/* Desktop: links + language/CTA sit on one centred row */
.nav-menu { display: flex; align-items: center; gap: clamp(1.25rem, 3vw, 2.5rem); }

.brand { display: flex; align-items: center; gap: .65rem; flex: 0 0 auto; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto;
  background: linear-gradient(150deg, var(--sage), var(--sage-deep));
  color: #fff; display: grid; place-items: center;
  font-family: var(--ff-display); font-weight: 700; font-size: 1.05rem;
  box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; justify-content: center; line-height: 1.05; }
.brand-name { font-family: var(--ff-display); font-weight: 700; color: var(--navy); font-size: 1.12rem; white-space: nowrap; }
.brand-tag { font-size: .72rem; color: var(--muted); }

.nav-links { display: flex; align-items: center; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--navy); font-weight: 500; font-size: .98rem;
  padding: .5rem .8rem; border-radius: var(--radius-sm);
  transition: background .15s ease, color .15s ease;
  white-space: nowrap;
}
.nav-links a:hover { background: var(--sage-100); color: var(--navy); }

.nav-side { display: flex; align-items: center; gap: .6rem; }

/* Language switcher */
.lang-switch { display: inline-flex; background: var(--sage-100); border-radius: var(--radius-pill); padding: 3px; }
.lang-switch button {
  border: 0; background: transparent; cursor: pointer;
  font-family: var(--ff-display); font-weight: 600; font-size: .82rem; color: var(--sage-deep);
  padding: .32rem .62rem; border-radius: var(--radius-pill); transition: all .15s ease;
}
.lang-switch button.active { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }
.lang-switch button:focus-visible { outline: 2px solid var(--sage); outline-offset: 1px; }

.nav-toggle {
  display: none; border: 0; background: transparent; cursor: pointer; padding: .4rem;
  color: var(--navy);
}
.nav-toggle svg { display: block; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 6vw, 88px) 0 0; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(70% 60% at 12% 0%, rgba(126,154,134,.20), transparent 60%),
    radial-gradient(60% 60% at 100% 20%, rgba(204,133,82,.12), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: #fff; border: 1px solid var(--line); color: var(--sage-deep);
  font-family: var(--ff-display); font-weight: 600; font-size: .8rem;
  padding: .42rem .85rem; border-radius: var(--radius-pill); box-shadow: var(--shadow-sm);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--caramel); }
.hero-license { display: block; margin-top: .5rem; font-size: .82rem; color: var(--muted); letter-spacing: .02em; }
.hero h1 { font-size: clamp(2.1rem, 1.2rem + 3.6vw, 3.4rem); font-weight: 700; margin: 1rem 0 1rem; }
.hero h1 .accent { color: var(--sage-deep); position: relative; white-space: nowrap; }
.hero h1 .accent::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .04em; height: .18em;
  background: var(--caramel-soft); border-radius: 4px; z-index: -1;
}
.hero-enroll { font-size: 1.1rem; color: var(--ink); max-width: 46ch; }
.hero-location { color: var(--muted); display: flex; gap: .5rem; align-items: flex-start; margin-top: .4rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

.hero-figure { position: relative; }
.hero-figure img {
  width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover;
  border-radius: 26px; box-shadow: var(--shadow-lg);
  border: 6px solid #fff;
}
.hero-figure .float-card {
  position: absolute; left: -10px; bottom: -18px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: .7rem 1rem; display: flex; align-items: center; gap: .7rem; border: 1px solid var(--line);
}
.float-card .fc-emoji { font-size: 1.4rem; }
.float-card .fc-num { font-family: var(--ff-display); font-weight: 700; color: var(--navy); line-height: 1; }
.float-card .fc-label { font-size: .76rem; color: var(--muted); }

/* Wavy divider under hero */
.hero-wave { display: block; width: 100%; height: 70px; margin-top: clamp(36px, 6vw, 64px); color: var(--sage-50); }

/* ---------- Approach ---------- */
.approach-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem,4vw,3rem); align-items: start; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: .5rem .95rem; font-size: .95rem; color: var(--navy); box-shadow: var(--shadow-sm);
}
.chip .tick { color: var(--sage-deep); font-weight: 700; }
.play-card {
  background: linear-gradient(160deg, var(--navy), var(--navy-deep));
  color: #f3f1ea; border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.play-card::before {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(204,133,82,.45), transparent 70%); border-radius: 50%;
}
.play-card .pc-emoji { font-size: 1.8rem; }
.play-card h3 { color: #fff; font-size: 1.15rem; margin: .6rem 0 .5rem; }
.play-card p { margin: 0; color: #dfe5dd; font-size: .98rem; }

/* ---------- Programs ---------- */
.programs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; align-items: stretch; }
.pcard {
  background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}
.pcard::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: var(--sage); border-radius: 5px 0 0 5px;
}
.pcard[data-accent="caramel"]::before { background: var(--caramel); }
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pcard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.pcard h3 { font-size: 1.28rem; margin: 0 0 .2rem; }
.price-badge {
  flex: 0 0 auto; text-align: center; background: var(--caramel-soft); color: var(--caramel-deep);
  border-radius: var(--radius-sm); padding: .5rem .7rem; font-family: var(--ff-display); font-weight: 700; line-height: 1.1;
}
.price-badge small { display: block; font-weight: 500; font-size: .66rem; color: var(--caramel-deep); opacity: .8; }
.pmeta { margin: .9rem 0 0; display: grid; gap: .45rem; }
.pmeta div { display: grid; grid-template-columns: 96px 1fr; gap: .4rem; font-size: .92rem; }
.pmeta .k { color: var(--muted); font-weight: 500; }
.pmeta .v { color: var(--navy); font-weight: 600; }

.pcard-toggle {
  margin-top: 1.1rem; align-self: flex-start;
  background: transparent; border: 1.5px solid var(--sage); color: var(--navy);
  font-family: var(--ff-display); font-weight: 600; font-size: .92rem;
  padding: .5rem 1.05rem; border-radius: var(--radius-pill); cursor: pointer;
  display: inline-flex; align-items: center; gap: .45rem; transition: all .18s ease;
}
.pcard-toggle:hover { background: var(--sage); color: #fff; }
.pcard-toggle .chev { transition: transform .25s ease; }
.pcard-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.pcard-toggle:focus-visible { outline: 3px solid var(--sage-200); outline-offset: 2px; }

.pcard-detail { overflow: hidden; max-height: 0; transition: max-height .35s ease; }
.pcard-detail-inner { padding-top: 1.1rem; margin-top: 1.1rem; border-top: 1px dashed var(--line); }
.pcard-detail h4 { font-size: 1rem; color: var(--sage-deep); margin: 1rem 0 .5rem; font-weight: 700; }
.pcard-detail h4:first-child { margin-top: 0; }
.pcard-detail p { margin: 0 0 .7rem; }
.pcard-detail ul { margin: 0 0 .6rem; padding: 0; list-style: none; display: grid; gap: .45rem; }
.pcard-detail li { position: relative; padding-left: 1.5rem; font-size: .95rem; }
.pcard-detail li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px;
  background: var(--sage); border-radius: 50%;
}
.pcard-detail .detail-cta { margin-top: .6rem; }

/* ---------- Reviews ---------- */
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; align-items: stretch; }
.rcard {
  position: relative; margin: 0; height: 100%; min-width: 0;
  background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2.2rem 1.6rem 1.6rem; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 1rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.rcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.rcard .rquote {
  position: absolute; top: .35rem; left: 1.1rem;
  font-family: var(--ff-display); font-weight: 700; font-size: 3.2rem; line-height: 1;
  color: var(--sage-200);
}
.rcard blockquote { margin: 0; color: var(--ink); font-size: .98rem; }
/* Clamp long quotes so cards stay aligned; line count is set per row by JS. */
.rcard.clamped blockquote {
  display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden;
}
.rcard.open blockquote { overflow: visible; }
.rcard figcaption {
  font-family: var(--ff-display); font-weight: 600; font-size: .9rem; color: var(--sage-deep);
  margin-top: auto;
}
.rcard figcaption::before { content: "— "; }
/* Expand toggle — hidden unless the quote overflows. */
.rcard .rmore {
  display: none; align-self: flex-start; align-items: center; gap: .35rem;
  background: transparent; border: 0; cursor: pointer; padding: 0;
  font-family: var(--ff-display); font-weight: 600; font-size: .88rem; color: var(--caramel-deep);
}
.rcard.has-more .rmore { display: inline-flex; }
.rcard .rmore:hover { color: var(--caramel); }
.rcard .rmore .chev { transition: transform .25s ease; }
.rcard .rmore[aria-expanded="true"] .chev { transform: rotate(180deg); }
.rcard .rmore:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; border-radius: 4px; }

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

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(1.5rem,4vw,3rem); align-items: center; }
.about-figure img {
  width: 100%; aspect-ratio: 1/1.08; object-fit: cover; border-radius: 24px;
  border: 6px solid #fff; box-shadow: var(--shadow);
}
.about-greeting { font-size: clamp(1.5rem,1rem+2vw,2.1rem); color: var(--navy); font-weight: 700; margin: 0 0 1rem; }
.about-bio { font-size: 1.05rem; color: var(--ink); }
.about-stats { display: flex; gap: 1.6rem; margin-top: 1.4rem; flex-wrap: wrap; }
.about-stats .stat .n { font-family: var(--ff-display); font-weight: 700; font-size: 1.5rem; color: var(--caramel-deep); }
.about-stats .stat .l { font-size: .85rem; color: var(--muted); }

/* ---------- Register ---------- */
.register-wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(1.5rem,4vw,3rem); align-items: start; }
.register-aside { position: sticky; top: calc(var(--header-h) + 20px); }
.register-aside .note {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.3rem; box-shadow: var(--shadow-sm); margin-top: 1.2rem;
}
.register-aside .note p { margin: 0; color: var(--muted); font-size: .95rem; }

.form-card { background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow); }
.field { margin-bottom: 1.05rem; }
.field label { display: block; font-family: var(--ff-display); font-weight: 600; font-size: .9rem; color: var(--navy); margin-bottom: .35rem; }
.field .req { color: var(--caramel-deep); }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--ff-body); font-size: 1rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: .75rem .9rem; transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-100);
}
.form-status { margin-top: 1rem; border-radius: var(--radius-sm); padding: .85rem 1rem; font-size: .95rem; display: none; }
.form-status.show { display: block; }
.form-status.ok { background: var(--sage-100); color: var(--sage-deep); border: 1px solid var(--sage-200); }
.form-status.err { background: #fbe7df; color: var(--caramel-deep); border: 1px solid #f0c8b3; }
.btn-submit { width: 100%; }
.btn-submit[disabled] { opacity: .7; cursor: progress; }

/* ---------- Footer / contacts ---------- */
.site-footer { background: var(--navy-deep); color: #d8ddd6; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { color: #fff; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-tag { color: #aab4ab; }
.footer-col h4 { color: #fff; font-size: 1rem; margin: 0 0 .8rem; }
.footer-col a, .footer-col p { color: #cdd4cc; font-size: .96rem; margin: 0 0 .5rem; display: block; }
.footer-col a:hover { color: var(--caramel); }
.footer-contacts li { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .6rem; list-style: none; }
.footer-contacts { padding: 0; margin: 0; }
.footer-contacts .ic { color: var(--caramel); margin-top: .15rem; flex: 0 0 auto; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.4rem; padding-top: 1.4rem; font-size: .85rem; color: #97a29a; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Mobile menu ---------- */
.nav-backdrop { display: none; }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--cream); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    flex-direction: column; align-items: stretch; gap: .2rem;
    padding: 1rem 6vw 1.4rem; transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .22s ease, opacity .22s ease; display: flex;
  }
  .nav-menu.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links { flex-direction: column; align-items: stretch; }
  .nav-links a { padding: .7rem .6rem; font-size: 1.05rem; }
  .nav-side { justify-content: space-between; margin-top: .6rem; }
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { order: -1; max-width: 460px; }
  .approach-grid, .about-grid, .register-wrap, .programs-grid, .footer-grid { grid-template-columns: 1fr; }
  .register-aside { position: static; }
  .about-figure { max-width: 340px; }
  .section { padding: 64px 0; }
}

@media (max-width: 420px) {
  .pmeta div { grid-template-columns: 84px 1fr; }
  .hero-figure .float-card { left: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .pcard-detail { transition: none !important; }
}
