/* Cairn — brand tokens and the Phase 0 application shell.
   Captured here at :root so every later screen inherits the same palette
   and type. Flat by design: gold hairline rules, no gradients, no shadows. */

:root {
  /* Brand palette */
  --color-primary:      #2c4a3b; /* forest green  — primary            */
  --color-primary-deep: #20382c; /* deep green    — headings / wordmark */
  --color-accent:       #a9824b; /* gold / bronze — accent, hairlines  */
  --color-bg:           #f5f1e7; /* parchment     — page background    */
  --color-sidebar:      #efe9db; /* deeper parchment — sidebar         */
  --color-muted:        #6e6a5e; /* warm muted    — secondary text     */
  --color-stone:        #8a8478; /* stone grey                         */
  --color-ink:          #2b2b28; /* warm near-black — body text        */

  /* Type */
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --header-height: 120px;
  --sidebar-width: 232px;
  --hairline: 1px solid var(--color-accent);
}

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

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* App shell --------------------------------------------------------------- */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  flex: 0 0 auto;
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 32px;
  background: var(--color-bg);
  border-bottom: var(--hairline);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand__logo {
  display: block;
  height: 120px;
  width: auto;
}

.app-body {
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
}

/* Sidebar ----------------------------------------------------------------- */
.sidebar {
  flex: 0 0 var(--sidebar-width);
  background: var(--color-sidebar);
  border-right: var(--hairline);
  padding: 28px 0;
}

.nav {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__list--footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: var(--hairline);
}

.nav__item {
  display: block;
  padding: 10px 32px;
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border-left: 3px solid transparent;
}

.nav__item:hover {
  color: var(--color-primary);
}

.nav__item--active {
  color: var(--color-primary-deep);
  font-weight: 600;
  background: rgba(169, 130, 75, 0.10);
  border-left-color: var(--color-accent);
}

/* Main -------------------------------------------------------------------- */
.main {
  flex: 1 1 auto;
  padding: 56px 48px;
  max-width: 960px;
}

.welcome__title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 2.25rem;
  line-height: 1.2;
  color: var(--color-primary-deep);
}

.welcome__intro {
  margin: 0 0 48px;
  max-width: 60ch;
  color: var(--color-muted);
  font-size: 1.075rem;
}

/* Cards ------------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.card {
  padding: 24px;
  background: var(--color-bg);
  border: 1px solid var(--color-accent);
  border-radius: 2px;
}

.card__title {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--color-primary);
}

.card__body {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* Responsive — sidebar stacks under the header on narrow screens ---------- */
@media (max-width: 720px) {
  .app-body { flex-direction: column; }

  .sidebar {
    flex-basis: auto;
    padding: 12px 0;
    border-right: none;
    border-bottom: var(--hairline);
  }

  .nav { flex-direction: row; }

  .nav__list {
    display: flex;
    flex-wrap: wrap;
  }

  .nav__list--footer {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }

  .nav__item {
    padding: 8px 16px;
    border-left: none;
    border-bottom: 3px solid transparent;
  }

  .nav__item--active {
    border-left: none;
    border-bottom-color: var(--color-accent);
  }

  .main { padding: 32px 20px; }
}
