/* ═══════════════════════════════════════════
   RIPE.AI — style.css
   ═══════════════════════════════════════════ */

/* ─── CSS VARIABLES ─── */
:root {
  --blue:        #2B7FFF;
  --blue-bright: #4DA3FF;
  --blue-dim:    #1456CC;
  --cyan:        #38BDF8;
  --grad-accent: linear-gradient(135deg, #2B7FFF 0%, #38BDF8 100%);
  --transition:  0.22s ease;
  --transition-slow: 0.4s ease;
  --font: 'Plus Jakarta Sans', sans-serif;
  --green:  #22c55e;
  --yellow: #f59e0b;
  --red:    #ef4444;
}

[hidden] {
  display: none !important;
}

/* ─── DARK THEME ─── */
[data-theme="dark"] {
  --bg:           #060a10;
  --bg-2:         #090f18;
  --bg-3:         #0d1520;
  --surface:      #0b1522;
  --surface-2:    #101e30;
  --text:         #EFF6FF;
  --text-dim:     #7FA8CC;
  --text-muted:   #3D607A;
  --border:       rgba(43,127,255,0.13);
  --border-bright:rgba(43,127,255,0.40);
  --glow:         rgba(43,127,255,0.22);
  --glow-soft:    rgba(43,127,255,0.08);
  --orb-1: rgba(43,127,255,0.10);
  --orb-2: rgba(56,189,248,0.06);
  --orb-3: rgba(43,127,255,0.05);
  /* logo & gradient text: white → blue in dark */
  --logo-color:  #ffffff;
  --grad-text:   linear-gradient(105deg, #ffffff 0%, #ffffff 30%, #4DA3FF 58%, #38BDF8 100%);
}

/* ─── LIGHT THEME ─── */
[data-theme="light"] {
  --bg:           #f0f6ff;
  --bg-2:         #e4eefa;
  --bg-3:         #d8ebff;
  --surface:      #ffffff;
  --surface-2:    #f4f9ff;
  --text:         #0a1628;
  --text-dim:     #3a5a7a;
  --text-muted:   #7ea8c4;
  --border:       rgba(43,127,255,0.14);
  --border-bright:rgba(43,127,255,0.38);
  --glow:         rgba(43,127,255,0.18);
  --glow-soft:    rgba(43,127,255,0.07);
  --orb-1: rgba(43,127,255,0.07);
  --orb-2: rgba(56,189,248,0.05);
  --orb-3: rgba(43,127,255,0.04);
  /* logo & gradient text: blue in light */
  --logo-color:  #2B7FFF;
  --grad-text:   linear-gradient(105deg, #0a1628 0%, #0a1628 28%, #1456CC 55%, #2B7FFF 75%, #38BDF8 100%);
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition-slow), color var(--transition-slow);
}

/* ─── AMBIENT ─── */
.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.ambient-orb { position: absolute; border-radius: 50%; filter: blur(60px); }
.ambient-orb--1 { top:-20%; left:-5%; width:65%; height:65%; background: radial-gradient(ellipse, var(--orb-1) 0%, transparent 70%); animation: drift1 20s ease-in-out infinite alternate; }
.ambient-orb--2 { bottom:-15%; right:-10%; width:55%; height:55%; background: radial-gradient(ellipse, var(--orb-2) 0%, transparent 70%); animation: drift2 24s ease-in-out infinite alternate; }
.ambient-orb--3 { top:40%; left:50%; transform:translateX(-50%); width:40%; height:40%; background: radial-gradient(ellipse, var(--orb-3) 0%, transparent 70%); animation: drift3 16s ease-in-out infinite alternate; }
@keyframes drift1 { from{transform:translate(0,0) scale(1)} to{transform:translate(4%,6%) scale(1.05)} }
@keyframes drift2 { from{transform:translate(0,0)} to{transform:translate(-5%,-4%)} }
@keyframes drift3 { from{transform:translateX(-50%) scale(1)} to{transform:translateX(-45%) scale(1.1)} }

/* ─── NAVBAR ─── */
.navbar {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem; height: 64px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-slow);
}
.navbar__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.navbar__logo-icon {
  width: 34px; height: 34px;
  background: var(--grad-accent);
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: 17px;
  box-shadow: 0 0 16px var(--glow);
  flex-shrink: 0;
}
.navbar__logo-text {
  font-size: 1.05rem; font-weight: 900; letter-spacing: -0.02em;
  color: var(--logo-color);
  transition: color var(--transition-slow);
}
.navbar__links { display: flex; gap: 1.6rem; list-style: none; }
.navbar__links a {
  color: var(--text-dim); text-decoration: none;
  font-size: 0.85rem; font-weight: 500;
  transition: color var(--transition);
}
.navbar__links a:hover, .navbar__links a.nav-link--active { color: var(--text); }
.navbar__right { display: flex; align-items: center; gap: 12px; }

/* ─── THEME TOGGLE ─── */
.theme-toggle {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: 50px; padding: 5px 10px; cursor: pointer;
  transition: border-color var(--transition);
}
.theme-toggle:hover { border-color: var(--blue); }
.theme-toggle__icon { font-size: 14px; line-height: 1; transition: opacity var(--transition); }
[data-theme="dark"] .theme-toggle__icon--light  { opacity: 0.35; }
[data-theme="dark"] .theme-toggle__icon--dark   { opacity: 1; }
[data-theme="light"] .theme-toggle__icon--dark  { opacity: 0.35; }
[data-theme="light"] .theme-toggle__icon--light { opacity: 1; }

/* ─── CONTENT WRAPPER ─── */
main { position: relative; z-index: 1; }
.content-section__inner { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

/* ─── SECTION SHARED ─── */
.section-eyebrow {
  text-align: center; font-size: 0.75rem; font-weight: 700;
  color: var(--blue-bright); text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 10px;
}
.section-title {
  text-align: center; font-size: 2rem; font-weight: 900;
  letter-spacing: -0.03em; margin-bottom: 8px;
  background: var(--grad-text);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.section-sub { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 36px; }

/* ─── HOME SECTION ─── */
.section-home {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 80px 2rem 60px;
  position: relative; z-index: 1;
}
.hero { max-width: 900px; margin: 0 auto; text-align: center; }
.hero__tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--glow-soft); border: 1px solid var(--border-bright);
  color: var(--blue-bright);
  padding: 5px 14px; border-radius: 20px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;
  margin-bottom: 28px;
}
.hero__tag-dot {
  width: 6px; height: 6px; background: var(--blue-bright);
  border-radius: 50%; animation: pulseDot 2s ease-in-out infinite; flex-shrink: 0;
}
@keyframes pulseDot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.45;transform:scale(.65)} }
.hero__title {
  font-size: clamp(2.5rem, 5.5vw, 4.4rem); font-weight: 900;
  line-height: 1.08; letter-spacing: -0.04em; color: var(--text); margin-bottom: 22px;
}
.hero__title-gradient {
  font-style: normal;
  background: var(--grad-text);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero__subtitle {
  color: var(--text-dim); font-size: 1rem; font-weight: 400;
  max-width: 580px; margin: 0 auto 32px; line-height: 1.75;
}
.hero__ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 44px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--grad-accent); color: #fff; text-decoration: none;
  padding: 13px 28px; border-radius: 11px; font-weight: 700; font-size: 0.95rem;
  box-shadow: 0 4px 24px var(--glow);
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-2px); box-shadow: 0 8px 36px var(--glow); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--grad-accent); color: #fff; text-decoration: none;
  border: none;
  padding: 13px 28px; border-radius: 11px; font-weight: 700; font-size: 0.95rem;
  box-shadow: 0 4px 24px var(--glow);
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-secondary:hover { opacity: 0.82; transform: translateY(-2px); box-shadow: 0 8px 36px var(--glow); }

/* ─── STATS ─── */
.hero__stats {
  display: flex; justify-content: center; align-items: center;
  padding: 24px 36px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; width: fit-content; margin: 0 auto;
}
.stat { text-align: center; padding: 0 28px; }
.stat__value {
  display: block; font-size: 1.7rem; font-weight: 900; letter-spacing: -0.03em;
  background: var(--grad-accent);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat__label { display: block; font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; margin-top: 3px; }
.stat__divider { width: 1px; height: 40px; background: var(--border); flex-shrink: 0; }

/* ─── CONTENT SECTIONS ─── */
.content-section { padding: 100px 0; position: relative; z-index: 1; }
.content-section + .content-section { border-top: 1px solid var(--border); }

/* ─── ABOUT ─── */
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.about-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px 24px;
  transition: border-color var(--transition), transform var(--transition);
}
.about-card:hover { border-color: var(--border-bright); transform: translateY(-4px); }
.about-card__icon { font-size: 2rem; margin-bottom: 14px; display: block; }
.about-card__title { font-size: 1rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 10px; color: var(--text); }
.about-card__text { font-size: 0.875rem; color: var(--text-dim); line-height: 1.65; }

/* ─── TECHNOLOGY STEPS ─── */
.tech-steps { display: flex; flex-direction: column; gap: 0; }
.tech-step {
  display: flex; align-items: flex-start; gap: 24px;
  padding: 28px 0; border-bottom: 1px solid var(--border);
}
.tech-step:last-child { border-bottom: none; }
.tech-step__num {
  font-size: 2.5rem; font-weight: 900; letter-spacing: -0.04em;
  background: var(--grad-accent);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  flex-shrink: 0; width: 60px; line-height: 1;
}
.tech-step__name { font-size: 1.05rem; font-weight: 800; color: var(--text); margin-bottom: 6px; letter-spacing: -0.01em; }
.tech-step__desc { font-size: 0.875rem; color: var(--text-dim); line-height: 1.65; }

/* ─── FEATURES ─── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 24px 20px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover { border-color: var(--border-bright); transform: translateY(-4px); box-shadow: 0 12px 40px var(--glow-soft); }
.feature-card--highlight { border-color: var(--border-bright); background: var(--surface-2); }
.feature-card:not(.feature-card--highlight) { border-color: var(--border-bright); background: var(--surface-2); }
.feature-card__icon { font-size: 2rem; margin-bottom: 14px; display: block; }
.feature-card__title { font-size: 1rem; font-weight: 800; color: var(--text); margin-bottom: 10px; letter-spacing: -0.01em; }
.feature-card__text { font-size: 0.875rem; color: var(--text-dim); line-height: 1.65; margin-bottom: 14px; }
.feature-card__list { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.feature-card__list li { font-size: 0.8rem; color: var(--text-muted); padding-left: 16px; position: relative; }
.feature-card__list li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }

/* ─── SCANNER SECTION ─── */
.section-scanner { padding: 100px 0; position: relative; z-index: 1; }

/* ─── FRUIT CHIPS ─── */
.fruits-bar { display: flex; justify-content: center; gap: 10px; margin-bottom: 32px; flex-wrap: wrap; }
.fruit-chip {
  display: flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 7px 16px; border-radius: 10px; font-size: 0.85rem; font-weight: 600;
  color: var(--text-dim); transition: border-color var(--transition), color var(--transition);
}
.fruit-chip:hover { border-color: var(--border-bright); color: var(--text); }
.fruit-chip--stages { background: var(--glow-soft); border-color: var(--border-bright); font-weight: 500; }

/* ─── DROP ZONE ─── */
.drop-zone {
  background: var(--surface); border: 2px dashed var(--border-bright);
  border-radius: 22px; padding: 60px 40px; text-align: center;
  cursor: pointer; position: relative; overflow: hidden;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.drop-zone::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, var(--glow-soft) 0%, transparent 70%);
  pointer-events: none;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--blue-bright); background: var(--surface-2);
  box-shadow: 0 0 50px var(--glow-soft);
}
.drop-zone.drag-over { border-style: solid; }
.drop-zone__inner { position: relative; z-index: 1; }
.drop-zone__icon {
  width: 68px; height: 68px;
  background: linear-gradient(135deg, rgba(43,127,255,0.18), rgba(56,189,248,0.09));
  border: 1px solid var(--border-bright); border-radius: 18px;
  display: grid; place-items: center; margin: 0 auto 20px; font-size: 28px;
  transition: transform var(--transition);
}
.drop-zone:hover .drop-zone__icon { transform: translateY(-4px); }
.drop-zone__title { font-size: 1.2rem; font-weight: 800; color: var(--text); margin-bottom: 8px; letter-spacing: -0.02em; }
.drop-zone__sub { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 26px; }

/* ─── BUTTONS ─── */
.btn-upload {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--grad-accent); color: #fff; border: none;
  padding: 12px 30px; border-radius: 11px;
  font-family: var(--font); font-size: 0.95rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 24px var(--glow);
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-upload:hover { opacity: 0.88; transform: translateY(-2px); box-shadow: 0 8px 36px var(--glow); }
.btn-reset {
  background: none; border: 1px solid var(--border); color: var(--text-dim);
  padding: 6px 14px; border-radius: 8px; font-family: var(--font); font-size: 0.82rem; font-weight: 600; cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.btn-reset:hover { border-color: var(--blue); color: var(--blue); }

/* ─── RESULT CARD ─── */
.result-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 22px; overflow: hidden; margin-top: 28px;
  animation: fadeUp 0.4s ease both;
}
@keyframes fadeUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
.result-card__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.result-card__header-left { display: flex; align-items: center; gap: 10px; }
.result-card__icon { font-size: 1rem; }
.result-card__title { font-weight: 800; font-size: 0.95rem; letter-spacing: -0.01em; }
.live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3);
  color: var(--green); padding: 2px 10px; border-radius: 20px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.live-badge__dot { width: 5px; height: 5px; background: var(--green); border-radius: 50%; animation: pulseDot 1.5s ease-in-out infinite; }
.source-tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; }
.source-tag--python { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: var(--green); }
.source-tag--js { background: var(--glow-soft); border: 1px solid var(--border-bright); color: var(--blue-bright); }

.result-card__body { display: grid; grid-template-columns: 280px 1fr; }
.img-panel {
  position: relative; background: var(--bg-3);
  border-right: 1px solid var(--border); min-height: 300px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.img-panel__img { max-width: 100%; max-height: 300px; object-fit: contain; display: block; }

/* Scan overlay */
.scan-overlay { position: absolute; inset: 0; pointer-events: none; }
.scan-line {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue-bright), var(--cyan), var(--blue-bright), transparent);
  box-shadow: 0 0 18px var(--blue-bright), 0 0 40px var(--glow);
  animation: scanMove 1.8s ease-in-out infinite;
}
@keyframes scanMove { 0%{top:0%;opacity:0} 8%{opacity:1} 92%{opacity:1} 100%{top:100%;opacity:0} }
.scan-corner { position: absolute; width: 20px; height: 20px; border-color: var(--blue-bright); border-style: solid; }
.scan-corner--tl { top:10px; left:10px; border-width:2px 0 0 2px; }
.scan-corner--tr { top:10px; right:10px; border-width:2px 2px 0 0; }
.scan-corner--bl { bottom:10px; left:10px; border-width:0 0 2px 2px; }
.scan-corner--br { bottom:10px; right:10px; border-width:0 2px 2px 0; }

.info-panel { padding: 28px 30px; display: flex; flex-direction: column; gap: 18px; }

/* Loading */
.loading-state { display: flex; flex-direction: column; gap: 14px; }
.loading-state__step { display: flex; align-items: center; gap: 10px; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--border-bright); border-top-color: var(--blue-bright); border-radius: 50%; animation: spin 0.7s linear infinite; flex-shrink: 0; }
@keyframes spin { to{transform:rotate(360deg)} }
.loading-state__text { font-size: 0.875rem; color: var(--text-dim); font-weight: 500; }
.progress-bar { height: 4px; background: var(--bg-3); border-radius: 4px; overflow: hidden; }
.progress-bar__fill { height: 100%; background: var(--grad-accent); border-radius: 4px; width: 0%; transition: width 0.5s ease; }
.loading-state__steps-list { display: flex; flex-direction: column; gap: 6px; }
.loading-step-item { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-muted); transition: color var(--transition); }
.loading-step-item.done { color: var(--green); }
.loading-step-item.active { color: var(--text-dim); }
.loading-step-item__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; transition: background var(--transition); }
.loading-step-item.done   .loading-step-item__dot { background: var(--green); }
.loading-step-item.active .loading-step-item__dot { background: var(--blue-bright); }

/* Analysis results */
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.result-item { background: var(--bg-3); border: 1px solid var(--border); border-radius: 12px; padding: 15px 17px; display: flex; flex-direction: column; gap: 5px; }
.result-item__label { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.09em; }
.result-item__value { font-size: 1.15rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.result-item__value--ripeness { display: flex; align-items: center; gap: 8px; }
.ripeness-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }

.confidence-block { background: var(--bg-3); border: 1px solid var(--border); border-radius: 12px; padding: 15px 17px; }
.confidence-block__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.confidence-block__pct { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.03em; background: var(--grad-accent); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.block-label { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.09em; }
.conf-track { height: 8px; background: var(--bg); border-radius: 8px; overflow: hidden; }
.conf-fill { height: 100%; border-radius: 8px; background: var(--grad-accent); width: 0%; transition: width 1.2s cubic-bezier(0.34,1.56,0.64,1); box-shadow: 0 0 10px var(--glow); }

.probs-block { background: var(--bg-3); border: 1px solid var(--border); border-radius: 12px; padding: 15px 17px; display: flex; flex-direction: column; gap: 12px; }
.probs-list { display: flex; flex-direction: column; gap: 8px; }
.prob-row { display: flex; align-items: center; gap: 10px; }
.prob-row__name { font-size: 0.8rem; color: var(--text-dim); font-weight: 600; width: 115px; flex-shrink: 0; }
.prob-row__track { flex: 1; height: 5px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.prob-row__fill { height: 100%; border-radius: 5px; background: var(--blue); opacity: 0.4; width: 0%; transition: width 1s ease; }
.prob-row__fill--top { opacity: 1; background: var(--grad-accent); }
.prob-row__pct { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; width: 38px; text-align: right; }

.features-block { background: var(--bg-3); border: 1px solid var(--border); border-radius: 12px; padding: 15px 17px; display: flex; flex-direction: column; gap: 12px; }
.features-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.feature-chip { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 5px 11px; font-size: 0.78rem; color: var(--text-dim); display: flex; align-items: center; gap: 4px; }
.feature-chip strong { color: var(--blue-bright); font-weight: 700; }

/* ─── REALTIME SCANNER ─── */
.section-realtime { padding: 100px 0; position: relative; z-index: 1; }
.realtime-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }

.camera-panel { display: flex; flex-direction: column; gap: 16px; }
.camera-viewport {
  position: relative; background: var(--bg-3);
  border: 1px solid var(--border); border-radius: 18px;
  overflow: hidden; flex: 1; min-height: 380px;
  display: flex; align-items: center; justify-content: center;
  width: 100%;
}
.camera-idle { text-align: center; padding: 40px 20px; }
.camera-idle__icon { font-size: 3rem; display: block; margin-bottom: 12px; }
.camera-idle__text { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.camera-idle__sub { font-size: 0.85rem; color: var(--text-muted); }
.camera-video { width: 100%; height: 100%; object-fit: cover; display: block; transform: scaleX(-1); }
.camera-overlay { 
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.camera-scanbar {
  position: absolute; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--blue-bright), var(--cyan), var(--blue-bright), transparent);
  box-shadow: 0 0 20px var(--blue-bright), 0 0 50px var(--glow);
  animation: scanMove 2.2s ease-in-out infinite;
}
.camera-corner { position: absolute; width: 24px; height: 24px; border-color: var(--blue-bright); border-style: solid; }
.camera-corner--tl { top:14px; left:14px; border-width:2px 0 0 2px; }
.camera-corner--tr { top:14px; right:14px; border-width:2px 2px 0 0; }
.camera-corner--bl { bottom:14px; left:14px; border-width:0 0 2px 2px; }
.camera-corner--br { bottom:14px; right:14px; border-width:0 2px 2px 0; }

/* Live result badge overlay on camera */
.camera-live-result {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: rgba(6,10,16,0.82); border: 1px solid var(--border-bright);
  border-radius: 12px; padding: 10px 20px; text-align: center;
  backdrop-filter: blur(12px); min-width: 200px;
}
.camera-live-result__fruit { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.camera-live-result__ripeness { font-size: 0.85rem; font-weight: 600; color: var(--blue-bright); margin-top: 3px; }
.camera-live-result__conf { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.camera-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-camera {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--grad-accent); color: #fff; border: none;
  padding: 10px 22px; border-radius: 10px;
  font-family: var(--font); font-size: 0.9rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 18px var(--glow);
  transition: opacity var(--transition), transform var(--transition);
}
.btn-camera:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-camera--stop {
  background: none; border: 1px solid var(--border-bright);
  color: var(--text-dim); box-shadow: none;
}
.btn-camera--stop:hover { border-color: var(--red); color: var(--red); background: none; opacity: 1; }
.btn-camera--capture {
  background: none; border: 1px solid var(--border-bright);
  color: var(--blue-bright); box-shadow: none;
}
.btn-camera--capture:hover { border-color: var(--blue); color: var(--blue); background: none; opacity: 1; }
.camera-select {
  background: var(--surface); border: 1px solid var(--border-bright);
  color: var(--text-dim); padding: 8px 12px; border-radius: 9px;
  font-family: var(--font); font-size: 0.85rem; cursor: pointer; flex: 1;
}

.realtime-results {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column;
}
.realtime-idle {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px 24px; text-align: center;
  color: var(--text-muted); font-size: 0.875rem;
}
.realtime-data { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.rt-result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rt-fps { display: flex; justify-content: space-between; align-items: center; padding: 10px 17px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 10px; }
.rt-fps__val { font-size: 0.95rem; font-weight: 800; background: var(--grad-accent); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ─── FOOTER ─── */
.footer { text-align: center; padding: 36px 2rem; border-top: 1px solid var(--border); position: relative; z-index: 1; }
.footer__brand { font-size: 1.1rem; font-weight: 900; letter-spacing: -0.02em; background: var(--grad-accent); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 8px; }
.footer__sub { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; }
.footer__members { font-size: 0.78rem; color: var(--text-muted); opacity: 0.7; }

/* ─── ENTRANCE ANIMATIONS ─── */
.hero__tag      { animation: fadeUp 0.45s 0.05s ease both; }
.hero__title    { animation: fadeUp 0.45s 0.12s ease both; }
.hero__subtitle { animation: fadeUp 0.45s 0.18s ease both; }
.hero__ctas     { animation: fadeUp 0.45s 0.22s ease both; }
.hero__stats    { animation: fadeUp 0.45s 0.28s ease both; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .realtime-layout { grid-template-columns: 1fr; }
  .realtime-results { order: -1; }
  .realtime-idle { padding: 30px 20px; }
}
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2,1fr); }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .navbar { padding: 0 1.25rem; }
  .navbar__links { display: none; }
  .section-home { padding: 60px 1.5rem 40px; }
  .hero__stats { flex-direction: column; gap: 20px; padding: 24px 28px; width: 100%; }
  .stat__divider { width: 100%; height: 1px; }
  .result-card__body { grid-template-columns: 1fr; }
  .img-panel { min-height: 220px; border-right: none; border-bottom: 1px solid var(--border); }
  .result-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .hero__ctas { flex-direction: column; align-items: center; }
}
