/* OpenBasalt site styles: mobile-first, light/dark via prefers-color-scheme, no web fonts. */

:root {
  color-scheme: light dark;
  --bg: #f6f5f2;
  --surface: #ffffff;
  --ink: #2b2f36;
  --muted: #5d636c;
  --line: #dcdad4;
  --accent: #a3472e;
  /* Terra roxa core of the logo: same value in both themes, as in the logo kit. */
  --core: #a3472e;
  --accent-ink: #8a3a24;
  --mark: #2b2f36;
  --focus: #a3472e;
  --radius: 14px;
  --max: 68rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171b;
    --surface: #1b1f24;
    --ink: #e3e6ea;
    --muted: #9aa1aa;
    --line: #2c3239;
    --accent: #c9644a;
    --accent-ink: #e08a72;
    --mark: #e3e6ea;
    --focus: #e08a72;
  }
}

*,
*::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;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 0.875rem;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: 1.25rem;
}

/* Header */

.site-header {
  padding-block: 1.25rem;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}

.brand svg {
  width: 2rem;
  height: 2rem;
}

.wordmark {
  font-size: 1.35rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1;
}

/* The logotype sets "basalt" heavier, as in the logo kit. */
.wordmark span {
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 1.1rem;
  font-size: 0.95rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
}

.nav .nav-optional {
  display: none;
}

/* Hero */

.hero {
  padding-block: 3rem 3.5rem;
}

.hero-mark {
  width: 7.5rem;
  height: 7.5rem;
  margin-bottom: 1.75rem;
}

.mark-ring {
  stroke: var(--mark);
}

.mark-core {
  fill: var(--core);
}

h1,
h2,
h3 {
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0;
}

.hero h1 {
  font-size: clamp(2.25rem, 9vw, 4.25rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  max-width: 14ch;
}

.lede {
  margin: 1.25rem 0 0;
  max-width: 38rem;
  font-size: 1.15rem;
  color: var(--muted);
}

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

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.button:hover {
  border-color: var(--muted);
}

.button.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.button.primary:hover {
  opacity: 0.9;
}

.button svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* Sections */

.section {
  padding-block: 3rem;
  border-top: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.section h2 {
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  max-width: 24ch;
}

.section-intro {
  margin: 1rem 0 0;
  max-width: 40rem;
  color: var(--muted);
}

.principles {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

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

.principle svg {
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
}

.principle h3 {
  font-size: 1.25rem;
}

.principle p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.icon-line {
  fill: none;
  stroke: var(--mark);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.icon-fill {
  fill: var(--core);
}

.closing {
  margin: 2rem 0 0;
  max-width: 40rem;
  font-size: 1.15rem;
}

/* Projects */

.projects {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

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

.project-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.project h3 {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0;
}

.tag {
  font-size: 0.8rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.project p {
  margin: 0.6rem 0 0;
  color: var(--muted);
}

.project.soon {
  background: transparent;
  border-style: dashed;
}

/* Footer */

.site-footer {
  padding-block: 2.5rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.site-footer p {
  margin: 0;
}

/* 404 */

.notfound {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 3rem;
}

.notfound h1 {
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 400;
}

/* Wider screens */

@media (min-width: 40rem) {
  .wrap {
    padding-inline: 2rem;
  }

  .nav .nav-optional {
    display: inline;
  }

  .hero {
    padding-block: 5rem 5.5rem;
  }

  .section {
    padding-block: 4.5rem;
  }

  .projects {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer .wrap {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 60rem) {
  .hero {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3.5rem;
    align-items: center;
  }

  .hero-mark {
    width: 13rem;
    height: 13rem;
    margin-bottom: 0;
  }

  .principles {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .button,
  .nav a {
    transition: border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
  }
}
