:root {
  --home-bg: #050608;
  --home-panel: #0b0f14;
  --home-panel-soft: #0d131d;
  --home-line: #1c2739;
  --home-text: #e8edf7;
  --home-soft: #9ba8bf;
  --home-blue: #0f86ff;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(20, 144, 255, 0.2);
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Sora", sans-serif;
  color: var(--home-text);
  background:
    radial-gradient(circle at 16% -8%, rgba(22, 94, 255, 0.19), transparent 40%),
    radial-gradient(circle at 84% 8%, rgba(15, 123, 255, 0.13), transparent 30%),
    var(--home-bg);
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background:
    repeating-linear-gradient(to right, transparent 0, transparent 62px, rgba(255, 255, 255, 0.02) 63px, transparent 64px),
    repeating-linear-gradient(to bottom, transparent 0, transparent 62px, rgba(255, 255, 255, 0.018) 63px, transparent 64px);
}

.home-main {
  width: min(1800px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.75rem 0 3rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  padding-bottom: max(3rem, env(safe-area-inset-bottom));
  display: grid;
  gap: 1.8rem;
}

.hero-board {
  border: 1px solid var(--home-line);
  border-radius: 24px;
  min-height: min(50vw, 430px);
  position: relative;
  overflow: hidden;
  background: #070a0e;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  object-fit: cover;
  object-position: center center;
  filter: grayscale(100%) contrast(1.18) brightness(0.42);
}

.hero-board::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 6, 10, 0.16), rgba(2, 4, 8, 0.84)),
    radial-gradient(circle at 50% 22%, rgba(13, 117, 255, 0.24), transparent 44%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 1.1rem;
  padding: clamp(1.2rem, 3vw, 2.2rem);
}

.hero-title {
  margin: 0;
  color: #1490ff;
  font-family: "Poiret One", "Sora", sans-serif;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.05;
  font-size: clamp(1rem, 3.15vw, 4.5rem);
  max-width: 100%;
  white-space: nowrap;
  padding: 0.7rem 1rem;
  background: rgba(9, 13, 21, 0.72);
  overflow-wrap: anywhere;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
}

.book-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  min-width: min(100%, 470px);
  padding: 0.28rem 0.32rem 0.28rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 140, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(34, 45, 64, 0.7), 0 0 18px rgba(7, 125, 255, 0.35);
  color: #f0f7ff;
  text-decoration: none;
  background: rgba(10, 13, 19, 0.9);
}

.book-btn b {
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.book-btn .arrow {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 1.3rem;
  background: linear-gradient(180deg, #13a2ff, #0b74f7);
  box-shadow: 0 10px 20px rgba(5, 101, 232, 0.36);
}

.hero-avatars {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  max-width: 100%;
}

.avatar-stack {
  display: inline-flex;
}

.avatar-stack img {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 3px solid #15a0ff;
  object-fit: cover;
  object-position: center 18%;
  margin-left: -14px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}

.avatar-stack img:first-child {
  margin-left: 0;
}

.hero-avatars span {
  color: #dde7f8;
  font-size: 1.08rem;
  white-space: nowrap;
}

.hero-copy {
  margin: 0;
  text-align: center;
  color: #ccd6e8;
  font-size: clamp(1rem, 1.5vw, 1.4rem);
  font-family: "Poiret One", "Sora", sans-serif;
  letter-spacing: 0.02em;
}

.why-choose {
  display: grid;
  grid-template-columns: minmax(320px, 760px) 1fr;
  gap: 1.5rem;
  align-items: start;
}

.why-left {
  display: grid;
  gap: 1.2rem;
}

.feature-card {
  border: 1px solid var(--home-line);
  border-radius: 24px;
  padding: 1.45rem;
  background:
    linear-gradient(165deg, rgba(14, 17, 24, 0.93), rgba(8, 11, 16, 0.93)),
    var(--home-panel-soft);
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 1.25rem;
  min-height: 200px;
}

.feature-icon {
  width: 96px;
  height: 96px;
  border-radius: 26px;
  border: 1px solid rgba(15, 135, 255, 0.6);
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(9, 13, 20, 0.98), rgba(8, 10, 14, 0.98));
  box-shadow: inset 0 0 16px rgba(16, 126, 240, 0.18), 0 8px 16px rgba(0, 0, 0, 0.32);
}

.feature-icon img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.45rem, 2.2vw, 3rem);
}

.feature-card p {
  margin: 0 0 1rem;
  color: var(--home-soft);
  font-size: clamp(1rem, 1.45vw, 1.4rem);
  line-height: 1.55;
}

.feature-card a {
  color: #0f8dff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.08rem;
}

.why-right {
  border: 1px solid var(--home-line);
  border-radius: 22px;
  padding: clamp(1.1rem, 2vw, 2rem);
  background:
    linear-gradient(165deg, rgba(14, 17, 24, 0.93), rgba(8, 11, 16, 0.93)),
    var(--home-panel-soft);
}

.eyebrow {
  margin: 0 0 1rem;
  color: #dfe8f9;
  font-size: 1.8rem;
  line-height: 1.1;
  font-weight: 700;
}

.eyebrow span {
  font-size: 1.05rem;
  color: #d8e7f9;
}

.why-right h2 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 6vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.why-right h2 strong {
  color: #ffffff;
  font-weight: 800;
}

.why-right > p {
  margin: 0 0 1.4rem;
  color: var(--home-soft);
  font-size: clamp(1rem, 1.5vw, 1.55rem);
  line-height: 1.65;
  max-width: 58ch;
}

.why-right.panel,
.why-image-wrap.panel {
  overflow: visible;
}

.why-image-wrap {
  border: 1px solid #1a2839;
  border-radius: 34px;
  overflow: visible;
  position: relative;
  aspect-ratio: 4 / 3;
  min-height: 560px;
  max-width: 100%;
}

.why-image-inner {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  z-index: 0;
}

.why-image-wrap .strategy-card {
  isolation: isolate;
}

.why-image-wrap img {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  filter: grayscale(100%) contrast(1.06);
}

.strategy-card {
  position: absolute;
  z-index: 10;
  right: 1.1rem;
  bottom: 1.1rem;
  pointer-events: auto;
  width: min(44%, 480px);
  min-width: 0;
  border: 1px solid rgba(15, 135, 255, 0.72);
  border-radius: 30px;
  padding: 1.8rem 1.75rem;
  background:
    linear-gradient(145deg, rgba(14, 18, 24, 0.98), rgba(7, 9, 13, 0.98)),
    #0b0f14;
  box-shadow:
    0 0 0 10px #050608,
    0 10px 24px rgba(0, 0, 0, 0.4),
    inset 0 0 18px rgba(10, 95, 218, 0.1);
  display: grid;
  align-content: start;
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: strategyCardIn 820ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.strategy-card h3 {
  color: #f0f6ff;
}

.strategy-card h3 {
  margin: 0 0 1rem;
  font-size: clamp(1.15rem, 1.8vw, 2rem);
  line-height: 1.38;
}

.strategy-card a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #0f8dff;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(1rem, 1.4vw, 1.45rem);
}

.why-image-wrap:hover .strategy-card {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 0 0 10px #050608,
    0 16px 32px rgba(0, 0, 0, 0.52),
    0 0 24px rgba(16, 129, 255, 0.34),
    inset 0 0 18px rgba(10, 95, 218, 0.14);
}

@keyframes strategyCardIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .strategy-card {
    animation: none;
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.expertise-third {
  display: grid;
  grid-template-columns: minmax(300px, 640px) 1fr;
  gap: 2.4rem;
  align-items: stretch;
}

.third-left {
  position: relative;
  aspect-ratio: 3 / 5;
  min-height: 980px;
  border: 0;
  border-radius: 32px;
  overflow: hidden;
  background: #04070b;
}

.third-left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% 10%;
  filter: grayscale(100%) contrast(1.08) brightness(0.86);
}

.third-consult {
  position: absolute;
  z-index: 5;
  top: 1.4rem;
  left: 1.4rem;
  width: min(52%, 450px);
  min-width: 340px;
  border: 1px solid rgba(20, 134, 255, 0.72);
  border-radius: 30px;
  padding: 1.7rem 1.5rem;
  background:
    linear-gradient(180deg, rgba(14, 18, 25, 0.96), rgba(8, 10, 15, 0.96)),
    #0b0f14;
  box-shadow:
    0 0 0 16px #050608,
    0 0 30px rgba(16, 129, 255, 0.42),
    0 18px 40px rgba(0, 0, 0, 0.52);
}

.third-consult h3 {
  margin: 0 0 0.8rem;
  font-size: clamp(2.1rem, 2.5vw, 3.2rem);
  line-height: 1.2;
}

.third-consult p {
  margin: 0 0 1rem;
  color: #8f97a8;
  font-size: clamp(1.2rem, 1.35vw, 1.55rem);
  line-height: 1.6;
}

.third-consult a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #0f8dff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.7rem;
}

.third-consult a::after {
  content: "➜";
  width: 1.05em;
  height: 1.05em;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid currentColor;
  font-size: 0.74em;
  line-height: 1;
}

.third-right {
  border: 1px solid var(--home-line);
  border-radius: 22px;
  padding: clamp(1.1rem, 2vw, 2rem);
  background:
    linear-gradient(165deg, rgba(14, 17, 24, 0.93), rgba(8, 11, 16, 0.93)),
    var(--home-panel-soft);
}

.third-right h2 {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 6.1vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.third-right h2 strong {
  color: #ffffff;
  font-weight: 800;
}

.third-right > p {
  margin: 0 0 1.4rem;
  color: var(--home-soft);
  font-size: clamp(1rem, 1.5vw, 1.55rem);
  line-height: 1.65;
  max-width: 60ch;
}

.third-lower {
  display: grid;
  grid-template-columns: 1fr minmax(270px, 470px);
  gap: 1.2rem;
  align-items: stretch;
}

.best-list {
  border: 1px solid #1a2839;
  border-radius: 20px;
  padding: 1rem 1rem 1rem 1.1rem;
  background: rgba(7, 10, 15, 0.72);
}

.best-list h3 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.8rem, 2.6vw, 3rem);
}

.best-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.72rem;
}

.best-list li {
  position: relative;
  padding-left: 1.9rem;
  color: #c8d4e7;
  font-size: clamp(1rem, 1.4vw, 1.5rem);
  line-height: 1.45;
}

.best-list li::before {
  content: "◉";
  color: #0d8cff;
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1rem;
}

.third-years {
  border: 1px solid rgba(15, 135, 255, 0.66);
  border-radius: 24px;
  padding: 1.2rem;
  background:
    linear-gradient(145deg, rgba(14, 18, 24, 0.95), rgba(7, 9, 13, 0.95)),
    #0b0f14;
  display: grid;
  align-content: center;
  gap: 0.8rem;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.42), inset 0 0 18px rgba(10, 95, 218, 0.1);
}

.third-years-row {
  display: inline-flex;
  align-items: baseline;
  gap: 0.65rem;
}

.third-years-row .big {
  color: #0f89ff;
  font-size: clamp(3.6rem, 7vw, 6.4rem);
  line-height: 1;
  font-weight: 700;
}

.third-years-row .plus {
  color: #0f89ff;
  font-size: clamp(2.2rem, 3.5vw, 3.2rem);
  line-height: 1;
  font-weight: 700;
}

.third-years p {
  margin: 0;
  color: #dce5f4;
  font-size: clamp(1.02rem, 1.5vw, 1.55rem);
  line-height: 1.5;
}

@media (max-width: 1240px) {
  .hero-cta-row {
    gap: 0.65rem;
  }

  .why-choose {
    grid-template-columns: 1fr;
  }

  .expertise-third {
    grid-template-columns: 1fr;
  }

  .third-left {
    aspect-ratio: 3 / 4;
    min-height: 400px;
    max-height: 70vh;
  }

  .why-image-wrap {
    min-height: 320px;
    max-height: 50vh;
  }
}

@media (max-width: 860px) {
  .home-main {
    width: 100%;
    max-width: 100%;
    padding-left: max(0.9rem, env(safe-area-inset-left));
    padding-right: max(0.9rem, env(safe-area-inset-right));
    gap: 1.2rem;
  }

  .hero-board {
    min-height: 420px;
    max-height: 55vh;
    border-radius: 18px;
  }

  .hero-title {
    font-size: clamp(0.92rem, 4.5vw, 1.6rem);
    line-height: 1.1;
    letter-spacing: 0.015em;
    padding: 0.62rem 0.7rem;
    width: 100%;
  }

  .book-btn {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0.3rem 0.3rem 0.3rem 0.85rem;
    -webkit-tap-highlight-color: rgba(20, 144, 255, 0.25);
  }

  .hero-avatars {
    width: 100%;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .hero-avatars span {
    display: none;
  }

  .avatar-stack img {
    width: 50px;
    height: 50px;
    border-width: 2px;
    margin-left: -10px;
  }

  .hero-copy {
    text-align: center;
    width: 100%;
    font-size: clamp(1rem, 4.6vw, 1.35rem);
  }

  .feature-card {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 1rem;
    min-height: auto;
    border-radius: 18px;
  }

  .feature-icon {
    width: 74px;
    height: 74px;
    border-radius: 18px;
  }

  .why-right h2 {
    font-size: clamp(2rem, 10vw, 3.5rem);
    line-height: 1.05;
  }

  .why-image-wrap {
    min-height: 280px;
    max-height: 42vh;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
  }

  .why-image-wrap img {
    object-position: center 30%;
  }

  .strategy-card {
    width: auto;
    min-width: 0;
    max-width: none;
    left: 1rem;
    right: 1rem;
    padding: 1.2rem;
    z-index: 10;
    background: rgba(11, 15, 20, 0.97);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(15, 135, 255, 0.4);
  }

  .strategy-card h3 {
    color: #f0f6ff;
  }

  .third-left {
    min-height: 380px;
    max-height: 55vh;
    border-radius: 20px;
  }

  .third-left img {
    object-position: center 25%;
  }

  .why-choose,
  .why-left,
  .expertise-third,
  .third-lower {
    min-width: 0;
  }

  .why-right,
  .third-right,
  .third-left {
    min-width: 0;
  }

  .third-consult {
    position: static;
    margin: 1rem;
    max-width: none;
    width: auto;
    min-width: 0;
  }

  .third-right h2 {
    font-size: clamp(2.1rem, 10vw, 3.8rem);
  }

  .third-lower {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .home-main {
    width: 100%;
    max-width: 100%;
    gap: 0.95rem;
    padding: 0.75rem max(0.5rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(0.5rem, env(safe-area-inset-left));
  }

  .hero-inner {
    padding: 0.72rem max(0.5rem, env(safe-area-inset-right)) max(0.72rem, env(safe-area-inset-bottom)) max(0.5rem, env(safe-area-inset-left));
    gap: 0.78rem;
  }

  .hero-board {
    min-height: 280px;
    max-height: 40vh;
    border-radius: 14px;
  }

  .hero-title {
    font-size: clamp(0.78rem, 4.2vw, 1.18rem);
    line-height: 1.08;
    padding: 0.5rem 0.55rem;
    max-width: 100%;
  }

  .avatar-stack img {
    width: 42px;
    height: 42px;
    border-width: 2px;
    margin-left: -8px;
  }

  .book-btn {
    min-height: 52px;
    border-radius: 16px;
    padding-left: 0.75rem;
  }

  .book-btn b {
    font-size: 0.82rem;
    line-height: 1.2;
  }

  .book-btn .arrow {
    width: 42px;
    height: 42px;
    font-size: 1.08rem;
  }

  .hero-avatars span {
    display: none;
  }

  .hero-copy {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .why-image-wrap {
    min-height: 220px;
    max-height: 38vh;
    border-radius: 14px;
  }

  .why-image-wrap img {
    object-position: center 32%;
  }

  .why-right h2 {
    font-size: clamp(1.8rem, 9vw, 2.45rem);
  }

  .why-right > p {
    font-size: 0.94rem;
    line-height: 1.5;
  }

  .feature-card h3 {
    font-size: 1.4rem;
  }

  .feature-card p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .feature-card a {
    font-size: 1rem;
  }

  .strategy-card {
    position: absolute;
    left: 0.8rem;
    right: 0.8rem;
    bottom: 0.8rem;
    width: auto;
    min-width: 0;
    border-radius: 14px;
    margin: 0;
    padding: 0.85rem 1rem;
    z-index: 10;
    background: rgba(11, 15, 22, 0.98);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(15, 135, 255, 0.5);
    opacity: 1;
  }

  .strategy-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
    color: #f2f7ff;
    line-height: 1.3;
  }

  .strategy-card a {
    font-size: 0.9rem;
    color: #5eb8ff;
  }

  .third-left {
    min-height: 300px;
    max-height: 48vh;
    border-radius: 14px;
  }

  .third-left img {
    object-position: center 28%;
  }

  .third-consult h3 {
    font-size: 1.35rem;
    line-height: 1.18;
  }

  .third-consult p {
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .third-consult a {
    font-size: 1.05rem;
  }

  .third-right h2 {
    font-size: clamp(1.82rem, 8.8vw, 2.5rem);
    line-height: 1.02;
  }

  .third-right > p {
    font-size: 0.94rem;
    line-height: 1.5;
  }

  .best-list h3 {
    font-size: 1.65rem;
  }

  .best-list li {
    font-size: 0.98rem;
    line-height: 1.42;
  }

  .third-years p {
    font-size: 0.95rem;
    line-height: 1.45;
  }
}

/* Very small phones and touch optimizations */
@media (max-width: 380px) {
  .home-main {
    padding-left: max(0.4rem, env(safe-area-inset-left));
    padding-right: max(0.4rem, env(safe-area-inset-right));
  }

  .hero-board {
    max-height: 36vh;
  }

  .hero-title {
    font-size: clamp(1.1rem, 9vw, 1.6rem);
  }

  .book-btn b {
    font-size: 0.78rem;
  }

  .why-image-wrap {
    max-height: 34vh;
    min-height: 200px;
  }

  .strategy-card h3 {
    font-size: 0.88rem;
  }

  .strategy-card a {
    font-size: 0.85rem;
  }

  .third-left {
    max-height: 42vh;
    min-height: 260px;
  }

  .why-right h2,
  .third-right h2 {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
  }

  .feature-card {
    padding: 0.85rem;
  }
}

/* Ensure all interactive elements have touch-friendly size */
@media (pointer: coarse) {
  .book-btn,
  .strategy-card a,
  .third-consult a,
  .feature-card a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .feature-card a {
    padding: 0.5rem 0;
  }
}
