/* Chani Segal — site styles
   Shared by index.html and contact.html.

   Palette
   --bg    warm sand beige   #EAD6BF
   --ink   soft black        #1A1A1A
   --sage  sage green        #879782
   --plum  muted plum        #795365

   Photographs live in the images folder and are placed in index.html.
*/

:root {
  --bg: #ead6bf;
  --ink: #1a1a1a;
  --sage: #879782;
  --plum: #795365;
  --ink-soft: #5c564e;
  --header-h: 4.35rem;
  --page: 1100px;
  --measure: 38rem;
  --serif: "EB Garamond", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: Lato, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
p,
figure,
dl,
dd,
ul {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

a {
  color: inherit;
}

::selection {
  background: var(--sage);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-140%);
  z-index: 80;
  padding: 0.55rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--sage);
  text-decoration: none;
  font-size: 0.9rem;
}

.skip-link:focus {
  transform: none;
}

.wrap {
  width: min(var(--page), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Header --------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  transition: box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: inset 0 -1px 0 var(--sage);
}

.site-header__inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
}

.logo__text {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
}

.logo img {
  display: block;
  height: 48px;
  width: auto;
}

.logo:has(img) .logo__text {
  display: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--plum);
  background: var(--sage);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 -2px 0 var(--plum);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.button:hover,
.button:focus-visible {
  background: transparent;
  border-color: var(--plum);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--sage);
}

.button:active {
  background: var(--sage);
}

/* Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  border-bottom: 1px solid var(--sage);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
  padding: 2.5rem 0 3rem;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  line-height: 1.55;
  text-transform: uppercase;
  max-width: 22rem;
}

.hero__name {
  margin-top: 0.85rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(4rem, 13vw, 6.6rem);
  line-height: 0.9;
  letter-spacing: -0.025em;
}

.hero__name span {
  display: block;
}

.accent-rule {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.accent-rule::before {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: var(--sage);
}

.accent-rule::after {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  border: 1px solid var(--plum);
  transform: rotate(45deg);
}

.hero__lede {
  max-width: 26rem;
  margin-top: 1.75rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1.45;
}

.hero__portrait {
  position: relative;
  width: min(100%, 22rem);
  padding: 0 0.8rem 0.8rem 0;
}

.hero__portrait::after {
  content: "";
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  right: 0;
  bottom: 0;
  border: 1px solid var(--plum);
  pointer-events: none;
}

/* Photographs ------------------------------------------------------------ */

.photo {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--sage);
  background: var(--bg);
}

.photo--portrait {
  aspect-ratio: 4 / 5;
}

.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo--portrait img {
  object-position: center 12%;
}

/* Side navigation and long-form reading -------------------------------- */

.essay {
  padding-bottom: 1rem;
}

.essay__layout {
  display: grid;
  grid-template-columns: 1fr;
}

.rail {
  position: sticky;
  top: var(--header-h);
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  align-items: center;
  margin: 0;
  padding: 0.7rem 0 0.55rem;
  background: var(--bg);
  border-bottom: 1px solid var(--sage);
}

.rail a {
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  padding: 0.3rem 0;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.rail a:hover {
  color: var(--ink);
}

.rail a.is-active {
  color: var(--ink);
  border-bottom-color: var(--plum);
}

.chapter {
  position: relative;
  padding: 3.15rem 0 2.6rem;
  scroll-margin-top: calc(var(--header-h) + 3.1rem);
}

.chapter + .chapter {
  position: relative;
  background-image: linear-gradient(var(--sage), var(--sage));
  background-repeat: no-repeat;
  background-size: 3.4rem 1px;
  background-position: left top;
}

.chapter + .chapter::before {
  content: "";
  position: absolute;
  left: 3.6rem;
  top: -0.18rem;
  width: 0.36rem;
  height: 0.36rem;
  border: 1px solid var(--plum);
  background: var(--bg);
  transform: rotate(45deg);
  pointer-events: none;
}

.chapter h2:focus {
  outline: none;
}

.chapter h2 {
  margin-bottom: 1.5rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.55rem, 6vw, 3.85rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 12em;
}

.prose {
  max-width: var(--measure);
}

.prose p + p {
  margin-top: 1.3rem;
}

.prose--marked {
  border-left: 1px solid var(--plum);
  padding-left: 1.25rem;
}

.prose--close {
  margin-top: 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--sage);
}

.areas {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 2rem;
  border-bottom: 1px solid var(--sage);
}

.areas li {
  padding: 1.35rem 0 1.45rem;
  border-top: 1px solid var(--sage);
}

.areas h3 {
  margin-bottom: 0.55rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.55rem, 2.4vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.areas h3::before {
  content: "";
  display: inline-block;
  width: 0.38rem;
  height: 0.38rem;
  margin-right: 0.6rem;
  border: 1px solid var(--plum);
  transform: translateY(-0.14rem) rotate(45deg);
}

.areas p {
  max-width: 38rem;
  font-size: 1rem;
  line-height: 1.7;
}

/* Office photograph ---------------------------------------------------- */

.office {
  padding: 0 0 2rem;
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

.office__photo {
  width: 100%;
  max-width: 900px;
  height: auto;
  margin: 0 auto;
}

.office__photo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: auto;
  border: 1px solid var(--sage);
}

/* Footer and contact details ------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--plum);
}

.site-footer__inner {
  display: grid;
  gap: 2.4rem;
  padding: 3.4rem 0 3.2rem;
}

.site-footer__heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-footer__heading::before {
  content: "";
  width: 1.35rem;
  height: 1px;
  background: var(--plum);
}

.site-footer__name {
  margin-top: 0.45rem;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 5vw, 3.15rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.site-footer__role {
  margin-top: 0.7rem;
  max-width: 18rem;
  font-size: 0.98rem;
  line-height: 1.45;
}

.details {
  display: grid;
  gap: 1.45rem;
}

.details dt {
  margin-bottom: 0.28rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.details dd {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.35;
}

/* Contact page --------------------------------------------------------- */

.contact-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.contact-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4.75rem 1.25rem 5rem;
  text-align: center;
}

@media (min-width: 720px) {
  .contact-page .contact-main {
    padding-top: 7.25rem;
  }
}

.contact-panel {
  width: min(34rem, 100%);
}

.contact-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 0 auto 1.35rem;
}

.contact-mark::before {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: var(--sage);
}

.contact-mark::after {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  border: 1px solid var(--plum);
  transform: rotate(45deg);
}

.contact-panel h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.15rem, 8vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.contact-note {
  max-width: 28rem;
  margin: 1.35rem auto 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
}

.contact-email {
  display: inline-block;
  margin-top: 1.85rem;
  padding-bottom: 0.15rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 3.4vw, 1.7rem);
  line-height: 1.35;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--sage);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.32em;
  overflow-wrap: anywhere;
  transition: text-decoration-color 0.25s ease;
}

.contact-email:hover,
.contact-email:focus-visible {
  text-decoration-color: var(--plum);
}

/* Wider layouts -------------------------------------------------------- */

@media (min-width: 720px) {
  .wrap {
    width: min(var(--page), calc(100% - 4.5rem));
  }

  .hero__grid {
    padding: 3.75rem 0 4.25rem;
  }

  .hero__portrait {
    width: min(100%, 26rem);
  }

  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 3rem;
    padding: 4rem 0 3.5rem;
  }

  .site-footer .details {
    justify-self: end;
    width: min(100%, 22rem);
    gap: 1.5rem;
    border-left: 1px solid var(--plum);
    padding-left: 1.25rem;
  }
}

@media (min-width: 980px) {
  html {
    scroll-padding-top: calc(var(--header-h) + 1.25rem);
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.78fr);
    column-gap: 3.5rem;
    align-items: center;
    padding: 4.25rem 0 4.75rem;
  }

  .hero__portrait {
    width: 100%;
    justify-self: end;
    max-width: 24.5rem;
  }

  .essay__layout {
    grid-template-columns: 8.4rem minmax(0, 1fr);
    column-gap: 2.6rem;
    align-items: start;
  }

  .rail {
    position: sticky;
    top: calc(var(--header-h) + 1.75rem);
    z-index: 5;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.1rem;
    margin-top: 4.35rem;
    padding: 0;
    border-bottom: 0;
    background: transparent;
  }

  .rail a {
    border-bottom: 0;
    border-left: 2px solid transparent;
    padding: 0.42rem 0 0.42rem 0.75rem;
  }

  .rail a.is-active {
    border-left-color: var(--plum);
  }

  .chapter {
    padding: 4.4rem 0 3.3rem;
    scroll-margin-top: calc(var(--header-h) + 1.4rem);
  }

  .areas {
    grid-template-columns: 1fr 1fr;
    column-gap: 2.6rem;
  }

  .areas p {
    max-width: none;
  }
}

@media (max-width: 380px) {
  .wrap {
    width: min(var(--page), calc(100% - 1.7rem));
  }

  .button {
    padding-inline: 0.75rem;
    letter-spacing: 0.12em;
  }

  .rail {
    gap: 0.2rem 0.8rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .hero__copy,
  .hero__portrait {
    animation: fade-rise 0.85s ease both;
  }

  .hero__portrait {
    animation-delay: 0.12s;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-header,
  .button,
  .rail a,
  .contact-email {
    transition: none;
  }
}

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .site-header,
  .rail {
    position: static;
  }

  .rail {
    display: none;
  }

  body {
    background: #fff;
  }
}
/* Botanical illustrations — hidden wherever they would crowd the layout. */

.botanical {
  display: none;
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.botanical svg {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 979px) {
  .botanical {
    display: none;
  }
}

@media (min-width: 980px) {
  .botanical--hero {
    display: block;
    width: 112px;
    left: max(1.15rem, calc((100% - var(--page)) / 2));
    bottom: 1.35rem;
  }
}

@media (min-width: 1440px) {
  .botanical--hero {
    width: 132px;
    left: max(0.75rem, calc((100% - var(--page)) / 2 - 152px));
    bottom: auto;
    top: 48%;
    transform: translateY(-50%);
  }
}

@media (min-width: 1080px) {
  .botanical--about {
    display: block;
    width: 126px;
    top: 5.2rem;
    right: 0;
  }

  .botanical--lower {
    display: block;
    width: 116px;
    top: 7.6rem;
    right: 0.15rem;
    opacity: 0.9;
  }
}

@media (max-width: 600px) {
  .hero__name {
    line-height: 1.12;
    margin-bottom: 24px;
  }
}

@media print {
  .botanical {
    display: none;
  }
}