/* ============================================================================
   ISP-ROCK Brand Theme — Obsidian, Crisp White & Metallic Gold
   Designed for zero-class semantic HTML output from render_site.pl
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Angkor&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg-obsidian:    #080808;
  --bg-surface:     #111111;
  --bg-elevated:    #181818;
  --border-subtle:  #272727;
  --border-gold:    rgba(223, 193, 110, 0.35);

  --text-primary:   #FFFFFF;
  --text-secondary: #D4D4D4;
  --text-muted:     #9A9A9A;

  --gold-dark:      #A67838;
  --gold-mid:       #DFC16E;
  --gold-bright:    #F4E48E;
  --gold-gradient:  linear-gradient(135deg, #A67838 0%, #DFC16E 50%, #F4E48E 100%);

  --font-display:   'Angkor', Georgia, serif;
  --font-sans:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:      'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --max-width:      1120px;
  --radius:         8px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-obsidian);
  background-image: radial-gradient(circle at 50% 0%, rgba(223, 193, 110, 0.08) 0%, transparent 55%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================================
   HEADER & PRIMARY NAVIGATION
   ============================================================================ */
header {
  background-color: rgba(8, 8, 8, 0.94);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

header nav > a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

header nav > a img {
  height: 44px;
  width: auto;
  display: block;
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
}

header nav ul a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.35rem 0.55rem;
  border-radius: 5px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

header nav ul a:hover {
  color: var(--gold-bright);
  background-color: var(--bg-elevated);
}

header nav ul a[aria-current="page"] {
  color: var(--bg-obsidian);
  background: var(--gold-gradient);
  font-weight: 700;
}

/* ============================================================================
   MAIN CONTAINER & HERO SECTION
   ============================================================================ */
main {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  flex: 1;
}

#hero {
  background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(17, 17, 17, 0.65) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 2.75rem 2.25rem;
  margin-bottom: 2.75rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
}

#hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.85rem, 3.6vw, 2.65rem);
  line-height: 1.22;
  letter-spacing: 0.02em;
  margin: 0 0 1.15rem;
  color: var(--text-primary);
}

#hero > p:first-of-type {
  font-size: 1.12rem;
  color: var(--text-secondary);
  max-width: 78ch;
  margin: 0 0 1.75rem;
}

/* Hero CTA Links Styled as Primary Gold & Secondary Outline Buttons */
#hero > p:last-of-type {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  color: transparent; /* Hides the literal '|' separator visually while keeping clean DOM */
  font-size: 0;
}

#hero > p:last-of-type a {
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.78rem 1.45rem;
  border-radius: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

#hero > p:last-of-type a:first-child {
  background: var(--gold-gradient);
  color: var(--bg-obsidian);
  box-shadow: 0 4px 18px rgba(223, 193, 110, 0.25);
}

#hero > p:last-of-type a:first-child:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(244, 228, 142, 0.38);
}

#hero > p:last-of-type a:last-child {
  background-color: var(--bg-elevated);
  color: var(--gold-bright);
  border: 1px solid var(--border-gold);
}

#hero > p:last-of-type a:last-child:hover {
  border-color: var(--gold-bright);
  background-color: #202020;
}

/* ============================================================================
   CONTENT SECTIONS, CARDS & TYPOGRAPHY
   ============================================================================ */
main > section:not(#hero) {
  margin-bottom: 3rem;
}

h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.55rem;
  letter-spacing: 0.02em;
  color: var(--gold-mid);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

h3 {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1.5rem 0 0.65rem;
}

p {
  color: var(--text-secondary);
  margin: 0 0 1rem;
}

a {
  color: var(--gold-mid);
}

a:hover {
  color: var(--gold-bright);
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background-color: var(--bg-elevated);
  color: var(--gold-bright);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

/* Article Grid Cards (e.g., #architecture, #migration-steps, #demo-options) */
section > article {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--gold-mid);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.15rem;
  transition: border-color 0.15s ease;
}

section > article:hover {
  border-color: var(--border-gold);
}

section > article h3 {
  margin-top: 0;
  color: var(--gold-bright);
}

section > article p:last-child {
  margin-bottom: 0;
}

/* Bullet Lists */
main ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: grid;
  gap: 0.75rem;
}

main ul li {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.9rem 1.15rem 0.9rem 2.1rem;
  position: relative;
  color: var(--text-secondary);
}

main ul li::before {
  content: "▸";
  position: absolute;
  left: 0.85rem;
  top: 0.88rem;
  color: var(--gold-mid);
  font-weight: 700;
}

main ul li strong {
  color: var(--text-primary);
}

/* ============================================================================
   DATA TABLES (Comparison, Pricing, Integrations)
   ============================================================================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.95rem;
}

thead {
  background-color: var(--bg-elevated);
  border-bottom: 2px solid var(--gold-dark);
}

th {
  text-align: left;
  padding: 0.9rem 1rem;
  color: var(--gold-bright);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: top;
}

tbody tr:hover {
  background-color: rgba(223, 193, 110, 0.04);
}

tbody tr:last-child td {
  border-bottom: none;
}

td strong {
  color: var(--text-primary);
}

/* Highlight ISP-ROCK column on /compare */
#comparison-matrix td:nth-child(2) {
  color: var(--gold-bright);
  background-color: rgba(223, 193, 110, 0.05);
  font-weight: 500;
}

/* ============================================================================
   FAQ ACCORDIONS (<details> / <summary>)
   ============================================================================ */
details {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  margin-bottom: 0.85rem;
  padding: 1rem 1.35rem;
  transition: border-color 0.15s ease;
}

details[open] {
  border-color: var(--border-gold);
}

summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.04rem;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  color: var(--gold-mid);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
}

details[open] summary::after {
  content: "−";
  color: var(--gold-bright);
}

details p {
  margin: 0.85rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* ============================================================================
   FOOTER
   ============================================================================ */
footer {
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

footer p {
  margin: 0.35rem 0;
  color: var(--text-muted);
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */
@media (max-width: 768px) {
  #hero {
    padding: 1.85rem 1.35rem;
  }

  table {
    display: block;
    overflow-x: auto;
  }

  header nav {
    flex-direction: column;
    align-items: flex-start;
  }
}
