/* =========================================================
   CSS Development Lab 02
   Responsive Hero Banner
   ========================================================= */

:root {
  --page-max: 1200px;
  --text: #171717;
  --muted: #686868;
  --line: #e6e6e2;
  --surface: #ffffff;
  --soft: #f4f4f0;
  --dark: #171717;
  --radius-lg: 30px;
  --radius-md: 20px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--surface);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

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

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

/* ---------- Hero ---------- */

.hero {
  padding:
    clamp(28px, 4vw, 56px)
    clamp(18px, 4vw, 40px)
    clamp(64px, 9vw, 120px);
  background:
    radial-gradient(circle at 82% 18%, rgba(0,0,0,.05), transparent 26%),
    linear-gradient(180deg, #fafaf8 0%, #f3f3ef 100%);
}

.hero-inner {
  width: min(100%, var(--page-max));
  min-height: min(760px, calc(100vh - 56px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
  align-items: center;
  gap: clamp(40px, 7vw, 96px);
}

.hero-content {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #7b7b7b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.7rem, 6vw, 6.3rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-desc {
  max-width: 620px;
  margin: clamp(22px, 3vw, 30px) 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.16rem);
}

.hero-actions {
  margin-top: clamp(26px, 4vw, 36px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  min-height: 48px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

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

.btn-primary {
  color: #fff;
  background: var(--dark);
}

.btn-secondary {
  border: 1px solid #d8d8d4;
  background: rgba(255,255,255,.72);
}

.hero-points {
  margin: clamp(30px, 5vw, 48px) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  list-style: none;
  color: #555;
  font-size: 0.9rem;
}

.hero-points li {
  position: relative;
  padding-left: 16px;
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.73em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #171717;
}

/* ---------- Hero image ---------- */

.hero-media {
  position: relative;
}

.hero-image-wrap {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #deded8;
  box-shadow: var(--shadow);
}

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

.hero-stat {
  position: absolute;
  left: clamp(-20px, -2vw, -8px);
  bottom: clamp(18px, 4vw, 40px);
  min-width: 190px;
  padding: 18px 20px;
  display: grid;
  gap: 2px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 18px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 16px 40px rgba(0,0,0,.08);
  backdrop-filter: blur(12px);
}

.hero-stat strong {
  font-size: 1.65rem;
  line-height: 1;
}

.hero-stat span {
  color: var(--muted);
  font-size: 0.84rem;
}

/* ---------- Feature section ---------- */

.features {
  padding:
    clamp(80px, 10vw, 140px)
    clamp(18px, 4vw, 40px);
}

.section-head,
.feature-grid,
.demo-section {
  width: min(100%, var(--page-max));
  margin-inline: auto;
}

.section-head h2,
.demo-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.feature-grid {
  margin-top: clamp(34px, 5vw, 52px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  min-height: 250px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.feature-card > span {
  color: #999;
  font-size: 0.8rem;
  font-weight: 800;
}

.feature-card h3 {
  margin: auto 0 10px;
  font-size: 1.26rem;
}

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

/* ---------- Secondary demo ---------- */

.demo-section {
  margin-bottom: clamp(80px, 10vw, 140px);
  padding: clamp(28px, 5vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  align-items: center;
  gap: clamp(36px, 7vw, 90px);
  border-radius: var(--radius-lg);
  background: var(--soft);
}

.demo-copy p:last-child {
  max-width: 560px;
  margin: 24px 0 0;
  color: var(--muted);
}

.demo-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.demo-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #deded8;
}

.demo-card-media img {
  height: 100%;
  object-fit: cover;
}

.demo-card-body {
  padding: 24px;
}

.demo-card-body span {
  color: #888;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-card-body h3 {
  margin: 8px 0 0;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.25;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-inner {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-content {
    max-width: 760px;
  }

  .hero-media {
    max-width: 680px;
  }

  .hero-image-wrap {
    aspect-ratio: 16 / 11;
  }

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

  .demo-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 20px;
  }

  .hero-inner {
    gap: 34px;
  }

  .hero-content {
    order: 1;
  }

  .hero-media {
    order: 2;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 13vw, 4.2rem);
  }

  .hero-actions {
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .hero-image-wrap {
    aspect-ratio: 4 / 3;
    border-radius: 22px;
  }

  .hero-stat {
    left: 14px;
    right: 14px;
    bottom: 14px;
    min-width: 0;
  }

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

  .feature-card {
    min-height: 205px;
  }

  .demo-section {
    width: calc(100% - 28px);
    padding: 20px;
    border-radius: 24px;
  }
}

:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
