/* =========================================================
   PhotoFixr — "PhotoFixr Warm" brand stylesheet
   Pure CSS. Mobile-first, responsive, Apple-HIG feel.
   ========================================================= */

:root {
  /* Brand palette */
  --amber-1: #E08A2B;
  --amber-2: #F2B056;
  --amber-grad: linear-gradient(135deg, #E08A2B 0%, #F2B056 100%);
  --ivory: #FBF5EC;
  --ivory-2: #F4E9D8;
  --charcoal: #2E2118;
  --grey: #8A7259;
  --grey-soft: #A6917A;
  --line: rgba(46, 33, 24, 0.10);
  --card: rgba(255, 255, 255, 0.72);
  --card-solid: #FFFFFF;
  --glass-border: rgba(255, 255, 255, 0.55);
  --shadow-sm: 0 2px 10px rgba(46, 33, 24, 0.06);
  --shadow-md: 0 12px 36px rgba(46, 33, 24, 0.10);
  --shadow-lg: 0 28px 70px rgba(46, 33, 24, 0.16);
  --shadow-amber: 0 14px 32px rgba(224, 138, 43, 0.34);

  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 28px;

  --maxw: 1120px;
  --pad: clamp(20px, 5vw, 40px);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro", "SF Pro Text",
    Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--charcoal);
  background-color: var(--ivory);
  background-image:
    radial-gradient(1100px 560px at 85% -8%, rgba(242, 176, 86, 0.30), transparent 60%),
    radial-gradient(900px 520px at -10% 4%, rgba(224, 138, 43, 0.16), transparent 55%);
  background-attachment: fixed;
  line-height: 1.62;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- Typography ---------- */
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.3rem, 6.2vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.8vw, 2.6rem); }
h3 { font-size: 1.22rem; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-1);
  margin-bottom: 0.9rem;
}

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

.muted { color: var(--grey); }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  --h: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  height: var(--h);
  padding: 0 1.6rem;
  border-radius: 999px;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .22s ease, background-color .2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--amber-grad);
  color: #fff;
  box-shadow: var(--shadow-amber);
}
.btn-primary:hover { box-shadow: 0 18px 40px rgba(224, 138, 43, 0.42); color: #fff; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.65);
  color: var(--charcoal);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover { color: var(--charcoal); background: #fff; }

.btn-sm { --h: 42px; font-size: 0.95rem; padding: 0 1.15rem; }
.btn-lg { --h: 58px; font-size: 1.08rem; padding: 0 2rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

/* App Store style badge button */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  height: 60px;
  padding: 0 1.5rem 0 1.25rem;
  border-radius: 16px;
  background: var(--charcoal);
  color: #fff;
  box-shadow: var(--shadow-md);
  transition: transform .18s ease, box-shadow .22s ease, opacity .2s ease;
}
.store-badge:hover { text-decoration: none; color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.store-badge svg { flex: 0 0 auto; }
.store-badge .badge-text { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.store-badge .badge-text small { font-size: 0.66rem; font-weight: 500; opacity: 0.82; letter-spacing: 0.02em; }
.store-badge .badge-text strong { font-size: 1.18rem; font-weight: 600; letter-spacing: -0.01em; }
.store-badge.is-disabled { background: rgba(46, 33, 24, 0.34); opacity: 1; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 245, 236, 0.78);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.wordmark {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.wordmark:hover { text-decoration: none; }
.wordmark .logo-dot {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--amber-grad);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-amber);
  flex: 0 0 auto;
}
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a.nav-link { color: var(--grey); font-weight: 500; font-size: 0.96rem; }
.nav-links a.nav-link:hover { color: var(--charcoal); text-decoration: none; }

/* ---------- Sections ---------- */
section { padding: clamp(56px, 9vw, 112px) 0; }
.section-head { max-width: 680px; margin: 0 auto clamp(36px, 6vw, 60px); text-align: center; }
.section-head p { font-size: 1.1rem; color: var(--grey); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(48px, 7vw, 84px); padding-bottom: clamp(48px, 7vw, 96px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
}
.hero-copy h1 { margin-bottom: 0.4em; }
.hero-copy .lede { font-size: clamp(1.08rem, 2vw, 1.28rem); color: var(--grey); max-width: 36ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; }
.hero-note { margin-top: 1.1rem; font-size: 0.92rem; color: var(--grey-soft); display: flex; align-items: center; gap: 0.45rem; }
.hero-note svg { flex: 0 0 auto; }

/* Before / After mockup card (CSS-only, no images) */
.ba-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--glass-border);
  aspect-ratio: 4 / 5;
  background: #efe4d2;
  isolation: isolate;
}
.ba-half { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 18px; }
.ba-before {
  background:
    repeating-linear-gradient(135deg, rgba(0,0,0,0.05) 0 7px, rgba(0,0,0,0.10) 7px 14px),
    linear-gradient(160deg, #cdbfa6 0%, #b6a387 55%, #9c8a6f 100%);
  filter: sepia(0.55) contrast(0.82) brightness(0.96);
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0% 100%);
}
/* faux scratches / damage on the BEFORE side */
.ba-before::before,
.ba-before::after {
  content: "";
  position: absolute;
  background: rgba(255,255,255,0.35);
}
.ba-before::before { width: 2px; height: 60%; top: 8%; left: 26%; transform: rotate(8deg); box-shadow: 38px 30px 0 -0.5px rgba(80,60,40,0.25); }
.ba-before::after { width: 70%; height: 2px; top: 38%; left: 4%; transform: rotate(-4deg); opacity: 0.6; }
.ba-after {
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(255,255,255,0.55), transparent 60%),
    linear-gradient(160deg, #F2B056 0%, #E08A2B 60%, #c9742073 100%),
    #f6ead6;
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}
/* subtle "portrait" suggestion shared across both halves */
.ba-portrait {
  position: absolute;
  z-index: 1;
  top: 16%;
  left: 50%;
  transform: translateX(-50%);
  width: 46%;
  aspect-ratio: 3/4;
  border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%;
  background: radial-gradient(60% 55% at 50% 38%, rgba(255,255,255,0.30), transparent 70%);
  box-shadow: inset 0 -22px 40px rgba(46,33,24,0.18);
  pointer-events: none;
}
.ba-divider {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 3px;
  background: #fff;
  transform: translateX(-50%);
  z-index: 3;
  box-shadow: 0 0 0 1px rgba(46,33,24,0.06);
}
.ba-handle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  z-index: 4;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--amber-1);
  font-weight: 700;
}
.ba-tag {
  position: relative;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ba-tag.before { background: rgba(46,33,24,0.55); color: #fff; }
.ba-tag.after { background: rgba(255,255,255,0.85); color: var(--charcoal); }

/* ---------- Feature cards ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(18px, 2.4vw, 26px);
}
.card {
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 3.6vw, 38px);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .icon {
  width: 60px; height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(242,176,86,0.22), rgba(224,138,43,0.16));
  border: 1px solid rgba(224,138,43,0.20);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.2rem;
  color: var(--amber-1);
}
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--grey); margin-bottom: 0; font-size: 0.99rem; }

/* ---------- How it works (steps) ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 3vw, 30px);
  counter-reset: step;
}
.step {
  position: relative;
  padding: clamp(24px, 3vw, 32px);
  padding-top: clamp(34px, 4vw, 44px);
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.step .num {
  position: absolute;
  top: -22px; left: clamp(24px, 3vw, 32px);
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--amber-grad);
  color: #fff;
  font-weight: 700;
  font-size: 1.18rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-amber);
}
.step h3 { margin-bottom: 0.35rem; }
.step p { color: var(--grey); margin-bottom: 0; font-size: 0.98rem; }

/* ---------- Trust strip ---------- */
.trust {
  background: var(--amber-grad);
  border-radius: var(--radius-lg);
  padding: clamp(30px, 4.5vw, 46px) clamp(26px, 5vw, 54px);
  color: #fff;
  box-shadow: var(--shadow-amber);
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 30px);
  flex-wrap: wrap;
}
.trust .trust-ico {
  flex: 0 0 auto;
  width: 64px; height: 64px;
  border-radius: 18px;
  background: rgba(255,255,255,0.20);
  border: 1px solid rgba(255,255,255,0.35);
  display: flex; align-items: center; justify-content: center;
}
.trust p { margin: 0; font-size: clamp(1.05rem, 2vw, 1.28rem); font-weight: 600; letter-spacing: -0.01em; max-width: 60ch; }
.trust p small { display: block; font-weight: 400; opacity: 0.9; font-size: 0.86rem; margin-top: 0.35rem; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.06rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  letter-spacing: -0.01em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev {
  flex: 0 0 auto;
  transition: transform .2s ease;
  color: var(--amber-1);
}
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item .faq-body { padding: 0 24px 22px; color: var(--grey); }
.faq-item .faq-body p { margin: 0; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band .panel {
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 72px) var(--pad);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.cta-band h2 { margin-bottom: 0.5rem; }
.cta-band p { color: var(--grey); max-width: 52ch; margin: 0 auto 1.6rem; font-size: 1.08rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(244, 233, 216, 0.5);
  padding: clamp(40px, 6vw, 56px) 0;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; letter-spacing: -0.02em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer-links a { color: var(--grey); font-size: 0.95rem; }
.footer-links a:hover { color: var(--charcoal); text-decoration: none; }
.footer-copy { width: 100%; color: var(--grey-soft); font-size: 0.88rem; margin-top: 0.5rem; }

/* ---------- Legal / content pages ---------- */
.legal { padding-top: clamp(40px, 6vw, 64px); }
.legal .legal-wrap {
  max-width: 800px;
  margin: 0 auto;
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 56px);
  box-shadow: var(--shadow-md);
}
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 0.3rem; }
.legal .effective { color: var(--grey-soft); font-size: 0.92rem; margin-bottom: 2rem; }
.legal h2 { font-size: 1.3rem; margin-top: 2.2rem; margin-bottom: 0.6rem; letter-spacing: -0.01em; }
.legal h3 { font-size: 1.08rem; margin-top: 1.4rem; }
.legal p, .legal li { color: #4a3a2c; font-size: 1rem; }
.legal ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.legal li { margin-bottom: 0.4rem; }
.legal a { font-weight: 500; }
.legal .lead { font-size: 1.08rem; color: var(--charcoal); }

/* Standalone centered page (download fallback) */
.standalone {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 8vw, 80px) var(--pad);
}
.standalone .panel {
  max-width: 460px;
  width: 100%;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: clamp(34px, 6vw, 52px);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.standalone .panel .logo-dot { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 1.4rem; }
.standalone .panel h1 { font-size: clamp(1.8rem, 5vw, 2.3rem); }
.standalone .panel p { color: var(--grey); margin-bottom: 1.8rem; }
.standalone .store-stack { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }
.standalone .platform-note { font-size: 0.84rem; color: var(--grey-soft); margin-top: 1.6rem; margin-bottom: 0; }

/* ---------- Responsive ---------- */
@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 920px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
  .ba-card { aspect-ratio: 4 / 4.4; }
}

@media (max-width: 560px) {
  .nav-links { gap: 0.8rem; }
  .nav-links .nav-link { display: none; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
