@font-face {
  font-family: 'EBAS Medium';
  src: url('../fonts/EBAS-Medium.subset.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}

:root {
  --bg-black: #000000;
  --card-bg: rgba(20, 20, 20, 0.6);
  --card-border: rgba(255, 255, 255, 0.1);
  --card-border-hover: rgba(255, 255, 255, 0.25);

  --ultra-bg: rgba(30, 30, 30, 0.8);
  --ultra-border: rgba(255, 255, 255, 0.35);
  --ultra-glow: rgba(255, 255, 255, 0.08);

  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-tertiary: #666666;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-black);
  background: radial-gradient(circle at 50% -20%, #1a1a1a 0%, #000000 60%);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  overflow-y: auto;
}

.page-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(12px, 2vh, 24px) 24px clamp(16px, 2.5vh, 32px);
  gap: clamp(14px, 2vh, 24px);
}

/* Header */
.plans-header {
  text-align: center;
  animation: fadeIn 0.8s ease-out;
}

.plans-header h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 6px 0;
  color: #fff;
}

.plans-header p {
  font-size: clamp(0.9rem, 1.3vw, 1rem);
  color: var(--text-secondary);
  font-weight: 400;
  margin: 0;
}

/* Container — fills page-shell height, defines 3 shared rows for subgrid */
.plans-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto 1fr;
  column-gap: clamp(10px, 1.5vw, 20px);
  row-gap: clamp(14px, 1.8vh, 20px);
  flex: 1;
  min-height: 0;
}

/* Cards — span all 3 rows and inherit row sizes via subgrid */
.plan-card {
  grid-row: span 3;
  display: grid;
  grid-template-rows: subgrid;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: clamp(18px, 2.2vh, 26px);
  position: relative;
  transition: border-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  backdrop-filter: blur(12px);
  animation: fadeIn 0.8s ease-out backwards;
}

.plan-free:hover,
.plan-light:hover {
  border-color: var(--card-border-hover);
}

.plan-ultra {
  background: var(--ultra-bg);
  border: 1px solid var(--ultra-border);
  box-shadow: 0 0 40px var(--ultra-glow);
}

.plan-ultra:hover {
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 60px rgba(255, 255, 255, 0.15);
}

/* Name row */
.plan-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

/* Title */
.plan-title {
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

/* Badges */
.plan-badge {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.03em;
}

.plan-badge-ultra {
  color: #000;
  background: #fff;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Pricing */
.plan-pricing {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.plan-price {
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
}

.plan-price-original {
  font-size: 1.1rem;
  color: var(--text-tertiary);
  text-decoration: line-through;
}

.plan-interval {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.plan-launch-tag {
  width: 100%;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-top: 2px;
}

/* Tagline */
.plan-tagline {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

/* Action block */
.plan-action {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plan-ultra .plan-action {
  justify-content: center;
}

/* Buttons */
.plan-button {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 0.93rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  font-family: inherit;
}

.btn-free {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
}

.btn-free:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.btn-light {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-light:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-ultra {
  background: #fff;
  border: 1px solid #fff;
  color: #000;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

.btn-ultra:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 25px rgba(255, 255, 255, 0.4);
}

.plan-assurance {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin: 0;
}

/* Features — 1fr row in subgrid fills remaining card height */
.plan-features {
  list-style: none;
  padding: clamp(14px, 1.8vh, 20px) 0 0 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(9px, 1.2vh, 13px);
  border-top: 1px solid var(--card-border);
}

.plan-ultra .plan-features {
  border-color: rgba(255, 255, 255, 0.15);
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.feature-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--text-secondary);
  margin-top: 2px;
}

.plan-ultra .feature-icon {
  color: rgba(255, 255, 255, 0.65);
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feature-text strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.feature-text span {
  font-size: 0.775rem;
  color: var(--text-tertiary);
  line-height: 1.4;
}

/* "Everything in Light, plus" row */
.feature-includes {
  margin-bottom: 2px;
}

.feature-includes strong {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 0.72rem !important;
  font-weight: 500 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Model showcase */
.model-showcase {
  border-top: 1px solid var(--card-border);
  padding-top: clamp(10px, 1.4vh, 18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.model-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-tertiary);
}

.models-grid {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.model-logo {
  height: 26px;
  width: auto;
  opacity: 0.5;
  filter: grayscale(100%);
  transition: all 0.3s;
}

.model-logo:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation delays match DOM order: Free, Ultra, Light */
.plan-free  { animation-delay: 0.1s; }
.plan-ultra { animation-delay: 0.2s; }
.plan-light { animation-delay: 0.3s; }

@media (max-width: 768px) {
  .page-shell {
    height: auto;
    min-height: 100vh;
    padding: 40px 20px 48px;
    justify-content: flex-start;
  }

  .plans-container {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
    flex: none;
  }

  /* Mobile order: Ultra first (featured), then Light, then Free */
  .plan-ultra { order: 1; }
  .plan-light { order: 2; }
  .plan-free  { order: 3; }
}

.plan-status {
  text-align: center;
  color: #a0aec0;
  font-size: 0.875rem;
  min-height: 1.25rem;
  margin: 0;
}
