:root {
  --bg: #f6faff;
  --text: #12213a;
  --muted: #607086;
  --blue: #1267d8;
  --blue-soft: #4d9cff;
  --cyan: #8bd3ff;
  --line: rgba(18, 103, 216, 0.11);
  --shadow: 0 24px 58px rgba(25, 84, 150, 0.12);
  --max-width: 1200px;
  --header-height: 72px;
  --poly-shell: polygon(4% 0, 100% 0, 96% 100%, 0 100%, 0 10%);
  --poly-card: polygon(6% 0, 100% 0, 96% 92%, 88% 100%, 0 100%, 0 10%);
  --poly-cut: polygon(0 10%, 8% 0, 100% 0, 94% 100%, 0 100%);
  --poly-chip: polygon(8% 0, 100% 0, 94% 100%, 0 100%, 0 20%);
}

* {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  border-radius: 0 !important;
}

html {
  scroll-behavior: smooth;
}

html.is-restoring-scroll {
  scroll-behavior: auto;
}

html.is-restoring-scroll body {
  visibility: hidden;
}

html {
  background: #f8fbff;
}

body {
  margin: 0;
  color: var(--text);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  background: transparent;
  overflow-x: hidden;
}

.webgl-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 32px), var(--max-width));
  height: var(--header-height);
  margin: 18px auto 0;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 36px rgba(25, 84, 150, 0.08);
  clip-path: polygon(18px 0, 100% 0, calc(100% - 18px) 100%, 0 100%, 0 18px);
  transition: box-shadow 0.24s ease;
}

.site-header.is-elevated {
  box-shadow: 0 16px 42px rgba(25, 84, 150, 0.11);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  clip-path: var(--poly-chip);
}

.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  background: #1680f0;
  clip-path: var(--poly-chip);
  box-shadow: 0 12px 24px rgba(18, 103, 216, 0.16);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.header-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(18, 103, 216, 0.18);
}

.hero {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(420px, 1fr);
  gap: 64px;
  align-items: center;
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 70px 0 96px;
}

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

.eyebrow {
  display: inline-flex;
  margin: 0 0 16px;
  padding: 7px 13px;
  color: #1769c8;
  font-size: 14px;
  font-weight: 700;
  position: relative;
  isolation: isolate;
  background: transparent;
}

.eyebrow::before,
.eyebrow::after {
  position: absolute;
  content: "";
  pointer-events: none;
  clip-path: var(--poly-chip);
}

.eyebrow::before {
  inset: 0;
  z-index: -2;
  background: rgba(18, 103, 216, 0.11);
}

.eyebrow::after {
  inset: 1px;
  z-index: -1;
  background: #ffffff;
}

.hero h1 {
  margin: 0;
  max-width: 560px;
  font-size: clamp(42px, 6vw, 72px);
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.hero-subtitle {
  margin: 20px 0 0;
  max-width: 580px;
  color: var(--muted);
  font-size: clamp(16px, 1.7vw, 21px);
  line-height: 1.86;
}

.hero-downloads {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.hero-downloads .download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  background: #1680f0;
  box-shadow: 0 12px 24px rgba(18, 103, 216, 0.16);
  clip-path: var(--poly-chip);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.hero-downloads .download-button::before,
.hero-downloads .download-button::after {
  display: none;
}

.hero-downloads .download-button:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(18, 103, 216, 0.18);
}

.hero-community {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.community-link {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  background: transparent;
  clip-path: var(--poly-chip);
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.community-link::before,
.community-link::after {
  position: absolute;
  content: "";
  pointer-events: none;
  clip-path: var(--poly-chip);
}

.community-link::before {
  inset: 0;
  z-index: -2;
  background: rgba(18, 103, 216, 0.22);
}

.community-link::after {
  inset: 1px;
  z-index: -1;
  background: #ffffff;
  transition: background 0.2s ease;
}

.community-link:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.community-link:hover::before,
.community-link:hover::after {
  background: #1680f0;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.trust-strip span {
  padding: 12px 10px;
  text-align: center;
  color: #245072;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(25, 84, 150, 0.06);
  clip-path: var(--poly-chip);
  font-size: 14px;
  font-weight: 700;
}

.hero-visual {
  min-width: 0;
  display: flex;
  justify-content: center;
}

.imac {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 580px;
}

.imac-display {
  position: relative;
  width: 100%;
  background: #f8f8f8;
  border: 2px solid #e0e0e0;
  border-bottom: 0;
  border-radius: 10px 10px 0 0 !important;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.1),
    0 8px 20px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.hero-screenshot {
  display: block;
  width: 100%;
  height: auto;
}

.imac-chin {
  height: 28px;
  background: linear-gradient(180deg, #f2f2f2, #e8e8e8);
  border-top: 1px solid #d8d8d8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.imac-chin::after {
  content: "";
  width: 52px;
  height: 6px;
  background: #d0d0d0;
  border-radius: 3px !important;
}

.imac-stand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.imac-neck {
  width: 46px;
  height: 44px;
  background: linear-gradient(180deg, #e0e0e0, #d0d0d0);
  clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%);
}

.imac-foot {
  width: 140px;
  height: 8px;
  background: linear-gradient(180deg, #d4d4d4, #c0c0c0);
  border-radius: 0 0 4px 4px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    width: min(100%, 680px);
  }
}

.site-footer {
  padding: 20px 0;
  text-align: center;
}

.site-footer p {
  display: inline-block;
  margin: 0;
  padding: 8px 20px;
  font-size: 11px;
  font-weight: 600;
  color: #93b0c8;
  background: rgba(255, 255, 255, 0.7);
  clip-path: var(--poly-chip);
  letter-spacing: 0.03em;
}

@media (max-width: 700px) {
  .site-header {
    width: min(calc(100% - 20px), var(--max-width));
    height: 56px;
    padding: 0 10px 0 12px;
    clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%, 0 12px);
  }

  .brand img {
    width: 32px;
    height: 32px;
  }

  .brand span {
    font-size: 14px;
  }

  .header-action {
    min-height: 36px;
    padding: 0 12px;
    font-size: 12px;
  }

  .hero {
    width: min(calc(100% - 24px), var(--max-width));
    padding: 32px 0 48px;
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .eyebrow {
    display: none;
  }

  .hero h1 {
    max-width: 100%;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.03em;
  }

  .hero-subtitle {
    margin-top: 8px;
    max-width: 300px;
    font-size: 13px;
    line-height: 1.7;
    color: #6b8299;
  }

  .hero-downloads {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
  }

  .hero-downloads .download-button {
    min-height: 38px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: #1680f0;
    box-shadow: 0 6px 16px rgba(22, 128, 240, 0.2);
    clip-path: none;
    border-radius: 20px;
  }

  .hero-downloads .download-button::before,
  .hero-downloads .download-button::after {
    display: none;
  }

  .hero-downloads .download-button:hover {
    color: #fff;
    transform: none;
    box-shadow: 0 6px 16px rgba(22, 128, 240, 0.2);
  }

  .hero-community {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
  }

  .community-link {
    min-height: auto;
    padding: 0;
    font-size: 12px;
    font-weight: 600;
    color: #6b8299;
    clip-path: none;
    background: none;
  }

  .community-link::before,
  .community-link::after {
    display: none;
  }

  .community-link:hover {
    color: var(--blue);
    transform: none;
  }

  .trust-strip {
    grid-template-columns: repeat(4, auto);
    gap: 0;
    margin-top: 16px;
    background: none;
    box-shadow: none;
  }

  .trust-strip span {
    padding: 0;
    font-size: 11px;
    font-weight: 600;
    color: #8ea8be;
    background: none;
    box-shadow: none;
    clip-path: none;
  }

  .trust-strip span + span {
    border-left: 1px solid #dce8f0;
    padding-left: 10px;
    margin-left: 10px;
  }

  .hero-visual {
    order: 1;
  }

  .imac {
    max-width: 92%;
  }

  .imac-display {
    border-radius: 8px 8px 0 0 !important;
    border-width: 1.5px;
  }

  .imac-chin {
    height: 14px;
  }

  .imac-chin::after {
    width: 24px;
    height: 3px;
  }

  .imac-neck {
    width: 20px;
    height: 18px;
  }

  .imac-foot {
    width: 70px;
    height: 4px;
  }
}

@media (max-width: 360px) {
  .hero h1 {
    font-size: 24px;
  }

  .trust-strip {
    grid-template-columns: repeat(2, auto);
    gap: 6px 0;
  }

  .trust-strip span + span:nth-child(3) {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
  }
}

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