/* ─── Variables ─── */
:root {
  --ink: #0d0d0d;
  --paper: #f5f0e8;
  --accent: #1a6cf0;
  --warm: #ff6b2b;
  --muted: #6b6660;
}
* { font-family: 'Bricolage Grotesque', sans-serif; box-sizing: border-box; }
code, .mono { font-family: 'DM Mono', monospace; }
body { background: var(--paper); color: var(--ink); overflow-x: hidden; }
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.6;
}

/* ─── Nav ─── */
nav { position: sticky; top: 0; z-index: 100; background: rgba(245,240,232,.88); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(13,13,13,.08); }

/* ─── Hero ─── */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 7rem 2rem 5rem; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; max-width: 1200px; margin: 0 auto; }
@media (max-width: 768px) { .hero-grid { grid-template-columns: 1fr; } .hero-visual { display: none; } }
.hero-eyebrow { display: inline-flex; align-items: center; gap: .5rem; background: var(--ink); color: var(--paper); padding: .35rem .9rem; border-radius: 99px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1.5rem; }
h1 { font-size: clamp(2.8rem, 5vw, 4.5rem); font-weight: 800; line-height: 1.06; letter-spacing: -.03em; margin-bottom: 1.5rem; }
.accent-word { color: var(--accent); position: relative; display: inline-block; }
.accent-word::after { content: ''; position: absolute; left: 0; bottom: .05em; width: 100%; height: .08em; background: var(--warm); border-radius: 4px; }
.hero-desc { font-size: 1.15rem; color: var(--muted); line-height: 1.7; margin-bottom: 2.5rem; max-width: 420px; font-weight: 400; }
.btn-primary { display: inline-flex; align-items: center; gap: .6rem; background: var(--ink); color: var(--paper); padding: .9rem 1.8rem; border-radius: 14px; font-weight: 700; font-size: .95rem; text-decoration: none; transition: transform .15s, box-shadow .15s; box-shadow: 4px 4px 0 var(--accent); }
.btn-primary:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--accent); }
.btn-secondary { display: inline-flex; align-items: center; gap: .6rem; background: transparent; color: var(--ink); padding: .9rem 1.8rem; border-radius: 14px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1.5px solid rgba(13,13,13,.2); transition: border-color .15s, background .15s; }
.btn-secondary:hover { background: rgba(13,13,13,.05); border-color: var(--ink); }

/* ─── Storage visual ─── */
.storage-card { background: var(--ink); color: var(--paper); border-radius: 24px; padding: 1.8rem; position: relative; overflow: hidden; }
.storage-card::before { content: ''; position: absolute; top: -40px; right: -40px; width: 180px; height: 180px; background: var(--accent); border-radius: 50%; opacity: .12; }
.storage-card::after { content: ''; position: absolute; bottom: -30px; left: 20px; width: 120px; height: 120px; background: var(--warm); border-radius: 50%; opacity: .1; }
.file-row { display: flex; align-items: center; gap: .75rem; padding: .6rem .8rem; border-radius: 10px; margin-bottom: .4rem; background: rgba(255,255,255,.06); font-size: .85rem; }
.file-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.quota-bar { background: rgba(255,255,255,.1); border-radius: 99px; height: 6px; margin-top: 1.2rem; overflow: hidden; }
.quota-fill { background: linear-gradient(90deg, var(--accent), #60a5fa); height: 100%; border-radius: 99px; width: 34%; transition: width 1s ease; }

/* ─── Plans ─── */
.plans-section { padding: 6rem 2rem; background: var(--ink); color: var(--paper); }
.plan-card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 20px; padding: 2rem; transition: background .2s, transform .2s; }
.plan-card:hover { background: rgba(255,255,255,.09); transform: translateY(-4px); }
.plan-card.featured { background: var(--accent); border-color: var(--accent); }
.plan-price { font-size: 2.5rem; font-weight: 800; letter-spacing: -.04em; }
.plan-price span { font-size: 1rem; font-weight: 400; opacity: .6; }

/* ─── Features ─── */
.features-section { padding: 6rem 2rem; }
.feat-item { display: flex; gap: 1.2rem; padding: 1.5rem 0; border-bottom: 1px solid rgba(13,13,13,.08); }
.feat-num { font-family: 'DM Mono', monospace; font-size: .75rem; color: var(--muted); padding-top: .3rem; min-width: 32px; }
.feat-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .3rem; }
.feat-desc { font-size: .9rem; color: var(--muted); line-height: 1.6; }

/* ─── Offer banner (legacy) ─── */
.offer-strip { background: var(--warm); color: white; text-align: center; padding: .5rem; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* ─── Footer ─── */
footer { background: var(--ink); color: rgba(245,240,232,.5); padding: 3rem 2rem; }

/* ─── Animations ─── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .6s cubic-bezier(.16,1,.3,1) both; }
.fade-up-2 { animation: fadeUp .6s .1s cubic-bezier(.16,1,.3,1) both; }
.fade-up-3 { animation: fadeUp .6s .2s cubic-bezier(.16,1,.3,1) both; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
.float { animation: float 4s ease-in-out infinite; }

/* ─── Pricing page ─── */
.page-pricing { --ink: #0d0d0d; --paper: #f5f0e8; --accent: #1a6cf0; --warm: #ff6b2b; --muted: #6b6660; }
.plan-wrap { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; max-width: 1080px; margin: 0 auto; }
@media(max-width:860px){ .plan-wrap { grid-template-columns: 1fr; max-width: 420px; } }
.plan { background: white; border: 1.5px solid rgba(13,13,13,.1); border-radius: 24px; padding: 2rem; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; position: relative; }
.plan:hover { transform: translateY(-5px); box-shadow: 0 20px 50px rgba(13,13,13,.08); }
.plan.featured { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.plan.featured .muted { color: rgba(245,240,232,.5); }
.plan.featured .divider { border-color: rgba(245,240,232,.1); }
.plan.featured .check-icon { color: #4ade80; }
.plan.featured .btn-plan { background: var(--accent); color: white; box-shadow: 0 4px 20px rgba(26,108,240,.4); }
.plan.featured .btn-plan:hover { opacity: .9; }
.plan-label { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .45; margin-bottom: .8rem; }
.plan-price { font-size: 3rem; font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.plan-price sub { font-size: 1rem; font-weight: 500; vertical-align: baseline; opacity: .5; }
.plan-old { font-size: 1.1rem; font-weight: 600; text-decoration: line-through; opacity: .35; margin-right: .3rem; }
.plan-storage { font-size: 1.5rem; font-weight: 800; margin-bottom: .2rem; }
.muted { color: var(--muted); }
.divider { border: none; border-top: 1px solid rgba(13,13,13,.08); margin: 1.5rem 0; }
.feat-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .65rem; font-size: .88rem; flex: 1; margin-bottom: 1.8rem; }
.feat-list li { display: flex; align-items: flex-start; gap: .65rem; }
.check-icon { color: var(--accent); margin-top: .12rem; flex-shrink: 0; font-size: .8rem; }
.btn-plan { display: block; text-align: center; padding: .85rem; border-radius: 14px; font-weight: 800; font-size: .9rem; text-decoration: none; transition: all .15s; background: rgba(13,13,13,.07); color: var(--ink); border: 1.5px solid rgba(13,13,13,.1); }
.btn-plan:hover { background: rgba(13,13,13,.12); }
.btn-plan-accent { background: var(--ink) !important; color: var(--paper) !important; border-color: var(--ink) !important; box-shadow: 3px 3px 0 var(--accent); }
.btn-plan-accent:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--accent) !important; }
details { border-bottom: 1px solid rgba(13,13,13,.08); }
details summary { padding: 1.2rem 0; font-weight: 700; font-size: .95rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details summary::after { content: '+'; font-size: 1.3rem; font-weight: 300; opacity: .4; transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding-bottom: 1.2rem; color: var(--muted); font-size: .9rem; line-height: 1.7; margin: 0; }

/* ─── Dashboard common ─── */
.loader { border-top-color: #f97316; animation: spinner 1s linear infinite; }
@keyframes spinner { to { transform: rotate(360deg); } }
.fade-in { animation: fadeIn 0.4s cubic-bezier(0.16,1,0.3,1) both; }
@keyframes fadeIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
::-webkit-scrollbar { width:6px; }
::-webkit-scrollbar-track { background:#f8fafc; }
::-webkit-scrollbar-thumb { background:#fed7aa; border-radius:10px; }
.wave-float  { animation: float 3s ease-in-out infinite; display:inline-block; }
.wave-float-2{ animation: float 3.7s ease-in-out infinite; display:inline-block; }
.wave-float-3{ animation: float 4.2s ease-in-out infinite; display:inline-block; }

/* ─── Dark mode on dashboard ─── */
body.dark-mode {
  background: #0f172a !important;
  color: #e2e8f0 !important;
}
body.dark-mode header {
  background: rgba(15,23,42,.88) !important;
  border-color: rgba(255,255,255,.08) !important;
}
body.dark-mode .sidebar {
  background: #1e293b !important;
  border-color: rgba(255,255,255,.08) !important;
}
body.dark-mode #user-display {
  background: #334155 !important;
  color: #cbd5e1 !important;
}
body.dark-mode #storage-bar {
  background: #3b82f6 !important;
}
body.dark-mode .card,
body.dark-mode [class*="bg-white"],
body.dark-mode [class*="bg-slate-50"],
body.dark-mode [class*="bg-slate-100"] {
  background: #1e293b !important;
  border-color: rgba(255,255,255,.08) !important;
}
body.dark-mode [class*="text-slate-900"],
body.dark-mode [class*="text-slate-800"],
body.dark-mode [class*="text-slate-700"] {
  color: #e2e8f0 !important;
}
body.dark-mode [class*="text-slate-500"],
body.dark-mode [class*="text-slate-400"] {
  color: #94a3b8 !important;
}
body.dark-mode input,
body.dark-mode select {
  background: #0f172a !important;
  border-color: rgba(255,255,255,.1) !important;
  color: #e2e8f0 !important;
}
