:root {
  --background: #D5F4FF;
  --text: #101010;
  --accent: #49BCE5;
  --content-width: 1408px;
  --grid-gap: 24px;
  --radius-large: 40px;
  --radius-card: 32px;
  --shadow: 0 18px 44px rgba(16, 16, 16, 0.14);
  --shadow-soft: 0 12px 30px rgba(16, 16, 16, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: Inter, Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.page {
  width: min(var(--content-width), calc(100% - 48px));
  margin: 48px auto 32px;
}

.header {
  width: 100%;
  height: 80px;
  border-radius: var(--radius-large);
  background: var(--text);
  color: var(--background);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 32px;
  padding: 0 40px;
  position: sticky;
  top: 24px;
  z-index: 50;
  box-shadow: 0 16px 34px rgba(16, 16, 16, 0.18);
}

.logo-link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  width: 117px;
  text-decoration: none;
}

.logo-link img {
  width: 117px;
  height: auto;
}

.nav {
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.nav a {
  font-size: 28px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-thickness: 1px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav a:hover,
.nav a.is-active {
  opacity: 0.78;
  transform: translateY(-1px);
}

.nav a.is-disabled {
  opacity: 0.48;
  cursor: default;
  pointer-events: none;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.login-button {
  color: var(--background);
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-thickness: 1px;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.burger {
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  color: var(--background);
  background: transparent;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 34px;
  height: 2px;
  margin: 7px auto;
  border-radius: 999px;
  background: currentColor;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.header.is-open .burger span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.header.is-open .burger span:nth-child(2) {
  opacity: 0;
}

.header.is-open .burger span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.hero {
  margin-top: 48px;
  text-align: center;
}

.hero h1 {
  color: var(--text);
  font-size: clamp(44px, 5vw, 64px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.hero p {
  max-width: 760px;
  margin: 20px auto 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.hero.compact p {
  display: none;
}

.grid-section {
  margin-top: 48px;
}

.five-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--grid-gap);
  align-items: stretch;
}

.skill-card,
.video-card,
.guide-card {
  color: var(--text);
  background: var(--background);
  border: 1px solid rgba(16, 16, 16, 0.035);
  box-shadow: var(--shadow);
  text-decoration: none;
  overflow: hidden;
  position: relative;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.skill-card:hover,
.video-card:hover,
.guide-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 58px rgba(16, 16, 16, 0.18);
  border-color: rgba(16, 16, 16, 0.08);
}

.skill-card {
  min-height: 240px;
  border-radius: var(--radius-card);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.skill-card.span-2 {
  grid-column: span 2;
}

.skill-card.start-2 {
  grid-column: 2 / span 2;
}

.skill-card.start-4 {
  grid-column: 4 / span 2;
}

.card-copy {
  min-width: 0;
}

.card-title {
  color: var(--text);
  font-size: clamp(32px, 2.25vw, 40px);
  line-height: 0.98;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.card-text {
  max-width: 420px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.16;
  letter-spacing: 0.02em;
}

.card-icon {
  width: 100px;
  height: 100px;
  flex: 0 0 100px;
  display: grid;
  place-items: center;
}

.card-icon img {
  width: 100px;
  max-height: 100px;
  object-fit: contain;
}

.video-card,
.guide-card {
  min-height: 314px;
  border-radius: var(--radius-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.video-card {
  grid-column: span 1;
}

.video-preview {
  height: 150px;
  border-radius: 24px;
  background: var(--text);
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.video-preview::before {
  content: "";
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--background);
  box-shadow: var(--shadow-soft);
}

.video-preview::after {
  content: "";
  position: absolute;
  border-left: 22px solid var(--text);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  transform: translateX(4px);
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pill {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(73, 188, 229, 0.18);
}

.video-card h2,
.guide-card h2 {
  color: var(--text);
  font-size: 30px;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.video-card p,
.guide-card p,
.guide-list li {
  color: var(--text);
  font-size: 16px;
  line-height: 1.26;
  letter-spacing: 0.02em;
}

.guide-card {
  grid-column: span 2;
  min-height: 280px;
}

.guide-card:nth-child(3n) {
  grid-column: span 1;
}

.guide-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.guide-number {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 22px;
  background: var(--text);
  color: var(--background);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 900;
}

.guide-list {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.guide-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.guide-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--text);
}

.login-layout {
  margin-top: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 48px;
  align-items: stretch;
}

.login-info,
.login-panel {
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
  padding: 40px;
}

.login-info {
  min-height: 420px;
  background: var(--text);
  color: var(--background);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-info h1 {
  font-size: clamp(48px, 5vw, 72px);
  line-height: 0.96;
  letter-spacing: 0.04em;
}

.login-info p {
  max-width: 640px;
  margin-top: 24px;
  font-size: 24px;
  line-height: 1.24;
}

.login-panel {
  background: var(--background);
  border: 1px solid rgba(16, 16, 16, 0.035);
}

.login-panel h2 {
  color: var(--text);
  font-size: 40px;
  line-height: 1;
  margin-bottom: 28px;
}

.form {
  display: grid;
  gap: 18px;
}

.form label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.form input {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 2px solid rgba(16, 16, 16, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form input:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 5px rgba(16, 16, 16, 0.08);
}

.submit-button {
  min-height: 58px;
  margin-top: 8px;
  padding: 16px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: var(--background);
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.submit-button:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

.form-result {
  min-height: 20px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
}

.footer {
  margin-top: 96px;
  min-height: 240px;
  border-radius: var(--radius-large);
  background: var(--text);
  color: var(--background);
  padding: 40px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(340px, 0.9fr);
  align-items: start;
  justify-content: space-between;
  gap: 48px;
  box-shadow: 0 18px 42px rgba(16, 16, 16, 0.18);
}

.footer-brand img {
  width: 264px;
  max-width: 100%;
  height: auto;
}

.footer-brand p {
  margin-top: 16px;
  color: var(--background);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.footer-links {
  display: flex;
  gap: 80px;
}

.footer-column h3,
.contact h3 {
  margin-bottom: 16px;
  color: var(--background);
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0.04em;
}

.footer-column ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.footer-column a,
.contact p {
  color: var(--background);
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: 0.03em;
}

.contact {
  justify-self: end;
  min-width: 340px;
}

.contact-button {
  margin-top: 32px;
  min-width: 196px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  border-radius: 999px;
  background: var(--background);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.contact-button:hover {
  opacity: 0.9;
  transform: translateY(-3px);
}

@media (max-width: 1180px) {
  .header {
    column-gap: 22px;
    padding: 0 28px;
  }

  .nav {
    gap: 22px;
  }

  .nav a,
  .login-button {
    font-size: 22px;
  }

  .five-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skill-card.span-2,
  .skill-card.start-2,
  .skill-card.start-4,
  .video-card,
  .guide-card,
  .guide-card:nth-child(3n) {
    grid-column: auto;
  }

  .footer {
    grid-template-columns: 1fr 1fr;
  }

  .contact {
    justify-self: start;
  }

  .login-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .page {
    width: min(100% - 28px, var(--content-width));
    margin-top: 24px;
  }

  .header {
    height: auto;
    min-height: 72px;
    border-radius: 32px;
    padding: 0 22px;
    top: 14px;
    grid-template-columns: 1fr auto;
  }

  .burger {
    display: block;
    justify-self: end;
  }

  .nav,
  .header-actions {
    display: none;
  }

  .header.is-open {
    align-items: start;
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .header.is-open .nav,
  .header.is-open .header-actions {
    display: flex;
    grid-column: 1 / -1;
    width: 100%;
  }

  .header.is-open .nav {
    margin-top: 22px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .header.is-open .header-actions {
    justify-content: flex-start;
    margin-top: 18px;
  }

  .hero h1 {
    letter-spacing: 0.08em;
  }

  .five-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .skill-card {
    min-height: 180px;
    padding: 28px;
    border-radius: 28px;
  }

  .card-icon,
  .card-icon img {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
  }

  .video-card,
  .guide-card {
    min-height: 280px;
    padding: 24px;
    border-radius: 28px;
  }

  .footer {
    margin-top: 64px;
    grid-template-columns: 1fr;
    border-radius: 32px;
    padding: 32px;
  }

  .footer-links {
    gap: 40px;
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  .page {
    width: min(100% - 22px, var(--content-width));
  }

  .logo-link,
  .logo-link img {
    width: 108px;
  }

  .hero h1 {
    font-size: 38px;
    line-height: 1.08;
  }

  .hero p {
    font-size: 17px;
  }

  .skill-card {
    align-items: flex-start;
    gap: 18px;
  }

  .card-title {
    font-size: 28px;
  }

  .card-text {
    font-size: 14px;
  }

  .card-icon,
  .card-icon img {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
  }

  .video-preview {
    height: 138px;
  }

  .footer-brand p {
    font-size: 20px;
  }

  .contact {
    min-width: 0;
  }

  .login-info,
  .login-panel {
    padding: 28px;
    border-radius: 30px;
  }
}
