/* ══════════════════════════════════════════
   FOYESCOUT — styles.css
   Dark luxury productivity app
══════════════════════════════════════════ */

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

:root {
  --bg:        #0a0a0f;
  --surface:   #111118;
  --surface2:  #16161f;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.12);
  --text:      #f0eff8;
  --muted:     #7b7a90;
  --muted2:    #5a5970;
  --gold:      #e8c97a;
  --gold-dim:  rgba(232,201,122,0.1);
  --gold-b:    rgba(232,201,122,0.25);
  --green:     #78d48e;
  --blue:      #7ec8e3;
  --red:       #e07878;
  --sidebar-w: 240px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* NOISE TEXTURE */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0; opacity: 0.3;
}

/* ══════════════════════════════
   DISCLAIMER
══════════════════════════════ */
#disclaimerOverlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.4s ease;
}

#disclaimerBox {
  background: var(--surface);
  border: 1px solid var(--gold-b);
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 60px rgba(232,201,122,0.1);
  animation: slideUp 0.4s ease;
}

#disclaimerIcon { font-size: 2.5rem; margin-bottom: 16px; }

#disclaimerBox h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

#disclaimerBox p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

#disclaimerBox p strong { color: var(--text); }

#disclaimerBtn {
  margin-top: 16px;
  width: 100%;
  padding: 14px 24px;
  background: var(--gold);
  color: #0a0a0f;
  border: none;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

#disclaimerBtn:hover {
  background: #f0d88a;
  box-shadow: 0 4px 20px rgba(232,201,122,0.35);
  transform: translateY(-1px);
}

/* ══════════════════════════════
   TOPBAR (mobile)
══════════════════════════════ */
.topbar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(10,10,15,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 200;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.topbar-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.topbar-logo span { color: var(--gold); }

.menu-btn {
  background: none;
  border: 1px solid var(--border2);
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.back-btn {
  font-size: 0.82rem;
  color: var(--gold);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  padding: 6px 10px;
}

/* ══════════════════════════════
   SIDEBAR
══════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: rgba(10,10,15,0.97);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  z-index: 100;
  display: flex; flex-direction: column;
  transition: transform 0.35s cubic-bezier(.22,1,.36,1);
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}

.logo-link {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}

.logo-link span { color: var(--gold); }

.sidebar-logo p {
  font-size: 0.68rem;
  color: var(--muted2);
  margin-top: 3px;
  letter-spacing: 0.05em;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 10px; }

.nav-label {
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted2);
  padding: 10px 20px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 0.84rem;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: all 0.18s;
}

.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.nav-item.active { color: var(--gold); border-left-color: var(--gold); background: var(--gold-dim); }
.nav-icon { width: 18px; text-align: center; font-size: 0.95rem; flex-shrink: 0; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
}

.sidebar-footer a {
  font-size: 0.75rem;
  color: var(--muted2);
  text-decoration: none;
  transition: color 0.2s;
}

.sidebar-footer a:hover { color: var(--gold); }

.overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}

/* ══════════════════════════════
   MAIN CONTENT
══════════════════════════════ */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
}

/* ══════════════════════════════
   HERO
══════════════════════════════ */
.hero {
  padding: 60px 48px 40px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 500px; height: 400px;
  background: radial-gradient(ellipse, rgba(232,201,122,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-b);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  animation: fadeUp 0.6s ease both;
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s ease infinite;
}

.hero h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
  animation: fadeUp 0.6s 0.1s ease both;
}

.gold { color: var(--gold); }

.hero-sub {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.7;
  animation: fadeUp 0.6s 0.2s ease both;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 28px;
  animation: fadeUp 0.6s 0.3s ease both;
  flex-wrap: wrap;
}

.hero-stat { display: flex; flex-direction: column; gap: 2px; }

.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ══════════════════════════════
   TICKER / DISCLAIMER STRIP
══════════════════════════════ */
.ticker-wrap {
  overflow: hidden;
  background: rgba(232,201,122,0.06);
  border-top: 1px solid var(--gold-b);
  border-bottom: 1px solid var(--gold-b);
  padding: 8px 0;
  margin-bottom: 32px;
}

.ticker-track {
  display: inline-block;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}

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

/* ══════════════════════════════
   TOOL CARDS GRID
══════════════════════════════ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  padding: 0 48px 48px;
  animation: fadeUp 0.6s 0.35s ease both;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.25s cubic-bezier(.22,1,.36,1);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(232,201,122,0.04), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.tool-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.tool-card:hover::before { opacity: 1; }

.tool-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width 0.3s;
}

.tool-card:hover::after { width: 100%; }

.card-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  width: 48px; height: 48px;
  background: var(--surface2);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}

.card-body { flex: 1; min-width: 0; }

.card-name {
  font-family: 'Syne', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}

.card-desc {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.5;
}

.card-arrow {
  font-size: 1rem;
  color: var(--muted2);
  flex-shrink: 0;
  transition: all 0.2s;
}

.tool-card:hover .card-arrow {
  color: var(--gold);
  transform: translateX(4px);
}

.new-badge {
  font-size: 0.6rem;
  padding: 2px 7px;
  background: var(--gold);
  color: #0a0a0f;
  border-radius: 100px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ══════════════════════════════
   TOOL VIEW
══════════════════════════════ */
.tool-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 32px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 10;
}

.back-btn-main {
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.back-btn-main:hover {
  border-color: var(--gold-b);
  color: var(--gold);
}

.tool-header-title {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.tool-header-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.4;
}

.tool-content {
  flex: 1;
  overflow-y: auto;
  animation: fadeUp 0.3s ease;
}

.tool-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 16px;
  color: var(--muted);
  font-size: 0.85rem;
}

.loading-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 48px 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.footer-logo span { color: var(--gold); }

.footer-tagline {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-socials a, .footer-col a {
  font-size: 0.78rem;
  color: var(--muted2);
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
  display: block;
  margin-bottom: 6px;
}

.footer-socials a:hover, .footer-col a:hover { color: var(--gold); }

.footer-col-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-bottom span {
  font-size: 0.72rem;
  color: var(--muted2);
}

.footer-policy { color: rgba(232,201,122,0.5) !important; }

/* ══════════════════════════════
   ANIMATIONS
══════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 8px 0 40px rgba(0,0,0,0.5); }
  .overlay.visible { display: block; }
  .topbar { display: flex; }
  .main { margin-left: 0; padding-top: 56px; }
  .hero { padding: 32px 20px 24px; }
  .cards-grid { padding: 0 16px 32px; grid-template-columns: 1fr 1fr; gap: 10px; }
  .tool-card { padding: 14px; gap: 12px; }
  .card-icon { width: 40px; height: 40px; font-size: 1.4rem; border-radius: 10px; }
  .card-name { font-size: 0.82rem; }
  .card-desc { font-size: 0.7rem; }
  .card-arrow { display: none; }
  .tool-header { padding: 14px 16px 12px; }
  footer { padding: 32px 20px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tool-card { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 12px; }
  .card-icon { width: 36px; height: 36px; font-size: 1.2rem; }
  .hero h1 { font-size: 1.8rem; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════
   SHARED TOOL STYLES
   (used inside tool iframes)
══════════════════════════════ */
.section-pad { padding: 28px 32px; }
@media (max-width: 960px) { .section-pad { padding: 20px 16px; } }
