/* ========== Tech2Trust theme (v2) ========== */

/* Root palette */
:root {
  --primary-50:  #effcf6;
  --primary-100: #d9f7e9;
  --primary-200: #b3efcf;
  --primary-300: #84e2b3;
  --primary-400: #4fd392;
  --primary-500: #22c274; /* primary green */
  --primary-600: #17a960;
  --primary-700: #128a4f;
  --primary-800: #0f6c40;
  --primary-900: #0b4f2f;

  --accent-500:  #1e90ff; /* secondary blue */

  --bg:          #ffffff;
  --bg-soft:     #f6f7f8;
  --surface:     #ffffff;
  --surface-alt: #f1f3f5;
  --text:        #0e1116;
  --muted:       #5b626f;
  --border:      #e6e8eb;
  --shadow:      0 6px 16px rgba(2, 6, 12, 0.08);

  --radius: 12px;
  --radius-sm: 8px;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #0f1115;
    --bg-soft:     #12151b;
    --surface:     #141821;
    --surface-alt: #181d27;
    --text:        #e6eaf2;
    --muted:       #a2aabc;
    --border:      #2b3240;
    --shadow:      0 8px 20px rgba(0,0,0,0.45);
  }
}

/* Reset-ish */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Typography */
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 2.4vw + 1rem, 2.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 1.6vw + .9rem, 1.8rem); }
h3 { font-size: 1.15rem; }
p  { margin: .5rem 0; }
.lede { font-size: 1.075rem; color: var(--muted); max-width: 65ch; }

/* Layout helpers */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.section { padding: 3rem 0; }
.section.soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* Accessibility */
.visually-hidden { position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; }
.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: fixed; left: 16px; top: 16px; width: auto; height: auto;
  padding: .5rem .75rem; background: var(--primary-600); color: #fff; border-radius: 6px; z-index: 9999;
}

/* Header & nav */
.site-header {
  position: sticky; top: 0; z-index: 999;
  background: linear-gradient(0deg, rgba(0,0,0,.0), rgba(0,0,0,.03)), var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(120%) blur(6px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding: .85rem 20px; }
.brand {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--text); font-weight: 700; letter-spacing: .2px;
}
.brand .logo { width: 28px; height: 28px; border-radius: 6px; display: inline-block; }
.brand .wordmark { font-size: 1.05rem; font-weight: 700; letter-spacing: .2px; }
.site-nav a {
  color: var(--text); text-decoration: none; margin-left: 1rem; opacity: .85; font-weight: 600;
}
.site-nav a:hover, .site-nav a:focus { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

/* Hero */
.hero {
  padding: 4.5rem 0 3rem;
  background:
    radial-gradient(800px 400px at 10% 0%, var(--primary-100), transparent 60%),
    radial-gradient(800px 400px at 90% 0%, rgba(30,144,255,.18), transparent 60%);
}
.hero .actions { margin-top: 1.1rem; display:flex; gap:.75rem; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-block; padding: .65rem 1rem; border-radius: 10px;
  font-weight: 700; text-decoration: none; border: 1px solid transparent; transition: transform .08s ease;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary-600); color: #fff; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost   { color: var(--text); background: transparent; border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-alt); }

/* Cards */
.card-grid {
  display:grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-top: 1rem;
}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(2,6,12,.12); }
.card h3 { margin: 0; font-size: 1.1rem; }
.card p { color: var(--muted); }
.card a { color: var(--accent-500); text-decoration: none; }
.card a:hover { text-decoration: underline; }

/* Badges / muted */
.badge {
  display:inline-block; font-size:.75rem; line-height:1; padding:.35rem .5rem; border-radius:999px;
  background: var(--primary-100); color: var(--primary-800); border:1px solid var(--primary-200);
}

/* Details (accordions) */
details { margin: .75rem 0 1rem; }
details > summary {
  list-style: none; cursor: pointer; user-select: none;
  padding: .75rem .9rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-weight: 700; color: var(--text);
  display:flex; align-items:center; gap:.5rem;
}
details > summary::before { content: "▸"; transition: transform .2s ease; color: var(--primary-700); }
details[open] > summary::before { transform: rotate(90deg); }
details > div {
  margin-top: .6rem; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
}

/* Code blocks */
pre, code { font-family: var(--font-mono); }
pre {
  background: var(--surface-alt); color: var(--text); padding: 1rem; border-radius: var(--radius-sm);
  overflow-x: auto; border: 1px solid var(--border); position: relative;
}
pre code { white-space: pre; }
.copy-btn {
  position: absolute; right: .5rem; top: .5rem; font-size: .75rem; padding: .25rem .5rem;
  border-radius: 6px; border: 1px solid var(--border); background: var(--surface);
  cursor: pointer;
}
.copy-btn:hover { background: var(--bg-soft); }

/* Footer */
.site-footer { margin-top: 2rem; background: var(--surface); border-top: 1px solid var(--border); }
.site-footer .wrap { padding: 1.25rem 20px; color: var(--muted); text-align: center; }

/* Links */
a { color: var(--accent-500); }
a:hover { text-decoration: underline; }
