/* ════════════════════════════════════════════════
   Russell Home Roasting — Shared Stylesheet
   rhr.css
   ════════════════════════════════════════════════ */
/* Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Special+Elite&display=swap');



/* ── TOKENS ── */
:root {
  --bg: #f7f5f0;
  --fg: #0e0d0b;
  --line: #0e0d0b;
  --muted: #7a7670;
  --soft: #dedad2;
}

/* ── RESET ── */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
}

body {
  font-family: "Inter", Georgia, "Times New Roman", Times, serif;
}

h1, h2 {
  font-family: "Playfair Display", Georgia, "Times New Roman", Times, serif;
}

/* ── PAGE ENTRANCE ── */
.page {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  opacity: 0;
  transform: translateY(40px);
  animation: rise .7s ease-out forwards;
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ── LEFT RAIL ── */
.rail {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 52px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  z-index: 10;
  background: var(--bg);
}

.rail-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--fg);
}

.rail-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── MAIN CONTENT ── */
.content {
  margin-left: 52px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

/* ── HEADER ── */
header {
  padding: 32px 28px 24px;
  border-bottom: 3px solid var(--line);
  position: relative;
  margin-bottom: 5px;
}

header::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 0; right: 0;
  height: 1px;
  background: var(--line);
}

.brand {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.5rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.brand span {
  display: block;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 5px;
}

/* ── BODY GRID ── */
.body-grid {
  display: grid;
  grid-template-columns: 1fr 100px;
  border-bottom: 1px solid var(--soft);
}

/* ── MAIN PANEL ── */
.main-panel {
  padding: 48px 28px 64px;
  border-right: 1px solid var(--line);
}

/* ── HERO (home page) ── */
.hero {
  padding: 56px 28px 56px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.6rem, 9vw, 5.5rem);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

.hero h2 em {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
}

.hero p {
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 340px;
}

/* ── SIDE NAV ── */
.side-nav {
  display: flex;
  flex-direction: column;
}

.side-nav a {
  flex: none;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  border: 1px solid var(--soft);
  margin-bottom: -1px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.side-nav a:hover,
.side-nav a.active {
  background: var(--fg);
  color: var(--bg);
}

/* ── FOOTER ── */
footer {
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  border-top: 1px solid var(--soft);
  flex-wrap: wrap;
  gap: 8px;
}

/* ── SECTION INTRO (shared hero heading style) ── */
.section-intro {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--soft);
}

.section-intro h2 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-intro h2 em {
  font-style: italic;
  font-weight: 400;
}

.section-intro p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 380px;
  font-family: Arial, Helvetica, sans-serif;
}

/* ════════════════════════════════════════════════
   ORIGINS PAGE
   ════════════════════════════════════════════════ */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.origin-card {
  background: var(--bg);
  padding: 28px 24px 32px;
  display: flex;
  flex-direction: column;
  transition: background 0.18s;
}

.origin-card:hover {
  background: #f0ece4;
}

.card-country {
  font-family: "Special Elite", Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.card-city {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  margin-bottom: 22px;
}

.card-divider {
  width: 100%;
  height: 1px;
  background: var(--line);
  margin-bottom: 20px;
}

.card-rows {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--soft);
  font-size: 0.86rem;
}

.card-row:last-child {
  border-bottom: none;
}

.card-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  color: var(--muted);
  flex-shrink: 0;
  font-family: Arial, Helvetica, sans-serif;
}

.card-value {
  text-align: right;
  line-height: 1.4;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.84rem;
}

.card-row.flavor .card-value {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-style: italic;
  font-size: 0.88rem;
  color: var(--fg);
}

/* ════════════════════════════════════════════════
   ROAST RECORD LOOKUP PAGE (index.html)
   ════════════════════════════════════════════════ */

.lookup {
  border: 1px solid var(--line);
  padding: 20px;
  margin-bottom: 32px;
  background: var(--bg);
}

.lookup-label {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}

.lookup-help {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 14px;
  font-family: Arial, Helvetica, sans-serif;
}

.lookup-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

input[type="text"] {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  padding: 11px 14px;
  font-size: 0.9rem;
  font-family: Arial, Helvetica, sans-serif;
  border-radius: 0;
  outline: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input[type="text"]:focus {
  outline: 2px solid var(--fg);
  outline-offset: 1px;
}

button {
  border: 1px solid var(--line);
  background: var(--fg);
  color: var(--bg);
  padding: 11px 18px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0;
  font-family: Arial, Helvetica, sans-serif;
  transition: background 0.15s, color 0.15s;
}

button:hover,
button:focus-visible {
  background: var(--bg);
  color: var(--fg);
}

.record {
  border-top: 3px solid var(--line);
  padding-top: 24px;
  position: relative;
}

.record::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 0; right: 0;
  height: 1px;
  background: var(--line);
  margin-top: 2px;
}

.record-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 24px;
}

.record-id {
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.record-date {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: Arial, Helvetica, sans-serif;
}

.record-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 32px;
}

.section-title {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 400;
}

.rows {
  border-top: 1px solid var(--line);
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px solid var(--soft);
  font-size: 0.88rem;
  font-family: Arial, Helvetica, sans-serif;
}

.row-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
}

.row-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}

.full { grid-column: 1 / -1; }

.chart-wrap {
  border: 1px solid var(--line);
  padding: 12px;
  margin-top: 12px;
  background: var(--bg);
}

svg { width: 100%; height: auto; display: block; }

.axis, .grid, .curve, .marker { fill: none; stroke: var(--fg); }
.axis  { stroke-width: 1; }
.grid  { stroke-width: 0.5; stroke-dasharray: 2 3; stroke: var(--soft); }
.curve { stroke-width: 2; }
.marker { stroke-width: 1; stroke-dasharray: 5 4; stroke: var(--muted); }

.axis-text {
  fill: var(--muted);
  font-size: 10px;
  font-family: Arial, Helvetica, sans-serif;
}

.chart-note {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 8px;
  letter-spacing: 0.06em;
  font-family: Arial, Helvetica, sans-serif;
}

.empty-state,
.error-state {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 20px;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0.03em;
}

.error-state {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--fg);
}

.error-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ════════════════════════════════════════════════
   ABOUT PAGE
   ════════════════════════════════════════════════ */

.about-hero {
  margin-bottom: 52px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--soft);
}

.about-hero h2 {
  font-size: clamp(2.4rem, 8vw, 5rem);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.about-hero h2 em {
  font-style: italic;
  font-weight: 400;
}

.about-hero p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--fg);
  max-width: 520px;
}

.about-hero p + p {
  margin-top: 18px;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 48px;
  max-width: 600px;
}

.detail-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.detail-value {
  font-size: 0.92rem;
  line-height: 1.65;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--fg);
  margin-top: 10px;
}

.detail-value strong {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: 600;
  font-size: 1rem;
}

/* ════════════════════════════════════════════════
   JOURNAL PAGE
   ════════════════════════════════════════════════ */

.journal-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
}

.journal-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  border-bottom: 1px solid var(--line);
  transition: background 0.18s;
  text-decoration: none;
  color: var(--fg);
}

.journal-card:last-child {
  border-bottom: none;
}

.journal-card:hover {
  background: #f0ece4;
}

/* Image slot */
.journal-card-image {
  border-right: 1px solid var(--line);
  overflow: hidden;
  background: var(--soft);
  min-height: 180px;
  position: relative;
}

.journal-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder shown when no image is set */
.journal-card-image.placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 6px,
      var(--soft) 6px,
      var(--soft) 7px
    );
}

/* Text area */
.journal-card-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.journal-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.journal-card-date {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
}

.journal-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.journal-tag {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--muted);
  border: 1px solid var(--soft);
  padding: 2px 8px;
}

.journal-card-title {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.journal-card-excerpt {
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  max-width: 480px;
}

/* ════════════════════════════════════════════════
   MOBILE
   ════════════════════════════════════════════════ */

@media (max-width: 560px) {
  .rail { display: none; }
  .content { margin-left: 0; }

  header { padding: 24px 22px 20px; }
  footer { padding: 14px 22px; }

  .body-grid { grid-template-columns: 1fr; }

  .main-panel,
  .hero {
    border-right: none;
    padding: 32px 22px 48px;
  }

  .side-nav {
    flex-direction: row;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
  }

  .side-nav a {
    writing-mode: horizontal-tb;
    transform: none;
    flex: none;
    width: 50%;
    justify-content: flex-start;
    padding: 16px 22px;
    font-size: 0.8rem;
    border: none;
    border-bottom: 1px solid var(--soft);
    border-right: 1px solid var(--soft);
    margin-bottom: 0;
    white-space: normal;
  }

  .side-nav a:nth-child(even) { border-right: none; }

  /* Origins */
  .cards-grid { grid-template-columns: 1fr; }

  /* Record lookup */
  .lookup-row { flex-direction: column; }
  .record-header { flex-direction: column; align-items: flex-start; }
  .record-grid { grid-template-columns: 1fr; }
  .row { flex-direction: column; gap: 2px; }
  .row-value { text-align: left; }
  button { width: 100%; }

  /* Journal */
  .journal-card {
    grid-template-columns: 1fr;
  }

  .journal-card-image {
    border-right: none;
    border-bottom: 1px solid var(--line);
    min-height: 160px;
  }

  .journal-card-body {
    padding: 20px 22px;
  }

  /* About */
  .details-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
