/* Miladasoft: one static page. System fonts, no external requests,
   no inline styles (the CSP allows only this file). */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f4f6f9;
  --ink: #0e1726;
  --muted: #4a5568;
  --line: #dfe3ea;
  --field-line: #8a94a6;
  --grid: #cfd6e2;
  --accent: #1d3f8f;
  --accent-hover: #15306e;
  --on-accent: #ffffff;
  --link: #1d3f8f;
  --todo-bg: #fff3c4;
  --todo-ink: #4f3b00;
  --todo-line: #a57a00;
  --radius: 6px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1018;
    --surface: #111824;
    --ink: #e8ebf0;
    --muted: #a3adbd;
    --line: #232d3c;
    --field-line: #5b677a;
    --grid: #253043;
    --accent: #9db8ff;
    --accent-hover: #bccdff;
    --on-accent: #0b1018;
    --link: #9db8ff;
    --todo-bg: #2e2508;
    --todo-ink: #ffe08a;
    --todo-line: #b8902a;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 48rem) {
  .wrap { padding: 0 2rem; }
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
}

.skip:focus { top: 1rem; }

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* The wordmark (tools/make_site_logo.py): its file has no clear space, so the header's
   margins keep at least half its cap height clear round it. */
.brand img {
  display: block;
  width: auto;
  height: 0.875rem;
}

nav ul {
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

@media (min-width: 48rem) {
  .brand img { height: 1.25rem; }
  nav ul { gap: 1.5rem; }
  nav a { font-size: 0.9375rem; }
}

nav a:hover { color: var(--ink); }

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--grid) 1.2px, transparent 1.6px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to left, #000 0%, transparent 75%);
  mask-image: linear-gradient(to left, #000 0%, transparent 75%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 48rem) {
  .hero .wrap {
    padding-top: 7rem;
    padding-bottom: 7rem;
  }
}

.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 19ch;
  font-size: clamp(2rem, 7vw, 3.5rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.button-quiet {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.button-quiet:hover {
  border-color: var(--muted);
  background: var(--surface);
}

@media (prefers-reduced-motion: no-preference) {
  .button, nav a { transition: background-color 0.15s, border-color 0.15s, color 0.15s; }
}

/* The contact form's button while the message is on its way. */
.button.is-busy {
  gap: 0.5rem;
  cursor: progress;
}

.button.is-busy::before {
  content: "";
  flex: none;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

@media (prefers-reduced-motion: no-preference) {
  .button.is-busy::before { animation: spin 0.8s linear infinite; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Sections */

.section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 48rem) {
  .section { padding: 5rem 0; }
}

.section-alt { background: var(--surface); }

.section-head { margin-bottom: 1.75rem; }

.section-intro {
  max-width: 52ch;
  margin-top: 0.5rem;
  color: var(--muted);
}

.hero-lead {
  max-width: 46ch;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 1.125rem;
}

@media (min-width: 48rem) {
  .hero-lead { font-size: 1.25rem; }
}

h2 {
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

/* Product */

.product {
  display: grid;
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}

@media (min-width: 48rem) {
  .product {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 2.25rem;
  }
}

.product h3 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.product-meta {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-desc {
  max-width: 46ch;
  margin-top: 0.75rem;
  color: var(--muted);
}

.product .button { justify-self: start; }

/* Services */

.cards {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

.card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}

@media (min-width: 48rem) {
  .card { padding: 2rem; }
}

.card-icon {
  display: block;
  width: 2rem;
  height: 2rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-desc {
  margin-top: 0.5rem;
  color: var(--muted);
}

.ticks {
  display: grid;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  font-size: 0.9375rem;
}

.ticks li {
  position: relative;
  padding-left: 1.25rem;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--accent);
}

/* Contact form */

.contact-form {
  display: grid;
  gap: 1.25rem;
  max-width: 36rem;
}

.field {
  display: grid;
  gap: 0.375rem;
}

.field label {
  font-size: 0.9375rem;
  font-weight: 600;
}

.optional {
  color: var(--muted);
  font-weight: 400;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--accent);
  outline-offset: 0;
}

/* Honeypot: off screen for people, still in the markup for form-filling bots. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ts:empty { display: none; }

.form-status:empty { display: none; }

.form-status {
  color: var(--ink);
  font-size: 0.9375rem;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.form-note {
  max-width: 40ch;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Footer */

.site-footer {
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

/* 404 */

.notfound .wrap {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 48rem) {
  .notfound .wrap {
    padding-top: 7rem;
    padding-bottom: 7rem;
  }
}

.notfound-text {
  max-width: 46ch;
  margin-top: 1rem;
  color: var(--muted);
}

/* Placeholders the owner still has to fill: impossible to miss, gone before deploy. */

.todo {
  padding: 0.125rem 0.375rem;
  border: 1px dashed var(--todo-line);
  border-radius: 4px;
  background: var(--todo-bg);
  color: var(--todo-ink);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
