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

:root {
  --ink: #16181D;
  --body: #3B3F48;
  --muted: #4A4F5A;
  --label: #5A5F6B;
  --ground: #F7F7F5;
  --card: #FAFAF8;
  --line: #E4E4E0;
  --accent: #1D4ED8;
  --accent-dark: #1E3A8A;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--ground);
  line-height: 1.5;
}

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

h1, h2, h3 { letter-spacing: -0.015em; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 20px; }
.brand:hover { color: var(--ink); }
.nav { display: flex; flex-wrap: wrap; gap: 8px; }
.nav a { padding: 12px 14px; color: var(--body); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--ink); }

/* Hero */
.hero { padding-top: 96px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 24px; }
.eyebrow { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.hero h1 { margin: 0; font-size: clamp(2.5rem, 6vw, 4.25rem); line-height: 1.05; max-width: 820px; }
.lead { margin: 0; font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 640px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }

.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-secondary { background: #fff; border: 1px solid #D4D4CF; color: var(--ink); }
.btn-secondary:hover { color: var(--ink); border-color: #A9A9A3; }
.btn-light { background: #fff; color: var(--ink); align-self: flex-start; }
.btn-light:hover { color: var(--ink); background: #E9E9E6; }

/* Sections */
.section { padding-top: 80px; padding-bottom: 80px; }
.band { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; }
.section h2 { margin: 0; font-size: 36px; }
.section-head p { margin: 0; font-size: 17px; color: var(--muted); }

/* Apps */
.app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.app-card { display: flex; flex-direction: column; gap: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.app-card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); flex-grow: 1; }
.app-icon { width: 64px; height: 64px; border-radius: 14px; display: block; }
.tile { display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; }
.tile-headland { background: #E3EBD8; color: #3E5226; }
.tile-ilmarath { background: #E8E0EE; color: #4A3B58; }
.app-title { display: flex; flex-direction: column; gap: 8px; }
.app-title h3 { margin: 0; font-size: 22px; }
.chip { align-self: flex-start; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.chip-live { background: #DCFCE7; color: #166534; }
.chip-test { background: #FEF3C7; color: #92400E; }
.chip-dev { background: #E5E7EB; color: #374151; }
.links { display: flex; flex-wrap: wrap; gap: 16px; font-size: 15px; font-weight: 600; }

/* About */
.about { display: flex; flex-direction: column; gap: 24px; }
.facts { max-width: 720px; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.facts div { display: flex; flex-direction: column; gap: 6px; }
.facts dt { font-size: 13px; font-weight: 600; color: var(--label); text-transform: uppercase; letter-spacing: 0.06em; }
.facts dd { margin: 0; font-size: 16px; font-weight: 500; }

/* Contact */
.dark { background: var(--ink); color: #F2F2EF; }
.contact-text { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.contact-text p { margin: 0; font-size: 17px; line-height: 1.6; color: #C9CBD1; }
.data-links { margin: 0 0 8px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.data-links li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; padding: 10px 0; border-bottom: 1px solid #2E3138; font-size: 16px; }
.data-links span { flex: 0 0 120px; font-weight: 600; color: #F2F2EF; }
.data-links a { color: #A8C1FF; font-weight: 500; }
.data-links a:hover { color: #FFFFFF; }

/* Footer */
.site-footer { background: #0E0F12; color: #A9ACB4; }
.footer-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; padding-top: 28px; padding-bottom: 28px; font-size: 14px; }
.site-footer a { color: #D4D6DB; }
.site-footer a:hover { color: #fff; }

/* Legal pages */
.legal { padding-top: 64px; padding-bottom: 80px; max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin: 0 0 8px; }
.legal h2 { font-size: 22px; margin: 40px 0 8px; }
.legal p, .legal li { font-size: 17px; line-height: 1.65; color: var(--body); }
.legal .updated { color: var(--label); font-size: 15px; margin: 0 0 32px; }

@media (max-width: 600px) {
  .hero { padding-top: 56px; padding-bottom: 56px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
}
