/* =============================================================================
   Website Roaster — Master Stylesheet
   Dark, edgy SaaS-meets-roast-comedy theme.
   ========================================================================== */

:root {
  /* Palette */
  --bg:            #0c0a09;
  --surface:       #191614;
  --surface-2:     #131110;
  --surface-3:     #221e1b;
  --border:        #272120;
  --border-light:  #342d29;

  --accent:        #FF4D00;
  --accent-hover:  #ff6a2b;
  --accent-soft:   rgba(255, 77, 0, 0.12);
  --hot:           #FF2D55;

  --text:          #FFFFFF;
  --text-muted:    #888888;
  --text-dim:      #666666;

  --success:       #00C48C;
  --warn:          #FF4D00;
  --bad:           #FF2D55;

  /* Type */
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);

  /* Layout */
  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --maxw:      1140px;

  --shadow:      0 10px 40px rgba(0, 0, 0, 0.5);
  --glow-accent: 0 0 40px rgba(255, 77, 0, 0.25);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }

/* soft warm base gradient so the page has depth (not a flat void) */
body {
  background:
    radial-gradient(1100px 620px at 50% -10%, rgba(255, 77, 0, 0.10), transparent 60%),
    radial-gradient(900px 700px at 100% 20%, rgba(255, 45, 85, 0.05), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

/* ---- Ambient animated background (public pages) ---- */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient .orb { position: absolute; border-radius: 50%; filter: blur(80px); will-change: transform; }
.ambient .orb-1 { width: 540px; height: 540px; top: -180px; left: -140px; opacity: .20;
  background: radial-gradient(circle at center, #ff4d00, transparent 70%); animation: drift1 34s ease-in-out infinite; }
.ambient .orb-2 { width: 480px; height: 480px; bottom: -180px; right: -140px; opacity: .14;
  background: radial-gradient(circle at center, #ff2d55, transparent 70%); animation: drift2 42s ease-in-out infinite; }
.ambient .orb-3 { width: 440px; height: 440px; top: 44%; left: 50%; opacity: .12;
  background: radial-gradient(circle at center, #ffab40, transparent 70%); animation: drift3 48s ease-in-out infinite; }
.ambient .ember { position: absolute; bottom: -12px; width: 4px; height: 4px; border-radius: 50%;
  background: #ff8a3d; box-shadow: 0 0 8px 1px rgba(255, 77, 0, .75); opacity: 0;
  animation-name: emberRise; animation-timing-function: linear; animation-iteration-count: infinite; will-change: transform, opacity; }

@keyframes drift1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(90px,70px); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-80px,-60px); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-60px,40px) scale(1.12); } }
@keyframes emberRise {
  0%   { transform: translateY(0) scale(1);   opacity: 0; }
  12%  { opacity: .85; }
  85%  { opacity: .4; }
  100% { transform: translateY(-102vh) scale(.3); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ambient .orb { animation: none; }
  .ambient .ember { display: none; }
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }
.site-main { position: relative; z-index: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 24px rgba(255, 77, 0, 0.35); }
.btn-accent:hover { background: var(--accent-hover); box-shadow: var(--glow-accent); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border-light); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-lg { padding: 17px 34px; font-size: 17px; }
.btn-block { display: flex; width: 100%; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.brand-flame { font-size: 22px; filter: drop-shadow(0 0 8px rgba(255, 77, 0, 0.6)); }
.brand-accent { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 28px; }
.nav-link { color: var(--text-muted); font-weight: 500; font-size: 15px; transition: color .2s; }
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-cta { margin-left: 6px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-sm { padding: 56px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.eyebrow {
  display: inline-block; font-family: var(--font-display); font-size: 13px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); padding: 6px 14px; border-radius: 100px; margin-bottom: 18px;
}
.section-title { font-size: clamp(28px, 4vw, 40px); }
.section-sub { color: var(--text-muted); font-size: 17px; margin: 0; }

/* ---------- Hero ---------- */
.hero { padding: 90px 0 70px; text-align: center; }
.hero h1 { font-size: clamp(36px, 6.5vw, 68px); letter-spacing: -0.02em; margin-bottom: 22px; }
.hero h1 .fire { color: var(--accent); text-shadow: 0 0 30px rgba(255, 77, 0, 0.5); }
.hero-sub { font-size: clamp(17px, 2.4vw, 21px); color: var(--text-muted); max-width: 620px; margin: 0 auto 38px; }
.hero-trust { margin-top: 20px; color: var(--text-dim); font-size: 14px; }
.hero-trust strong { color: var(--text-muted); }

/* URL audit form */
.audit-form {
  display: flex; gap: 10px; max-width: 560px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow);
}
.audit-form:focus-within { border-color: var(--accent); box-shadow: var(--glow-accent); }
.audit-form input[type="url"], .audit-form input[type="text"] {
  flex: 1; background: transparent; border: 0; color: var(--text);
  font-size: 16px; padding: 12px 16px; outline: none; min-width: 0;
}
.audit-form input::placeholder { color: var(--text-dim); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color .25s, transform .25s;
}
.card-hover:hover { border-color: var(--border-light); transform: translateY(-4px); }
.card-glow { box-shadow: var(--shadow); }

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* Feature / step cards */
.feature-icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  font-size: 26px; border-radius: 14px; background: var(--accent-soft);
  border: 1px solid rgba(255, 77, 0, 0.25); margin-bottom: 18px;
}
.feature-card h3 { font-size: 20px; }
.feature-card p { color: var(--text-muted); margin: 0; font-size: 15px; }

.step-num {
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  color: var(--accent); background: var(--accent-soft);
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
}

/* ---------- Score ring ---------- */
.score-ring {
  --val: 0; --ring-color: var(--accent);
  width: 150px; height: 150px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; line-height: 1;
  background: conic-gradient(var(--ring-color) calc(var(--val) * 1%), var(--surface-3) 0);
}
.score-ring::before { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: var(--surface); }
.score-ring .score-num { position: relative; z-index: 1; font-family: var(--font-display); font-size: 40px; font-weight: 700; line-height: 1; }
.score-ring .score-max { position: relative; z-index: 1; color: var(--text-dim); font-size: 12px; line-height: 1; margin-top: 4px; }

.score-good { --ring-color: var(--success); }
.score-warn { --ring-color: var(--accent); }
.score-bad  { --ring-color: var(--hot); }
.text-good { color: var(--success); }
.text-warn { color: var(--accent); }
.text-bad  { color: var(--hot); }

/* Small score bars (report breakdown) */
.metric-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.metric-row:last-child { border-bottom: 0; }
.metric-label { flex: 1; }
.metric-label strong { display: block; font-size: 16px; }
.metric-label span { color: var(--text-muted); font-size: 13px; }
.metric-bar { flex: 0 0 140px; height: 8px; background: var(--surface-3); border-radius: 100px; overflow: hidden; }
.metric-bar > i { display: block; height: 100%; border-radius: 100px; }
.metric-score { flex: 0 0 52px; text-align: right; font-family: var(--font-display); font-weight: 700; font-size: 18px; }

/* ---------- Roast verdict card ---------- */
.roast-card {
  background: linear-gradient(160deg, #1c1310, var(--surface));
  border: 1px solid rgba(255, 77, 0, 0.3);
  border-radius: var(--radius-lg); padding: 34px;
  position: relative; overflow: hidden;
}
.roast-card::after {
  content: "🔥"; position: absolute; right: -10px; bottom: -20px;
  font-size: 130px; opacity: .07; pointer-events: none;
}
.roast-label { color: var(--accent); font-family: var(--font-display); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; margin-bottom: 12px; }
.roast-text { font-size: clamp(19px, 2.6vw, 24px); font-weight: 500; line-height: 1.5; margin: 0; }

/* ---------- Badges / pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 100px; border: 1px solid var(--border-light); color: var(--text-muted); }
.badge-good { background: rgba(0,196,140,.12); color: var(--success); border-color: transparent; }
.badge-warn { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge-bad  { background: rgba(255,45,85,.12); color: var(--hot); border-color: transparent; }
.badge-new  { background: rgba(0,196,140,.12); color: var(--success); border-color: transparent; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; color: var(--text); }
.form-control {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border-light);
  color: var(--text); font-size: 15px; padding: 13px 15px; border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s; font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-control::placeholder { color: var(--text-dim); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-hint { font-size: 13px; color: var(--text-dim); margin-top: 6px; }

/* ---------- Alerts ---------- */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: 15px; margin-bottom: 22px; border: 1px solid transparent; }
.alert-error { background: rgba(255,45,85,.1); border-color: rgba(255,45,85,.35); color: #ff8ba3; }
.alert-success { background: rgba(0,196,140,.1); border-color: rgba(0,196,140,.35); color: #6ff0c9; }
.alert-info { background: var(--accent-soft); border-color: rgba(255,77,0,.35); color: #ffb08a; }

/* ---------- Loading / spinner ---------- */
.spinner { width: 46px; height: 46px; border: 4px solid var(--surface-3); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-wrap { text-align: center; padding: 60px 20px; }
.loading-wrap p { color: var(--text-muted); margin-top: 20px; }
.loading-wrap .loading-step { font-family: var(--font-display); color: var(--text); }

/* ---------- Stats strip ---------- */
.stats-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 48px; }
.stat { text-align: center; }
.stat-num { font-family: var(--font-display); font-size: clamp(32px, 5vw, 46px); font-weight: 700; color: var(--accent); }
.stat-label { color: var(--text-muted); font-size: 14px; }

/* ---------- Tables (admin) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th, .table td { padding: 14px 16px; text-align: left; font-size: 14px; }
.table thead th { color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: 12px; border-bottom: 1px solid var(--border); }
.table tbody tr { border-bottom: 1px solid var(--border); transition: background .15s; }
.table tbody tr:last-child { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table a { color: var(--accent); }

/* ---------- Share buttons ---------- */
.share-row { display: flex; flex-wrap: wrap; gap: 10px; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: var(--radius-sm); background: var(--surface-3); color: var(--text); border: 1px solid var(--border-light); font-size: 14px; font-weight: 500; font-family: inherit; -webkit-appearance: none; appearance: none; cursor: pointer; transition: .2s; }
.share-btn:hover { transform: translateY(-2px); border-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 90px; padding: 54px 0 30px; background: var(--surface-2); position: relative; z-index: 1; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
.footer-tag { color: var(--text-muted); max-width: 320px; margin-top: 14px; font-size: 15px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--text-muted); font-size: 15px; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 13px; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 34px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--border); border: 0; margin: 28px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--surface-2); border-bottom: 1px solid var(--border);
    padding: 18px 20px 26px; transform: translateY(-120%); transition: transform .28s ease; z-index: 40;
  }
  .site-nav.open { transform: translateY(0); }
  .nav-link { padding: 12px 4px; font-size: 16px; border-bottom: 1px solid var(--border); }
  .nav-cta { margin: 12px 0 0; }
  .audit-form { flex-direction: column; }
  .audit-form .btn { width: 100%; }
}
@media (max-width: 560px) {
  .section { padding: 60px 0; }
  .hero { padding: 60px 0 50px; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .stats-strip { gap: 30px; }
  .footer-bottom { flex-direction: column; }
}
