/* Iromi — site styles.
   Tokens mirror DESIGN_SYSTEM.md in the app repo. Dark is primary; light
   mirrors it at equivalent contrast rather than being an afterthought.

   No build step, no dependencies, no fonts fetched from anyone else's server —
   a site that says "we collect nothing about you" should not be quietly asking
   a CDN to watch you read it. */

:root {
  color-scheme: dark light;

  --bg-base: #101115;
  --bg-surface: #1c1d22;
  --bg-elevated: #26272d;

  --text-primary: #f4f6f5;   /* 17.4:1 on base */
  /* Lightened from the app's #9A9AA2, which measures 6.8:1 on base and 6.0:1 on
     the panel surface — AA, not the AAA this site holds itself to for text
     below 18pt. This clears 7:1 on both. Worth checking the app's own token
     against the same bar. */
  --text-secondary: #a8a8b0; /* 8.0:1 on base, 7.1:1 on surface */

  --accent: #33a08a;
  --accent-link: #6fd3be;    /* ~11:1 on base; the accent itself is only 6.6:1 */
  --aperture: #fbfdfc;

  --border: #2f3138;
  --focus: var(--aperture);

  --measure: 34rem;
  --radius: 14px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-base: #ffffff;
    --bg-surface: #f4f5f7;
    --bg-elevated: #e9ebee;

    --text-primary: #14161a;   /* ~16:1 on white */
    --text-secondary: #4a4e57; /* ~8.6:1 on white */

    --accent: #1e7060;
    --accent-link: #14574a;    /* ~7.6:1 on white */
    --aperture: #14161a;

    --border: #d3d6dc;
    --focus: #14161a;
  }
}

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

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

body {
  margin: 0;
  /* System fonts: nothing to download, and they already respect the reader's
     own size and legibility settings. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Scales with the browser's text size; never a fixed pixel body. */
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-base);
}

/* Keyboard users must always be able to see where they are. Never remove this
   without replacing it with something at least as visible. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  color: var(--text-primary);
  z-index: 10;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.wrap {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  text-decoration: none;
}
.wordmark .mark { flex: none; }
.wordmark .mark-ring { stroke: currentColor; }
.wordmark .mark-dot { fill: var(--accent); }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  /* 44px minimum target, per the same rule the app follows. */
  min-height: 44px;
  color: var(--text-primary);
}
.site-nav a[aria-current="page"] {
  /* Marked by weight and an underline as well as colour — never colour alone. */
  font-weight: 700;
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

/* Type */

main { padding: 2.5rem 0 4rem; }

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 6vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.375rem, 3.5vw, 1.75rem); margin-top: 2.5rem; }
h3 { font-size: 1.125rem; margin-top: 1.75rem; }

p, li { max-width: var(--measure); }
p { margin: 0 0 1rem; }

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

.lead {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  color: var(--text-primary);
}
.muted { color: var(--text-secondary); }

.tagline {
  font-size: 0.9375rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-link);
  margin: 0 0 0.75rem;
  font-weight: 700;
}

/* Blocks */

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}
.panel > :last-child { margin-bottom: 0; }

.callout {
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
  margin: 1.5rem 0;
}

.steps {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.steps li {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  max-width: none;
}
.steps h3 { margin-top: 0; }
.steps p:last-child { margin-bottom: 0; }

.free-list { padding-left: 1.25rem; }
.free-list li { margin-bottom: 0.5rem; }

.status {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Blog */

.post-list { list-style: none; padding: 0; margin: 2rem 0; }
.post-list li { margin-bottom: 2rem; max-width: none; }
.post-list h2 { margin: 0 0 0.25rem; font-size: 1.375rem; }
.post-list a { text-decoration-thickness: 2px; text-underline-offset: 3px; }

time.posted {
  display: block;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

article.post h2 { margin-top: 2.25rem; }
article.post blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 4px solid var(--border);
  color: var(--text-secondary);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 3rem;
  color: var(--text-secondary);
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer p { font-size: 0.9375rem; }

/* Stability communicates trustworthiness — there is nothing here that moves on
   its own, so there is nothing to disable. This guard is for anything added
   later. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-contrast: more) {
  :root { --border: currentColor; }
}
