/* Elmara Technologies Inc. - site stylesheet.
   All styling lives here so the pages work under a CSP of default-src 'self'. */

:root {
  --bg: #ffffff;
  --surface: #f4f6f8;
  --text: #17202b;
  --muted: #4b5664;
  --border: #d6dce2;
  --accent: #1d5a85;
  --accent-hover: #144466;
  --on-accent: #ffffff;
  --grid: rgba(23, 32, 43, 0.045);
  --notice-bg: #eef4f9;
  --error: #9b2c2c;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --radius: 6px;
  --measure: 68ch;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1318;
    --surface: #151c23;
    --text: #e5e9ee;
    --muted: #a7b1bd;
    --border: #2c3641;
    --accent: #82bce6;
    --accent-hover: #acd3f1;
    --on-accent: #0e1318;
    --grid: rgba(229, 233, 238, 0.045);
    --notice-bg: #142230;
    --error: #f2a0a0;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem);
  font-weight: 650;
}

h2 {
  font-size: clamp(1.35rem, 1.2rem + 0.7vw, 1.7rem);
  font-weight: 620;
}

h3 {
  font-size: 1.125rem;
  font-weight: 620;
}

p,
ul,
ol,
dl {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

address {
  font-style: normal;
}

/* Layout */

.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 40rem) {
  .container {
    padding: 0 1.5rem;
  }
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
  color: var(--on-accent);
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
}

.brand-mark .mark-bg {
  fill: var(--accent);
}

.brand-mark .mark-fg {
  fill: var(--bg);
}

.brand-sub {
  font-weight: 450;
  color: var(--muted);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-block;
  padding: 0.35rem 0;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--text);
  border-bottom-color: var(--border);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* Hero and page heads */

.hero,
.page-head {
  border-bottom: 1px solid var(--border);
  background-color: var(--surface);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 2rem 2rem;
  background-position: -1px -1px;
}

.hero {
  padding: clamp(3rem, 2rem + 5vw, 6rem) 0;
}

.page-head {
  padding: clamp(2.25rem, 1.75rem + 3vw, 3.75rem) 0;
}

.page-head h1,
.hero h1 {
  max-width: 22ch;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  max-width: 62ch;
  font-size: 1.1875rem;
  color: var(--muted);
  margin-bottom: 0;
}

.hero .lead {
  margin-bottom: 2rem;
}

.meta {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Buttons */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
}

.button {
  display: inline-block;
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
}

.button-secondary {
  background: transparent;
  color: var(--accent);
}

.button-secondary:hover {
  background: transparent;
  color: var(--accent-hover);
}

/* Sections */

.section {
  padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-intro {
  max-width: var(--measure);
  color: var(--muted);
  margin-bottom: 2rem;
}

.group-title {
  margin: 2.25rem 0 1rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.group-title:first-of-type {
  margin-top: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg);
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card p + p {
  margin-top: 0.75rem;
}

.columns {
  display: grid;
  gap: 2rem;
}

@media (min-width: 52rem) {
  .columns {
    grid-template-columns: repeat(3, 1fr);
  }

  .columns-2 {
    grid-template-columns: 3fr 2fr;
    gap: 3rem;
  }
}

.columns p {
  color: var(--muted);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.cta h2 {
  margin-bottom: 0.35rem;
}

.cta p {
  margin: 0;
  color: var(--muted);
}

/* Prose (about, support, legal pages) */

.prose {
  max-width: var(--measure);
}

.prose h2 {
  margin-top: 2.25rem;
  padding-top: 0.25rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 1.5rem;
}

.prose ul,
.prose ol {
  padding-left: 1.4rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.toc {
  margin: 0 0 2.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.toc h2 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.4rem;
  columns: 2 14rem;
  column-gap: 2rem;
}

.toc li {
  margin-bottom: 0.25rem;
}

.details {
  display: grid;
  grid-template-columns: minmax(8rem, max-content) 1fr;
  gap: 0.6rem 1.5rem;
  margin: 0;
}

.details dt {
  color: var(--muted);
  font-weight: 500;
}

.details dd {
  margin: 0;
}

@media (max-width: 30rem) {
  .details {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .details dd {
    margin-bottom: 0.75rem;
  }
}

.panel {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel h2 {
  font-size: 1.125rem;
}

.panel h2 + .details,
.panel h2 + p {
  margin-top: 0;
}

.panel + .panel {
  margin-top: 1rem;
}

.notice {
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--notice-bg);
}

.notice p:last-child {
  margin-bottom: 0;
}

/* Forms */

.form {
  max-width: 40rem;
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.optional {
  color: var(--muted);
  font-weight: 400;
}

.hint {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

input[type="text"],
input[type="email"],
select,
textarea {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  line-height: 1.4;
}

textarea {
  min-height: 10rem;
  resize: vertical;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.form-note {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Honeypot field: kept out of view and out of the tab order. */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Status pages (404, form result) */

.status {
  padding: clamp(3rem, 2rem + 5vw, 6rem) 0;
}

.status .lead {
  margin-bottom: 1.75rem;
}

.status-code {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status .group-title {
  margin-top: 3rem;
}

.status-list {
  margin: 0;
  padding-left: 1.4rem;
}

.status-list li {
  margin-bottom: 0.35rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-legal {
  margin: 0;
}

@media print {
  .site-nav,
  .skip-link,
  .actions,
  .cta {
    display: none;
  }

  .hero,
  .page-head {
    background: none;
  }
}
