/*
  Digital Horizon Software LLC – Front page styles (reset)
  - CSS variables with light/dark themes
  - Fluid, responsive layout
  - Accessible focus, reduced motion
*/

:root {
  --bg: #0b1526;
  --bg-elev: #101c33;
  --text: #e8edf6;
  --muted: #b9c2d3;
  --primary: #4ea1ff;
  --primary-contrast: #06101f;
  --accent: #71f3cc;
  --card: #0f1a2e;
  --border: #21314f;
  --shadow: 0 10px 30px rgba(0,0,0,.25);
  /* Brand sizing: larger logo without scaling to avoid clipping */
  --brand-h: 84px;
  --brand-scale: 1;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8fafc;
    --bg-elev: #ffffff;
    --text: #0b1526;
    --muted: #384862;
    --card: #ffffff;
    --border: #e5eaf1;
    --shadow: 0 8px 24px rgba(0,0,0,.08);
  }
}

@media (min-width: 840px) {
  :root { --brand-h: 128px; --brand-scale: 1; }
}
@media (min-width: 1200px) {
  :root { --brand-h: 148px; --brand-scale: 1; }
}

/* Small phones: keep header compact but readable */
@media (max-width: 420px) {
  :root { --brand-h: 78px; --brand-scale: 1; }
  .header-inner { padding: .5rem 0; }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 600px at 20% -10%, #142342 10%, transparent 60%) no-repeat, var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus { left: 1rem; top: 1rem; width: auto; height: auto; background: var(--primary); color: var(--primary-contrast); padding: .5rem .75rem; border-radius: .5rem; }

/* Header */
.site-header { position: sticky; top: 0; backdrop-filter: saturate(120%) blur(8px); background: color-mix(in oklab, var(--bg), transparent 30%); border-bottom: 1px solid var(--border); z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: inherit; height: var(--brand-h); overflow: hidden; padding-inline: .5rem; padding-block: .15rem; }
.brand img { height: 100%; width: auto; display: block; transform: scale(var(--brand-scale)); transform-origin: center; }
@media (min-width: 840px) { 
  .header-inner { padding: 1.25rem 0; }
  .brand { padding-inline: .75rem; padding-block: .2rem; }
}
@media (min-width: 1200px) { }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .75rem; }
.site-nav a { text-decoration: none; color: var(--text); padding: .5rem .75rem; border-radius: .5rem; }
.site-nav a:hover { background: color-mix(in oklab, var(--card), transparent 40%); }

.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .65rem .9rem; border-radius: .65rem; text-decoration: none; font-weight: 600; }
.btn-primary { background: linear-gradient(135deg, var(--primary), #6ac8ff); color: var(--primary-contrast); box-shadow: var(--shadow); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: color-mix(in oklab, var(--card), transparent 40%); }

.nav-toggle { display: none; background: transparent; border: 1px solid var(--border); border-radius: .5rem; padding: .5rem; }
.nav-toggle-bar { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  /* Fully hide the menu when closed; reveal below the header when open */
  .site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    transition: transform .25s ease, opacity .25s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    z-index: 15; /* keep under header (z-index: 20) */
  }
  .site-nav.open {
    top: calc(var(--brand-h) + 2.25rem);
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    max-height: 80vh;
    overflow: auto;
  }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: .5rem; }
  .site-nav a, .site-nav .btn { width: 100%; justify-content: center; }
}

/* Very small screens: adjust the menu drop offset to the tighter header */
@media (max-width: 420px) {
  .site-nav.open { top: calc(var(--brand-h) + 1.25rem); }
}

/* Hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0; background: radial-gradient(800px 400px at 80% 0%, #12203e 5%, transparent 60%) no-repeat; }
.hero-inner { display: grid; gap: 1rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.2; margin: 0; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--muted); max-width: 70ch; }
.hero-ctas { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .25rem; }

/* Sections */
.section { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.section.alt { background: color-mix(in oklab, var(--card), transparent 55%); border-block: 1px solid var(--border); }
.section-header { display: grid; gap: .5rem; margin-bottom: 1.25rem; }
.section-header h2 { margin: 0; font-size: clamp(1.5rem, 3.2vw, 2rem); }
.section-header p { color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 980px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 1rem; padding: 1rem; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card ul { margin: .25rem 0 0; padding-left: 1.1rem; color: var(--muted); }

.placeholder-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
@media (max-width: 840px) { .placeholder-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .placeholder-grid { grid-template-columns: 1fr; } }
.placeholder { background: repeating-linear-gradient(135deg, color-mix(in oklab, var(--card), transparent 20%), color-mix(in oklab, var(--card), transparent 20%) 8px, color-mix(in oklab, var(--card), transparent 40%) 8px, color-mix(in oklab, var(--card), transparent 40%) 16px); border: 1px dashed var(--border); border-radius: .75rem; padding: 2rem; color: var(--muted); text-align: center; }

.about { display: grid; gap: 1rem; }
.about-text p { margin-top: 0; }

.cta { text-align: center; }
.cta .note { margin-left: .5rem; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-elev); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; }
.site-footer ul { list-style: none; display: flex; gap: .75rem; margin: 0; padding: 0; }
.site-footer a { color: var(--muted); text-decoration: none; padding: .25rem .5rem; border-radius: .5rem; }
.site-footer a:hover { color: var(--text); }
.badge { display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .5rem; border-radius: .5rem; background: color-mix(in oklab, var(--card), transparent 30%); color: var(--muted); border: 1px dashed var(--border); }

/* Footer: stack nicely on mobile */
@media (max-width: 640px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .site-footer ul { flex-wrap: wrap; justify-content: center; }
}

/* Focus & motion */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: .25rem; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
