:root {
  --ink: #221b50;
  --ink-soft: #4d4770;
  --violet: #5044c8;
  --violet-dark: #342896;
  --lavender: #eeebff;
  --lavender-deep: #dcd5ff;
  --yellow: #ffd456;
  --paper: #fbfaff;
  --white: #ffffff;
  --line: #dedbee;
  --shadow: 0 18px 56px rgba(34, 27, 80, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", Arial, sans-serif;
  line-height: 1.55;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Sora", "DM Sans", sans-serif; line-height: 1.16; letter-spacing: -0.045em; }
h2 { font-size: clamp(2rem, 3.7vw, 3.25rem); font-weight: 700; }
h3 { font-size: 1.5rem; }
:focus-visible { outline: 3px solid #ffb700; outline-offset: 4px; }
::selection { color: var(--ink); background: var(--yellow); }
.shell { width: min(100% - 3.5rem, 1200px); margin-inline: auto; }
.skip-link {
  position: absolute; top: -100px; left: 1rem; z-index: 100;
  padding: .7rem 1rem; border-radius: .4rem; background: var(--yellow); font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: relative;
  z-index: 20;
  background: #221b50;
  color: white;
}
.header-inner { min-height: 84px; display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; white-space: nowrap; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand-wordmark, .footer-brand span { display: flex; flex-direction: column; font-family: "Sora", sans-serif; font-weight: 800; line-height: 1; letter-spacing: -.055em; font-size: 1.27rem; }
.brand-wordmark small, .footer-brand small { font: 600 .71rem "DM Sans", sans-serif; letter-spacing: .08em; margin-top: .24rem; }
.main-nav { display: flex; align-items: center; gap: clamp(1.1rem, 2.2vw, 2.4rem); }
.main-nav a { text-decoration: none; font-size: .92rem; font-weight: 600; color: #e8e5ff; }
.main-nav a:hover { color: white; text-decoration: underline; text-underline-offset: 6px; }
.main-nav .nav-contact {
  display: inline-flex; gap: .8rem; align-items: center;
  color: var(--ink); background: white; border-radius: 8px; padding: .72rem 1rem;
}
.main-nav .nav-contact:hover { color: var(--ink); text-decoration: none; background: var(--yellow); }
.menu-toggle { display: none; }

.hero {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  background: #221b50;
  color: white;
}
.hero-grid {
  position: absolute; inset: 0; opacity: .22; pointer-events: none;
  background-image: linear-gradient(#a9a0eb 1px, transparent 1px), linear-gradient(90deg, #a9a0eb 1px, transparent 1px);
  background-size: 66px 66px;
  mask-image: linear-gradient(90deg, transparent 5%, #000 90%);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 130px; background: linear-gradient(transparent, rgba(18, 15, 53, .35));
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.08fr .92fr; align-items: center;
  gap: 2rem; padding-block: 5.4rem 6.6rem;
}
.hero-copy { max-width: 680px; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1.5rem;
  font-weight: 700; font-size: .93rem; color: #f4f1ff;
}
.kicker-mark { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 5px rgba(255, 212, 86, .18); }
.hero h1 {
  margin-bottom: 1.65rem; max-width: 690px;
  font-size: clamp(2.9rem, 5.3vw, 5.4rem); font-weight: 800; line-height: 1.08;
}
.hero h1 span { color: var(--yellow); }
.hero-lead { max-width: 600px; color: #e5e1ff; font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.7; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.6rem; margin-top: 2.25rem; }
.button {
  border: 0; cursor: pointer; border-radius: 10px; padding: .93rem 1.3rem;
  text-decoration: none; font-size: .96rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 1.15rem;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { opacity: .55; cursor: not-allowed; }
.button-yellow { background: var(--yellow); color: var(--ink); box-shadow: 0 12px 30px rgba(255, 212, 86, .2); }
.button-yellow:hover { background: #ffe07f; }
.button-indigo { background: var(--violet); color: white; }
.button-indigo:hover:not(:disabled) { background: var(--violet-dark); }
.text-link { font-weight: 700; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: .17rem; }
.text-link:hover { color: var(--yellow); }
.light-link { color: white; }
.hero-tags { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 3.15rem; }
.hero-tags span { color: #d8d3ff; padding: .35rem 0; font-size: .8rem; font-weight: 700; }
.hero-tags span + span::before { content: "·"; margin-right: .8rem; color: var(--yellow); }
.hero-art { position: relative; height: 510px; display: grid; place-items: center; }
.hero-art::before {
  content: ""; position: absolute; width: min(94%, 495px); aspect-ratio: 1;
  border-radius: 50%; background: #dcd5ff;
  box-shadow: inset -30px -30px 0 rgba(150, 130, 235, .25), 0 0 100px rgba(116, 86, 255, .24);
}
.hero-mascot { position: relative; z-index: 2; width: min(112%, 580px); max-width: none; filter: drop-shadow(0 28px 25px rgba(7, 3, 51, .28)); }
.hero-orbit { position: absolute; border: 1px solid rgba(240, 231, 255, .3); border-radius: 50%; }
.orbit-one { width: 110%; aspect-ratio: 1; }
.orbit-two { width: 122%; aspect-ratio: 1; }
.formula {
  position: absolute; z-index: 3; background: white; color: var(--violet-dark);
  padding: .4rem .65rem; border-radius: .4rem; font-family: "Sora", sans-serif; font-size: 1rem;
  font-weight: 700; box-shadow: 0 6px 0 rgba(20, 16, 69, .22);
}
.formula-top { top: 4%; right: -2%; transform: rotate(8deg); }
.formula-bottom { bottom: 8%; left: -2%; transform: rotate(-6deg); }

.finder-section { padding-block: 6.5rem; background: var(--lavender); }
.finder-layout { display: grid; grid-template-columns: .72fr 1.28fr; gap: clamp(2rem, 5vw, 6.3rem); align-items: start; }
.section-index {
  display: inline-block; padding-bottom: .45rem; margin-bottom: 1.3rem;
  color: var(--violet-dark); border-bottom: 3px solid var(--yellow);
  font-size: .9rem; font-weight: 800;
}
.finder-intro h2 { max-width: 460px; margin-bottom: 1rem; }
.finder-intro > p:last-child { color: var(--ink-soft); font-size: 1.07rem; max-width: 420px; }
.finder-panel { padding: 2.3rem; background: white; border: 1px solid #e2dcff; border-radius: 16px; box-shadow: var(--shadow); }
.choice-group { border: 0; padding: 0; margin: 0 0 1.65rem; min-width: 0; }
.choice-group legend { width: 100%; padding: 0 0 .7rem; font-weight: 800; font-size: .95rem; }
.choice-row { display: flex; flex-wrap: wrap; gap: .55rem; }
.choice-row button {
  border: 1.5px solid var(--line); border-radius: 8px; background: white;
  color: var(--ink); padding: .66rem .86rem; font-weight: 700; font-size: .9rem; cursor: pointer;
}
.choice-row button:hover { border-color: var(--violet); }
.choice-row button[aria-pressed="true"] { color: white; background: var(--violet); border-color: var(--violet); }
.finder-result {
  display: flex; align-items: flex-start; gap: 1rem; min-height: 76px;
  background: #f6f4ff; border-left: 4px solid var(--yellow); padding: 1rem 1.1rem; margin-top: .4rem; border-radius: 0 8px 8px 0;
}
.result-symbol { color: var(--violet); font-size: 1.2rem; line-height: 1.3; }
.finder-result strong { display: block; font-family: "Sora", sans-serif; font-size: .96rem; }
.finder-result p { margin: .28rem 0 0; color: var(--ink-soft); font-size: .87rem; }
#finder-next { margin-top: 1.2rem; }

.subjects-section { padding-block: 7rem; background: var(--paper); }
.section-head { display: flex; justify-content: space-between; gap: 3rem; align-items: end; margin-bottom: 2.5rem; }
.section-head h2 { max-width: 680px; margin-bottom: 0; }
.section-head > p { max-width: 340px; margin-bottom: .3rem; color: var(--ink-soft); }
.subject-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.35rem; }
.subject-card { position: relative; overflow: hidden; min-height: 440px; border-radius: 16px; padding: 2.45rem; }
.math-card { background: #241e61; color: white; }
.physics-card { background: #ffebaa; color: var(--ink); }
.subject-copy { position: relative; z-index: 2; max-width: 320px; }
.subject-symbol { display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1.65rem; border-radius: 9px; font-family: "Sora", sans-serif; font-size: 1.75rem; font-weight: 700; }
.math-card .subject-symbol { color: var(--yellow); background: rgba(255, 255, 255, .12); }
.physics-card .subject-symbol { color: var(--violet); background: rgba(255, 255, 255, .7); }
.subject-card h3 { font-size: 1.75rem; margin-bottom: .7rem; }
.subject-card p { line-height: 1.65; margin-bottom: 1.35rem; }
.math-card p, .math-card li { color: #e5e0ff; }
.subject-card ul { list-style: none; margin: 0 0 1.55rem; padding: 0; }
.subject-card li { margin: .48rem 0; padding-left: 1.3rem; position: relative; font-size: .94rem; }
.subject-card li::before { content: "•"; position: absolute; left: 0; color: #ffbe2e; font-weight: 700; }
.physics-card li::before { color: var(--violet); }
.subject-action {
  padding: 0 0 .18rem; border: 0; border-bottom: 1.5px solid currentColor;
  color: inherit; background: none; font-weight: 800; cursor: pointer;
}
.subject-action span { margin-left: .6rem; }
.subject-action:hover { color: #ffbe2e; }
.physics-card .subject-action:hover { color: var(--violet); }
.subject-decoration { position: absolute; font: 800 3.8rem "Sora", sans-serif; letter-spacing: -.09em; transform: rotate(-12deg); right: -.8rem; bottom: 2rem; color: rgba(255,255,255,.12); }
.physics-card img { position: absolute; right: -30px; bottom: -40px; width: 45%; max-width: 340px; filter: drop-shadow(0 15px 16px rgba(37, 31, 95, .18)); }

.method-section { padding-block: 7rem; background: white; }
.method-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(3rem, 8vw, 9rem); }
.method-heading h2 { max-width: 480px; }
.method-heading > p:last-child { color: var(--ink-soft); max-width: 440px; }
.method-steps { list-style: none; margin: 0; padding: 0; }
.method-steps li { display: grid; grid-template-columns: 62px 1fr; gap: 1.4rem; padding: 1.3rem 0 1.5rem; border-bottom: 1px solid var(--line); }
.method-steps li:first-child { padding-top: 0; }
.method-steps li:last-child { border-bottom: 0; }
.step-number { color: var(--violet); font: 800 1.25rem "Sora", sans-serif; }
.method-steps h3 { margin-bottom: .35rem; font-size: 1.25rem; }
.method-steps p { margin: 0; color: var(--ink-soft); }

.contact-section { padding-block: 7rem; background: #eeeaff; }
.contact-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 6vw, 7rem); align-items: start; }
.contact-intro h2 { max-width: 480px; }
.contact-intro > p:not(.section-index) { color: var(--ink-soft); max-width: 430px; }
.direct-whatsapp {
  display: flex; align-items: center; gap: 1rem; max-width: 450px; margin-top: 2.6rem;
  padding: 1rem 1.15rem; border-radius: 12px; background: white;
  box-shadow: 0 10px 30px rgba(34, 27, 80, .07); text-decoration: none;
}
.direct-whatsapp:hover { box-shadow: 0 14px 34px rgba(34, 27, 80, .16); }
.whatsapp-icon { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #078a54; background: #d9f8e7; font-size: 1.5rem; font-weight: 700; }
.direct-whatsapp strong, .direct-whatsapp small { display: block; }
.direct-whatsapp strong { font-size: .93rem; line-height: 1.3; }
.direct-whatsapp small { margin-top: .2rem; color: var(--ink-soft); }
.direct-arrow { margin-left: auto; color: var(--violet); font-weight: 800; }
.contact-form { padding: 2.4rem; border-radius: 16px; background: white; box-shadow: var(--shadow); }
.contact-form h3 { margin-bottom: .4rem; }
.contact-form > p:first-of-type { color: var(--ink-soft); font-size: .9rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem 1rem; margin-top: 1.55rem; }
.field { display: flex; flex-direction: column; gap: .45rem; color: var(--ink); font-size: .87rem; font-weight: 700; }
.field-wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 8px;
  padding: .8rem .9rem; color: var(--ink); background: #fcfbff; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(80, 68, 200, .12); }
.field textarea { resize: vertical; min-height: 116px; }
.field input::placeholder, .field textarea::placeholder { color: #8c87a2; }
.form-submit { margin-top: 1.4rem; width: 100%; }
.form-note { color: var(--ink-soft); font-size: .78rem; line-height: 1.5; margin: .8rem 0 0; }
.form-status { min-height: 1.3rem; margin: .3rem 0 0; font-size: .84rem; font-weight: 700; color: var(--violet-dark); }

.faq-section { padding-block: 7rem; background: var(--paper); }
.faq-layout { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(2rem, 7vw, 8rem); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list summary {
  position: relative; cursor: pointer; list-style: none;
  padding: 1.3rem 2.3rem 1.3rem 0; font-family: "Sora", sans-serif; font-size: 1.02rem; font-weight: 700;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: .25rem; top: 1rem; color: var(--violet); font: 500 1.5rem "Sora", sans-serif; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { max-width: 650px; margin: 0 2rem 1.4rem 0; color: var(--ink-soft); }

.site-footer { background: #221b50; color: white; padding-block: 2.2rem; }
.footer-inner { display: flex; align-items: center; gap: 2rem; }
.footer-brand { display: inline-flex; align-items: center; gap: .6rem; }
.footer-brand img { width: 40px; height: 40px; }
.footer-inner p { color: #d9d4ff; font-size: .88rem; margin: 0 auto 0 0; }
.footer-inner > a { color: white; font-size: .88rem; font-weight: 700; text-decoration: none; border-bottom: 1px solid #aaa3e0; }
.footer-inner > a:hover { color: var(--yellow); }

@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr .8fr; }
  .hero-art { height: 450px; }
  .hero h1 { font-size: clamp(2.7rem, 5vw, 4.3rem); }
  .physics-card img { opacity: .65; }
}
@media (max-width: 760px) {
  .shell { width: min(100% - 2rem, 1200px); }
  .header-inner { min-height: 72px; }
  .menu-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.3); border-radius: 7px;
    background: transparent; cursor: pointer;
  }
  .menu-toggle span { display: block; width: 19px; height: 2px; margin-inline: auto; background: white; }
  .main-nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    padding: 1.1rem; background: #221b50; box-shadow: 0 15px 22px rgba(14,10,51,.22);
    flex-direction: column; align-items: stretch; gap: .2rem;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: .7rem .45rem; }
  .main-nav .nav-contact { justify-content: space-between; margin-top: .4rem; padding: .8rem 1rem; }
  .hero { min-height: 0; }
  .hero-inner { grid-template-columns: 1fr; gap: 0; padding-block: 3.7rem 1.8rem; }
  .hero-copy { max-width: 650px; }
  .hero h1 { font-size: clamp(2.65rem, 8vw, 4rem); }
  .hero-tags { margin-top: 2.2rem; }
  .hero-art { height: 370px; max-width: 450px; margin-inline: auto; width: 100%; }
  .hero-mascot { width: 450px; max-width: 110%; }
  .formula-top { right: 0; }
  .formula-bottom { left: 0; }
  .finder-section, .subjects-section, .method-section, .contact-section, .faq-section { padding-block: 4.5rem; }
  .finder-layout, .method-layout, .contact-layout, .faq-layout { grid-template-columns: 1fr; gap: 2rem; }
  .section-head { display: block; }
  .section-head > p { margin-top: 1rem; }
  .subject-grid { grid-template-columns: 1fr; }
  .subject-card { min-height: 400px; }
  .physics-card img { opacity: 1; width: 39%; }
}
@media (max-width: 520px) {
  .hero h1 { font-size: 2.5rem; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 1.25rem; }
  .hero-tags { gap: .5rem; }
  .hero-tags span { font-size: .73rem; }
  .hero-tags span + span::before { margin-right: .5rem; }
  .hero-art { height: 360px; margin-top: 3rem; }
  .hero-art::before { width: min(90%, 330px); }
  .hero-mascot { width: 350px; }
  .formula { font-size: .75rem; }
  .finder-panel, .contact-form { padding: 1.3rem; }
  .choice-row button { flex: 1 1 auto; }
  .subject-card { min-height: 410px; padding: 1.55rem; }
  .subject-copy { max-width: 280px; }
  .physics-card img { width: 48%; right: -35px; bottom: -32px; opacity: .42; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: 1; }
  .footer-inner { flex-wrap: wrap; gap: 1rem 2rem; }
  .footer-inner p { order: 3; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
