/* Grand Welkin — system fonts only, light/dark via prefers-color-scheme. */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f6f8;
  --text: #18181b;
  --muted: #52525b;
  --accent: #312e81;        /* deep indigo */
  --accent-ink: #ffffff;
  --border: #e4e4e7;
  --card: #ffffff;
  --focus: #312e81;
  --maxw: 1100px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f14;
    --bg-soft: #16161d;
    --text: #ededf2;
    --muted: #a1a1aa;
    --accent: #a5b4fc;      /* lighter indigo for contrast on dark */
    --accent-ink: #0f0f14;
    --border: #26262e;
    --card: #15151c;
    --focus: #a5b4fc;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  overflow-wrap: break-word;
}

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(16px, 5vw, 40px); }
.narrow { max-width: 760px; }

a { color: var(--accent); }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 10;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.wordmark:hover { text-decoration: none; color: var(--accent); }
.wordmark-mark { display: inline-flex; color: var(--accent); }
.site-header nav a { color: var(--text); text-decoration: none; font-weight: 550; }
.site-header nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* Hero */
.hero { padding-block: clamp(48px, 10vw, 104px); max-width: 820px; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 0.5em; }
.lede { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--muted); margin: 0 0 1.6em; max-width: 46ch; }

.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  text-decoration: none; font-weight: 600; padding: 12px 22px; border-radius: 10px;
}
.btn:hover { opacity: 0.92; text-decoration: none; }

/* Sections */
.section { padding-block: clamp(36px, 7vw, 64px); border-top: 1px solid var(--border); }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); letter-spacing: -0.01em; margin: 0 0 1em; }
h3 { font-size: 1.12rem; margin: 0; }

/* Grids */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.card { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 10px; overflow-wrap: anywhere; transition: border-color .15s ease; }
.card p { margin: 0; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }

/* Category icon tile (placeholder art — swap for real icons later) */
.card-icon { width: 46px; height: 46px; border-radius: 12px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); margin-bottom: 2px; }
.card-icon svg { width: 24px; height: 24px; }
.card[data-accent="violet"] .card-icon { color: #7c3aed; background: color-mix(in srgb, #7c3aed 14%, transparent); }
@media (prefers-color-scheme: dark) { .card[data-accent="violet"] .card-icon { color: #a78bfa; background: color-mix(in srgb, #a78bfa 16%, transparent); } }

/* Live cards are clickable (whole card -> site in a new tab) */
.card-live { transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.card-live:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: 0 10px 30px -18px rgba(0,0,0,.45); transform: translateY(-2px); }
.card-live:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.card-link { color: var(--text); text-decoration: none; }
.card-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.card-link:focus-visible { outline: none; }  /* the whole card shows the focus ring (focus-within) */
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.relink { position: relative; z-index: 1; }  /* keep the support email clickable above the stretched link */
@media (prefers-reduced-motion: reduce) { .card, .card-live { transition: none; } .card-live:hover { transform: none; } }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 10px; flex-wrap: wrap; }
.card-meta { color: var(--muted); font-size: 0.9rem; }
.card-meta a { color: var(--muted); word-break: break-all; }
.visit { font-weight: 600; font-size: 0.95rem; color: var(--accent); margin-top: auto; }

.badge { flex: none; font-size: 0.74rem; font-weight: 650; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; }
.badge-live { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

.point { list-style: none; }
.point h3 { margin-bottom: 6px; }
.point p { margin: 0; color: var(--muted); }

/* Contact */
.copy-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 6px 0 14px; }
.email { font-weight: 600; font-size: 1.05rem; word-break: break-all; }
.copy-btn { font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; color: var(--text); background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: 7px 14px; }
.copy-btn:hover { border-color: var(--accent); }
.copy-btn[data-copied="true"] { color: var(--accent); border-color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding-block: 28px; margin-top: 8px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); }
.footer-inner p { margin: 0; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--accent); }
