/* ==========================================================================
   KITBREEZE SAFEZONE™ - EDITORIAL MINIMAL CREAM & WARM ESPRESSO DESIGN SYSTEM
   Theme: Luxury Minimal Cream (#FAF8F5) / Deep Espresso (#261C14) / Warm Tan (#9E724C)
   Ultra-responsive across Mobile, Tablet, and Desktop.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Cream & Espresso Palette */
  --bg-cream: #FAF8F5;
  --bg-cream-alt: #F4EFEB;
  --bg-cream-tint: #ECE5DC;
  --bg-card: #FFFFFF;
  --bg-card-subtle: #FDFBF8;
  
  --border-cream: #E8E1D5;
  --border-cream-dark: #D9CFC1;
  --border-focus: #261C14;

  --text-espresso: #261C14;
  --text-cocoa: #544437;
  --text-muted: #827265;
  --text-cream-light: #FBF9F6;

  --accent-tan: #9E724C;
  --accent-tan-light: #C49B74;
  --accent-tan-soft: rgba(158, 114, 76, 0.12);

  --accent-safe: #2B6E48;
  --accent-safe-soft: rgba(43, 110, 72, 0.12);

  --accent-danger: #C04A3A;
  --accent-danger-soft: rgba(192, 74, 58, 0.14);

  --accent-ochre: #C87922;
  --accent-teal: #287282;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  background-color: var(--bg-cream);
  color: var(--text-espresso);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  selection-background-color: #261C14;
  selection-color: #FAF8F5;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-cream);
}
::-webkit-scrollbar-thumb {
  background: #D5CBBC;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #B9AC9B;
}

/* Cards & Surfaces */
.cream-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-cream);
  border-radius: 20px;
  box-shadow: 0 2px 6px -1px rgba(38, 28, 20, 0.04), 0 10px 24px -4px rgba(38, 28, 20, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.cream-card-subtle {
  background-color: var(--bg-cream-alt);
  border: 1px solid var(--border-cream);
  border-radius: 16px;
}

/* Premium Buttons */
.kb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  letter-spacing: -0.01em;
}

.kb-btn-espresso {
  background: #261C14;
  color: #FAF8F5;
  box-shadow: 0 4px 14px rgba(38, 28, 20, 0.16);
}

.kb-btn-espresso:hover {
  background: #3D2E22;
  box-shadow: 0 6px 20px rgba(38, 28, 20, 0.24);
  transform: translateY(-1px);
}

.kb-btn-cream {
  background: #FFFFFF;
  color: var(--text-espresso);
  border: 1px solid var(--border-cream);
  box-shadow: 0 2px 6px rgba(38, 28, 20, 0.04);
}

.kb-btn-cream:hover {
  background: var(--bg-cream-alt);
  border-color: var(--border-cream-dark);
  transform: translateY(-1px);
}

.kb-btn-tan {
  background: var(--accent-tan);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(158, 114, 76, 0.25);
}

.kb-btn-tan:hover {
  background: #875F3D;
  transform: translateY(-1px);
}

/* Platform Selectors */
.platform-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-cocoa);
  background: #FAF8F5;
  border: 1px solid var(--border-cream);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.platform-tab:hover {
  color: var(--text-espresso);
  background: #FFFFFF;
  border-color: var(--border-cream-dark);
}

.platform-tab.active {
  color: #FAF8F5;
  background: #261C14;
  border-color: #261C14;
  box-shadow: 0 4px 12px rgba(38, 28, 20, 0.15);
}

/* Authentic Titanium Smartphone Frame (Scales perfectly on all screens) */
.iphone-frame-wrapper {
  position: relative;
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
  perspective: 1200px;
}

@media (min-width: 640px) {
  .iphone-frame-wrapper {
    max-width: 370px;
  }
}

@media (min-width: 1024px) {
  .iphone-frame-wrapper {
    max-width: 380px;
  }
}

@media (min-width: 1280px) {
  .iphone-frame-wrapper {
    max-width: 395px;
  }
}

.iphone-frame {
  position: relative;
  width: 100%;
  background: #DCD4CA;
  border-radius: 48px;
  padding: 9px;
  box-shadow: 
    0 0 0 1px #CBC1B4,
    0 0 0 4px #E7E0D6,
    0 24px 50px -12px rgba(45, 33, 24, 0.25),
    inset 0 0 4px 1px rgba(255, 255, 255, 0.6);
  user-select: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Side Phone Hardware Accents */
.iphone-btn-volume-up,
.iphone-btn-volume-down,
.iphone-btn-power,
.iphone-btn-action {
  position: absolute;
  background: #B8ADA0;
  border-radius: 2px;
  z-index: 0;
}

.iphone-btn-action {
  left: -5px;
  top: 90px;
  width: 4px;
  height: 24px;
}

.iphone-btn-volume-up {
  left: -5px;
  top: 130px;
  width: 4px;
  height: 44px;
}

.iphone-btn-volume-down {
  left: -5px;
  top: 185px;
  width: 4px;
  height: 44px;
}

.iphone-btn-power {
  right: -5px;
  top: 145px;
  width: 4px;
  height: 60px;
}

/* Inner Screen Viewport (Strict 9:16) */
.iphone-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 40px;
  overflow: hidden;
  background: #111111;
}

/* Dynamic Island */
.dynamic-island {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 98px;
  height: 25px;
  background: #000000;
  border-radius: 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.dynamic-island-lens {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0D1117;
  border: 1px solid #1F2937;
}

.dynamic-island-sensor {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #05070B;
}

/* iOS Home Indicator */
.ios-home-indicator {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 4px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 4px;
  z-index: 45;
  pointer-events: none;
}

/* Media Layer */
.media-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.media-container video,
.media-container img,
.media-container canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay & Danger Zones */
.safezone-overlay-container {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.danger-zone-block {
  position: absolute;
  pointer-events: none;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

/* Minimal Luxury Danger Shading */
.danger-zone-terracotta {
  background-color: rgba(192, 74, 58, 0.38);
  border: 1px dashed rgba(192, 74, 58, 0.75);
}

.danger-zone-smoke {
  background-color: rgba(38, 28, 20, 0.65);
  border: 1px dashed rgba(230, 220, 205, 0.6);
}

/* Danger & Buffer Badges */
.danger-tag {
  position: absolute;
  background: rgba(38, 28, 20, 0.85);
  backdrop-filter: blur(6px);
  padding: 3px 7px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #FAF8F5;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  z-index: 25;
}

.danger-tag-terracotta {
  border-left: 2.5px solid #C04A3A;
  color: #FFD4CE;
}

.danger-tag-ochre {
  border-left: 2.5px solid #D9822B;
  color: #FFE6C7;
}

.danger-tag-teal {
  border-left: 2.5px solid #2B7A8C;
  color: #D3F3F9;
}

/* Crop Guides */
.guide-box {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 22;
  box-sizing: border-box;
}

.guide-box-4-5 {
  border: 1.5px dashed #D9822B;
  box-shadow: 0 0 10px rgba(217, 130, 43, 0.2);
}

.guide-box-1-1 {
  border: 1.5px dashed #2B7A8C;
  box-shadow: 0 0 10px rgba(43, 122, 140, 0.2);
}

.guide-rule-of-thirds {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 18;
}

.guide-rule-of-thirds .line-h {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.guide-rule-of-thirds .line-v {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
}

/* Native App UI Layer */
.native-ui-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  color: #FFFFFF;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.native-ui-layer * {
  user-select: none;
}

/* Draggable Title Hook Tester */
.draggable-test-text {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 42;
  cursor: grab;
  user-select: none;
  touch-action: none;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  padding: 6px 14px;
  border-radius: 10px;
  border: 2px solid var(--accent-safe);
  box-shadow: 0 4px 16px rgba(38, 28, 20, 0.18);
  max-width: 86%;
  text-align: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  color: #261C14;
}

.draggable-test-text.conflict {
  border-color: var(--accent-danger);
  box-shadow: 0 0 20px rgba(192, 74, 58, 0.35);
  background: rgba(255, 245, 243, 0.94);
}

.draggable-test-text:active {
  cursor: grabbing;
}

.drag-handle-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.drag-status-safe {
  color: var(--accent-safe);
}

.drag-status-conflict {
  color: var(--accent-danger);
}

/* Interactive Cursor Inspector HUD */
.cursor-inspector-hud {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(38, 28, 20, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 7px;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #FAF8F5;
  z-index: 48;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* Custom Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  background: #E8E1D5;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #261C14;
  box-shadow: 0 2px 6px rgba(38, 28, 20, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #261C14;
  border: none;
  box-shadow: 0 2px 6px rgba(38, 28, 20, 0.25);
  cursor: pointer;
}

/* Custom Toggle Switch */
.kb-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.kb-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.kb-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #E2D9CC;
  border-radius: 22px;
  transition: 0.2s ease;
}

.kb-toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: 0.2s ease;
}

.kb-toggle input:checked + .kb-toggle-slider {
  background-color: #261C14;
}

.kb-toggle input:checked + .kb-toggle-slider:before {
  transform: translateX(18px);
}

/* Dropzone */
.dropzone {
  border: 1.5px dashed #D9CFC1;
  border-radius: 16px;
  background: var(--bg-cream-alt);
  transition: all 0.2s ease;
}

.dropzone:hover,
.dropzone.drag-active {
  border-color: #261C14;
  background: #F8F3EC;
}

/* Spinning Disc & Marquee Animations */
@keyframes spin-disc {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin-disc {
  animation: spin-disc 4s linear infinite;
}

@keyframes ticker-slide {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.animate-ticker {
  display: inline-block;
  white-space: nowrap;
  animation: ticker-slide 8s linear infinite;
}

/* Accordion */
.faq-accordion-item {
  border: 1px solid var(--border-cream);
  border-radius: 14px;
  background: #FFFFFF;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-accordion-item:hover {
  border-color: var(--border-cream-dark);
}

.faq-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-espresso);
  user-select: none;
}

.faq-header svg {
  transition: transform 0.25s ease;
}

.faq-header.open svg {
  transform: rotate(180deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 20px;
  color: var(--text-cocoa);
  font-size: 14px;
  line-height: 1.65;
}

.faq-content.open {
  max-height: 350px;
  padding-bottom: 18px;
}

/* Cheat Sheet Table (Warm Cream Theme) */
.cheat-sheet-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-cream);
  background: #FFFFFF;
}

.cheat-sheet-table th {
  background: #F4EFEB;
  color: var(--text-espresso);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-cream);
}

.cheat-sheet-table td {
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--text-cocoa);
  border-bottom: 1px solid #F0E9DF;
  background: #FFFFFF;
}

.cheat-sheet-table tr:last-child td {
  border-bottom: none;
}

.cheat-sheet-table tr:hover td {
  background: #FCFAF7;
}

/* Notification Toast */
.kb-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #261C14;
  color: #FAF8F5;
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: 0 10px 25px -4px rgba(38, 28, 20, 0.3);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.kb-toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
