/* Rabbi Jeremy Barras — site stylesheet
   Palette: tekhelet (traditional tallit-thread blue) + brass + warm ivory paper.
   Headline serif: Cormorant Garamond (roman + italic). Interface sans: Raleway. */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Raleway:wght@300;400;500;600;700&display=swap');

:root {
  --ink: #201d19;
  --ink-soft: #4a453e;
  --muted: #726c62;
  --paper: #F7F3EA;
  --paper-raised: #FFFFFF;
  --field: #24304F;      /* tekhelet deep blue */
  --field-2: #1A2440;    /* tekhelet darker, for gradients/hover */
  --brass: #B08D4F;      /* brass accent, used sparingly */
  --brass-light: #D8C08A;
  --rule: #DED6C2;
  --rule-soft: #EAE3D2;
  --radius: 3px;
  --measure: 620px;
  --rail: 220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Raleway', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2.6rem, 5.5vw, 4.2rem); font-weight: 500; text-transform: uppercase; letter-spacing: 0.02em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-style: italic; }
h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: 0; }
h3.serif-italic, .lede { font-style: italic; font-weight: 500; }
p { margin: 0 0 1.1em; color: var(--ink-soft); font-weight: 300; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.eyebrow {
  font-family: 'Raleway', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
}
.eyebrow.on-paper { color: #8a6f3a; }

.measure { max-width: var(--measure); }

/* ---------- Layout shell ---------- */
.page {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
}
@media (max-width: 860px) {
  .page { grid-template-columns: 1fr; }
  .rail { display: none; }
}

.rail {
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--rule);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.rail-top a.brand {
  text-decoration: none;
  display: block;
}
.rail-top .brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.rail nav {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.rail nav a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  width: fit-content;
}
.rail nav a:hover, .rail nav a.active {
  color: var(--ink);
  border-bottom-color: var(--brass);
}
.rail-bottom { font-size: 0.78rem; color: var(--muted); }
.rail-bottom a { color: var(--muted); text-decoration: underline; }

/* Mobile top nav */
.topbar {
  display: none;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--rule);
  align-items: center;
  justify-content: space-between;
}
.topbar .brand-name { font-family: 'Cormorant Garamond', serif; font-weight: 600; }
.topbar nav { display: flex; gap: 1.1rem; font-size: 0.88rem; }
.topbar nav a { text-decoration: none; color: var(--ink-soft); }
@media (max-width: 860px) {
  .topbar { display: flex; }
}

main { min-width: 0; }

.section {
  padding: 4.5rem 3rem;
  border-bottom: 1px solid var(--rule-soft);
  scroll-margin-top: 4.5rem;
}
@media (max-width: 860px) {
  .section { padding: 3rem 1.5rem; }
}
.section:last-of-type { border-bottom: none; }
.section.on-field {
  background: var(--field);
  background-image: linear-gradient(160deg, var(--field) 0%, var(--field-2) 100%);
  border-bottom: none;
}
.section.on-field h1, .section.on-field h2, .section.on-field h3 { color: #F5F1E6; }
.section.on-field p { color: #C9CEDC; }

/* ---------- Hero ---------- */
.hero {
  min-height: 78vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}
.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
}
.hero-photo {
  aspect-ratio: 4 / 5;
  border: 1px solid var(--brass-light);
  overflow: hidden;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 3rem; }
  .hero-photo { max-width: 280px; margin: 0 auto; order: -1; }
}
.hero .eyebrow { margin-bottom: 0.4rem; }
.hero h1 { color: #F5F1E6; max-width: 14ch; }
.hero .sub { color: #DCD8CB; max-width: 46ch; font-size: 1.08rem; }
.hero .credentials {
  margin-top: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.85rem;
  color: #AEB4C6;
}

/* ---------- Buttons / links ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid var(--brass-light);
  color: #F5F1E6;
  margin-top: 1.4rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: rgba(255,255,255,0.06); }
.btn.solid {
  background: var(--brass);
  border-color: var(--brass);
  color: #201d19;
}
.btn.solid:hover { background: var(--brass-light); }
.text-link {
  color: var(--field);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
.text-link:hover { text-decoration-color: var(--brass); }

/* ---------- Grid / cards ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1.8rem;
}
@media (max-width: 700px) { .grid-3 { grid-template-columns: 1fr; } }
.card {
  border-top: 2px solid var(--brass);
  padding-top: 1rem;
}
.card h3 { margin-bottom: 0.4rem; }
.card p { font-size: 0.95rem; }

/* ---------- Quote cards ---------- */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1.8rem;
}
@media (max-width: 700px) { .quote-grid { grid-template-columns: 1fr; } }
.quote-card { border-top: 2px solid var(--brass); padding-top: 1rem; }
.quote-card blockquote {
  margin: 0 0 0.8rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--ink-soft);
}
.quote-card cite {
  font-style: normal;
  font-family: 'Raleway', sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
  display: block;
}

.subhead {
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin: 0 0 0.4rem;
}

/* ---------- Press list ---------- */
.press-list { margin-top: 1rem; }
.press-item {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
}
@media (max-width: 700px) { .press-item { grid-template-columns: 1fr; gap: 0.3rem; } }
.press-item .meta {
  font-family: 'Raleway', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 0.2rem;
}
.press-item h3 { margin-bottom: 0.4rem; font-size: 1.2rem; }
.press-item p { font-size: 0.95rem; margin-bottom: 0.6rem; }
.press-item .text-link { font-size: 0.85rem; font-weight: 600; }

/* ---------- Footer ---------- */
footer {
  padding: 3rem 3rem 2.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2rem;
}
@media (max-width: 860px) { footer { padding: 2.5rem 1.5rem 2rem; flex-direction: column; } }
footer .footer-brand .brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
}
footer .footer-brand p {
  font-size: 0.85rem;
  margin: 0.3rem 0 0;
  color: var(--muted);
}
footer .footer-contact {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
footer .footer-contact a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--rule); }
footer .footer-contact a:hover { color: var(--ink); text-decoration-color: var(--brass); }
footer .footer-copy {
  font-size: 0.78rem;
  color: var(--muted);
  align-self: flex-end;
}
@media (max-width: 860px) { footer .footer-copy { align-self: flex-start; } }

/* ---------- Portrait frame ---------- */
.portrait {
  aspect-ratio: 4 / 5;
  background: var(--rule-soft);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Inline supporting photo ---------- */
.inline-photo {
  aspect-ratio: 3 / 4;
  border: 1px solid var(--rule);
  overflow: hidden;
}
.inline-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
@media (max-width: 700px) { .miami-grid { grid-template-columns: 1fr !important; } .inline-photo { order: -1; } }
