/* ==========================================================================
   Verso Theme Lab — Base CSS
   Comparison UI, phone frames, and default CSS custom properties
   ========================================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@400;500;600;700;800;900&family=DM+Serif+Display&family=Cormorant+Garamond:wght@300;400;500;600;700&family=Josefin+Sans:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&family=Libre+Baskerville:wght@400;700&display=swap');

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

/* ── Default CSS Custom Properties ──────────────────────────────────────── */
:root {
  --bg-primary: #09090b;
  --bg-secondary: #111113;
  --bg-card: #18181b;
  --bg-card-hover: #1f1f23;
  --bg-input: #18181b;
  --bg-elevated: #27272a;

  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-inverse: #09090b;

  --accent-primary: #a855f7;
  --accent-secondary: #3b82f6;
  --accent-tertiary: #ec4899;
  --accent-success: #22c55e;
  --accent-warning: #eab308;

  --border-default: #27272a;
  --border-subtle: #1c1c1f;
  --border-strong: #3f3f46;
  --border-width: 1px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-card: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-elevated: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-button: 0 2px 8px rgba(0,0,0,0.2);

  --font-heading: 'Inter', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'SF Mono', monospace;
  --heading-weight: 700;
  --body-weight: 400;
  --letter-spacing-heading: -0.02em;
  --letter-spacing-body: 0;
  --line-height-heading: 1.2;
  --line-height-body: 1.5;

  --btn-primary-bg: #ffffff;
  --btn-primary-text: #000000;
  --btn-secondary-bg: transparent;
  --btn-secondary-text: #fafafa;
  --btn-secondary-border: #3f3f46;
  --btn-radius: 9999px;
  --btn-padding: 14px 28px;
  --btn-font-weight: 600;
  --btn-font-size: 15px;
  --btn-shadow: none;

  --card-border: 1px solid var(--border-default);
  --card-padding: 16px;
  --card-gap: 12px;

  --chip-bg: #27272a;
  --chip-text: #fafafa;
  --chip-active-bg: var(--accent-primary);
  --chip-active-text: #ffffff;
  --chip-radius: 9999px;
  --chip-padding: 8px 16px;

  --hero-overlay: linear-gradient(transparent 40%, rgba(9,9,11,0.85) 100%);
  --hero-height: 220px;

  --fab-bg: var(--accent-primary);
  --fab-text: #ffffff;
  --fab-size: 56px;
  --fab-shadow: 0 4px 16px rgba(168,85,247,0.4);

  --search-bg: var(--bg-input);
  --search-border: var(--border-default);
  --search-radius: var(--radius-full);
  --search-text: var(--text-secondary);

  --countdown-bg: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  --countdown-text: #ffffff;
  --countdown-radius: var(--radius-lg);

  --badge-bg: var(--accent-primary);
  --badge-text: #ffffff;
  --badge-radius: var(--radius-full);

  --glass-blur: 0px;
  --glass-bg: transparent;
  --neo-offset: 0px;
  --neo-border-width: 0px;
  --perspective-depth: none;
  --gradient-surface: none;
  --pattern-bg: none;
}


/* ══════════════════════════════════════════════════════════════════════════
   COMPARISON TOOL UI
   ══════════════════════════════════════════════════════════════════════════ */

body {
  background: #08080a;
  color: #fafafa;
  font-family: 'Inter', -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Top Bar ──────────────────────────────────────────────────────────── */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(8,8,10,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #1a1a1e;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.top-bar-brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fafafa;
  flex-shrink: 0;
}

.top-bar-brand span {
  font-weight: 400;
  color: #71717a;
  letter-spacing: 0;
  margin-left: 6px;
  font-size: 13px;
}

.controls-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.control-label {
  font-size: 11px;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.control-select {
  background: #18181b;
  color: #fafafa;
  border: 1px solid #27272a;
  padding: 8px 32px 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2371717a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-width: 180px;
  transition: border-color 0.2s;
}

.control-select:hover {
  border-color: #3f3f46;
}

.control-select:focus {
  outline: none;
  border-color: #a855f7;
}

.btn-compare {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  color: #a1a1aa;
  border: 1px solid #27272a;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-compare:hover {
  color: #fafafa;
  border-color: #3f3f46;
  background: #18181b;
}

.btn-compare.active {
  background: #a855f7;
  color: #ffffff;
  border-color: #a855f7;
}

.spacer { flex: 1; }

.shortcut-hints {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #52525b;
}

.shortcut-hints kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 2px 5px;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 4px;
  font-family: inherit;
  font-size: 10px;
  color: #71717a;
  margin: 0 2px;
}

@media (max-width: 900px) {
  .shortcut-hints { display: none; }
}


/* ── Combo Label ──────────────────────────────────────────────────────── */
.combo-label {
  text-align: center;
  padding: 12px 24px 0;
  font-size: 13px;
  color: #52525b;
}

.combo-label strong {
  color: #a1a1aa;
  font-weight: 500;
}


/* ══════════════════════════════════════════════════════════════════════════
   SINGLE VIEW MODE
   ══════════════════════════════════════════════════════════════════════════ */

.single-view {
  padding: 28px 20px 60px;
}

.phones-row {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1360px;
  margin: 0 auto;
}

.phone-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.phone-label {
  font-size: 11px;
  color: #52525b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}


/* ══════════════════════════════════════════════════════════════════════════
   COMPARE VIEW MODE
   ══════════════════════════════════════════════════════════════════════════ */

.compare-view {
  padding: 20px 20px 60px;
  display: none;
}

.compare-view.active { display: block; }
.single-view.hidden { display: none; }

.compare-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1600px;
  margin: 0 auto;
}

.compare-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.compare-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #111113;
  border: 1px solid #1e1e22;
  border-radius: 10px;
  flex-wrap: wrap;
}

.compare-col-label {
  font-size: 12px;
  font-weight: 700;
  color: #52525b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 4px;
}

.compare-col-header .control-select {
  min-width: 140px;
  font-size: 12px;
  padding: 6px 28px 6px 10px;
}

.compare-phones-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  scrollbar-width: none;
  padding-bottom: 20px;
}

.compare-phones-col::-webkit-scrollbar { display: none; }

/* Smaller phones in compare mode */
.compare-phones-col .phone-frame {
  width: 320px;
  height: 693px;
  border-radius: 36px;
}

.compare-phones-col .phone-frame::before {
  width: 104px;
  height: 28px;
  top: 8px;
  border-radius: 16px;
}

.compare-phones-col .phone-frame::after {
  width: 110px;
  height: 4px;
  bottom: 6px;
}

@media (max-width: 1100px) {
  .compare-columns {
    grid-template-columns: 1fr;
    max-width: 600px;
  }
  .compare-phones-col {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    max-height: none;
    overflow: visible;
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   PHONE FRAME
   ══════════════════════════════════════════════════════════════════════════ */

.phone-frame {
  width: 390px;
  height: 844px;
  border-radius: 44px;
  overflow: hidden;
  position: relative;
  background: var(--bg-primary);
  box-shadow:
    0 0 0 2px #2a2a2e,
    0 0 0 4px #1a1a1e,
    0 20px 60px rgba(0,0,0,0.5);
  flex-shrink: 0;
}

/* Dynamic Island */
.phone-frame::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 34px;
  background: #000;
  border-radius: 20px;
  z-index: 100;
}

/* Home indicator */
.phone-frame::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  z-index: 100;
}

/* Screen content (scrollable area inside phone) */
.screen-content {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-primary);
  font-family: var(--font-body);
  color: var(--text-primary);
  position: relative;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.screen-content::-webkit-scrollbar { display: none; }


/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1300px) {
  .phone-frame {
    width: 340px;
    height: 736px;
    border-radius: 38px;
  }
  .phone-frame::before {
    width: 110px;
    height: 30px;
    border-radius: 18px;
  }
  .phone-frame::after {
    width: 116px;
  }
  .phones-row { gap: 24px; }
}

@media (max-width: 1100px) {
  .phone-frame {
    width: 300px;
    height: 650px;
    border-radius: 34px;
  }
  .phone-frame::before {
    width: 96px;
    height: 26px;
    border-radius: 15px;
  }
}

@media (max-width: 768px) {
  .phones-row {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }
  .phone-frame {
    width: 360px;
    height: 780px;
    border-radius: 40px;
  }
}
