/* ============================================
   ALMFES — Stylesheet
   Design: Editorial minimalism / research publication
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=Source+Serif+4:ital,wght@0,300;0,400;1,300&family=DM+Sans:wght@300;400&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:          #F8F7F4;
  --text:        #1A1A1A;
  --navy:        #0E2340;
  --accent:      #B89A6A;
  --muted:       #6B6B6B;
  --rule:        #D8D0C4;
  --link:        #0E2340;
  --link-hover:  #B89A6A;
  --max-width:   720px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:   'Source Serif 4', Georgia, serif;
  --font-ui:     'DM Sans', system-ui, sans-serif;
}

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Page fade in ── */
body {
  animation: fadein 0.5s ease;
}
@keyframes fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Layout ── */
.site-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

/* ── Header / Nav ── */
.site-header {
  padding: 2.2rem 0 1.8rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3.5rem;
}

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

.site-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--navy);
  text-decoration: none;
  text-transform: uppercase;
}

.site-name:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 1.8rem;
  flex-wrap: wrap;
  list-style: none;
}

.site-nav a {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--navy);
}

/* ── Main content ── */
main {
  flex: 1;
}

/* ── Page header ── */
.page-header {
  margin-bottom: 2.8rem;
}

.page-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.25;
  color: var(--navy);
}

/* ── Framing text ── */
.framing {
  border-left: 2px solid var(--accent);
  padding-left: 1.4rem;
  margin-bottom: 3rem;
}

.framing p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 0.8rem;
}

.framing p:last-child {
  margin-bottom: 0;
}

/* ── Steps (IRRBB Framework) ── */
.steps {
  margin-bottom: 3rem;
}

.step {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0 1.4rem;
  margin-bottom: 2.8rem;
  padding-bottom: 2.8rem;
  border-bottom: 1px solid var(--rule);
}

.step:last-child {
  border-bottom: none;
}

.step-number {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--rule);
  line-height: 1.2;
  padding-top: 0.1rem;
}

.step-content {}

.step-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.step-subtitle {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

.step-desc {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 1rem;
}

/* Step parts (for multi-part steps) */
.step-parts {
  list-style: none;
  margin-top: 0.8rem;
  margin-bottom: 1rem;
}

.step-parts li {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text);
  padding: 0.4rem 0;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.step-parts li:last-child {
  border-bottom: 1px solid var(--rule);
}

.part-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Research links ── */
.research-link {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.research-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.research-link::after {
  content: ' →';
}

/* Pending link (no post yet) */
.link-pending {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 300;
  font-style: italic;
  color: var(--muted);
}

/* ── Nav cards (Home page) ── */
.nav-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 3rem;
}

.nav-card {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  gap: 1rem;
  transition: all 0.2s;
}

.nav-card:first-child {
  border-top: 1px solid var(--rule);
}

.nav-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--navy);
  transition: color 0.2s;
}

.nav-card-desc {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--muted);
  text-align: right;
  flex-shrink: 0;
  transition: color 0.2s;
}

.nav-card:hover .nav-card-title {
  color: var(--accent);
}

.nav-card:hover .nav-card-desc {
  color: var(--navy);
}

/* ── Mission statement (Home) ── */
.mission {
  margin-bottom: 4rem;
}

.mission-text {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  color: var(--navy);
  max-width: 600px;
}

/* ── Closing note ── */
.closing {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.88rem;
  color: var(--muted);
  font-family: var(--font-ui);
  font-weight: 300;
}

.closing a {
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color 0.2s, border-color 0.2s;
}

.closing a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Footer ── */
.site-footer {
  margin-top: 5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
}

.site-footer .site-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-name {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.footer-email {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.footer-email:hover {
  color: var(--navy);
}

/* ── About page ── */
.about-body {
  margin-bottom: 2rem;
}

.about-section {
  margin-bottom: 2.8rem;
  padding-bottom: 2.8rem;
  border-bottom: 1px solid var(--rule);
}

.about-section:last-child {
  border-bottom: none;
}

.about-heading {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 1rem;
}

.about-subheading {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  margin-top: 1.4rem;
  margin-bottom: 0.6rem;
}

.about-body p {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 0.9rem;
  color: var(--text);
}

.about-body p:last-child {
  margin-bottom: 0;
}

.about-body a {
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  transition: color 0.2s;
}

.about-body a:hover {
  color: var(--accent);
}

/* ── Contact page ── */
.contact-block {
  margin: 3rem 0;
}

.contact-label {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--muted);
  margin-bottom: 1rem;
}

.contact-email {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  transition: color 0.2s;
  display: inline-block;
}

.contact-email:hover {
  color: var(--accent);
}
@media (max-width: 600px) {
  html { font-size: 16px; }

  .site-header { margin-bottom: 2.5rem; }

  .site-header .site-wrapper {
    flex-direction: column;
    gap: 0.8rem;
  }

  .site-nav { gap: 1.2rem; }

  .page-title { font-size: 1.6rem; }

  .mission-text { font-size: 1.3rem; }

  .step {
    grid-template-columns: 2.4rem 1fr;
    gap: 0 1rem;
  }

  .step-number { font-size: 1.3rem; }

  .nav-card {
    flex-direction: column;
    gap: 0.3rem;
  }

  .nav-card-desc { text-align: left; }

  .site-footer .site-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }
}
