/* ===== Kovalink — luxury monochrome landing ===== */

:root {
  --black: #050505;
  --white: #f6f6f4;
  --grey: #a4a4a4;
  --border: rgba(246, 246, 244, 0.22);
  --gutter: 44px;
  --gutter-mobile: 24px;
}

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

html {
  height: 100%;
}

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--black);
  color: var(--white);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* Decorative fullbleed orbit visual (behind content, right side) */
.visual {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 72%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}

.is-ready .visual {
  opacity: 1;
  transform: translateX(0);
}

/* Soft fade from right image into left black so text stays readable */
.visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, rgba(5, 5, 5, 0) 0%, rgba(5, 5, 5, 0.35) 38%, rgba(5, 5, 5, 0.92) 74%, var(--black) 100%);
}

.orbit-img {
  position: absolute;
  top: 50%;
  right: 0;
  width: min(88vw, 1200px);
  max-width: 100%;
  height: auto;
  transform: translateY(-52%);
  display: block;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--white);
  color: var(--black);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* ===== Header ===== */
.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid rgba(246, 246, 244, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
  min-height: 44px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: block;
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.32em;
  padding-left: 2px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  font-family: inherit;
}
.lang-toggle:hover {
  border-color: var(--border);
}
.lang-sep {
  color: var(--grey);
}

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ===== Main ===== */
main {
  position: relative;
  z-index: 5;
  flex: 1;
  min-height: calc(100svh - 128px);
  display: flex;
  flex-direction: column;
}

.hero {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 620px;
  overflow: hidden;
}

.content {
  position: relative;
  z-index: 5;
  width: 58%;
  max-width: 760px;
  padding: 72px var(--gutter);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.is-ready .content {
  opacity: 1;
  transform: translateY(0);
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.42em;
  font-weight: 500;
  color: var(--grey);
  margin-bottom: 34px;
}

.headline {
  font-size: clamp(70px, 7.8vw, 126px);
  line-height: 0.98;
  font-weight: 600;
  letter-spacing: -0.03em;
  display: block;
}
.headline .line {
  display: block;
  white-space: nowrap;
}

.tagline {
  margin-top: 34px;
  font-size: 20px;
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.01em;
}

.price {
  margin-top: 26px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.price-amount {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.price-unit {
  font-size: 15px;
  color: var(--grey);
}

.cta-row {
  margin-top: 40px;
  display: flex;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  min-height: 52px;
  transition: opacity 0.18s ease, background 0.18s ease;
}
.btn .icon {
  width: 20px;
  height: 20px;
  flex: none;
}
.btn-ios {
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--white);
}
.btn-ios:hover {
  background: #e9e9e5;
}
.btn-mac {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(246, 246, 244, 0.5);
}
.btn-mac:hover {
  background: rgba(246, 246, 244, 0.08);
}

.small {
  font-size: 13px;
  color: var(--grey);
}
.available {
  margin-top: 16px;
  letter-spacing: 0.06em;
}
.invite {
  margin-top: 6px;
  letter-spacing: 0.02em;
}

/* Planet label beneath the planet (lower right) */
.planet-label {
  position: absolute;
  right: calc(var(--gutter) + 40px);
  bottom: 26px;
  z-index: 4;
  font-size: 12px;
  letter-spacing: 0.34em;
  color: var(--grey);
  pointer-events: none;
  white-space: nowrap;
}

/* ===== Footer ===== */
footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(246, 246, 244, 0.08);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 20px var(--gutter);
  font-size: 13px;
  color: var(--grey);
  letter-spacing: 0.03em;
}

/* ===== Dialog ===== */
.dialog {
  width: min(420px, calc(100% - 40px));
  max-height: calc(100svh - 40px);
  margin: auto;
  background: #101010;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 34px 30px 30px;
  color: var(--white);
}
.dialog::backdrop { background: rgba(5,5,5,.82); }
.dialog-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--grey);
  cursor: pointer;
}
.dialog-x:hover {
  color: var(--white);
}
.dialog-x .icon {
  width: 20px;
  height: 20px;
}
.dialog-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding-right: 40px;
}
.dialog-desc {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--grey);
}
.dialog-gotit {
  margin-top: 26px;
  width: 100%;
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--white);
}

/* dialog[hidden] must fully hide */
.dialog-root[hidden] {
  display: none;
}

/* ===== Tablet ===== */
@media (max-width: 960px) {
  .headline {
    font-size: clamp(58px, 8vw, 78px);
  }
  .content {
    width: 64%;
  }
  .visual {
    width: 86%;
  }
  .planet-label {
    right: var(--gutter);
  }
}

/* ===== Mobile <= 700 ===== */
@media (max-width: 700px) {
  :root {
    --gutter: var(--gutter-mobile);
  }
  .site-header {
    height: 64px;
    padding: 0 var(--gutter-mobile);
  }
  .brand-name {
    font-size: 13px;
    letter-spacing: 0.26em;
  }

  .hero {
    position: relative;
    flex-direction: column;
    align-items: center;
    min-height: 0;
    overflow: visible;
  }

  /* Illustration occupies top background ~320px */
  .visual {
    position: relative;
    top: 0;
    width: 100%;
    height: 230px;
    overflow: hidden;
    transform: none;
  }
  .visual::after {
    background: linear-gradient(to top, var(--black) 0%, rgba(5, 5, 5, 0) 62%);
  }
  .orbit-img {
    position: absolute;
    top: -94px;
    left: 50%;
    width: 640px;
    height: auto;
    max-width: none;
    transform: translateX(-65%);
  }

  .content {
    width: 100%;
    max-width: none;
    padding: 0 var(--gutter-mobile) 40px;
    text-align: center;
    opacity: 1;
    transform: none;
    transition: none;
  }
  .is-ready .content {
    opacity: 1;
    transform: none;
  }
  .is-ready .visual {
    opacity: 1;
  }

  .eyebrow {
    margin-bottom: 24px;
    font-size: 12px;
  }
  .headline {
    font-size: clamp(44px, 13.5vw, 70px);
  }
  .tagline {
    margin-top: 24px;
    font-size: 17px;
  }
  .price {
    margin-top: 20px;
    justify-content: center;
  }
  .cta-row {
    margin-top: 32px;
    flex-direction: column;
    gap: 12px;
  }
  .btn {
    width: 100%;
  }

  .planet-label {
    display: none;
    position: static;
    text-align: center;
    padding: 0 var(--gutter-mobile) 14px;
    right: auto;
    bottom: auto;
    font-size: 11px;
    letter-spacing: 0.28em;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 22px var(--gutter-mobile);
    text-align: center;
  }
}

/* Small phones — avoid clipped text / horizontal scroll */
@media (max-width: 380px) {
  .headline {
    font-size: 44px;
  }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .visual,
  .content {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Keep content readable if script loading is delayed or unavailable. */
.content, .visual { opacity: 1; }
@media (min-width: 701px) and (max-width: 1050px) { .cta-row { flex-direction: column; align-items: flex-start; } .cta-row .btn { width: 220px; } }
@media (max-width: 700px) { main { min-height: auto; } .lang-toggle { padding: 0 4px; } .brand { gap: 8px; } }
