/* Aperto Shop — Frontend CSS */
:root {
  --bg:        #080808;
  --surface:   #111111;
  --surface-2: #1a1a1a;
  --border:    #222222;
  --text:      #f0f0f0;
  --muted:     #777;
  --accent:    #7c6af7;
  --accent-l:  #a99bf8;
  --success:   #22c55e;
  --danger:    #ef4444;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

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

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,8,8,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: .9rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo { font-size: 1.3rem; font-weight: 800; color: var(--text); text-decoration: none; }
.logo span { color: var(--accent); }

.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav a { color: var(--muted); font-size: .9rem; font-weight: 500; text-decoration: none; transition: color .15s; }
.main-nav a:hover { color: var(--text); }

.btn-nav {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .4rem .9rem;
  color: var(--text) !important;
  font-size: .85rem;
}

.btn-nav:hover { background: var(--border); text-decoration: none !important; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .6rem 1.2rem;
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #6a57f5; text-decoration: none; color: #fff; }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-2); text-decoration: none; }

.btn-lg { padding: .85rem 2rem; font-size: 1rem; border-radius: 10px; }
.btn-sm { padding: .35rem .75rem; font-size: .82rem; }
.btn-block { width: 100%; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 70% 50%, rgba(124,106,247,.12), transparent);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(124,106,247,.15);
  border: 1px solid rgba(124,106,247,.3);
  color: var(--accent-l);
  font-size: .78rem;
  font-weight: 600;
  padding: .25rem .75rem;
  border-radius: 99px;
  margin-bottom: 1rem;
  letter-spacing: .04em;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 1rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), #a78bfa, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 460px;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

.hero-meta {
  display: flex;
  gap: 1.25rem;
  font-size: .82rem;
  color: var(--muted);
}

.hero-meta span::before { content: ''; }

/* ── Browser-Mockup ──────────────────────────────────────── */
.mockup-browser {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.04);
}

.mockup-bar {
  background: var(--surface-2);
  padding: .6rem .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  border-bottom: 1px solid var(--border);
}

.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.dot:nth-child(1) { background: #ef4444; }
.dot:nth-child(2) { background: #f59e0b; }
.dot:nth-child(3) { background: #22c55e; }

.mockup-url {
  flex: 1;
  text-align: center;
  font-size: .72rem;
  color: var(--muted);
  background: var(--surface);
  border-radius: 4px;
  padding: .2rem .5rem;
}

.mockup-screen { padding: 1rem; }

.mockup-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
}

.mockup-photo {
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--border) 100%);
  border-radius: 6px;
  overflow: hidden;
  animation: pulse 2s ease-in-out infinite alternate;
}

.mockup-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  animation: none;
  transition: transform .4s ease;
}

.mockup-photo:hover img {
  transform: scale(1.06);
}

@keyframes pulse {
  from { opacity: .5; }
  to   { opacity: 1; }
}

/* ── Features ────────────────────────────────────────────── */
.features { padding: 5rem 0; }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; margin-bottom: .75rem; }
.section-header p  { color: var(--muted); font-size: 1.05rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color .2s, transform .2s;
}

.feature-card:hover {
  border-color: rgba(124,106,247,.4);
  transform: translateY(-2px);
}

.feature-icon { font-size: 1.75rem; margin-bottom: .75rem; }
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: .4rem; }
.feature-card p  { color: var(--muted); font-size: .88rem; line-height: 1.6; }

/* ── Pricing ─────────────────────────────────────────────── */
.pricing { padding: 5rem 0; background: var(--surface); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.pricing-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  position: relative;
  transition: border-color .2s;
}

.pricing-card--featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(124,106,247,.07), var(--bg));
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .75rem;
  border-radius: 99px;
  letter-spacing: .05em;
}

.pricing-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; color: var(--muted); }

.pricing-price { margin-bottom: .4rem; }
.price-amount  { font-size: 2.5rem; font-weight: 800; letter-spacing: -.03em; }
.price-label   { font-size: .85rem; color: var(--muted); margin-left: .25rem; }

.pricing-renewal {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.pricing-features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.pricing-features li {
  font-size: .88rem;
  color: var(--muted);
  padding: .3rem 0;
}

.pricing-features li::first-child { color: var(--success); }

.pricing-note {
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
  margin-top: 2rem;
}

/* ── FAQ ─────────────────────────────────────────────────── */
.faq { padding: 5rem 0; }

.faq-list { max-width: 720px; margin: 0 auto; }

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.25rem 0;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: inherit;
}

.faq-icon { font-size: 1.3rem; color: var(--muted); transition: transform .2s; flex-shrink: 0; }
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height .25s ease;
}

.faq-answer p { color: var(--muted); padding-bottom: 1.25rem; line-height: 1.7; font-size: .93rem; }

/* ── CTA-Banner ──────────────────────────────────────────── */
.cta-banner {
  padding: 5rem 0;
  text-align: center;
  background: linear-gradient(135deg, rgba(124,106,247,.1), transparent);
  border-top: 1px solid var(--border);
}

.cta-banner h2 { font-size: 2rem; font-weight: 700; margin-bottom: .75rem; }
.cta-banner p  { color: var(--muted); margin-bottom: 2rem; font-size: 1.05rem; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 0;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-brand .logo { font-size: 1.1rem; }
.footer-brand p { color: var(--muted); font-size: .85rem; margin-top: .4rem; }

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a { color: var(--muted); font-size: .85rem; text-decoration: none; }
.footer-links a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  color: var(--muted);
  font-size: .8rem;
}

/* ── Buy-Page ────────────────────────────────────────────── */
.buy-page { padding: 3rem 0; }

.buy-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  align-items: start;
}

.buy-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; }

.product-options { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.5rem; }

.product-option {
  display: block;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s;
}

.product-option input { display: none; }
.product-option.selected { border-color: var(--accent); }

.option-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
}

.option-name   { font-weight: 600; margin-bottom: .2rem; }
.option-detail { font-size: .82rem; color: var(--muted); }
.option-price  { font-size: 1.3rem; font-weight: 700; }

.email-group label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .4rem; font-weight: 500; }
.email-group input {
  width: 100%;
  padding: .65rem .9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: .95rem;
  font-family: inherit;
}

.email-group input:focus { outline: none; border-color: var(--accent); }
.email-hint { font-size: .78rem; color: var(--muted); margin-top: .3rem; }

.buy-error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  color: #fca5a5;
  padding: .75rem 1rem;
  border-radius: 8px;
  font-size: .88rem;
  margin-top: 1rem;
}

.checkout-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  position: sticky;
  top: 90px;
}

.checkout-summary { margin-bottom: 1.5rem; }
.checkout-summary h3 { font-size: .95rem; font-weight: 600; margin-bottom: 1rem; }

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5rem 0;
  font-size: .9rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.summary-total { border-bottom: none; color: var(--text); font-size: 1rem; padding-top: .75rem; }

.paypal-btn-wrap { margin-bottom: .75rem; }

.paypal-spinner {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem;
  justify-content: center;
  font-size: .88rem;
  color: var(--muted);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.checkout-note { font-size: .78rem; color: var(--muted); text-align: center; }

/* ── Success / Cancel ────────────────────────────────────── */
.success-page, .cancel-page { padding: 5rem 0; }

.success-box {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 3rem 2rem;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: rgba(34,197,94,.15);
  color: var(--success);
  font-size: 1.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.success-box h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: .5rem; }
.success-sub { color: var(--muted); margin-bottom: 1.5rem; }

.key-display {
  background: var(--surface-2);
  border: 2px dashed rgba(124,106,247,.4);
  border-radius: 10px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.key-label { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4rem; }
.key-value { font-family: 'Courier New', monospace; font-size: 1.2rem; font-weight: 700; color: var(--accent); margin-bottom: .75rem; }

.success-steps {
  text-align: left;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.success-steps h3 { font-size: .9rem; font-weight: 600; margin-bottom: .75rem; }
.success-steps ol { padding-left: 1.2rem; color: var(--muted); font-size: .88rem; line-height: 2; }
.success-steps a  { color: var(--accent); }
.success-steps code { background: var(--border); padding: .1rem .35rem; border-radius: 3px; font-size: .82rem; }

/* ── Portal ──────────────────────────────────────────────── */
.portal-page { padding: 3rem 0; }

.portal-login-wrap { display: flex; justify-content: center; }

.portal-login-box {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
}

.portal-login-box h2 { margin-bottom: .5rem; }
.text-muted { color: var(--muted); font-size: .88rem; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: .35rem; font-weight: 500; }
.form-control {
  width: 100%;
  padding: .6rem .85rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: .92rem;
  font-family: inherit;
}

.form-control:focus { outline: none; border-color: var(--accent); }

.alert { padding: .65rem .9rem; border-radius: 8px; font-size: .88rem; margin-bottom: 1rem; }
.alert-danger { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; }

.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.portal-header h2 { font-size: 1.5rem; font-weight: 700; }

.portal-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

.portal-section h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }

.license-list { display: flex; flex-direction: column; gap: 1rem; }

.license-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.license-card--expired { opacity: .7; }

.license-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .75rem; }
.license-product { font-weight: 600; font-size: .9rem; margin-bottom: .25rem; }
.license-key { font-family: 'Courier New', monospace; font-size: .82rem; color: var(--muted); }

.badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 700;
}

.badge-success { background: rgba(34,197,94,.15); color: var(--success); }
.badge-warning { background: rgba(245,158,11,.15); color: #fbbf24; }
.badge-neutral { background: var(--surface-2); color: var(--muted); }
.badge-danger  { background: rgba(239,68,68,.15); color: #fca5a5; }

.license-meta { display: flex; gap: 2rem; margin-bottom: .75rem; }
.license-meta-item { }
.license-meta-label { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.license-meta-value { font-size: .88rem; color: var(--text); margin-top: .15rem; }

.license-actions { display: flex; gap: .5rem; }

.portal-empty { text-align: center; padding: 2rem; color: var(--muted); }
.portal-empty a { margin-top: 1rem; }

.portal-sidebar { display: flex; flex-direction: column; gap: 1rem; }

.portal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.portal-card h4 { font-size: .95rem; font-weight: 600; margin-bottom: .5rem; }
.portal-card p.text-muted { margin-bottom: .5rem; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner      { grid-template-columns: 1fr; }
  .hero-visual     { display: none; }
  .buy-grid        { grid-template-columns: 1fr; }
  .checkout-box    { position: static; }
  .portal-grid     { grid-template-columns: 1fr; }
  .footer-inner    { flex-direction: column; }
}

@media (max-width: 600px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero-cta     { flex-direction: column; }
  .main-nav a:not(.btn-nav) { display: none; }
}
