/* ===== Software4All — modern dark theme ===== */

:root {
  --bg: #0b0d14;
  --bg-alt: #10131d;
  --surface: #161a26;
  --surface-2: #1d2231;
  --border: #262c3f;
  --text: #e8eaf2;
  --text-muted: #9aa1b5;
  --accent: #7c5cff;
  --accent-2: #4dd6ff;
  --accent-grad: linear-gradient(120deg, #7c5cff, #4dd6ff);
  --success: #34d399;
  --error: #f87171;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* film-grain texture over the whole page */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== Icons ===== */

.icon {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.22em;
  flex-shrink: 0;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }

.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.lead { font-size: 1.12rem; color: var(--text-muted); }
.accent { color: var(--accent); }

.gradient-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Header ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 13, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.logo:hover { text-decoration: none; }

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 2px 10px rgba(124, 92, 255, 0.4);
}
.logo-mark .icon { width: 15px; height: 15px; vertical-align: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}

.nav-links a { color: var(--text-muted); font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.cart-link { position: relative; display: inline-flex; align-items: center; gap: 7px; }
.cart-link .icon { width: 18px; height: 18px; vertical-align: 0; }

.cart-badge {
  position: absolute;
  top: -10px;
  right: -14px;
  background: var(--accent-grad);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 6px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
}
.nav-toggle .icon { width: 20px; height: 20px; vertical-align: 0; }

/* ===== Buttons ===== */

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-family: inherit;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 4px 18px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 24px rgba(124, 92, 255, 0.5); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); }

.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ===== Hero ===== */

.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 0 60px;
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(124, 92, 255, 0.18), transparent),
    radial-gradient(500px 300px at 85% 20%, rgba(77, 214, 255, 0.12), transparent);
}

/* subtle grid texture, fading out toward the bottom */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(124, 92, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 92, 255, 0.07) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 30%, transparent 75%);
}

.hero-inner { position: relative; }

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent-2);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-text h1 { margin-bottom: 18px; }
.hero-text .lead { margin-bottom: 28px; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }

.hero-stats { display: flex; gap: 36px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.3rem; }
.hero-stats span { color: var(--text-muted); font-size: 0.85rem; }

/* Mock app window */

.mock-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.mock-bar span {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--border);
}
.mock-bar span:first-child { background: #f87171; }
.mock-bar span:nth-child(2) { background: #fbbf24; }
.mock-bar span:nth-child(3) { background: #34d399; }
.mock-bar em {
  font-style: normal;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  margin-left: 8px;
}

.mock-body { padding: 20px; }

.mock-long {
  display: block;
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.mock-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--accent-2);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 13px 0;
}

.clip-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mock-short {
  display: block;
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(124, 92, 255, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}
.mock-short:hover { transform: translateY(-3px) scale(1.02); }

/* ===== Sections ===== */

.section { padding: 64px 0; }

/* dotted texture on alternate sections */
.section-alt {
  background-color: var(--bg-alt);
  background-image: radial-gradient(rgba(154, 161, 181, 0.09) 1px, transparent 1px);
  background-size: 24px 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title { text-align: center; margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--text-muted); margin-bottom: 40px; }

.page-head { padding: 56px 0 8px; }
.page-head h1 { margin-bottom: 8px; }

/* ===== Cards ===== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.card-inset {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  margin: 18px 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 36px;
}

.feature { text-align: center; }
.feature-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--accent-2);
  background: linear-gradient(160deg, rgba(124, 92, 255, 0.18), rgba(77, 214, 255, 0.08));
  border: 1px solid rgba(124, 92, 255, 0.35);
}
.feature-icon .icon { width: 24px; height: 24px; vertical-align: 0; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--text-muted); font-size: 0.95rem; }

/* ===== Plans ===== */

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.plan {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.plan:hover { transform: translateY(-3px); border-color: var(--accent); }

.plan-highlight {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.09), var(--surface));
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-grad);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.plan-days { font-size: 2rem; }
.plan-days small { font-size: 1rem; color: var(--text-muted); font-weight: 500; }

.plan-price {
  font-size: 1.7rem;
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.plan-perday { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 8px; }

.plan-features {
  list-style: none;
  text-align: left;
  margin: 8px 0 16px;
  flex: 1;
}
.plan-features li {
  padding: 5px 0 5px 24px;
  position: relative;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.plan-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.plan form { margin-top: auto; }

.plans-cta { margin-top: 40px; }

/* ===== Product page ===== */

.product-layout { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: start; }
.product-info h2 { margin-bottom: 12px; }
.product-info p { margin-bottom: 14px; }

.check-list { list-style: none; margin: 14px 0; }
.check-list li {
  padding: 6px 0 6px 26px;
  position: relative;
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.shop-grid { grid-template-columns: repeat(2, 1fr); }

/* ===== Cart ===== */

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th {
  text-align: left;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 10px 12px;
  border-bottom: 1px solid var(--border);
}
.cart-table td { padding: 16px 10px; border-bottom: 1px solid var(--border); }

.qty-input {
  width: 64px;
  padding: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  text-align: center;
}

.btn-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
}
.btn-remove .icon { width: 16px; height: 16px; vertical-align: 0; }
.btn-remove:hover { color: var(--error); background: rgba(248, 113, 113, 0.1); }

.cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 10px 6px;
  font-size: 1.05rem;
}
.cart-total { font-size: 1.5rem; }

.cart-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.empty-state { text-align: center; padding: 56px 28px; }
.empty-state p { font-size: 1.1rem; margin-bottom: 20px; }
.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.empty-icon .icon { width: 28px; height: 28px; vertical-align: 0; }

/* ===== Checkout ===== */

.checkout-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: start;
}

.checkout-form h2, .order-summary h2 { margin-bottom: 18px; font-size: 1.25rem; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
.form-group input {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}
.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2);
}

.payment-note h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-2);
}

.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 0.95rem;
}
.alert-error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: var(--error);
}

.summary-list { list-style: none; }
.summary-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

/* ===== Success ===== */

.success-card { text-align: center; padding: 48px 36px; }
.success-icon {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.15);
  border: 2px solid var(--success);
  color: var(--success);
}
.success-icon .icon { width: 30px; height: 30px; vertical-align: 0; stroke-width: 2.5; }
.success-card h1 { margin-bottom: 8px; }
.order-details { text-align: left; }
.order-details p { margin-bottom: 6px; }
.status-pill {
  display: inline-block;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fbbf24;
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 0.85rem;
  font-weight: 600;
}
.success-card > .btn { margin-top: 20px; }

/* ===== Legal pages ===== */

.legal h2 { font-size: 1.15rem; margin: 26px 0 10px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--text-muted); font-size: 0.97rem; }
.legal ul { padding-left: 22px; margin: 8px 0; }
.legal li { margin-bottom: 6px; }

/* ===== CTA ===== */

.cta-box {
  text-align: center;
  padding: 56px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--surface);
  background-image:
    radial-gradient(400px 200px at 50% 0%, rgba(124, 92, 255, 0.2), transparent),
    radial-gradient(rgba(154, 161, 181, 0.07) 1px, transparent 1px);
  background-size: auto, 22px 22px;
}
.cta-box h2 { margin-bottom: 10px; }
.cta-box .lead { margin-bottom: 24px; }

/* ===== Footer ===== */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 48px 0 0;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
}

.footer-grid h4 { margin-bottom: 12px; font-size: 0.95rem; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--text-muted); }
.footer-grid a:hover { color: var(--text); }
.footer-grid .logo { margin-bottom: 10px; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px 24px;
  font-size: 0.85rem;
}

/* ===== Responsive ===== */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; }
  .plans-grid, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .product-layout, .checkout-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 18px 24px;
    gap: 16px;
    align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  .plans-grid, .grid-3, .shop-grid { grid-template-columns: 1fr; }
  .cart-table th:nth-child(2), .cart-table td:nth-child(2) { display: none; }
  .section { padding: 44px 0; }
  .hero { padding: 56px 0 40px; }
}

/* ---------- Day picker (flexible pay-per-day access) ---------- */
.day-picker p { color: var(--text-muted); }
.day-quickpicks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 22px;
}
.day-pick { padding: 8px 14px; font-size: 0.95rem; }
.day-pick.active {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.12);
}
.day-label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 0.95rem;
}
/* Segmented stepper: [ − | input | + ] as one cohesive control */
.day-input-row {
  display: inline-flex;
  align-items: stretch;
  height: 56px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.day-input-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}
.day-input-row .day-step {
  width: 56px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.day-input-row .day-step:hover {
  background: rgba(124, 92, 255, 0.15);
  border-color: transparent;
  color: var(--accent);
  transform: none;
}
.day-input-row .day-step:active { background: rgba(124, 92, 255, 0.28); }
.day-input-row input[type="number"] {
  width: 96px;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  padding: 0 6px;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
}
.day-input-row input[type="number"]::-webkit-outer-spin-button,
.day-input-row input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.day-picker-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.day-suffix { align-self: center; margin-left: 12px; color: var(--text-muted); }
.day-picker .plan-price {
  font-size: 2.4rem;
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Home: pay-per-day price hero ---------- */
.price-hero { max-width: 640px; margin: 0 auto; padding: 34px 28px; }
.price-hero-rate {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.price-hero-rate small { font-size: 1.1rem; color: var(--text-muted); -webkit-text-fill-color: var(--text-muted); }
.center-picks { justify-content: center; margin: 18px 0 8px; }
.center-picks .day-pick { text-decoration: none; }