@import url("https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #071823;
  --bg-deep: #06131d;
  --bg-soft: #0b1d29;
  --surface: rgba(8, 22, 31, 0.88);
  --surface-strong: rgba(9, 24, 34, 0.94);
  --line: rgba(213, 179, 114, 0.16);
  --line-strong: rgba(213, 179, 114, 0.3);
  --text: #f5eee5;
  --muted: rgba(245, 238, 229, 0.74);
  --muted-soft: rgba(245, 238, 229, 0.54);
  --accent: #d5b372;
  --accent-strong: #e5c88f;
  --danger: #f4a7a1;
  --success: #8bc4a8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
  --radius: 8px;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  color: var(--text);
}

body {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
}

a,
button,
[role="button"] {
  cursor: pointer;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
}

.shell {
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(7, 24, 35, 0.98) 0%, rgba(5, 17, 25, 1) 100%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(7, 24, 35, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: rgba(213, 179, 114, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-mark svg {
  width: 25px;
  height: 25px;
}

.brand-title {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  justify-self: center;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 500;
  transition: color 160ms ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}

.account-chip,
.ghost-link,
.primary-link,
.secondary-link,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.account-chip,
.ghost-link,
.secondary-link,
.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.primary-link,
.primary-button {
  background: var(--accent);
  color: #132230;
  font-weight: 700;
}

.account-chip {
  font-size: 0.95rem;
}

.ghost-link:hover,
.primary-link:hover,
.secondary-link:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 28px 72px;
}

.home-hero {
  position: relative;
  min-height: 856px;
  border-radius: 8px;
  overflow: hidden;
  margin: 0 auto;
}

.home-hero__media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 18, 27, 0.36) 0%, rgba(7, 18, 27, 0.58) 56%, rgba(7, 18, 27, 0.72) 100%),
    url("https://images.unsplash.com/photo-1552664730-d307ca884978?auto=format&fit=crop&w=1800&q=80")
      center center / cover no-repeat;
  transform: scale(1.02);
}

.home-hero__content {
  position: relative;
  z-index: 1;
  min-height: 856px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 96px 40px 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-title,
.section-title,
.plan-card h3,
.study-name,
.auth-panel h2,
.study-card h3 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 400;
}

.hero-title {
  margin: 0 auto;
  max-width: 10.6ch;
  font-size: clamp(4.2rem, 6vw, 5.95rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.hero-line {
  display: block;
}

.hero-subtitle {
  margin: 28px auto 0;
  max-width: 860px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.72;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.section {
  padding: 34px 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-title {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 1.06;
}

.section-copy {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
  font-size: 1.05rem;
}

.grid {
  display: grid;
  gap: 20px;
}

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

.card,
.auth-panel,
.study-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-body,
.auth-panel,
.study-card {
  padding: 26px;
}

.plan-card {
  min-height: 100%;
}

.plan-card h3 {
  margin: 12px 0 10px;
  font-size: 2rem;
}

.plan-description,
.auth-panel p,
.study-card p {
  color: var(--muted);
  line-height: 1.72;
}

.plan-price {
  margin: 20px 0 18px;
  font-size: 2.2rem;
  font-weight: 700;
}

.plan-price small {
  font-size: 0.98rem;
  color: var(--muted-soft);
  font-weight: 500;
}

.plan-meta {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 24px;
  align-items: start;
}

.auth-panel h2,
.study-card h3 {
  margin: 0 0 10px;
  font-size: 2rem;
}

.form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.94rem;
  color: var(--text);
}

.field input {
  min-height: 50px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.field input::placeholder {
  color: rgba(245, 238, 229, 0.36);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.secondary-button {
  min-height: 46px;
}

.primary-button[disabled],
.secondary-button[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

.status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.status.error {
  background: rgba(244, 167, 161, 0.08);
  border: 1px solid rgba(244, 167, 161, 0.22);
  color: #ffd8d4;
}

.status.success {
  background: rgba(139, 196, 168, 0.08);
  border: 1px solid rgba(139, 196, 168, 0.2);
  color: #d4f2e1;
}

.study-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.study-card {
  display: grid;
  gap: 18px;
}

.study-name {
  font-size: 2rem;
}

.study-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  color: var(--muted);
}

.study-meta dt {
  color: var(--muted-soft);
}

.study-actions {
  display: flex;
  gap: 14px;
}

.study-actions .primary-button {
  width: 100%;
}

.helper {
  color: var(--muted-soft);
  font-size: 0.94rem;
}

.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px 28px;
  color: var(--muted-soft);
  font-size: 0.92rem;
}

@media (max-width: 1024px) {
  .nav {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .nav-links,
  .nav-actions {
    justify-self: center;
  }

  .plan-grid,
  .auth-layout,
  .study-grid {
    grid-template-columns: 1fr;
  }

  .home-hero,
  .home-hero__content {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .nav {
    padding: 16px 18px;
    gap: 16px;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 16px 18px;
  }

  .nav-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .page {
    padding: 16px 18px 52px;
  }

  .home-hero {
    min-height: auto;
    margin: 0 auto;
  }

  .home-hero__content {
    min-height: auto;
    padding: 88px 20px 72px;
  }

  .hero-title {
    max-width: 8.3ch;
    font-size: clamp(3rem, 12vw, 4.8rem);
    line-height: 1.04;
  }

  .hero-subtitle {
    font-size: 1.08rem;
  }
}
