/* ============================================================
   Italy Journal
   Fonts:   Playfair Display (display) · Cormorant Garamond (body)
   Palette: ivory · near-black · gold · deep wine · deep slate
   ============================================================ */

:root {
  --ivory:         #F8F5EE;
  --white:         #FFFFFF;

  --dark:          #0F0804;    /* header / footer background */
  --dark-warm:     #1E0E06;    /* slightly lighter dark */

  --ink:           #1A0E06;    /* primary text */
  --ink-mid:       #4A3018;    /* secondary text */
  --ink-light:     #8C6840;    /* muted text */
  --ink-pale:      #B89870;    /* placeholder */

  --gold:          #C49012;    /* primary gold */
  --gold-dark:     #A07808;    /* darker gold — borders */
  --gold-light:    #D8B040;    /* lighter gold */
  --gold-pale:     #F0DCA8;    /* very pale gold tint */

  --wine:          #7A1828;    /* voice 1 — deep burgundy */
  --wine-pale:     #F0D8DC;
  --slate:         #284E6A;    /* voice 2 — deep slate */
  --slate-pale:    #D0DDE8;

  --separator:     #DDD0B0;
  --card-border:   rgba(196, 144, 18, 0.2);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 18px; scroll-behavior: smooth; background-color: var(--dark); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

body {
  background-color: var(--ivory);
  color: var(--ink);
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  background-color: var(--dark);
  color: var(--ivory);
  text-align: center;
  padding: 5rem 2rem 4.5rem;
  position: relative;
}

/* Single gold rule at the bottom — confident, not decorative */
.site-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 80px;
  height: 1px;
  background: var(--gold);
}

.site-header__eyebrow {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.75rem;
  opacity: 0.85;
}

.site-header__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.site-header__subtitle {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--gold-light);
  font-weight: 400;
  margin-bottom: 0;
}

/* The rule with ✦ — one ornamental moment, restrained */
.site-header__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem auto 1.25rem;
  color: var(--gold);
  opacity: 0.5;
  width: 200px;
}

.site-header__rule::before,
.site-header__rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gold);
}

.site-header__rule span { font-size: 0.5rem; }

.site-header__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  font-style: italic;
  letter-spacing: 0.08em;
  color: rgba(248, 245, 238, 0.55);
  margin-top: 1.5rem;
}

.site-header__stats .dot { opacity: 0.4; font-style: normal; }

.site-header__stat-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(248, 245, 238, 0.25);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
.site-header__stat-link:hover {
  text-decoration-color: rgba(248, 245, 238, 0.7);
}

.back-link--header {
  display: block;
  margin-bottom: 1.5rem;
}

/* ============================================================
   HOME — DAYS GRID
   ============================================================ */
.main-content { padding-top: 4rem; padding-bottom: 6rem; }

.days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.25rem;
}

.day-card {
  background: var(--white);
  border: 1px solid var(--card-border);
  border-top: 2px solid var(--gold);
  box-shadow: 0 4px 24px rgba(15, 8, 4, 0.07);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.day-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(15, 8, 4, 0.12);
}

/* Stretched link covers the whole card; photos link sits above it */
.day-card__stretched-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.day-card__photos-link {
  position: relative;
  z-index: 2;
  color: var(--ink-light);
  text-underline-offset: 2px;
}

.day-card__photos-link:hover {
  color: var(--gold-dark);
  text-decoration: underline;
}

.day-card__photo-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #E8E0D0;
}

.day-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.day-card:hover .day-card__photo { transform: scale(1.04); }

.day-card__photo--empty {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #E8E0D0 0%, #D8CCB4 100%);
}

/* Day number — inset label, like a caption on an exhibition print */
.day-card__number {
  position: absolute;
  bottom: 0.85rem;
  left: 0.85rem;
  background: var(--dark);
  color: var(--gold-light);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  font-variant-numeric: lining-nums;
  line-height: 1.6;
}

.day-card__body {
  padding: 1.5rem 1.75rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border-top: 1px solid rgba(196, 144, 18, 0.12);
}

.day-card__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.day-card__date {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-top: 0.1rem;
}

.day-card__excerpt {
  font-size: 0.97rem;
  font-style: italic;
  color: var(--ink-mid);
  line-height: 1.65;
  margin-top: 0.5rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.day-card__meta {
  display: flex;
  gap: 1.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--separator);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 7rem 2rem;
  color: var(--ink-mid);
}

.empty-state p {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.4rem;
}

.empty-state__hint {
  font-size: 0.9rem;
  font-style: normal;
  letter-spacing: 0.06em;
  margin-top: 0.75rem;
  color: var(--ink-light);
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  background: var(--dark);
  padding: 2.5rem 0;
  text-align: center;
}

.site-footer p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(248, 245, 238, 0.45);
}



/* ============================================================
   DAY PAGE HEADER
   ============================================================ */
.day-page { min-height: 100vh; display: flex; flex-direction: column; }

.day-header {
  background-color: var(--dark);
  color: var(--ivory);
  padding: 3rem 2rem 2.75rem;
  position: relative;
}

.day-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.4;
}

.back-link {
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.75rem;
  transition: color 0.15s;
}

.back-link:hover { color: var(--white); }

.day-header__inner { max-width: 760px; }

.day-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 0.6rem;
}

.day-header__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 0.6rem;
}

.day-header__date {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(248, 245, 238, 0.5);
}

/* ============================================================
   DAY CONTENT
   ============================================================ */
.day-content {
  padding-top: 4rem;
  padding-bottom: 5rem;
  flex: 1;
  max-width: 820px;
}

/* ============================================================
   PLAN SECTION
   ============================================================ */
.plan-section {
  background: var(--white);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--gold);
  padding: 2.5rem 2.75rem 2.75rem;
  margin-bottom: 4rem;
  box-shadow: 0 4px 28px rgba(15, 8, 4, 0.06);
}

.plan-entry + .plan-entry {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--card-border);
}

.plan-section__label {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--gold-dark);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.plan-section__author {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--separator);
}

/* ============================================================
   UPDATES DIVIDER
   ============================================================ */
.updates-divider {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.updates-divider::before,
.updates-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--separator);
}

.updates-divider span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-light);
  white-space: nowrap;
}

/* ============================================================
   UPDATES FEED
   ============================================================ */
.updates-feed {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.update {
  background: var(--white);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--separator);
  padding: 2rem 2.25rem 2.25rem;
  box-shadow: 0 2px 16px rgba(15, 8, 4, 0.05);
}

.update.voice-1 { border-left-color: var(--wine); }
.update.voice-2 { border-left-color: var(--slate); }

.update__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--separator);
}

.update__author {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-light);
}

.update.voice-1 .update__author { color: var(--wine); }
.update.voice-2 .update__author { color: var(--slate); }

.update__time {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--ink-pale);
  margin-left: auto;
  white-space: nowrap;
}

/* ============================================================
   VOICE DOT
   ============================================================ */
.voice-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--ink-pale);
}

.voice-1 .voice-dot,
.plan-section__author.voice-1 .voice-dot { background: var(--wine); }
.voice-2 .voice-dot,
.plan-section__author.voice-2 .voice-dot { background: var(--slate); }

/* ============================================================
   PROSE
   ============================================================ */
.prose {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--ink);
}

.prose p { margin-bottom: 1em; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { font-weight: 600; }
.prose em { font-style: italic; }
.prose a { color: var(--wine); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.75rem; margin-bottom: 1em; }
.prose li { margin-bottom: 0.3em; }
.prose blockquote {
  border-left: 2px solid var(--gold-pale);
  padding: 0.25rem 0 0.25rem 1.5rem;
  color: var(--ink-mid);
  font-style: italic;
  margin: 1.25em 0;
}
.prose h1, .prose h2, .prose h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  margin: 1.5em 0 0.5em;
  line-height: 1.3;
}

/* ============================================================
   PHOTO GRIDS
   ============================================================ */
.photo-grid {
  display: grid;
  gap: 3px;
  margin-top: 1.5rem;
}

.photo-grid.grid-1 { grid-template-columns: 1fr; }
.photo-grid.grid-2 { grid-template-columns: 1fr 1fr; }
.photo-grid.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.photo-grid.grid-multi { grid-template-columns: 1fr 1fr; }

@media (max-width: 540px) {
  .photo-grid.grid-3 { grid-template-columns: 1fr 1fr; }
  .photo-grid.grid-3 .photo-item:first-child { grid-column: 1 / -1; }
}

.photo-item {
  overflow: hidden;
  background: #E0D8C8;
}

.photo-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
  cursor: zoom-in;
}

.photo-item:hover img { transform: scale(1.03); }

/* ============================================================
   MAP WIDGET
   ============================================================ */
.map-widget {
  max-width: 480px;
  margin: 1.75rem auto;
  border: 1px solid var(--card-border);
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 2px 16px rgba(15, 8, 4, 0.07);
}

.map-widget iframe {
  width: 100%;
  height: 300px;
  display: block;
  border: none;
}

.map-widget__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  border-top: 1px solid var(--card-border);
  transition: background 0.15s;
}

.map-widget__link:hover { background: var(--ivory); }

.map-inline-link {
  color: var(--wine);
}

/* ============================================================
   DAY NAVIGATION
   ============================================================ */
.day-nav {
  background: var(--dark);
  padding: 0;
}

.day-nav .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(196, 144, 18, 0.15);
}

.day-nav__link {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.75rem 2rem;
  transition: background 0.15s;
  border-right: 1px solid rgba(196, 144, 18, 0.1);
}

.day-nav__link:last-child { border-right: none; }
.day-nav__link:hover { background: rgba(196, 144, 18, 0.06); }
.day-nav__link--next { text-align: right; align-items: flex-end; }

.day-nav__label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.day-nav__name {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(248, 245, 238, 0.65);
  line-height: 1.3;
}

/* ============================================================
   404
   ============================================================ */
.not-found {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
}

.not-found h1 {
  font-family: 'Playfair Display', serif;
  font-size: 8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  opacity: 0.08;
  margin-bottom: 1.5rem;
}

.not-found p {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink-mid);
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-block;
  padding: 0.85rem 2.5rem;
  background: var(--dark);
  color: var(--ivory);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background 0.15s;
}

.btn:hover { background: var(--wine); }

/* ============================================================
   PHOTO GRID PAGE (/day/:id/photos)
   ============================================================ */
.photos-grid {
  columns: 3;
  column-gap: 4px;
  margin-top: 3rem;
  margin-bottom: 4rem;
}

.photos-grid__item {
  display: block;
  break-inside: avoid;
  margin-bottom: 4px;
  overflow: hidden;
}

.photos-grid__item img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.2s ease;
}

.photos-grid__item:hover img {
  opacity: 0.88;
}

@media (max-width: 680px) {
  .photos-grid { columns: 2; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 680px) {
  html { font-size: 16px; }
  .days-grid { grid-template-columns: 1fr; }
  .plan-section { padding: 2rem 1.75rem; }
  .update { padding: 1.5rem 1.5rem 1.75rem; }
  .day-nav .container { grid-template-columns: 1fr; }
  .day-nav__link { border-right: none; border-bottom: 1px solid rgba(196, 144, 18, 0.1); }
  .day-nav__link--next { text-align: left; align-items: flex-start; }
  .day-content { padding-top: 2.5rem; }
  .site-header { padding: 3.5rem 1.5rem 3.5rem; }
}

@media (min-width: 681px) and (max-width: 960px) {
  .days-grid { grid-template-columns: repeat(2, 1fr); }
}

