/* ============================================================
   SecurNotes — styles.css
   securnotes.com
   ============================================================ */

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

:root {
  --cream: #F7F3EE;
  --warm-white: #FDFAF6;
  --ink: #1A1714;
  --ink-soft: #3D3630;
  --ink-muted: #8C7E72;
  --amber: #C4773A;
  --amber-light: #E8A96A;
  --amber-pale: #F5E6D4;
  --sidebar-w: 260px;
  --list-w: 300px;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(26,23,20,0.08);
  --shadow-lg: 0 12px 48px rgba(26,23,20,0.14);
}

html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--cream); color: var(--ink); overflow-x: hidden; }


/* ─── LANDING ─── */
#landing { display: flex; flex-direction: column; min-height: 100vh; }


/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px; height: 64px;
  background: rgba(247,243,238,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(196,119,58,0.12);
}
.nav-logo {
  font-family: 'Lora', serif; font-size: 1.5rem; font-weight: 600;
  color: var(--ink); text-decoration: none; letter-spacing: -0.5px;
}
.nav-logo span { color: var(--amber); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 0.875rem; font-weight: 500; color: var(--ink); text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--amber); }
.btn-nav {
  background: var(--ink); color: var(--cream); border: none;
  padding: 9px 22px; border-radius: 50px; font-size: 0.875rem;
  font-weight: 500; cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: background .2s, transform .15s;
}
.btn-nav:hover { background: var(--amber); transform: translateY(-1px); }


/* ─── HERO ─── */
.hero {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  padding: 140px 24px 80px;
  background:
    radial-gradient(ellipse 60% 50% at 70% 20%, rgba(196,119,58,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(196,119,58,0.07) 0%, transparent 60%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--amber-pale); color: var(--amber);
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 5px 14px; border-radius: 50px;
  margin-bottom: 28px;
}
.hero-badge::before { content: '✦'; font-size: 0.7rem; }
h1 {
  font-family: 'Lora', serif; font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 600; line-height: 1.12; color: var(--ink);
  letter-spacing: -1.5px; max-width: 700px; margin-bottom: 22px;
}
h1 em { font-style: italic; color: var(--amber); }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem); color: var(--ink-muted);
  font-weight: 300; max-width: 480px; line-height: 1.7; margin-bottom: 44px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* Buttons */
.btn-primary {
  background: var(--amber); color: white; border: none;
  padding: 14px 32px; border-radius: 50px; font-size: 1rem;
  font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif;
  box-shadow: 0 8px 28px rgba(196,119,58,0.35);
  transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(196,119,58,0.45); }
.btn-ghost {
  background: transparent; color: var(--ink); border: 1.5px solid rgba(26,23,20,0.18);
  padding: 14px 32px; border-radius: 50px; font-size: 1rem; font-weight: 500;
  cursor: pointer; font-family: 'DM Sans', sans-serif; transition: border-color .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }


/* ─── APP PREVIEW (landing mockup) ─── */
.preview-wrapper {
  margin: 0 auto; padding: 0 24px 100px; max-width: 1000px;
  animation: floatUp .8s ease both .3s;
}
@keyframes floatUp { from { opacity:0; transform: translateY(40px); } to { opacity:1; transform: translateY(0); } }
.preview-frame {
  background: white; border-radius: 16px;
  box-shadow: 0 32px 80px rgba(26,23,20,0.16), 0 0 0 1px rgba(26,23,20,0.06);
  overflow: hidden;
}
.preview-bar {
  background: #F0ECEB; padding: 12px 16px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(26,23,20,0.06);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.r { background: #FF6059; }
.dot.y { background: #FFBE30; }
.dot.g { background: #28CA42; }
.preview-bar span {
  margin-left: auto; font-size: 0.75rem; color: #999;
  font-family: monospace;
}
.preview-app { display: flex; height: 480px; }

/* Mini sidebar */
.mini-sidebar {
  width: 56px; background: #1A1714; display: flex;
  flex-direction: column; align-items: center; padding: 16px 0; gap: 4px;
}
.mini-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer; transition: background .15s;
  color: rgba(255,255,255,0.5);
}
.mini-icon:hover,
.mini-icon.active { background: rgba(255,255,255,0.1); color: white; }
.mini-icon.active { color: var(--amber-light); }

/* Mini list */
.mini-list {
  width: 220px; background: var(--warm-white);
  border-right: 1px solid rgba(26,23,20,0.07);
  display: flex; flex-direction: column;
}
.mini-list-header { padding: 16px 16px 10px; border-bottom: 1px solid rgba(26,23,20,0.07); }
.mini-search {
  width: 100%; background: rgba(26,23,20,0.06); border: none;
  border-radius: 8px; padding: 7px 10px; font-size: 0.78rem;
  color: var(--ink); font-family: 'DM Sans', sans-serif; outline: none;
}
.mini-note-item {
  padding: 12px 16px; border-bottom: 1px solid rgba(26,23,20,0.05);
  cursor: pointer; transition: background .15s;
}
.mini-note-item:hover { background: rgba(196,119,58,0.06); }
.mini-note-item.active { background: var(--amber-pale); border-left: 3px solid var(--amber); }
.mini-note-title { font-size: 0.82rem; font-weight: 600; color: var(--ink); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-note-preview { font-size: 0.72rem; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-note-date { font-size: 0.65rem; color: #bbb; margin-top: 4px; }

/* Mini editor */
.mini-editor { flex: 1; padding: 24px 28px; background: white; overflow: hidden; }
.mini-editor-title {
  font-family: 'Lora', serif; font-size: 1.3rem; font-weight: 600;
  color: var(--ink); margin-bottom: 14px; border: none; outline: none;
  width: 100%; background: transparent;
}
.mini-editor-body { font-size: 0.875rem; line-height: 1.8; color: var(--ink-soft); font-weight: 300; }
.mini-editor-toolbar {
  display: flex; gap: 6px; margin-top: 20px; padding-top: 16px;
  border-top: 1px solid rgba(26,23,20,0.06);
}
.mini-tb-btn {
  background: rgba(26,23,20,0.05); border: none;
  width: 30px; height: 30px; border-radius: 6px;
  font-size: 0.8rem; cursor: pointer; transition: background .15s;
  color: var(--ink-soft);
}
.mini-tb-btn:hover { background: var(--amber-pale); color: var(--amber); }


/* ─── FEATURES SECTION ─── */
.section { padding: 100px 24px; }
.section-inner { max-width: 1000px; margin: 0 auto; }
.section-label {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--amber); margin-bottom: 14px;
}
.section-title {
  font-family: 'Lora', serif; font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600; letter-spacing: -0.5px; line-height: 1.2;
  color: var(--ink); max-width: 560px; margin-bottom: 56px;
}
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.feature-card {
  background: white; padding: 32px; border-radius: var(--radius);
  border: 1px solid rgba(26,23,20,0.07);
  transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon {
  width: 48px; height: 48px; background: var(--amber-pale); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 18px;
}
.feature-title { font-size: 1rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.feature-desc { font-size: 0.875rem; color: var(--ink-muted); line-height: 1.7; font-weight: 300; }


/* ─── CTA SECTION ─── */
.cta-section { background: var(--ink); padding: 100px 24px; text-align: center; }
.cta-section h2 {
  font-family: 'Lora', serif; font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600; color: white; letter-spacing: -0.5px; margin-bottom: 18px;
}
.cta-section h2 em { color: var(--amber-light); font-style: italic; }
.cta-section p { color: rgba(255,255,255,0.55); font-weight: 300; margin-bottom: 40px; font-size: 1.05rem; }
.mobile-badges { display: flex; justify-content: center; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.badge {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  padding: 10px 20px; border-radius: 12px; color: white;
  font-size: 0.85rem; font-weight: 500; cursor: pointer;
  transition: background .2s;
}
.badge:hover { background: rgba(255,255,255,0.14); }
.badge-icon { font-size: 1.3rem; }


/* ─── FOOTER ─── */
footer {
  background: #0F0D0B; padding: 48px 48px 32px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
footer .nav-logo { color: rgba(255,255,255,0.7); font-size: 1.2rem; }
footer p { font-size: 0.8rem; color: rgba(255,255,255,0.3); }
footer nav { display: flex; gap: 24px; }
footer nav a { font-size: 0.8rem; color: rgba(255,255,255,0.4); text-decoration: none; transition: color .2s; }
footer nav a:hover { color: var(--amber-light); }


/* ─── APP VIEW ─── */
#app {
  display: none; height: 100vh; background: var(--warm-white);
  flex-direction: row;
}
#app.active { display: flex; }
#landing.hidden { display: none; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w); background: var(--ink);
  display: flex; flex-direction: column;
  flex-shrink: 0; z-index: 10;
}
.sidebar-top {
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.app-logo {
  font-family: 'Lora', serif; font-size: 1.25rem; font-weight: 600;
  color: white; letter-spacing: -0.4px; margin-bottom: 16px;
  display: block;
}
.app-logo span { color: var(--amber-light); }
.sidebar-search {
  width: 100%; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px; padding: 9px 12px; font-size: 0.85rem;
  color: white; font-family: 'DM Sans', sans-serif; outline: none;
  transition: border-color .2s;
}
.sidebar-search::placeholder { color: rgba(255,255,255,0.3); }
.sidebar-search:focus { border-color: rgba(196,119,58,0.4); }
.sidebar-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
.nav-section-label {
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.25);
  padding: 12px 8px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px; cursor: pointer;
  color: rgba(255,255,255,0.55); font-size: 0.875rem; font-weight: 400;
  transition: background .15s, color .15s; margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: white; }
.nav-item.active { background: rgba(196,119,58,0.18); color: var(--amber-light); }
.nav-item .icon { font-size: 15px; width: 18px; text-align: center; }
.tag-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sidebar-bottom {
  padding: 12px 8px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.user-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 8px; cursor: pointer;
  transition: background .15s;
}
.user-row:hover { background: rgba(255,255,255,0.06); }
.user-avatar {
  width: 32px; height: 32px; background: var(--amber); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: white; flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 0.82rem; font-weight: 500; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 0.72rem; color: rgba(255,255,255,0.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Note list */
.note-list {
  width: var(--list-w); background: white; display: flex;
  flex-direction: column; border-right: 1px solid rgba(26,23,20,0.07);
  flex-shrink: 0;
}
.note-list-header {
  padding: 16px 16px 12px; border-bottom: 1px solid rgba(26,23,20,0.07);
  display: flex; align-items: center; justify-content: space-between;
}
.note-list-title { font-size: 0.8rem; font-weight: 600; color: var(--ink-muted); letter-spacing: 0.05em; text-transform: uppercase; }
.btn-new-note {
  width: 30px; height: 30px; background: var(--amber); border: none;
  border-radius: 8px; color: white; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, background .15s; font-family: monospace; line-height: 1;
}
.btn-new-note:hover { background: #b36830; transform: scale(1.05); }
.notes-scroll { flex: 1; overflow-y: auto; }
.note-item {
  padding: 14px 16px; border-bottom: 1px solid rgba(26,23,20,0.05);
  cursor: pointer; transition: background .15s; position: relative;
}
.note-item:hover { background: rgba(26,23,20,0.025); }
.note-item.active { background: var(--amber-pale); }
.note-item.active::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--amber); border-radius: 0 2px 2px 0;
}
.note-item-title { font-size: 0.875rem; font-weight: 600; color: var(--ink); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-item-preview { font-size: 0.78rem; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.note-item-meta { display: flex; align-items: center; gap: 8px; }
.note-item-date { font-size: 0.7rem; color: #ccc; }
.note-tag {
  font-size: 0.65rem; font-weight: 600; padding: 2px 7px; border-radius: 50px;
  background: rgba(196,119,58,0.1); color: var(--amber);
}

/* Editor */
.editor { flex: 1; display: flex; flex-direction: column; background: white; overflow: hidden; }
.editor-topbar {
  padding: 14px 28px; border-bottom: 1px solid rgba(26,23,20,0.07);
  display: flex; align-items: center; gap: 12px;
}
.editor-title-input {
  flex: 1; font-family: 'Lora', serif; font-size: 1.4rem; font-weight: 600;
  color: var(--ink); border: none; outline: none; background: transparent;
  letter-spacing: -0.3px;
}
.editor-title-input::placeholder { color: #ddd; }
.editor-action-btn {
  width: 34px; height: 34px; background: rgba(26,23,20,0.05); border: none;
  border-radius: 8px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: 16px; transition: background .15s;
  color: var(--ink-muted);
}
.editor-action-btn:hover { background: var(--amber-pale); color: var(--amber); }
.editor-toolbar {
  padding: 8px 28px; border-bottom: 1px solid rgba(26,23,20,0.06);
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.tb-btn {
  width: 32px; height: 32px; background: transparent; border: none;
  border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600;
  color: var(--ink-muted); transition: background .15s, color .15s;
  display: flex; align-items: center; justify-content: center;
}
.tb-btn:hover { background: var(--amber-pale); color: var(--amber); }
.tb-divider { width: 1px; height: 20px; background: rgba(26,23,20,0.1); margin: 0 4px; }
.editor-body { flex: 1; padding: 28px 48px; overflow-y: auto; }
.editor-textarea {
  width: 100%; height: 100%; font-family: 'DM Sans', sans-serif;
  font-size: 0.975rem; line-height: 1.9; color: var(--ink-soft); font-weight: 300;
  border: none; outline: none; resize: none; background: transparent;
}
.editor-statusbar {
  padding: 10px 28px; border-top: 1px solid rgba(26,23,20,0.06);
  display: flex; align-items: center; gap: 20px;
}
.status-item { font-size: 0.72rem; color: #bbb; }
.status-item strong { color: var(--ink-muted); }
.sync-indicator {
  margin-left: auto; display: flex; align-items: center; gap: 6px;
  font-size: 0.72rem; color: #5cb85c;
}
.sync-dot { width: 6px; height: 6px; background: #5cb85c; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.4; } }


/* ─── AUTH MODAL ─── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(26,23,20,0.6); backdrop-filter: blur(8px);
  align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: white; border-radius: 20px; padding: 48px;
  width: 100%; max-width: 420px; box-shadow: var(--shadow-lg);
  animation: slideUp .3s ease;
}
@keyframes slideUp { from { opacity:0; transform: translateY(24px) scale(.97); } to { opacity:1; transform: none; } }
.modal-logo { font-family: 'Lora', serif; font-size: 1.6rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.modal-logo span { color: var(--amber); }
.modal-sub { font-size: 0.875rem; color: var(--ink-muted); margin-bottom: 36px; font-weight: 300; }
.modal-tabs { display: flex; gap: 0; margin-bottom: 28px; border-bottom: 2px solid #eee; }
.modal-tab {
  padding: 10px 20px; font-size: 0.9rem; font-weight: 500;
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
  color: var(--ink-muted); transition: color .2s, border-color .2s;
}
.modal-tab.active { color: var(--amber); border-bottom-color: var(--amber); }
.form-group { margin-bottom: 18px; }
.form-label { font-size: 0.78rem; font-weight: 600; color: var(--ink); margin-bottom: 7px; display: block; letter-spacing: 0.03em; }
.form-input {
  width: 100%; padding: 11px 14px; border: 1.5px solid rgba(26,23,20,0.12);
  border-radius: 10px; font-size: 0.9rem; font-family: 'DM Sans', sans-serif;
  color: var(--ink); outline: none; transition: border-color .2s;
}
.form-input:focus { border-color: var(--amber); }
.btn-submit {
  width: 100%; background: var(--amber); color: white; border: none;
  padding: 13px; border-radius: 12px; font-size: 1rem; font-weight: 600;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  box-shadow: 0 6px 20px rgba(196,119,58,0.3);
  transition: background .2s, transform .15s; margin-top: 6px;
}
.btn-submit:hover { background: #b36830; transform: translateY(-1px); }
.modal-close {
  position: absolute; top: 16px; right: 20px; background: none; border: none;
  font-size: 22px; cursor: pointer; color: #aaa; transition: color .15s;
}
.modal-close:hover { color: var(--ink); }
.divider-or { text-align: center; font-size: 0.8rem; color: #ccc; margin: 20px 0; position: relative; }
.divider-or::before,
.divider-or::after { content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: #eee; }
.divider-or::before { left: 0; }
.divider-or::after { right: 0; }


/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(26,23,20,0.1); border-radius: 4px; }


/* ─── RESPONSIVE ─── */
@media (max-width: 700px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
}
