/* ----------------------------------------------------------
   The Keep — a private practice
   Editorial, intimate, high-end
   ---------------------------------------------------------- */

:root {
  --bg:        #F2EDE3;   /* warm ivory */
  --bg-soft:   #ECE5D7;   /* slightly deeper ivory */
  --ink:       #1F1B16;   /* deep ink */
  --ink-soft:  #3A332A;   /* slightly lifted ink */
  --mute:      #6B6258;   /* warm grey for secondary */
  --accent:    #7A5C3E;   /* muted walnut, used sparingly */
  --rule:      #CFC6B4;   /* subtle divider */
  --measure:   34rem;     /* ~620px reading column */
}

/* ---- Dark mode: adapts to the reader's device theme ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #17130E;   /* deep warm near-black */
    --bg-soft:   #1F1A14;
    --ink:       #ECE4D6;   /* warm ivory text */
    --ink-soft:  #D6CDBC;
    --mute:      #9A8E7C;
    --accent:    #C6A079;   /* lifted walnut for links on dark */
    --rule:      #3A332A;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'EB Garamond', Garamond, 'Iowan Old Style', 'Apple Garamond', Georgia, serif;
  font-size: 19px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "liga", "dlig", "kern";
  font-variant-numeric: oldstyle-nums;
  text-rendering: optimizeLegibility;
  hanging-punctuation: first last;
}

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

/* ---- Navigation ---- */

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2.25rem 2.5rem 0;
  max-width: 70rem;
  margin: 0 auto;
  width: 100%;
}

.brand {
  font-family: 'Cormorant Garamond', 'EB Garamond', Garamond, serif;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2.25rem;
}

.nav-links a {
  font-family: 'Cormorant Garamond', 'EB Garamond', Garamond, serif;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
  text-decoration: none;
  transition: color 0.25s ease;
}

.nav-links a:hover,
.nav-links a.is-current {
  color: var(--ink);
}

/* ---- Layout ---- */

main {
  flex: 1;
  padding: 6rem 2.5rem 5rem;
  max-width: 70rem;
  width: 100%;
  margin: 0 auto;
}

.column {
  max-width: var(--measure);
  margin: 0 auto;
}

/* ---- Gentle settle on load (respects reduced-motion) ---- */
@media (prefers-reduced-motion: no-preference) {
  main .column {
    animation: keep-rise 0.9s cubic-bezier(0.2, 0.6, 0.2, 1) both;
  }
  @keyframes keep-rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ---- Typography ---- */

h1, h2, h3 {
  font-family: 'Cormorant Garamond', 'EB Garamond', Garamond, serif;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 1.5rem;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  letter-spacing: -0.005em;
  font-style: italic;
  font-weight: 300;
  margin-bottom: 2.25rem;
}

h2 {
  font-size: 1.6rem;
  font-style: italic;
  font-weight: 400;
  color: var(--ink-soft);
  margin: 3.5rem 0 1.25rem;
}

p {
  margin: 0 0 1.4rem;
  color: var(--ink-soft);
}

p.lede {
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 2rem;
}

/* ---- Drop cap on the opening paragraph ---- */
.lede::first-letter {
  float: left;
  font-family: 'Cormorant Garamond', 'EB Garamond', Garamond, serif;
  font-weight: 400;
  font-size: 3.3em;
  line-height: 0.82;
  padding: 0.04em 0.09em 0 0;
  color: var(--ink);
}

p.kicker {
  font-family: 'Cormorant Garamond', 'EB Garamond', serif;
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 2rem;
}

a.text-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(122, 92, 62, 0.35);
  transition: border-color 0.2s ease;
}

a.text-link:hover {
  border-bottom-color: var(--accent);
}

em { font-style: italic; }

/* ---- Letter signoff ---- */

.signoff {
  margin-top: 2.75rem;
  font-family: 'Cormorant Garamond', 'EB Garamond', serif;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

/* ---- Hairline ornament ---- */

.hairline {
  width: 3rem;
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 3rem 0;
}

.hairline.center {
  margin-left: auto;
  margin-right: auto;
}

/* ---- Onward links ---- */

.onward {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.onward a {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.25s ease;
  display: inline-block;
}

.onward a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.onward a::after {
  content: " \2192";
  color: var(--mute);
  font-style: normal;
  margin-left: 0.4em;
}

/* ---- Footer ---- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.25rem 2.5rem 2.5rem;
  max-width: 70rem;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--mute);
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.04em;
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.2s ease;
}

.site-footer a:hover {
  border-bottom-color: var(--ink);
}

.footer-note {
  font-style: italic;
  letter-spacing: 0.06em;
}

/* ---- Responsive ---- */

@media (max-width: 720px) {
  html, body { font-size: 18px; }

  .site-nav {
    padding: 1.5rem 1.5rem 0;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .nav-links { gap: 1.5rem; }

  main { padding: 3.5rem 1.5rem 3rem; }

  .lede::first-letter { font-size: 3em; }

  .site-footer {
    padding: 2rem 1.5rem;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---- Print: clean reading on paper ---- */

@media print {
  .site-nav,
  .onward,
  .hairline {
    display: none;
  }

  html, body {
    background: #fff;
    color: #000;
    font-size: 12pt;
    line-height: 1.5;
  }

  main {
    padding: 0;
    max-width: none;
  }

  .column {
    max-width: none;
  }

  h1, h2, p, p.lede, .kicker { color: #000; }

  .lede::first-letter { color: #000; }

  a, a.text-link, .site-footer a {
    color: #000;
    border-bottom: none;
  }

  .site-footer {
    border-top: 1px solid #999;
    color: #333;
    margin-top: 2rem;
  }
}
