/* ════════════════════════════════════════
   calmrocks.io — styles.css
   All styles for all pages live here.
   ════════════════════════════════════════ */

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

/* ── Tokens ── */
:root {
  --bg:          #0a0c0f;
  --surface:     #111418;
  --surface2:    #181c22;
  --border:      rgba(255,255,255,0.07);
  --text:        #e8eaed;
  --muted:       #6b7280;
  --accent:      #2dd4bf;
  --accent-dim:  rgba(45,212,191,0.10);
  --accent-glow: rgba(45,212,191,0.22);
  --danger:      #f87171;
  --success:     #34d399;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Aurora background ── */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.aurora::before,
.aurora::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.15;
}
.aurora::before {
  width: 800px; height: 600px;
  background: radial-gradient(ellipse, #2dd4bf 0%, transparent 70%);
  top: -200px; left: -200px;
  animation: drift1 18s ease-in-out infinite alternate;
}
.aurora::after {
  width: 600px; height: 500px;
  background: radial-gradient(ellipse, #6366f1 0%, transparent 70%);
  bottom: -150px; right: -100px;
  animation: drift2 22s ease-in-out infinite alternate;
}
@keyframes drift1 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(120px,80px) scale(1.15); }
}
@keyframes drift2 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-80px,-60px) scale(1.2); }
}

/* Noise texture */
.noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up-1 { animation: fadeUp 0.85s ease both; }
.fade-up-2 { animation: fadeUp 0.85s 0.12s ease both; }
.fade-up-3 { animation: fadeUp 0.85s 0.24s ease both; }
.fade-up-4 { animation: fadeUp 0.85s 0.36s ease both; }

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

/* ── Logo ── */
.logo {
  font-family: 'DM Mono', monospace;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-decoration: none;
}
.logo .muted { color: var(--muted); }

/* ── Buttons ── */
.btn-primary {
  background: var(--accent);
  color: #0a0c0f;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 1.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-primary:hover    { background: #5eead4; }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary.full     { width: 100%; }

.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger {
  background: none;
  border: 1px solid rgba(248,113,113,0.3);
  color: var(--danger);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-danger:hover { background: rgba(248,113,113,0.08); }

/* ── Form controls ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}
.form-group label {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.form-group input,
.form-group select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus {
  border-color: rgba(45,212,191,0.4);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input::placeholder { color: var(--muted); }
.form-group select { cursor: pointer; }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.25rem;
  width: min(440px, calc(100vw - 2rem));
  transform: translateY(14px) scale(0.985);
  transition: transform 0.22s;
  box-shadow: 0 28px 70px rgba(0,0,0,0.55);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.75rem;
}
.modal-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.55rem;
  font-weight: 400;
}
.modal-subtitle {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.25rem;
  font-family: 'DM Mono', monospace;
}
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.1rem;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }

.form-error {
  font-size: 0.78rem;
  color: var(--danger);
  min-height: 1em;
  margin-bottom: 0.75rem;
}
.form-info {
  text-align: center;
  margin-top: 0.9rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
}

/* ══════════════════════════════════════
   COMING SOON PAGE
   ══════════════════════════════════════ */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 3rem;
}

.admin-trigger {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 0.45rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  transition: color 0.2s, background 0.2s, opacity 0.2s;
  opacity: 0.35;
}
.admin-trigger:hover {
  color: var(--accent);
  background: var(--accent-dim);
  opacity: 1;
}
.admin-trigger svg { width: 17px; height: 17px; }

.page-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  gap: 2.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(45,212,191,0.18);
  padding: 0.38em 1em;
  border-radius: 999px;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease infinite;
}

.hero-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--muted);
  font-weight: 300;
  max-width: 380px;
  line-height: 1.65;
}

/* Email signup */
.signup { display: flex; flex-direction: column; align-items: center; gap: 0.85rem; }
.signup-label { font-size: 0.78rem; color: var(--muted); }

.signup-row {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.signup-row:focus-within {
  border-color: rgba(45,212,191,0.38);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.signup-row input {
  background: none;
  border: none;
  outline: none;
  padding: 0.85rem 1.2rem;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  width: 240px;
  border-radius: 0;
  box-shadow: none;
}
.signup-row input::placeholder { color: var(--muted); }
.signup-row .btn-primary {
  border-radius: 0;
  padding: 0.85rem 1.3rem;
  font-size: 0.82rem;
}

.signup-msg {
  font-size: 0.78rem;
  min-height: 1.1em;
}

.page-footer {
  text-align: center;
  padding: 1.75rem 2rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════
   DASHBOARD
   ══════════════════════════════════════ */
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 3rem;
  border-bottom: 1px solid var(--border);
  background: rgba(17,20,24,0.88);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.dash-logo {
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dash-logo .sep   { color: var(--border); }
.dash-logo .label { color: var(--muted); }
.dash-nav { display: flex; gap: 0.75rem; align-items: center; }

.dash-body {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 3rem;
}

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Stats */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}
.stat-value {
  font-family: 'DM Serif Display', serif;
  font-size: 2.2rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-label { font-size: 0.75rem; color: var(--muted); }

/* App tiles */
.tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.1rem;
  margin-bottom: 3.5rem;
}

.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem;
  position: relative;
  transition: border-color 0.2s, transform 0.18s, box-shadow 0.18s;
}
.tile:hover {
  border-color: rgba(45,212,191,0.22);
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(0,0,0,0.28);
}
.tile-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid rgba(45,212,191,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.9rem;
}
.tile-name {
  font-family: 'DM Serif Display', serif;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}
.tile-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 1rem;
}
.tile-url {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.65;
  word-break: break-all;
  display: block;
  transition: opacity 0.2s;
}
.tile-url:hover { opacity: 1; }

.tile-status {
  position: absolute;
  top: 1rem; right: 1rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  padding: 0.22em 0.65em;
  border-radius: 999px;
}
.tile-status.live {
  background: rgba(52,211,153,0.1);
  color: var(--success);
  border: 1px solid rgba(52,211,153,0.2);
}
.tile-status.soon {
  background: rgba(107,114,128,0.12);
  color: var(--muted);
  border: 1px solid var(--border);
}

.tile-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.tile-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 0.28rem 0.65rem;
  font-size: 0.7rem;
  font-family: 'DM Mono', monospace;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.tile-btn:hover     { border-color: var(--accent); color: var(--accent); }
.tile-btn.del:hover { border-color: var(--danger);  color: var(--danger); }

.tile-add {
  background: none;
  border: 1px dashed rgba(255,255,255,0.09);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  cursor: pointer;
  min-height: 175px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  width: 100%;
}
.tile-add:hover {
  border-color: rgba(45,212,191,0.3);
  color: var(--accent);
  background: var(--accent-dim);
}

/* Subscribers */
.sub-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 3.5rem;
}
.sub-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 1rem;
}
.sub-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.8rem;
  background: var(--surface2);
  border-radius: 8px;
}
.sub-email {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
}
.sub-meta { display: flex; align-items: center; gap: 0.75rem; }
.sub-date {
  font-family: 'DM Mono', monospace;
  font-size: 0.67rem;
  color: var(--muted);
}
.sub-del {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0.1rem;
  transition: color 0.2s;
}
.sub-del:hover { color: var(--danger); }
.sub-empty {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.5rem 0;
  font-family: 'DM Mono', monospace;
}

/* Loading state */
.loading {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--muted);
  padding: 1rem 0;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .page-header, .dash-header { padding: 1.25rem 1.5rem; }
  .dash-body { padding: 2rem 1.5rem; }
  .signup-row input { width: 170px; }
  .modal { padding: 1.75rem; }
}
