/* Palette: onyx black (from the KDAE logo) + gold accents on warm ivory.
   Text contrast checked to WCAG AA: gold-text on ivory 4.97:1, gold on onyx 8.2:1. */
:root {
  --onyx: #0b0b0c;
  --onyx-2: #17171a;
  --ink: #1c1917;
  --stone: #57534e;
  --line: #e7dfcc;
  --ivory: #fffdf8;
  --ivory-2: #f7f3ea;
  --gold: #c9a24b;
  --gold-light: #e2c275;
  --gold-text: #8a6a1c;
  --gold-tint: #f4ecd8;
  --on-dark: #d6d3d1;
  --on-dark-muted: #a8a29e;
  --radius: 6px;
  --max: 1100px;
  --serif: Georgia, "Times New Roman", serif;
  font-size: 16px;
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
}

a { color: var(--gold-text); text-underline-offset: 3px; }
a:hover { color: var(--onyx); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

h1, h2, h3, .brand { font-family: var(--serif); font-weight: 400; }
h1, h2, h3 { line-height: 1.2; color: var(--onyx); letter-spacing: 0.01em; }
h1 { font-size: 2.1rem; margin: 0 0 1rem; }
h2 { font-size: 1.75rem; margin: 2.5rem 0 1rem; }
h2::after { content: ""; display: block; width: 48px; height: 2px; background: var(--gold); margin-top: 0.75rem; }
h3 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

/* Skip link */
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--ivory); padding: 0.5rem 1rem; z-index: 10; }

/* Header / nav */
.site-header { background: var(--onyx); color: var(--ivory); border-bottom: 1px solid rgba(201, 162, 75, 0.45); }
.site-header .container {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding-top: 0.9rem; padding-bottom: 0.9rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  color: var(--ivory); text-decoration: none; font-size: 1.05rem; letter-spacing: 0.14em;
}
.brand:hover { color: var(--gold-light); }
.brand img { display: block; }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.nav a {
  color: var(--on-dark); text-decoration: none; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.12em; padding: 0.25rem 0; border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--gold-light); }
.nav a[aria-current="page"] { color: var(--gold-light); border-bottom-color: var(--gold); }

/* Hero */
.hero {
  background:
    radial-gradient(ellipse at 85% 10%, rgba(201, 162, 75, 0.18), transparent 55%),
    linear-gradient(170deg, var(--onyx), var(--onyx-2));
  color: var(--on-dark); padding: 4.5rem 0 5rem; border-bottom: 1px solid rgba(201, 162, 75, 0.45);
}
.hero h1 { color: var(--ivory); font-size: 2.4rem; letter-spacing: 0.04em; }
.hero p { max-width: 640px; font-size: 1.1rem; }
.hero-logo { width: 120px; height: auto; margin-bottom: 1.75rem; box-shadow: 0 0 0 1px rgba(201, 162, 75, 0.6), 0 12px 40px rgba(0, 0, 0, 0.5); }
.tagline {
  font-family: var(--serif); letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-light); font-size: 0.85rem; margin: 0 0 0.75rem;
}

/* Buttons */
.btn {
  display: inline-block; padding: 0.75rem 1.4rem; border-radius: var(--radius);
  background: var(--gold); color: var(--onyx); text-decoration: none; font-weight: 600;
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em;
  border: 1px solid var(--gold); transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--onyx); }
.btn-outline { background: transparent; color: var(--gold-light); border-color: var(--gold); }
.btn-outline:hover { background: rgba(201, 162, 75, 0.12); color: var(--ivory); border-color: var(--gold-light); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* Sections */
main { padding-bottom: 3rem; }
.section { padding: 3.5rem 0; }
.section-alt { background: var(--ivory-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lead { color: var(--stone); max-width: 680px; }

/* Cards */
.grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; margin-top: 1.75rem; }
.card {
  background: #fff; border: 1px solid var(--line); border-top: 2px solid var(--gold); border-radius: var(--radius);
  padding: 1.6rem; display: flex; flex-direction: column; gap: 0.6rem;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: 0 10px 30px rgba(28, 25, 23, 0.08); transform: translateY(-2px); }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--stone); }
.card .links { margin-top: auto; padding-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; font-size: 0.95rem; }
.card-img { width: 100%; height: auto; border-radius: calc(var(--radius) - 2px); display: block; }
.badge {
  align-self: flex-start; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  background: var(--gold-tint); color: #6b5216; padding: 0.25rem 0.65rem; border-radius: 999px;
}
.badge-muted { background: var(--ivory-2); color: var(--stone); border: 1px solid var(--line); }

/* Legal / document pages */
.doc { max-width: 760px; padding-top: 3rem; }
.doc .meta { color: var(--stone); font-size: 0.95rem; }
.doc ul, .doc ol { padding-left: 1.25rem; }
.doc li { margin-bottom: 0.35rem; }
.note {
  background: var(--ivory-2); border-left: 3px solid var(--gold); padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0;
}
table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem; background: #fff; }
th, td { text-align: left; padding: 0.65rem; border: 1px solid var(--line); vertical-align: top; }
th { background: var(--ivory-2); font-family: var(--serif); font-weight: 400; }
.table-wrap { overflow-x: auto; }

/* Footer */
.site-footer { background: var(--onyx); color: var(--on-dark); padding: 3rem 0; font-size: 0.95rem; border-top: 2px solid var(--gold); }
.site-footer a { color: var(--ivory); }
.site-footer a:hover { color: var(--gold-light); }
.site-footer .container { display: grid; gap: 1.5rem; }
.site-footer address { font-style: normal; }
.site-footer .legal-name { color: var(--gold-light); font-family: var(--serif); letter-spacing: 0.14em; font-size: 1.05rem; margin-top: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.copyright { color: var(--on-dark-muted); font-size: 0.85rem; margin: 0; }
.bir-seal { margin: 0; background: #fff; padding: 0.5rem; border-radius: var(--radius); max-width: 300px; box-shadow: 0 0 0 1px rgba(201, 162, 75, 0.5); }
.bir-seal img { width: 100%; height: auto; display: block; }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 2.6rem; }
  .hero h1 { font-size: 3.2rem; }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .site-footer .container { grid-template-columns: 2fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .btn { transition: none; }
  .card:hover { transform: none; }
}

/* Studio (Ube Maester Labs) intro */
.studio { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; margin-top: 1rem; }
.studio img { width: 140px; height: auto; flex: none; }
.studio > div, .studio > p { flex: 1 1 320px; }
.studio h1 { margin-bottom: 0.75rem; }
.tagline-dark { color: var(--gold-text); }
