:root {
  --bg: #f6efe4;
  --bg-deep: #e9dcc8;
  --card: rgba(17, 36, 33, 0.9);
  --card-soft: rgba(255, 248, 240, 0.9);
  --ink: #0f2f2b;
  --ink-soft: #39534d;
  --accent: #ea6a2c;
  --accent-strong: #ce4e12;
  --highlight: #ffd36e;
  --line: rgba(15, 47, 43, 0.12);
  --white: #fffdf9;
  --shadow: 0 30px 80px rgba(72, 49, 25, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 211, 110, 0.65), transparent 30%),
    radial-gradient(circle at bottom right, rgba(234, 106, 44, 0.22), transparent 28%),
    linear-gradient(135deg, var(--bg), var(--bg-deep));
}

.app-shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 1rem auto 0;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(15, 47, 43, 0.08);
  border-radius: 1.3rem;
  background: rgba(255, 253, 249, 0.62);
  backdrop-filter: blur(12px);
}

.app-shell-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.shell-eyebrow,
.shell-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.app-shell-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.shell-link {
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: var(--ink);
  background: rgba(15, 47, 43, 0.06);
}

.shell-link.is-active {
  color: var(--white);
  background: var(--ink);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
  filter: blur(40px);
  z-index: -1;
}

body::before {
  top: -6rem;
  right: -4rem;
  background: rgba(234, 106, 44, 0.2);
}

body::after {
  bottom: -7rem;
  left: -5rem;
  background: rgba(17, 36, 33, 0.12);
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 1rem;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: #fff5cf url("/logo.png") center / 92% auto no-repeat;
  box-shadow: 0 15px 35px rgba(206, 78, 18, 0.28);
}

.eyebrow,
.kicker,
.panel-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
}

.eyebrow,
.panel-kicker {
  color: rgba(255, 253, 249, 0.72);
}

.topbar h1,
.hero-copy h2,
.access-panel h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.topbar h1 {
  font-size: 1.25rem;
}

.top-link {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.top-link:hover {
  border-color: currentColor;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: stretch;
}

.auth-topbar {
  align-items: flex-start;
}

.auth-link-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.auth-hero-layout {
  align-items: start;
}

.auth-hero-copy {
  padding-top: 2rem;
}

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

.auth-access-panel .panel-card {
  min-height: 100%;
}

.hero-copy {
  padding: 3rem 1rem 2rem 0;
}

.kicker {
  color: var(--accent-strong);
  margin-bottom: 1rem;
}

.hero-copy h2 {
  font-size: clamp(2.7rem, 5vw, 5.2rem);
  line-height: 0.95;
  max-width: 11ch;
}

.hero-text {
  max-width: 57ch;
  margin: 1.4rem 0 2rem;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.value-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.value-strip article,
.stats-row div {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  background: rgba(255, 253, 249, 0.48);
  backdrop-filter: blur(12px);
}

.value-strip strong,
.stat-number {
  display: block;
  margin-bottom: 0.5rem;
  font-family: "Space Grotesk", sans-serif;
}

.value-strip span,
.stat-label {
  color: var(--ink-soft);
  line-height: 1.5;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.stat-number {
  font-size: 1.1rem;
}

.access-panel {
  position: relative;
  display: grid;
  align-items: center;
}

.panel-glow {
  position: absolute;
  inset: 8% 8% auto auto;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: rgba(255, 211, 110, 0.45);
  filter: blur(30px);
}

.panel-card {
  position: relative;
  overflow: hidden;
  padding: 1.2rem;
  border-radius: 2rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    var(--card);
  color: var(--white);
  box-shadow: var(--shadow);
}

.panel-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 211, 110, 0.16), transparent 35%),
    linear-gradient(320deg, rgba(234, 106, 44, 0.12), transparent 40%);
  pointer-events: none;
}

.tab-bar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  padding: 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.portal-switch {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.portal-button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1rem;
  padding: 0.95rem 1rem;
  font: inherit;
  font-weight: 700;
  color: rgba(255, 253, 249, 0.76);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.portal-button.is-active {
  color: var(--ink);
  border-color: transparent;
  background: linear-gradient(135deg, var(--highlight), #ffc145);
}

.portal-panel {
  position: relative;
  z-index: 1;
}

.tab-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1rem;
  font: inherit;
  font-weight: 700;
  color: rgba(255, 253, 249, 0.76);
  background: transparent;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.tab-button.is-active {
  color: var(--ink);
  background: var(--highlight);
  transform: translateY(-1px);
}

.tab-panel {
  position: relative;
  z-index: 1;
  padding: 1.5rem 0 0.5rem;
}

.panel-text {
  margin: 0.75rem 0 1.35rem;
  color: rgba(255, 253, 249, 0.78);
  line-height: 1.65;
}

.access-form {
  display: grid;
  gap: 1rem;
}

.access-form label {
  display: grid;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.access-form input,
.access-form select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  padding: 0.95rem 1rem;
  font: inherit;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.access-form input::placeholder {
  color: rgba(255, 253, 249, 0.42);
}

.access-form select option {
  color: var(--ink);
}

.access-form input:focus,
.access-form select:focus,
.primary-button:focus,
.tab-button:focus,
.portal-button:focus {
  outline: 2px solid rgba(255, 211, 110, 0.95);
  outline-offset: 2px;
}

.inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.inline-row a,
.checkbox-row span {
  color: rgba(255, 253, 249, 0.8);
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.checkbox-row input {
  width: auto;
}

.primary-button {
  border: 0;
  border-radius: 999px;
  padding: 1rem 1.2rem;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: linear-gradient(135deg, var(--highlight), #ffc145);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(255, 193, 69, 0.2);
}

.hub-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.top-hub-button {
  position: static;
  transform: none;
}

.top-hub-button:hover {
  transform: translateY(-1px);
}

.top-action-group {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transform: translateX(-50%);
}

.top-action-group .primary-button {
  text-decoration: none;
}

.top-platform-button {
  color: var(--white);
  background: linear-gradient(135deg, #163f39, #0f2f2b);
}

.top-platform-button:hover {
  box-shadow: 0 14px 28px rgba(15, 47, 43, 0.2);
}

.primary-button:disabled {
  opacity: 0.75;
  cursor: progress;
  transform: none;
  box-shadow: none;
}

.form-message {
  min-height: 1.4rem;
  margin: 0;
  font-size: 0.92rem;
  color: rgba(255, 253, 249, 0.82);
}

.form-message.is-error {
  color: #ffb2a5;
}

.form-message.is-success {
  color: #bdf9c7;
}

.trust-note {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 1.3rem;
  background: rgba(255, 255, 255, 0.07);
}

.trust-pill {
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--highlight);
}

.trust-note p {
  margin: 0;
  color: rgba(255, 253, 249, 0.76);
  line-height: 1.55;
}

@media (max-width: 960px) {
  .app-shell-header,
  .hero-layout,
  .value-strip,
  .stats-row,
  .portal-switch {
    grid-template-columns: 1fr;
  }

  .app-shell-header {
    width: min(100% - 1rem, 100%);
  }

  .app-shell-header,
  .app-shell-brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-copy {
    padding-right: 0;
  }

  .hero-copy h2 {
    max-width: 13ch;
  }

  .auth-link-row {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1rem, 100%);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-action-group {
    position: static;
    left: auto;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    transform: none;
  }

  .top-hub-button {
    position: static;
    transform: none;
  }

  .top-hub-button:hover {
    transform: translateY(-1px);
  }

  .panel-card,
  .value-strip article,
  .stats-row div {
    border-radius: 1.4rem;
  }

  .hero-copy {
    padding-top: 1rem;
  }

  .hero-copy h2 {
    font-size: clamp(2.3rem, 14vw, 3.6rem);
  }
}
