/* === PetPortrait AI — Styles === */
:root {
  --bg: #fffbf5;
  --bg2: #fff5e6;
  --surface: #ffffff;
  --ink: #1a1208;
  --muted: #7c6b5a;
  --rule: #f0e4d3;
  --accent: #f97316;
  --accent2: #8b5cf6;
  --accent-dark: #ea580c;
  --accent2-dark: #7c3aed;
  --ok: #16a34a;
  --radius: 14px;
  --max: 1100px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-head: 'Outfit', var(--font);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.65; }
a { color: inherit; text-decoration: none; }

/* Nav */
#nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 2rem; background: rgba(255,251,245,0.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule);
}
.logo { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { font-size: 0.92rem; font-weight: 500; color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.btn-nav { background: var(--accent); color: #fff !important; padding: 0.5rem 1.2rem; border-radius: 8px; font-weight: 600 !important; }
.btn-nav:hover { background: var(--accent-dark); color: #fff !important; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem;
  max-width: var(--max); margin: 0 auto; padding: 4rem 2rem 3rem;
  align-items: center;
}
.badge {
  display: inline-block; background: var(--bg2); border: 1px solid var(--rule);
  padding: 0.3rem 0.8rem; border-radius: 99px; font-size: 0.82rem; font-weight: 600;
  color: var(--accent-dark); margin-bottom: 1.2rem;
}
.hero h1 { font-family: var(--font-head); font-size: 3rem; font-weight: 800; line-height: 1.1; margin-bottom: 1rem; letter-spacing: -0.02em; }
.grad { background: linear-gradient(120deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero .sub { font-size: 1.12rem; color: var(--muted); max-width: 32rem; margin-bottom: 1.5rem; }
.hero .sub strong { color: var(--ink); }
.hero-cta { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.trust { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.trust span { font-size: 0.82rem; color: var(--muted); font-weight: 500; }

.btn-primary {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 0.7rem 1.5rem; border-radius: 10px; font-weight: 700; font-size: 1rem;
  border: none; cursor: pointer; transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-ghost { padding: 0.7rem 1.5rem; border-radius: 10px; border: 1px solid var(--rule); font-weight: 600; background: transparent; cursor: pointer; }
.btn-ghost:hover { background: var(--bg2); }
.btn-large { width: 100%; padding: 1rem; font-size: 1.1rem; margin-top: 1rem; }

.hero-visual { }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.photo-card {
  aspect-ratio: 1; border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  font-size: 3rem; box-shadow: 0 4px 20px rgba(0,0,0,0.08); transition: transform 0.3s;
}
.photo-card:hover { transform: scale(1.05); }
.photo-card:nth-child(1) { transform: rotate(-3deg); }
.photo-card:nth-child(4) { transform: rotate(3deg); }

/* Sections */
.section { max-width: var(--max); margin: 0 auto; padding: 3.5rem 2rem; }
.section.alt { background: var(--bg2); max-width: none; }
.section h2 { font-family: var(--font-head); font-size: 2rem; font-weight: 800; text-align: center; margin-bottom: 0.3rem; }
.section-sub { text-align: center; color: var(--muted); font-size: 1.05rem; margin-bottom: 2.5rem; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; }
.step { text-align: center; }
.step-num {
  width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 1.3rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}
.step h3 { font-family: var(--font-head); font-size: 1.2rem; margin-bottom: 0.4rem; }
.step p { color: var(--muted); font-size: 0.92rem; }

/* Styles grid */
.styles-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; max-width: var(--max); margin: 0 auto; }
.style-card {
  background: var(--surface); border-radius: var(--radius); padding: 1.5rem 1rem; text-align: center;
  border: 1px solid var(--rule); transition: transform 0.2s, box-shadow 0.2s;
}
.style-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.style-card span { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }
.style-card h4 { font-family: var(--font-head); font-size: 1rem; margin-bottom: 0.2rem; }
.style-card p { font-size: 0.82rem; color: var(--muted); }

/* Owner+Pet banner */
.owner-pet-banner {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; align-items: center;
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(236,72,153,0.08));
  border: 1px solid rgba(139,92,246,0.2); border-radius: var(--radius); padding: 2.5rem;
}
.banner-badge {
  display: inline-block; background: var(--accent2); color: #fff;
  padding: 0.2rem 0.8rem; border-radius: 99px; font-size: 0.78rem; font-weight: 700; margin-bottom: 0.8rem;
}
.banner-text h2 { text-align: left; margin-bottom: 0.8rem; }
.banner-text p { color: var(--muted); margin-bottom: 1.2rem; }
.banner-visual { display: flex; justify-content: center; }
.duo-card {
  background: var(--surface); border-radius: var(--radius); padding: 2rem; text-align: center;
  box-shadow: 0 8px 30px rgba(139,92,246,0.15); border: 1px solid rgba(139,92,246,0.2);
}
.duo-card p { color: var(--muted); font-size: 0.9rem; margin-top: 0.5rem; }

/* Plan selector */
.plan-selector {
  display: flex; gap: 1rem; justify-content: center; margin-bottom: 2rem; flex-wrap: wrap;
}
.plan-btn {
  background: var(--surface); border: 2px solid var(--rule); border-radius: var(--radius);
  padding: 1.2rem 2rem; cursor: pointer; text-align: center; transition: all 0.2s;
  min-width: 160px;
}
.plan-btn:hover { border-color: var(--accent); }
.plan-btn.active { border-color: var(--accent); background: rgba(249,115,22,0.05); }
.plan-btn.plan-premium.active { border-color: var(--accent2); background: rgba(139,92,246,0.05); }
.plan-btn h4 { font-family: var(--font-head); font-size: 1.1rem; margin-bottom: 0.3rem; }
.plan-price { font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; color: var(--accent); }
.plan-premium .plan-price { color: var(--accent2); }
.plan-btn small { color: var(--muted); font-size: 0.82rem; }

/* Upload */
.upload-container { max-width: 640px; margin: 0 auto; }
.upload-zone {
  border: 2px dashed var(--rule); border-radius: var(--radius); padding: 3rem 2rem;
  text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: var(--bg2); }
.upload-zone.owner-zone:hover, .upload-zone.owner-zone.dragover { border-color: var(--accent2); }
.upload-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.upload-zone h3 { font-family: var(--font-head); font-size: 1.2rem; margin-bottom: 0.3rem; }
.upload-zone p { color: var(--muted); font-size: 0.9rem; }
.upload-hint { font-size: 0.8rem !important; color: var(--muted); margin-top: 0.5rem; }

.photo-preview { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.photo-preview .thumb {
  width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 2px solid var(--rule);
}
.photo-preview .thumb-wrap { position: relative; }
.photo-preview .remove {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px;
  background: var(--accent); color: #fff; border-radius: 50%; font-size: 0.7rem;
  display: flex; align-items: center; justify-content: center; cursor: pointer; border: 2px solid #fff;
}
.upload-progress { text-align: center; padding: 2rem; }
.spinner {
  width: 36px; height: 36px; border: 3px solid var(--rule); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 1rem;
}
.spinner.big { width: 48px; height: 48px; border-width: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

.continue-section { text-align: center; margin-top: 1.5rem; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; max-width: 900px; margin: 0 auto; }
.price-card {
  background: var(--surface); border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center;
  border: 1px solid var(--rule); position: relative;
}
.price-card.featured { border: 2px solid var(--accent); box-shadow: 0 8px 30px rgba(249,115,22,0.15); }
.price-card.premium { border: 2px solid var(--accent2); box-shadow: 0 8px 30px rgba(139,92,246,0.15); }
.popular { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; padding: 0.2rem 1rem; border-radius: 99px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.price-card h3 { font-family: var(--font-head); font-size: 1.2rem; color: var(--muted); margin-bottom: 0.5rem; }
.price { font-family: var(--font-head); font-size: 2.8rem; font-weight: 800; color: var(--accent); margin-bottom: 1rem; }
.price-card.premium .price { color: var(--accent2); }
.price-card ul { list-style: none; text-align: left; margin-bottom: 1.5rem; }
.price-card ul li { padding: 0.3rem 0; font-size: 0.9rem; border-bottom: 1px solid var(--rule); }
.price-card .btn-primary { width: 100%; }

/* FAQ */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-list details { border-bottom: 1px solid var(--rule); padding: 1rem 0; }
.faq-list summary { font-weight: 600; font-size: 1.02rem; cursor: pointer; }
.faq-list summary::after { content: '+'; float: right; color: var(--accent); font-weight: 700; }
.faq-list details[open] summary::after { content: '−'; }
.faq-list p { margin-top: 0.6rem; color: var(--muted); font-size: 0.92rem; }

/* Modal */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal-content {
  background: var(--surface); border-radius: var(--radius); padding: 2.5rem;
  max-width: 700px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; text-align: center;
}
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--muted); }
.progress-bar { width: 100%; height: 8px; background: var(--rule); border-radius: 4px; margin: 1.5rem 0; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 4px; width: 0%; transition: width 0.5s; }
.results-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.8rem; margin: 1.5rem 0; }
.result-item { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--rule); }
.result-item img { width: 100%; aspect-ratio: 1; object-fit: cover; cursor: pointer; transition: transform 0.2s; }
.result-item img:hover { transform: scale(1.05); }
.result-label {
  position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.6);
  color: #fff; font-size: 0.72rem; padding: 0.3rem; text-align: center;
}

/* Footer */
footer { background: var(--ink); color: #c4b5a0; padding: 3rem 2rem 1.5rem; }
.footer-content { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: 2rem; }
.footer-brand .logo { color: #fff; }
.footer-brand p { font-size: 0.88rem; margin-top: 0.5rem; max-width: 24rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { font-size: 0.88rem; color: #c4b5a0; }
.footer-links a:hover { color: #fff; }
.footer-bottom { max-width: var(--max); margin: 2rem auto 0; padding-top: 1.5rem; border-top: 1px solid #3a2f25; }
.footer-bottom p { font-size: 0.8rem; color: #8a7a68; }

/* Responsive */
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-cta, .trust { justify-content: center; }
  .steps, .styles-grid, .pricing-grid { grid-template-columns: 1fr; }
  .styles-grid { grid-template-columns: repeat(2,1fr); }
  .nav-links a:not(.btn-nav) { display: none; }
  .hero h1 { font-size: 2.2rem; }
  .results-grid { grid-template-columns: repeat(2,1fr); }
  .owner-pet-banner { grid-template-columns: 1fr; text-align: center; }
  .banner-text h2 { text-align: center; }
  .plan-selector { flex-direction: column; align-items: center; }
  .plan-btn { width: 100%; max-width: 320px; }
}
