/* =========================================================
   BrandScan — main.css
   Dark editorial-forensic. Fraunces display + IBM Plex body/mono.
   ========================================================= */

:root {
  --bg: #0a0a0b;
  --bg-2: #101015;
  --surface: #15151a;
  --surface-2: #1c1c22;
  --surface-3: #24242c;
  --border: #2a2a32;
  --border-2: #3a3a44;
  --text: #f0ede4;
  --text-2: #c9c6bc;
  --muted: #888892;
  --muted-2: #5a5a64;
  --amber: #e8b04a;
  --amber-2: #c89236;
  --red: #ff6b5b;
  --green: #7adb9b;
  --blue: #6db4f0;
  --purple: #b78fe8;

  --display: 'Fraunces', 'Georgia', serif;
  --body: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;

  --r: 4px;
  --maxw: 1280px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(ellipse 800px 400px at 50% -10%, rgba(232, 176, 74, 0.06), transparent 60%),
    radial-gradient(ellipse 600px 300px at 90% 10%, rgba(109, 180, 240, 0.04), transparent 60%);
  background-attachment: fixed;
}

/* === Typography === */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 0;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em 0;
  color: var(--text);
}
h1 { font-size: clamp(2.5rem, 5vw, 4.2rem); line-height: 1.02; font-weight: 350; }
h1 em { font-style: italic; font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1; color: var(--amber); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.1; }
h3 { font-size: 1.3rem; line-height: 1.2; }
h4 { font-size: 1.05rem; }
p  { margin: 0 0 1em 0; }
a  { color: var(--amber); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s; }
a:hover { border-bottom-color: var(--amber); }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
.muted { color: var(--muted); }
.dim { color: var(--text-2); }
.small-caps { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 600; }

/* === Layout === */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.site-main { min-height: 70vh; padding: 0 0 80px 0; }
hr.rule { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }

/* === Header === */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: saturate(140%) blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: baseline; gap: 8px; color: var(--text); border: 0; }
.brand:hover { border: 0; }
.brand-mark { color: var(--amber); font-size: 1.4rem; line-height: 1; }
.brand-name { font-family: var(--display); font-size: 1.35rem; font-weight: 500; letter-spacing: -0.02em; }
.brand-tag { color: var(--muted); font-size: 0.8rem; font-family: var(--mono); }
@media (max-width: 700px) { .brand-tag { display: none; } }

.nav { display: flex; gap: 4px; }
.nav-link {
  color: var(--text-2); padding: 8px 14px; border-radius: var(--r);
  font-size: 0.88rem; border: 0; transition: all .15s;
}
.nav-link:hover { color: var(--amber); background: var(--surface); border: 0; }

/* === Footer === */
.site-footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 30px 0; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.foot-mark { color: var(--amber); }
.foot-name { font-family: var(--display); margin: 0 8px; }
.foot-meta { font-family: var(--mono); font-size: 0.8rem; }

/* === Buttons & inputs === */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 12px 22px;
  background: var(--amber); color: #1a1a1f; border: 1px solid var(--amber);
  font-family: var(--body); font-weight: 600; font-size: 0.92rem;
  border-radius: var(--r); transition: all .15s;
  letter-spacing: 0.01em;
}
.btn:hover { background: var(--amber-2); border-color: var(--amber-2); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-2); }
.btn-ghost:hover { background: var(--surface); border-color: var(--amber); color: var(--amber); }
.btn-sm { padding: 7px 13px; font-size: 0.82rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.input, .textarea, .select {
  width: 100%; padding: 12px 16px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r);
  font-family: var(--body); font-size: 0.95rem;
  transition: border-color .15s, background .15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--amber); background: var(--bg-2);
}
.input.mono { font-family: var(--mono); font-size: 1.1rem; letter-spacing: 0.02em; }

label { display: block; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; font-weight: 600; }

/* === Hero === */
.hero { padding: 80px 0 60px; }
.hero h1 { max-width: 14ch; margin-bottom: 24px; }
.hero p.lead { font-size: 1.15rem; color: var(--text-2); max-width: 56ch; margin-bottom: 40px; }

.search-form {
  display: grid; grid-template-columns: 1fr auto; gap: 12px;
  max-width: 720px; margin-bottom: 16px;
}
.search-form .input { font-size: 1.15rem; padding: 18px 22px; }
.search-form .btn { padding: 18px 32px; font-size: 1rem; }
@media (max-width: 600px) { .search-form { grid-template-columns: 1fr; } }

.hero .meta-row {
  display: flex; gap: 30px; flex-wrap: wrap;
  font-size: 0.82rem; color: var(--muted); font-family: var(--mono);
  border-top: 1px dashed var(--border); padding-top: 20px; margin-top: 30px;
}
.hero .meta-row span b { color: var(--amber); font-weight: 500; }

/* === Cards & sections === */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 24px;
}
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.card-head h3 { margin: 0; }
.card-head .small-caps { color: var(--amber); }

.section-label { color: var(--amber); font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.section-label::before { content: "●"; }

/* === Score display === */
.score-grid {
  display: grid; grid-template-columns: 1.5fr repeat(5, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden;
}
.score-cell { background: var(--surface); padding: 22px 18px; text-align: center; }
.score-cell.big { text-align: left; padding: 26px; }
.score-cell .lab { display: block; font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 6px; }
.score-cell .val {
  font-family: var(--display); font-size: 2.4rem; font-weight: 350; line-height: 1;
  font-variation-settings: 'opsz' 144;
}
.score-cell.big .val { font-size: 4rem; color: var(--amber); }
.score-cell .val sub { font-size: 0.9rem; color: var(--muted); font-family: var(--mono); margin-left: 4px; }
@media (max-width: 800px) {
  .score-grid { grid-template-columns: repeat(2, 1fr); }
  .score-cell.big { grid-column: span 2; text-align: center; }
}

.score-pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 600;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border-2);
}
.score-pill.good { background: rgba(122, 219, 155, 0.12); color: var(--green); border-color: rgba(122, 219, 155, 0.3); }
.score-pill.warn { background: rgba(232, 176, 74, 0.12); color: var(--amber); border-color: rgba(232, 176, 74, 0.3); }
.score-pill.bad  { background: rgba(255, 107, 91, 0.12); color: var(--red); border-color: rgba(255, 107, 91, 0.3); }
.score-pill.neutral { background: var(--surface-2); }

/* === Domain headline === */
.domain-headline {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border); padding-bottom: 24px; margin-bottom: 28px;
}
.domain-headline .domain-name {
  font-family: var(--display); font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 350; letter-spacing: -0.02em; line-height: 1;
}
.domain-headline .domain-name em { font-style: italic; color: var(--amber); font-variation-settings: 'opsz' 144, 'WONK' 1; }
.domain-headline .meta { color: var(--muted); font-family: var(--mono); font-size: 0.85rem; }
.domain-headline .availability {
  margin-left: auto;
}

/* === Tables === */
table.data {
  width: 100%; border-collapse: collapse; font-size: 0.9rem;
}
table.data th, table.data td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
table.data th { color: var(--muted); font-weight: 500; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; background: var(--bg-2); }
table.data tr:hover td { background: var(--surface-2); }
table.data td.mono { font-family: var(--mono); font-size: 0.85rem; }
table.data tr.highlight td { background: rgba(232, 176, 74, 0.06); }

/* === Multi-TLD grid === */
.tld-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px;
}
.tld-cell {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px; text-align: center;
  transition: all .15s;
}
.tld-cell.available { border-color: rgba(122, 219, 155, 0.4); background: rgba(122, 219, 155, 0.04); }
.tld-cell.taken { opacity: 0.55; }
.tld-cell .tld { font-family: var(--display); font-size: 1.4rem; line-height: 1; }
.tld-cell .full { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); margin: 4px 0 8px; }
.tld-cell .price { font-family: var(--mono); font-size: 0.82rem; color: var(--amber); font-weight: 600; }
.tld-cell.available .status { color: var(--green); }
.tld-cell.taken .status { color: var(--muted); }

/* === Lists === */
ul.bullets { margin: 0; padding: 0; list-style: none; }
ul.bullets li { padding: 8px 0 8px 24px; position: relative; border-bottom: 1px dashed var(--border); }
ul.bullets li:last-child { border-bottom: none; }
ul.bullets li::before { content: "▸"; position: absolute; left: 0; color: var(--amber); }
ul.bullets.weak li::before { content: "▾"; color: var(--red); }
ul.bullets.strong li::before { content: "▴"; color: var(--green); }

/* === Language meanings table === */
.semantic-table {
  display: grid; grid-template-columns: 60px 1fr 1fr; gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden;
  font-size: 0.88rem;
}
.semantic-table > div { background: var(--surface); padding: 10px 14px; }
.semantic-table .lang { font-family: var(--mono); font-weight: 600; color: var(--muted); }
.semantic-table .interp { color: var(--text-2); }
.semantic-table .row.issue > div { background: rgba(255, 107, 91, 0.07); }
.semantic-table .row.issue .lang { color: var(--red); }

/* === Loading === */
.loader {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 0.88rem; color: var(--muted);
}
.loader .dot {
  width: 8px; height: 8px; background: var(--amber); border-radius: 50%;
  animation: dot 1.4s infinite ease-in-out both;
}
.loader .dot:nth-child(1) { animation-delay: -0.32s; }
.loader .dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes dot { 0%, 80%, 100% { transform: scale(0); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }

.skeleton {
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite linear;
  border-radius: var(--r); height: 16px; margin: 6px 0;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* === Stage indicator === */
.stages { display: flex; flex-direction: column; gap: 10px; margin: 30px 0; }
.stage {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); font-size: 0.92rem;
  transition: all .25s;
}
.stage .ico { width: 22px; text-align: center; color: var(--muted); }
.stage.running { border-color: var(--amber); }
.stage.running .ico { color: var(--amber); animation: pulse 1.2s infinite; }
.stage.done .ico { color: var(--green); }
.stage.error .ico { color: var(--red); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* === Tabs === */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin: 30px 0 24px; flex-wrap: wrap; }
.tab {
  padding: 10px 18px; background: transparent; border: 0;
  color: var(--muted); cursor: pointer; font-family: var(--body); font-size: 0.9rem;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all .15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--amber); border-bottom-color: var(--amber); }

/* === Verdict box === */
.verdict {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border-2);
  border-left: 3px solid var(--amber);
  border-radius: var(--r);
  padding: 28px 32px; margin: 24px 0;
}
.verdict .label { font-family: var(--mono); font-size: 0.75rem; color: var(--amber); text-transform: uppercase; letter-spacing: 0.16em; }
.verdict h3 { font-style: italic; font-variation-settings: 'opsz' 144, 'SOFT' 50, 'WONK' 1; margin: 8px 0 14px; font-size: 1.6rem; line-height: 1.2; }
.verdict p { color: var(--text-2); font-size: 1.02rem; line-height: 1.6; }

/* === Compare grid === */
.compare-grid {
  display: grid; gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden;
}
.compare-grid .col { background: var(--surface); padding: 0; }
.compare-grid .col-head {
  background: var(--bg-2); padding: 22px 20px; border-bottom: 1px solid var(--border);
}
.compare-grid .col.winner .col-head { background: rgba(232, 176, 74, 0.08); border-bottom-color: var(--amber); }
.compare-grid .row {
  display: grid; padding: 14px 20px; border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.compare-grid .row .lab { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 4px; }

/* === Notice / warning === */
.notice { padding: 14px 18px; border-radius: var(--r); border: 1px solid; margin: 16px 0; font-size: 0.92rem; }
.notice.info { background: rgba(109, 180, 240, 0.06); border-color: rgba(109, 180, 240, 0.3); color: var(--blue); }
.notice.warn { background: rgba(232, 176, 74, 0.06); border-color: rgba(232, 176, 74, 0.3); color: var(--amber); }
.notice.error { background: rgba(255, 107, 91, 0.06); border-color: rgba(255, 107, 91, 0.3); color: var(--red); }
.notice.success { background: rgba(122, 219, 155, 0.06); border-color: rgba(122, 219, 155, 0.3); color: var(--green); }

/* === Decorative grain === */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  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.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.85 0 0 0 0 0.7 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.5; mix-blend-mode: overlay;
}

/* === Utility === */
.flex { display: flex; }
.flex.gap { gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 800px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.hidden { display: none !important; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; }
