:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #61706b;
  --surface: #fbfaf6;
  --surface-strong: #ffffff;
  --line: #dfe4dc;
  --accent: #2f7567;
  --accent-dark: #174d44;
  --accent-soft: #d9eee8;
  --warning: #9a5b17;
  --shadow: 0 18px 60px rgba(30, 47, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    linear-gradient(120deg, rgba(217, 238, 232, 0.62), transparent 38%),
    var(--surface);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.hidden {
  display: none !important;
}

.gate {
  width: min(520px, 100%);
  margin: clamp(56px, 12vh, 120px) auto 0;
  padding: clamp(28px, 5vw, 44px);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.brand-lockup,
.topbar,
.meta-row,
.section-heading,
.release-meta,
.release-actions {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 12px;
}

.mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 8px;
  color: #fff;
  background: var(--accent-dark);
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  max-width: 760px;
  font-size: clamp(2.25rem, 6vw, 4.65rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.gate h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 7vw, 3.1rem);
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.1;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.gate-form {
  margin-top: 34px;
}

.gate-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #cbd6d0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

input:focus {
  outline: 3px solid rgba(47, 117, 103, 0.24);
  border-color: var(--accent);
}

button,
.text-button,
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--accent-dark);
  border-radius: 8px;
  background: var(--accent-dark);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

button:hover,
.download-button:hover {
  transform: translateY(-1px);
  background: var(--accent);
  border-color: var(--accent);
}

.text-button {
  min-height: 40px;
  background: transparent;
  color: var(--accent-dark);
  text-decoration: none;
}

.text-button:hover {
  background: var(--accent-soft);
}

.form-message,
.security-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.form-message {
  min-height: 24px;
  margin: 12px 0 0;
}

.form-message.error {
  color: #9d2a23;
}

.security-note {
  margin: 28px 0 0;
}

.portal {
  padding-bottom: 64px;
}

.hero {
  min-height: min(780px, calc(100vh - 64px));
  padding: 20px 0 42px;
}

.topbar {
  justify-content: space-between;
  min-height: 56px;
  margin-bottom: clamp(36px, 8vh, 76px);
}

.topbar .brand-lockup {
  font-weight: 900;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
  gap: clamp(28px, 6vw, 76px);
  align-items: center;
}

.hero-copy p:not(.eyebrow) {
  max-width: 660px;
  color: var(--muted);
  font-size: clamp(1.04rem, 2vw, 1.25rem);
}

.meta-row {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.meta-row span,
.release-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.companion-panel {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: min(340px, 100%);
  aspect-ratio: 9 / 16;
  padding: 20px;
  border: 10px solid #1d2925;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.75), rgba(255,255,255,0.35)),
    #e6f4ef;
  box-shadow: 0 26px 70px rgba(23, 32, 29, 0.24);
}

.status-strip,
.progress-card {
  padding: 12px;
  border: 1px solid rgba(23, 32, 29, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.status-strip {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.status-strip strong {
  color: var(--ink);
}

.companion-art {
  position: relative;
  width: 72%;
  aspect-ratio: 1;
  margin: 42px auto;
  border-radius: 38% 38% 46% 46%;
  background:
    radial-gradient(circle at 38% 34%, #fff 0 4%, transparent 5%),
    linear-gradient(150deg, #6fc6ac, #2f7567);
  box-shadow: inset 0 -18px 30px rgba(23, 77, 68, 0.22), 0 22px 40px rgba(47, 117, 103, 0.22);
}

.companion-art::before,
.companion-art::after {
  content: "";
  position: absolute;
  top: 17%;
  width: 20%;
  height: 20%;
  border-radius: 50%;
  background: #94ddca;
}

.companion-art::before {
  left: -7%;
}

.companion-art::after {
  right: -7%;
}

.companion-face {
  position: absolute;
  inset: 38% 25% auto;
  display: flex;
  justify-content: space-between;
}

.companion-face span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #10231f;
}

.progress-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 750;
}

.progress-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #d2ded9;
}

.progress-track span {
  height: 100%;
  background: var(--accent-dark);
}

.downloads,
.details-grid {
  padding-top: 48px;
}

.section-heading {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.release-list {
  display: grid;
  gap: 16px;
}

.release-card,
.details-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 34px rgba(30, 47, 42, 0.07);
}

.release-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  padding: clamp(18px, 3vw, 26px);
}

.release-card p {
  color: var(--muted);
}

.release-meta {
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.release-meta span:not(:last-child)::after {
  content: "/";
  margin-left: 10px;
  color: #a5b2ad;
}

.release-card ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.release-actions {
  align-self: start;
  flex-direction: column;
  gap: 10px;
  min-width: 180px;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.release-status {
  width: 100%;
  justify-content: center;
  color: var(--warning);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.details-grid article {
  padding: 22px;
}

.details-grid p {
  color: var(--muted);
}

@media (max-width: 820px) {
  .shell {
    width: min(100% - 24px, 720px);
    padding-top: 16px;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid,
  .release-card,
  .details-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    margin-bottom: 44px;
  }

  .companion-panel {
    justify-content: flex-start;
  }

  .phone-frame {
    width: min(300px, 100%);
  }

  .release-actions {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .password-row {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.45rem;
  }

  .gate {
    margin-top: 28px;
    padding: 24px;
  }

  .phone-frame {
    width: min(210px, 100%);
    border-width: 8px;
    border-radius: 28px;
  }

  .companion-art {
    margin: 24px auto;
  }
}
