/* ClosetSync — global styles */

:root {
  --bg: #FAF7F2;
  --bg-elevated: #FFFFFF;
  --ink: #0A0A0A;
  --ink-soft: #4A4A4A;
  --ink-muted: #8A8A8A;
  --line: #E8E3DA;
  --accent: #C99B6F;
  --accent-soft: #E8C5A0;
  --success: #4A7C59;
  --danger: #B8553A;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

.serif {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: #1f1f1f; transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--bg); }

/* Layout containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header.site-header {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
header .logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
header .nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Hero */
.hero {
  padding: 96px 0 80px;
  text-align: center;
}
.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(48px, 7vw, 84px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--ink);
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero p.lead {
  font-size: 20px;
  color: var(--ink-soft);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.5;
}
.hero .actions { display: flex; gap: 12px; justify-content: center; }

/* Waitlist form */
.waitlist {
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  padding: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.waitlist input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  padding: 10px 16px;
  outline: none;
  color: var(--ink);
  font-family: inherit;
}
.waitlist input::placeholder { color: var(--ink-muted); }

/* Sections */
section { padding: 80px 0; border-top: 1px solid var(--line); }
section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 500;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
section .section-lead {
  text-align: center;
  color: var(--ink-soft);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto 56px;
}

/* How it works grid */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 768px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
}
.step .num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 42px;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}
.step h3 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 15px; }

/* Comparison */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
@media (max-width: 768px) { .compare { grid-template-columns: 1fr; } }
.compare-card {
  padding: 32px;
  border-radius: 16px;
  border: 1px solid var(--line);
}
.compare-card.bad { background: #FFFFFF; }
.compare-card.good { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.compare-card h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  opacity: 0.6;
}
.compare-card ul { list-style: none; padding: 0; }
.compare-card li { padding: 8px 0; font-size: 15px; }
.compare-card li::before { content: '— '; opacity: 0.5; }

/* Footer */
footer {
  padding: 48px 0 64px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}
footer .founders {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* App-specific */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.app-header {
  padding: 20px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-header .logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
}
.app-main { flex: 1; padding: 40px 32px; }

/* Onboarding */
.onboard {
  max-width: 480px;
  margin: 80px auto 0;
  text-align: center;
}
.onboard h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 40px;
  font-weight: 500;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.onboard p { color: var(--ink-soft); margin-bottom: 32px; font-size: 16px; }
.onboard .options { display: flex; flex-direction: column; gap: 12px; }
.onboard .option {
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elevated);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.15s ease;
}
.onboard .option:hover { border-color: var(--ink); }
.onboard .option.selected { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.onboard .option .icon { font-size: 24px; }

/* Loading / progress */
.loading-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  max-width: 440px;
  margin: 80px auto 0;
}
.loading-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  margin-bottom: 8px;
}
.loading-card p { color: var(--ink-soft); margin-bottom: 24px; font-size: 15px; }
.progress-bar {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
}
.found-counter {
  font-family: 'Cormorant Garamond', serif;
  font-size: 56px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 4px;
}
.found-label { font-size: 14px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* Wardrobe grid */
.wardrobe-toolbar {
  max-width: 1200px;
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wardrobe-toolbar h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 500;
}
.wardrobe-toolbar .stats { color: var(--ink-soft); font-size: 14px; }
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; max-width: 1200px; margin: 0 auto 24px; }
.pill {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pill:hover { border-color: var(--ink); }
.pill.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}
.card {
  background: var(--bg-elevated);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  border: 1px solid var(--line);
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.card .swatch {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.card .swatch::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
  pointer-events: none;
}
.card .swatch .swatch-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.card .swatch .swatch-cat {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.6;
}
.card .meta { padding: 12px 14px; }
.card .meta .name { font-size: 14px; font-weight: 500; line-height: 1.3; margin-bottom: 2px; }
.card .meta .sub { font-size: 12px; color: var(--ink-muted); }

/* Item detail modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg);
  border-radius: 16px;
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
@media (max-width: 768px) { .modal { grid-template-columns: 1fr; } }
.modal .img-side {
  min-height: 400px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}
.modal .img-side .swatch-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.modal .img-side .swatch-cat {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.6;
}
.modal .info-side { padding: 40px; }
.modal .info-side .brand-tag { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); margin-bottom: 8px; }
.modal .info-side h2 { font-family: 'Cormorant Garamond', serif; font-size: 32px; font-weight: 500; margin-bottom: 12px; }
.modal .info-side .item-meta { color: var(--ink-soft); font-size: 14px; margin-bottom: 32px; }
.modal .matches-section h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  color: var(--ink-soft);
}
.modal .match-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.modal .match-card {
  flex: 0 0 auto;
  width: 110px;
  cursor: pointer;
}
.modal .match-card .mini-swatch {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 8px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  line-height: 1.15;
  font-weight: 500;
}
.modal .match-card .match-name { font-size: 12px; line-height: 1.3; }
.modal .close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bg);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 200;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translate(-50%, 30px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* ============== Hero with split mockup ============== */
.hero-split { padding: 64px 0 80px; text-align: left; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-copy { text-align: center; }
  .hero-copy .waitlist { margin: 0 auto; }
}
.hero-copy h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(44px, 5.5vw, 72px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--ink);
}
.hero-copy h1 em { font-style: italic; color: var(--accent); }
.hero-copy .lead {
  font-size: 18px;
  color: var(--ink-soft);
  margin-bottom: 32px;
  line-height: 1.55;
  max-width: 520px;
}
.hero-copy .waitlist { max-width: 460px; margin: 0; }

/* Device frame mockup */
.device-frame {
  background: #fff;
  border-radius: 14px;
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,0.25),
    0 18px 36px -18px rgba(201, 155, 111, 0.25);
  overflow: hidden;
  border: 1px solid var(--line);
}
.device-bar {
  background: #f4efe6;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--line);
}
.device-bar .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #d4cfc4;
  display: inline-block;
}
.device-bar .dot:nth-child(1) { background: #ec6a5e; }
.device-bar .dot:nth-child(2) { background: #f5bf4f; }
.device-bar .dot:nth-child(3) { background: #61c554; }
.device-bar .device-url {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-muted);
  background: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.device-content { padding: 20px; background: var(--bg); }

.mockup-toolbar { margin-bottom: 14px; }
.mockup-h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.mockup-sub { font-size: 11px; color: var(--ink-muted); margin-top: 2px; }

.mockup-pills { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.mockup-pill {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
}
.mockup-pill.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.mockup-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mockup-card {
  aspect-ratio: 3/4;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  position: relative;
}
.mockup-card .mc-name { font-size: 13px; font-weight: 500; line-height: 1.2; }
.mockup-card .mc-cat { font-size: 9px; opacity: 0.6; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.08em; font-family: 'Inter', sans-serif; }

/* ============== Extension demo section ============== */
.extension-section { position: relative; }
.ext-demo {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.ext-product {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 32px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: center;
  box-shadow: 0 12px 40px -16px rgba(0,0,0,0.12);
  position: relative;
}
@media (max-width: 720px) { .ext-product { grid-template-columns: 1fr; } }
.ext-product-img {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}
.ext-product-placeholder {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: rgba(255,255,255,0.95);
  line-height: 1.2;
}
.ext-brand {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.ext-product-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 10px;
}
.ext-price { font-size: 16px; color: var(--ink); }

/* The widget — positioned floating over the product card */
.ext-widget {
  position: absolute;
  top: 20px;
  right: -20px;
  width: 280px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);
  overflow: hidden;
  z-index: 2;
  animation: ext-slide-in 0.5s ease 0.3s both;
}
@keyframes ext-slide-in {
  from { transform: translateX(20px) translateY(8px); opacity: 0; }
  to { transform: translateX(0) translateY(0); opacity: 1; }
}
@media (max-width: 720px) {
  .ext-widget { position: static; width: 100%; margin-top: -8px; }
}
.ext-widget-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: #fff;
  border-bottom: 1px solid var(--line);
}
.ext-widget-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px; font-weight: 600;
}
.ext-widget-close { color: var(--ink-muted); font-size: 18px; cursor: pointer; }
.ext-widget-body { padding: 14px 16px; }
.ext-widget-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500;
  margin-bottom: 10px;
}
.ext-check {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--success); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.ext-widget-sub { font-size: 11px; color: var(--ink-muted); margin-bottom: 10px; }
.ext-widget-matches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.ext-match {
  aspect-ratio: 3/4;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 6px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px; line-height: 1.15; font-weight: 500;
}
.ext-actions { display: flex; gap: 6px; }

/* ============== Hero with PHOTO + floating mockup ============== */
.hero-mockup { position: relative; }
.hero-photo {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #ece4d3, #d8c5a8);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.25);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.device-frame-floating {
  position: absolute;
  bottom: -30px;
  right: -20px;
  width: 70%;
  z-index: 2;
  background: #fff;
}
@media (max-width: 960px) {
  .device-frame-floating { position: static; width: 100%; margin-top: 16px; }
}

/* ============== Step cards with photos ============== */
.step-with-photo {
  padding: 0 !important;
  overflow: hidden;
}
.step-photo {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #ece4d3, #d8c5a8);
  overflow: hidden;
}
.step-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.step-with-photo:hover .step-photo img {
  transform: scale(1.04);
}
.step-body {
  padding: 24px 32px 32px;
}

/* ============== Lifestyle banner ============== */
.lifestyle-banner {
  position: relative;
  padding: 0;
  border: none;
  min-height: 460px;
  overflow: hidden;
}
.lifestyle-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.7);
}
.lifestyle-overlay {
  position: relative;
  padding: 96px 0;
  background: linear-gradient(
    135deg,
    rgba(10,10,10,0.55) 0%,
    rgba(10,10,10,0.35) 50%,
    rgba(201,155,111,0.40) 100%
  );
  display: flex;
  align-items: center;
  min-height: 460px;
  width: 100%;
}

/* ============== Mockup cards with photos ============== */
.mockup-card.mockup-card-img {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  padding: 0;
}
.mockup-card.mockup-card-img .mc-name,
.mockup-card.mockup-card-img .mc-cat { display: none; }

.ext-product-img-photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.ext-product-img-photo .ext-product-placeholder { display: none; }

.ext-match.ext-match-img {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  font-size: 0;
  padding: 0;
}


