:root {
  --ink: #181512;
  --muted: #665f57;
  --paper: #fffaf2;
  --panel: #ffffff;
  --line: #e7ded2;
  --accent: #b8322a;
  --accent-dark: #7f1f1a;
  --sage: #d7e0d2;
  --blue: #21394f;
  --shadow: 0 18px 50px rgba(42, 31, 22, 0.12);
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

.ripple-canvas {
  position: fixed;
  inset: 0;
  z-index: 30;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(24, 21, 18, 0.08);
  background: rgba(255, 250, 242, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  font-weight: 820;
}

.brand-mark {
  display: block;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  color: var(--accent);
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-mark circle {
  fill: rgba(184, 50, 42, 0.1);
  stroke: currentColor;
  stroke-width: 3.4;
}

.brand-mark path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.2;
}

.brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  color: var(--ink);
  font-size: 1.08rem;
  letter-spacing: 0;
  line-height: 1;
}

.brand-wordmark span:last-child {
  color: var(--accent-dark);
}

.nav {
  display: flex;
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
}

.nav a:hover {
  color: var(--accent-dark);
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 72px));
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: clamp(56px, 8vw, 96px) clamp(18px, 5vw, 72px);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.72;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 250, 242, 0.96) 0%, rgba(255, 250, 242, 0.86) 42%, rgba(255, 250, 242, 0.18) 78%),
    linear-gradient(0deg, rgba(255, 250, 242, 0.96) 0%, rgba(255, 250, 242, 0) 22%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 20ch;
  margin: 0;
  font-size: clamp(2.25rem, 5.2vw, 4.45rem);
  line-height: 1.3;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.2vw, 3.1rem);
  line-height: 1.3;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.18rem;
}

.lead {
  max-width: 58ch;
  margin: 28px 0 0;
  color: #3c352f;
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 780;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

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

.button.primary {
  background: var(--accent);
  color: white;
}

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

.button.secondary {
  border-color: rgba(24, 21, 18, 0.18);
  background: rgba(255, 255, 255, 0.72);
}

.section {
  padding: clamp(56px, 7vw, 96px) clamp(18px, 5vw, 72px);
}

#zajecia,
#o-mnie,
#jlpt,
#faq,
#kontakt {
  scroll-margin-top: 96px;
}

.intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  width: min(calc(100% - 36px), var(--container));
  margin: clamp(28px, 5vw, 58px) auto;
  padding: clamp(38px, 5vw, 60px) clamp(26px, 4vw, 54px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(215, 224, 210, 0.28), transparent 44%),
    white;
  box-shadow: 0 18px 54px rgba(42, 31, 22, 0.1);
  overflow: hidden;
}

.intro::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 2;
  width: 0;
  background: var(--accent);
  opacity: 0;
  transition:
    width 220ms ease,
    opacity 220ms ease;
}

.intro > * {
  position: relative;
  z-index: 1;
}

.intro-heading {
  justify-self: start;
  max-width: 560px;
  text-align: left;
}

.intro-copy {
  justify-self: stretch;
  width: 100%;
  padding-left: clamp(24px, 4vw, 46px);
  border-left: 1px solid rgba(184, 50, 42, 0.14);
  text-align: left;
}

.intro-copy p,
.jlpt-copy p,
.contact-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.intro-copy p + p {
  margin-top: 14px;
}

.section-heading {
  max-width: 850px;
  margin-bottom: 36px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.feature,
.contact-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.feature {
  position: relative;
  overflow: hidden;
  min-height: 195px;
  padding: 24px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.feature::after {
  content: "";
  position: absolute;
  inset: auto 24px 20px 24px;
  height: 3px;
  background: var(--accent);
  border-radius: 999px;
  opacity: 0;
  transform: scaleX(0.55);
  transform-origin: left;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.feature:hover,
.feature:focus-within,
.feature.is-scroll-active {
  border-color: rgba(184, 50, 42, 0.28);
  box-shadow: 0 22px 58px rgba(42, 31, 22, 0.16);
  transform: translateY(-3px);
}

.feature:hover::after,
.feature:focus-within::after,
.feature.is-scroll-active::after {
  opacity: 0.82;
  transform: scaleX(1);
}

.feature-number {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-weight: 850;
}

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

.jlpt {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: clamp(32px, 7vw, 96px);
  align-items: center;
  background: linear-gradient(135deg, #17324a 0%, var(--blue) 58%, #3b1d1a 100%);
  color: white;
}

.jlpt > *:not(.jlpt-canvas) {
  position: relative;
  z-index: 1;
}

.jlpt-copy h2 {
  margin-bottom: 24px;
}

.jlpt-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.75;
}

.jlpt .section-kicker,
.jlpt-copy p {
  color: #f3c9bd;
}

.level-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.level-list span {
  --jlpt-light: 0;
  --jlpt-accent: 255, 255, 255;
  display: grid;
  min-height: clamp(90px, 14vw, 150px);
  place-items: center;
  border: 1px solid rgba(var(--jlpt-accent), calc(0.26 + var(--jlpt-light) * 0.34));
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 42%, rgba(var(--jlpt-accent), calc(var(--jlpt-light) * 0.32)), transparent 62%),
    rgba(255, 255, 255, calc(0.08 + var(--jlpt-light) * 0.11));
  box-shadow:
    0 0 calc(var(--jlpt-light) * 48px) rgba(var(--jlpt-accent), calc(var(--jlpt-light) * 0.42)),
    inset 0 0 calc(var(--jlpt-light) * 32px) rgba(var(--jlpt-accent), calc(var(--jlpt-light) * 0.22));
  font-size: clamp(1.5rem, 3vw, 2.7rem);
  font-weight: 850;
  text-shadow: 0 0 calc(var(--jlpt-light) * 18px) rgba(255, 255, 255, calc(var(--jlpt-light) * 0.58));
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    text-shadow 180ms ease;
}

.level-list span:last-child {
  --jlpt-accent: 184, 50, 42;
  border-color: rgba(255, 255, 255, calc(0.2 + var(--jlpt-light) * 0.28));
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, calc(var(--jlpt-light) * 0.18)), transparent 58%),
    var(--accent);
  box-shadow:
    0 0 calc(var(--jlpt-light) * 58px) rgba(184, 50, 42, calc(var(--jlpt-light) * 0.52)),
    inset 0 0 calc(var(--jlpt-light) * 32px) rgba(255, 255, 255, calc(var(--jlpt-light) * 0.22));
}

@media (prefers-reduced-motion: reduce) {
  .feature,
  .feature::after,
  .intro,
  .intro::before,
  .send-seal.is-visible .seal-mark,
  .level-list span,
  .send-seal.is-visible,
  .status,
  .status::before,
  .faq-list summary::after,
  .faq-answer,
  .faq-list details p {
    animation: none;
    transition: none;
  }

  .send-seal.is-visible {
    opacity: 1;
    transform: translateY(0) rotate(-10deg) scale(1);
  }

  .has-scroll-effects [data-scroll-effect],
  .has-scroll-effects [data-scroll-effect].is-scroll-active {
    opacity: 1;
    transform: none;
  }
}

.is-low-power .hero-canvas,
.is-low-power .jlpt-canvas,
.is-low-power .ripple-canvas {
  display: none;
}

.is-low-power .send-seal.is-visible,
.is-low-power .send-seal.is-visible .seal-mark,
.is-low-power .status,
.is-low-power .status::before {
  animation: none;
  transition: none;
}

.is-low-power .send-seal.is-visible {
  opacity: 1;
  transform: translateY(0) rotate(-10deg) scale(1);
}

.details {
  position: relative;
  display: grid;
  grid-template-columns: minmax(230px, 0.42fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 58px);
  align-items: start;
  width: min(calc(100% - 36px), var(--container));
  margin: clamp(34px, 5vw, 64px) auto;
  padding: clamp(38px, 5vw, 64px) clamp(24px, 4vw, 54px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(215, 224, 210, 0.34), transparent 44%),
    linear-gradient(90deg, rgba(184, 50, 42, 0.055), transparent 34%),
    white;
  box-shadow: 0 18px 54px rgba(42, 31, 22, 0.1);
  overflow: hidden;
}

.details::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 4;
  width: 5px;
  background: var(--accent);
}

.details::after {
  content: "日本語";
  position: absolute;
  right: clamp(22px, 5vw, 64px);
  bottom: -0.18em;
  z-index: 2;
  color: rgba(184, 50, 42, 0.04);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(5.4rem, 12vw, 10.5rem);
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.details-heading {
  position: relative;
  z-index: 3;
  align-self: center;
  justify-self: center;
  max-width: 340px;
  text-align: center;
}

.details-heading h2 {
  font-size: clamp(1.65rem, 2.6vw, 2.55rem);
}

.detail-list {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: minmax(110px, 0.24fr) minmax(0, 1fr);
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(184, 50, 42, 0.12);
}

.detail-note {
  position: relative;
  display: grid;
  gap: 0;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(184, 50, 42, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.76);
}

.detail-note > * {
  position: relative;
  z-index: 3;
}

.detail-list div:first-child {
  padding-top: 0;
}

.detail-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-list dt {
  color: var(--accent-dark);
  font-weight: 850;
}

.detail-list dd {
  margin: 0;
  color: var(--muted);
}

.faq {
  width: min(calc(100% - 36px), var(--container));
  margin: 0 auto;
  padding-top: clamp(32px, 5vw, 62px);
  padding-bottom: clamp(36px, 5vw, 68px);
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 14px 38px rgba(42, 31, 22, 0.08);
  overflow: hidden;
}

.faq-list summary {
  cursor: pointer;
  padding: 20px clamp(18px, 3vw, 28px);
  color: var(--ink);
  font-weight: 820;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 850;
  transition: transform 180ms ease;
}

.faq-list details[open] summary::after {
  content: "-";
  transform: rotate(180deg);
}

.faq-list p {
  margin: 0;
  padding: 0 clamp(18px, 3vw, 28px) 22px;
  color: var(--muted);
}

.faq-answer {
  height: 0;
  overflow: hidden;
  transition: height 280ms ease;
}

.faq-list details[open] .faq-answer {
  height: auto;
}

.faq-list details p {
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.faq-list details[open]:not(.is-closing) p {
  opacity: 1;
  transform: translateY(0);
}

.contact {
  width: min(calc(100% - 36px), var(--container));
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
  margin: clamp(16px, 3vw, 36px) auto clamp(36px, 6vw, 80px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.contact-copy {
  position: sticky;
  top: 104px;
}

.contact-copy h2 {
  margin-bottom: 22px;
}

.contact-form {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  padding: clamp(18px, 3vw, 26px);
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: #342e29;
  font-size: 0.92rem;
  font-weight: 720;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d8cec2;
  border-radius: 6px;
  background: #fffdf9;
  color: var(--ink);
  font: inherit;
  padding: 12px 13px;
}

select {
  padding-right: 34px;
}

select.is-enhanced {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.custom-select {
  position: relative;
}

.custom-select-button {
  position: relative;
  width: 100%;
  padding: 12px 38px 12px 13px;
  border: 1px solid #d8cec2;
  border-radius: 6px;
  background: #fffdf9;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.custom-select-button::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 15px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--accent-dark);
  border-bottom: 2px solid var(--accent-dark);
  transform: translateY(-62%) rotate(45deg);
}

.custom-select-button.is-placeholder {
  color: var(--ink);
  font-weight: 720;
}

.custom-select-button:focus {
  outline: 3px solid rgba(184, 50, 42, 0.18);
  border-color: var(--accent);
}

.custom-select-menu {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 8;
  display: none;
  margin-top: 6px;
  overflow: hidden;
  border: 1px solid rgba(127, 31, 26, 0.26);
  border-radius: 12px;
  background: #fffdf9;
  box-shadow: 0 18px 38px rgba(42, 31, 22, 0.16);
}

.custom-select.is-open .custom-select-menu {
  display: grid;
}

.custom-select-option {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid rgba(231, 222, 210, 0.72);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.custom-select-option:last-child {
  border-bottom: 0;
}

.custom-select-option:hover,
.custom-select-option:focus {
  outline: 0;
  background: rgba(184, 50, 42, 0.08);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(184, 50, 42, 0.18);
  border-color: var(--accent);
}

[aria-invalid="true"] {
  border-color: var(--accent);
  background: #fff8f6;
}

.field-error {
  min-height: 18px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

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

.send-seal {
  position: absolute;
  right: clamp(22px, 5vw, 46px);
  bottom: clamp(58px, 7vw, 76px);
  z-index: 2;
  display: grid;
  width: clamp(118px, 18vw, 154px);
  aspect-ratio: 1;
  place-items: center;
  color: var(--accent);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) rotate(-10deg) scale(1.45);
  transform-origin: center;
}

.send-seal.is-visible {
  animation: sealStamp 820ms cubic-bezier(0.18, 0.88, 0.24, 1.18) forwards;
}

.seal-mark {
  position: relative;
  display: block;
  width: 96%;
  height: 96%;
  border: 5px solid currentColor;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 34%, rgba(184, 50, 42, 0.08), transparent 34%),
    rgba(255, 250, 242, 0.92);
  box-shadow:
    inset 0 0 0 6px rgba(184, 50, 42, 0.1),
    0 16px 28px rgba(184, 50, 42, 0.14);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
  line-height: 1;
}

.seal-char {
  position: absolute;
  display: block;
  width: 1.18em;
  height: 0.82em;
  color: currentColor;
  font-size: clamp(2.35rem, 7.6vw, 3rem);
  line-height: 0.82;
  text-align: center;
  transform: translate(-50%, -50%) scaleX(1.5);
}

.seal-char-send {
  top: 17%;
  left: 50%;
}

.seal-char-message {
  top: 51%;
  left: 50%;
}

.seal-char-done {
  top: 84%;
  left: 50%;
}

.send-seal.is-visible .seal-mark {
  animation: sealInkSettle 900ms ease-out forwards;
}

.full {
  grid-column: 1 / -1;
}

.local-preview-button[hidden] {
  display: none;
}

.status {
  grid-column: 1 / -1;
  position: relative;
  min-height: 30px;
  margin: 0;
  padding: 6px 0 0 18px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
}

.status::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 0;
  width: 7px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  transform: scale(0.4);
}

.status.is-sending,
.status.is-preview,
.status.is-success,
.status.is-error {
  animation: statusInk 620ms ease-out forwards;
}

.status.is-sending::before,
.status.is-preview::before,
.status.is-success::before,
.status.is-error::before {
  animation: statusDot 520ms ease-out 180ms forwards;
}

.status.is-sending {
  color: var(--muted);
}

.status.is-preview {
  color: var(--accent-dark);
}

.status.is-success {
  color: var(--accent-dark);
  animation-delay: 180ms;
}

.status.is-error {
  color: var(--accent);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer p {
  margin: 0;
}

.footer a {
  font-weight: 740;
}

@keyframes sealStamp {
  0% {
    opacity: 0;
    transform: translateY(-18px) rotate(-18deg) scale(1.75);
    filter: blur(1px);
  }

  42% {
    opacity: 1;
    transform: translateY(2px) rotate(-8deg) scale(0.92);
    filter: blur(0);
  }

  62% {
    transform: translateY(0) rotate(-10deg) scale(1.04);
  }

  100% {
    opacity: 1;
    transform: translateY(0) rotate(-10deg) scale(1);
  }
}

@keyframes sealInkSettle {
  0%,
  38% {
    filter: saturate(1.18) contrast(1.08);
  }

  100% {
    filter: saturate(0.96) contrast(1);
  }
}

@keyframes statusInk {
  0% {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(1px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes statusDot {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }

  60% {
    opacity: 0.75;
    transform: scale(1.28);
  }

  100% {
    opacity: 0.55;
    transform: scale(1);
  }
}

@media (max-width: 980px) {
  .intro,
  .jlpt,
  .contact {
    grid-template-columns: 1fr;
  }

  .intro-copy {
    padding-top: 24px;
    padding-left: 0;
    border-top: 1px solid rgba(184, 50, 42, 0.14);
    border-left: 0;
  }

  .feature-grid,
  .details {
    grid-template-columns: 1fr;
  }

  .contact-copy {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  #zajecia,
  #o-mnie,
  #jlpt,
  #faq,
  #kontakt {
    scroll-margin-top: 128px;
  }

  .hero {
    min-height: 720px;
    align-items: end;
  }

  .hero::after {
    background:
      linear-gradient(0deg, rgba(255, 250, 242, 0.98) 0%, rgba(255, 250, 242, 0.9) 50%, rgba(255, 250, 242, 0.18) 100%),
      linear-gradient(90deg, rgba(255, 250, 242, 0.98) 0%, rgba(255, 250, 242, 0.35) 100%);
  }

  .hero-canvas {
    opacity: 1;
  }

  h1 {
    max-width: 18ch;
    font-size: clamp(2.25rem, 10vw, 3.45rem);
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .intro {
    margin: 18px;
    padding: clamp(34px, 9vw, 54px) clamp(20px, 6vw, 30px);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 16px 42px rgba(42, 31, 22, 0.1);
    transition:
      transform 240ms ease,
      border-color 240ms ease,
      box-shadow 240ms ease,
      background 240ms ease;
  }

  .intro.is-scroll-active {
    border-color: rgba(184, 50, 42, 0.32);
    background:
      linear-gradient(120deg, rgba(184, 50, 42, 0.08), transparent 38%),
      white;
    box-shadow: 0 24px 56px rgba(42, 31, 22, 0.16);
    transform: translateY(-3px);
  }

  .intro.is-scroll-active::before {
    width: 5px;
    opacity: 1;
  }

  .feature-grid,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .detail-list div {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .detail-note {
    padding: 22px;
  }

  .contact-form {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .send-seal {
    right: 22px;
    bottom: 78px;
    width: 112px;
  }

  .level-list {
    grid-template-columns: repeat(5, minmax(54px, 1fr));
    overflow-x: auto;
  }

  .level-list span {
    min-height: 84px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) and (prefers-reduced-motion: no-preference) {
  .has-scroll-effects [data-scroll-effect] {
    opacity: 0.78;
    transform: translateY(18px);
    transition:
      opacity 260ms ease,
      transform 260ms ease,
      border-color 240ms ease,
      box-shadow 240ms ease,
      background 240ms ease;
  }

  .has-scroll-effects [data-scroll-effect].is-scroll-active {
    opacity: 1;
  }
}
