:root {
  --bg: #f7f1e3;
  --surface: #fffdf7;
  --surface-strong: #fff9ef;
  --text: #1a1812;
  --muted: #5f5849;
  --line: rgba(26, 24, 18, 0.12);
  --line-strong: rgba(26, 24, 18, 0.2);
  --accent: #d86f1d;
  --accent-dark: #a54d0f;
  --accent-soft: rgba(216, 111, 29, 0.12);
  --green: #2b7a4b;
  --shadow: 0 30px 80px rgba(88, 63, 23, 0.12);
  --radius: 28px;
  --radius-sm: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  direction: rtl;
  background:
    radial-gradient(circle at top right, rgba(216, 111, 29, 0.18), transparent 30%),
    radial-gradient(circle at 15% 20%, rgba(43, 122, 75, 0.14), transparent 28%),
    linear-gradient(180deg, #fbf7ed 0%, #f7f1e3 48%, #efe6d2 100%);
  color: var(--text);
  font-family: 'Rubik', sans-serif;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(1320px, calc(100% - 40px));
  margin: 20px auto;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 16px 22px;
  background: rgba(255, 253, 247, 0.78);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  box-shadow: 0 16px 45px rgba(83, 64, 33, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, #f0b154 100%);
  color: #fffaf0;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 1rem;
}

.brand-copy span {
  font-size: 0.73rem;
  color: var(--muted);
}

.site-nav {
  display: inline-flex;
  justify-content: center;
  gap: 24px;
  color: var(--muted);
}

.site-nav a:hover {
  color: var(--text);
}

.header-actions,
.hero-actions,
.account-actions,
.serial-row,
.hero-notes,
.pricing-layout,
.workflow-grid,
.account-layout,
.account-metrics {
  display: flex;
}

.header-actions,
.hero-actions,
.account-actions,
.serial-row,
.hero-notes {
  gap: 12px;
  flex-wrap: wrap;
}

.primary-btn,
.ghost-btn {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent) 0%, #ec9f44 100%);
  color: #fffaf4;
  box-shadow: 0 16px 34px rgba(216, 111, 29, 0.22);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.46);
  border-color: var(--line);
  color: var(--text);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.hero {
  min-height: calc(100svh - 110px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
  padding: 48px 8px 42px;
}

.hero-copy h1,
.section-head h2 {
  margin: 0;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  font-family: 'Space Grotesk', 'Rubik', sans-serif;
  font-size: clamp(3rem, 7vw, 6.2rem);
  max-width: 8ch;
}

.hero-text {
  max-width: 34rem;
  margin: 24px 0 30px;
  font-size: 1.08rem;
  color: var(--muted);
  line-height: 1.8;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--accent-dark);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  width: 34px;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}

.eyebrow.inline {
  margin-bottom: 8px;
}

.hero-notes span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.56);
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-stage {
  position: relative;
  min-height: 620px;
  border-radius: 44px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 250, 238, 0.88), rgba(255, 245, 226, 0.6)),
    linear-gradient(150deg, rgba(216, 111, 29, 0.08), transparent 45%),
    linear-gradient(35deg, rgba(43, 122, 75, 0.08), transparent 55%);
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
}

.stage-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26, 24, 18, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 24, 18, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), transparent 92%);
}

.stage-panel {
  position: absolute;
  width: min(320px, calc(100% - 48px));
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 253, 247, 0.86);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 24px 44px rgba(103, 72, 28, 0.14);
}

.stage-label,
.stage-kicker {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stage-title,
.stage-price {
  margin: 14px 0 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
}

.stage-chip {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(43, 122, 75, 0.12);
  color: var(--green);
  font-size: 0.86rem;
}

.stage-meter {
  margin-top: 16px;
}

.meter-bar {
  width: 100%;
  height: 10px;
  margin-top: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(26, 24, 18, 0.08);
}

.meter-bar div {
  width: 73%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d86f1d 0%, #f0b154 100%);
}

.floating-a {
  top: 64px;
  right: 42px;
  animation: driftA 8s ease-in-out infinite;
}

.floating-b {
  bottom: 78px;
  left: 34px;
  animation: driftB 9s ease-in-out infinite;
}

.floating-c {
  top: 280px;
  left: 96px;
  animation: driftC 10s ease-in-out infinite;
}

@keyframes driftA {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -12px, 0); }
}

@keyframes driftB {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, 10px, 0); }
}

@keyframes driftC {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(6px, -10px, 0); }
}

.pricing,
.workflow,
.account {
  padding: 68px 0;
}

.section-head {
  margin-bottom: 30px;
}

.section-head h2 {
  font-family: 'Space Grotesk', 'Rubik', sans-serif;
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.section-head.compact h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.pricing-layout {
  gap: 18px;
  align-items: stretch;
}

.plan,
.auth-panel,
.account-panel,
.workflow-grid article {
  background: rgba(255, 253, 247, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 30px;
  box-shadow: 0 18px 40px rgba(79, 55, 20, 0.08);
}

.plan {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  padding: 28px;
}

.featured {
  background: linear-gradient(180deg, rgba(255, 246, 229, 0.96), rgba(255, 252, 244, 0.86));
  transform: translateY(-12px);
}

.plan-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 700;
}

.plan-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.plan-top h3,
.workflow-grid h3,
.auth-panel h3,
.account-panel h3 {
  margin: 0;
  font-size: 1.5rem;
}

.price-line {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
}

.price-line span,
.plan p,
.workflow-grid p,
.panel-note,
.config-warning,
.status-banner {
  color: var(--muted);
}

.plan-list {
  padding: 0;
  margin: 24px 0 28px;
  list-style: none;
  display: grid;
  gap: 12px;
}

.plan-list li::before {
  content: '•';
  margin-left: 8px;
  color: var(--accent);
}

.plan-btn,
.wide {
  width: 100%;
}

.workflow-grid {
  gap: 18px;
  flex-wrap: wrap;
}

.workflow-grid article {
  flex: 1 1 calc(25% - 18px);
  padding: 24px;
}

.workflow-grid strong {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--accent-dark);
  font-size: 0.9rem;
}

.account-layout {
  gap: 22px;
  align-items: stretch;
}

.auth-panel,
.account-panel {
  flex: 1 1 0;
  padding: 28px;
}

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

.stack-form label {
  display: grid;
  gap: 8px;
}

input {
  min-height: 52px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.account-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.account-metrics {
  margin: 26px 0;
  gap: 14px;
  flex-wrap: wrap;
}

.metric {
  flex: 1 1 calc(50% - 14px);
  min-width: 0;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
}

.metric span,
.serial-block span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.metric strong,
.serial-row code {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.08rem;
}

.serial-block {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--line);
}

.serial-row {
  align-items: center;
  justify-content: space-between;
}

.serial-row code {
  white-space: nowrap;
  overflow: auto;
}

.status-banner,
.config-warning {
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
}

.status-banner.success {
  color: var(--green);
  border-color: rgba(43, 122, 75, 0.25);
  background: rgba(43, 122, 75, 0.08);
}

.status-banner.error {
  color: #a13722;
  border-color: rgba(161, 55, 34, 0.25);
  background: rgba(161, 55, 34, 0.08);
}

.hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-stage {
    min-height: 500px;
  }

  .pricing-layout,
  .account-layout {
    flex-direction: column;
  }

  .featured {
    transform: none;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 24px, 100%);
    margin: 12px auto 24px;
  }

  .site-header {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .site-nav,
  .header-actions {
    justify-content: space-between;
  }

  .hero-copy h1 {
    max-width: 11ch;
  }

  .hero-stage {
    min-height: 420px;
  }

  .stage-panel {
    width: calc(100% - 32px);
    right: 16px !important;
    left: 16px !important;
  }

  .floating-a { top: 20px; }
  .floating-c { top: 170px; }
  .floating-b { bottom: 18px; }

  .workflow-grid article,
  .metric {
    flex-basis: 100%;
  }
}
