:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --surface-3: #f3f3f3;
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --primary: #ff3b30;
  --primary-dark: #e03228;
  --primary-soft: #ffe8e6;
  --primary-muted: rgba(255, 59, 48, 0.1);
  --cta: #0066cc;
  --cta-dark: #004a99;
  --cta-soft: #e8f2ff;
  --border: #e8e8e8;
  --shadow: 0 18px 50px rgba(26, 26, 26, 0.08);
  --radius: 16px;
  --header-h: 84px;
  --font: "Montserrat", "Segoe UI", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 800;
}

h3 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
}

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

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

button {
  font: inherit;
  cursor: pointer;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 2.5rem;
}

.section-heading--center {
  margin-inline: auto;
  text-align: center;
}

.section-title {
  margin: 0 0 2rem;
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-title--center {
  text-align: center;
}

.section-title + .about__content,
.section-title + .vision__content,
.section-title + .mission__list,
.section-title + .products__grid,
.section-title + .blog__grid {
  margin-top: 0;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.logo__image {
  display: block;
  height: 42px;
  width: auto;
  flex-shrink: 0;
}

.logo__image--header {
  height: 44px;
  width: auto;
  max-width: min(320px, 58vw);
}

.logo__slogan {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #1a1a1a;
  white-space: nowrap;
  line-height: 1.3;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(26, 26, 26, 0.12);
  opacity: 0.72;
}

.nav {
  display: flex;
  gap: 0.5rem;
}

.nav__link {
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.82rem;
  transition: background 0.2s, color 0.2s;
}

.nav__link:hover,
.nav__link.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav__link--cta {
  background: var(--cta);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 102, 204, 0.35);
}

.nav__link--cta:hover,
.nav__link--cta.active {
  background: var(--cta-dark);
  color: #ffffff;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  border: 0;
  background: transparent;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding: 4rem 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.97) 0%, rgba(253, 232, 234, 0.4) 100%),
    url("assets/brand-pattern.svg") repeat;
  background-size: auto, 120px 120px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__watermark {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: min(520px, 55vw);
  height: auto;
  opacity: 0.06;
  object-fit: contain;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero__lead {
  max-width: 34rem;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

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

.btn--primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 10px 24px rgba(227, 6, 19, 0.22);
}

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

.btn--ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn--full {
  width: 100%;
}

/* Highlights */
.highlights {
  padding: 0 0 5rem;
  margin-top: -3rem;
  position: relative;
  z-index: 2;
}

.highlights__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.highlight-card {
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.highlight-card h3 {
  color: var(--primary);
}

.highlight-card p {
  font-size: 0.95rem;
}

/* Section blocks */
.section-block {
  padding: 5rem 0;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.section-block--alt {
  background: var(--surface-2);
  border-block: 1px solid var(--border);
}

.section-block--pattern {
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(253, 232, 234, 0.18) 100%),
    url("assets/brand-pattern.svg");
  background-size: auto, 120px 120px;
}

.section-block--alt.section-block--pattern {
  background-image:
    linear-gradient(135deg, rgba(250, 250, 250, 0.96) 0%, rgba(232, 242, 255, 0.35) 100%),
    url("assets/brand-pattern.svg");
  background-size: auto, 120px 120px;
}

.section-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.section-split--reverse .app-shot,
.section-split--reverse .section-visual {
  order: -1;
}

.section-split__content .section-title {
  margin-bottom: 1.5rem;
}

.app-shot {
  margin: 0;
  padding: 0.65rem;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.app-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.app-shot--sticky {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}

.app-shot--compact {
  margin-bottom: 1rem;
}

.section-visual {
  margin: 0;
  padding: 0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.section-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.section-visual--sticky {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}

.section-visual--compact {
  margin-bottom: 1rem;
}

.about {
  padding-top: 2.5rem;
}

.about__content {
  display: grid;
  gap: 1rem;
}

.about__content p {
  font-size: 0.98rem;
  line-height: 1.75;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
}

.vision__content p {
  font-size: 1.05rem;
  line-height: 1.8;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
}

.mission__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.mission__list li {
  padding: 0.95rem 1.1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.products {
  padding: 5rem 0;
}

.product-rows {
  display: grid;
  gap: 3rem;
  margin-top: 2.5rem;
}

.product-row {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
}

.product-row .section-split__content ul {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
}

.product-row .section-split__content li + li {
  margin-top: 0.35rem;
}

.product-card__tag {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.blog {
  padding: 5rem 0;
}

.blog__grid--stack {
  display: grid;
  gap: 1rem;
}

.blog__grid--stack .blog-card {
  padding: 1.25rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s, transform 0.2s;
}

.blog-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.blog-card time {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.blog-card__tag {
  display: inline-block;
  width: fit-content;
  margin: 0.5rem 0 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-card h3 {
  margin-bottom: 0.65rem;
  font-size: 1.02rem;
}

.blog-card p {
  flex: 1;
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.blog-card__link {
  font-weight: 700;
  color: var(--primary);
}

.blog-card__link:hover {
  text-decoration: underline;
}

.contact {
  padding: 5rem 0;
}

.contact__panel {
  display: flex;
  flex-direction: column;
}

.contact__intro {
  margin-bottom: 1.5rem;
  font-size: 1.02rem;
  line-height: 1.75;
}

.contact__details {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.contact__details li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.contact__details li:last-child {
  border-bottom: 0;
}

.contact__details strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.contact__details a {
  color: var(--text);
  font-weight: 600;
}

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

.contact-form,
.demo-form {
  position: relative;
}

.contact-form {
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
}

.form-row {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-row label {
  font-size: 0.92rem;
  font-weight: 700;
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  font: inherit;
  color: var(--text);
}

.form-row select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235c5c5c' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-row .iti {
  width: 100%;
}

.form-row .iti input {
  width: 100%;
  padding: 0.8rem 0.95rem 0.8rem 52px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  font: inherit;
  color: var(--text);
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus,
.form-row .iti input:focus {
  outline: 2px solid rgba(227, 6, 19, 0.2);
  border-color: var(--primary);
}

.form-row input.input-error,
.form-row .iti input.input-error {
  border-color: var(--primary);
  outline: 2px solid rgba(227, 6, 19, 0.15);
}

.field-error {
  display: none;
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
}

.field-error.visible {
  display: block;
}

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  text-align: center;
}

.form-note--success {
  color: #0f7a3a;
  font-weight: 600;
}

.form-note--error {
  color: #b42318;
  font-weight: 600;
}

/* Legal pages (TeachSmall Privacy / Terms) */
.legal-page {
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, var(--primary-soft), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, var(--cta-soft), transparent 50%),
    var(--bg);
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.legal-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.legal-brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.legal-brand:hover {
  color: var(--primary);
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.legal-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.legal-nav a:hover,
.legal-nav a[aria-current="page"] {
  color: var(--primary);
}

.legal-main {
  padding: 2.5rem 0 3rem;
}

.legal-content {
  max-width: 760px;
  margin-inline: auto;
  padding: 2rem 1.5rem 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.legal-content h1 {
  font-size: clamp(1.85rem, 4vw, 2.6rem);
}

.legal-content h2 {
  margin-top: 2rem;
  font-size: 1.25rem;
}

.legal-content p,
.legal-content li {
  color: var(--text-muted);
}

.legal-content ul {
  padding-left: 1.25rem;
}

.legal-content a {
  color: var(--cta);
  font-weight: 600;
}

.legal-meta {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.legal-related {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.legal-footer {
  padding-bottom: 2rem;
}

/* Footer */
.footer {
  padding: 1.75rem 0 6rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
}

.footer__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.footer__copy {
  margin: 0;
  font-size: 0.88rem;
}

/* FAB */
.fab {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--cta);
  color: white;
  font-weight: 700;
  box-shadow: 0 16px 34px rgba(0, 102, 204, 0.4);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.fab:hover {
  transform: translateY(-2px);
  background: var(--cta-dark);
  box-shadow: 0 20px 40px rgba(0, 102, 204, 0.45);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.45);
  backdrop-filter: blur(4px);
}

.modal__dialog {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.75rem;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
}

.modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
}

.modal__lead {
  margin-bottom: 1.25rem;
}

.demo-form {
  display: grid;
  gap: 1rem;
}

.form-success {
  text-align: center;
}

.form-success.hidden,
.hidden {
  display: none;
}

.success-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 960px) {
  .section-split,
  .section-split--reverse {
    grid-template-columns: 1fr;
  }

  .section-split--reverse .app-shot,
  .section-split--reverse .section-visual {
    order: 0;
  }

  .app-shot--sticky,
  .section-visual--sticky {
    position: static;
  }

  .hero__watermark {
    right: 50%;
    top: auto;
    bottom: 5%;
    transform: translateX(50%);
    width: 280px;
    opacity: 0.05;
  }
}

@media (max-width: 960px) {
  .logo__slogan {
    display: none;
  }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: flex;
  }

  .logo__image--header {
    height: 40px;
    max-width: min(240px, 58vw);
  }

  .nav {
    position: absolute;
    top: calc(var(--header-h) - 8px);
    left: 1rem;
    right: 1rem;
    flex-direction: column;
    padding: 0.75rem;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: 0.2s;
  }

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

  .fab span {
    display: none;
  }

  .fab {
    width: 58px;
    height: 58px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
}


.blog__lead {
  margin: 0.35rem 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.98rem;
  max-width: 40rem;
}

.blog__status {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.blog__attribution {
  margin-top: 0.85rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.blog-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.blog-card__source {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.blog-card--skeleton {
  min-height: 8.5rem;
  pointer-events: none;
}

.blog-card__skeleton-line {
  height: 0.75rem;
  margin-bottom: 0.65rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #eceff3 25%, #f7f8fa 50%, #eceff3 75%);
  background-size: 200% 100%;
  animation: news-shimmer 1.2s linear infinite;
}

.blog-card__skeleton-line--short {
  width: 45%;
}

@keyframes news-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
