:root {
  --paper:        #F8F6F4;
  --ink:          #232120;
  --ink-soft:     #4F4A45;
  --ink-muted:    #847E76;
  --orange:       #D77D3C;
  --divider:      #DDD8D2;
  --content-w:    1100px;
}

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

html { background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-size: 19px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.hibrium-standalone {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.masthead {
  height: 3px;
  background: var(--orange);
}

.site-header {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 32px 56px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}
.site-header img {
  width: 32px;
  height: 32px;
  display: block;
}
.site-header .wordmark {
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink);
}
.site-header nav { display: flex; gap: 36px; }
.site-header nav a {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: border-color 220ms ease;
}
.site-header nav a:hover,
.site-header nav a:focus-visible { border-bottom-color: var(--orange); }
.site-header nav a.active        { border-bottom-color: var(--ink); }

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 56px;
}

.hero {
  margin: 82px 0 76px;
  animation: rise 700ms ease-out both;
  text-align: center;
}
.hero h1 {
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 1.55rem;
  line-height: 1.34;
  letter-spacing: 0;
  margin: 0 auto;
  max-width: 900px;
  color: var(--ink);
  text-align: center;
}
.hero--minimal h1 {
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-soft);
}
.hero .lede {
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.6;
  margin: 36px 0 0;
  max-width: 720px;
  color: var(--ink-soft);
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

body.hibrium-page-about .hero {
  text-align: left;
}
body.hibrium-page-about .hero h1 {
  max-width: 720px;
  margin-left: 0;
  margin-right: 0;
  text-align: left;
}

.positioning-line {
  max-width: 640px;
  margin: 42px auto 0;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 1.18rem;
  line-height: 1.5;
  text-align: center;
}

figure.visual {
  margin: 0 auto 60px;
  max-width: 1020px;
  animation: rise 800ms ease-out 200ms both;
}
figure.visual img {
  display: block;
  width: 100%;
  height: auto;
}

.home-contact {
  margin: 0 auto 92px;
  text-align: center;
}
.home-contact p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.5;
}

footer {
  flex-shrink: 0;
  width: 100%;
  border-top: 1px solid var(--divider);
  margin-top: 40px;
  padding: 26px 56px 48px;
  max-width: var(--content-w);
  margin-left: auto;
  margin-right: auto;
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}
footer .line { margin: 0; padding: 4px 0; }
footer a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--divider);
  transition: color 200ms, border-color 200ms;
  overflow-wrap: break-word;
}
footer a:hover { color: var(--orange); border-bottom-color: var(--orange); }
footer .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
  margin-top: 14px;
  color: var(--ink-muted);
}
footer .meta span::after {
  content: '\B7';
  margin-left: 22px;
  color: var(--divider);
}
footer .meta span:last-child::after { content: ''; margin: 0; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero, figure.visual { animation: none; }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  main, .site-header, footer {
    padding-left: 24px;
    padding-right: 24px;
  }
  .site-header { flex-wrap: wrap; gap: 14px 28px; }
  .site-header nav { gap: 24px; }
  .site-header nav a { font-size: 0.78rem; }
  .hero { margin: 64px 0 56px; }
  .hero h1 { font-size: 1.32rem; line-height: 1.34; }
  .hero .lede { font-size: 1.02rem; margin-top: 24px; }
  .positioning-line { font-size: 1.05rem; margin-top: 22px; }
  figure.visual { margin-bottom: 40px; }
  .home-contact { margin-bottom: 64px; }
}

@media (max-width: 520px) {
  .site-header {
    align-items: flex-start;
  }
  .site-header nav {
    width: 100%;
    gap: 20px;
    flex-wrap: wrap;
  }
  footer .line a {
    display: block;
    margin-top: 2px;
  }
}
