/* ==========================================================================
   Bologna.travel — design system
   "La Rossa": warm terracotta/brick palette inspired by Bologna's porticoes.
   Hand-written, no framework. Headings: Fraunces. Body: Inter.
   ========================================================================== */

:root {
  --brick:      #9c2c2c;   /* primary — deep portico red */
  --brick-dark: #7a211f;
  --terracotta: #c4612f;   /* warm accent */
  --gold:       #c79a3e;   /* Renaissance gold, sparing use */
  --ink:        #2b2320;   /* warm near-black text */
  --ink-soft:   #5d544d;   /* secondary text */
  --cream:      #fbf7f1;   /* page background (warm paper) */
  --sand:       #f1e9dc;   /* alternating section bg */
  --sand-deep:  #e7dcca;
  --line:       #e4d8c5;   /* hairlines / borders */
  --white:      #ffffff;

  --maxw: 1140px;
  --maxw-prose: 720px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(43,35,32,.06), 0 8px 24px rgba(43,35,32,.07);
  --shadow-lg: 0 12px 40px rgba(43,35,32,.14);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brick); text-decoration-color: rgba(156,44,44,.35); text-underline-offset: 2px; }
a:hover { color: var(--brick-dark); text-decoration-color: currentColor; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin-top: 1.8em; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.45rem); margin-top: 1.5em; }
p { margin: 0 0 1.1em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,247,241,.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 1.35rem; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.brand .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--brick); display: inline-block; }
.brand b { color: var(--brick); font-weight: 600; }
.primary-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.primary-nav a {
  font-size: .96rem; font-weight: 500; color: var(--ink); text-decoration: none;
  padding: 8px 12px; border-radius: 8px; white-space: nowrap;
}
.primary-nav a:hover { background: var(--sand); color: var(--brick); }
.primary-nav a.active { color: var(--brick); font-weight: 600; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s; }

/* secondary guide nav */
.guide-nav { border-bottom: 1px solid var(--line); background: var(--white); }
.guide-nav .scroller { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 7px 0; }
.guide-nav .scroller::-webkit-scrollbar { display: none; }
.guide-nav a { font-size: .85rem; color: var(--ink-soft); text-decoration: none; padding: 6px 12px; border-radius: 99px; white-space: nowrap; }
.guide-nav a:hover { background: var(--sand); color: var(--brick); }
.guide-nav a.active { background: var(--brick); color: #fff; }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .primary-nav {
    position: fixed; inset: 66px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 8px 14px 16px; margin: 0; transform: translateY(-130%);
    transition: transform .28s ease; box-shadow: var(--shadow); max-height: calc(100vh - 66px); overflow-y: auto;
  }
  .primary-nav.open { transform: translateY(0); }
  .primary-nav a { padding: 12px 10px; border-radius: 8px; width: 100%; font-size: 1.05rem; }
  body.nav-open { overflow: hidden; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; color: #fff;
  display: flex; align-items: center; min-height: 46vh;
  /* designed default backdrop (warm Bologna tones) until a photo is dropped in */
  background:
    radial-gradient(1200px 500px at 75% -10%, rgba(199,154,62,.4), transparent 60%),
    linear-gradient(135deg, #7a211f 0%, #9c2c2c 45%, #c4612f 100%);
}
.hero.compact { min-height: 34vh; }
.hero.has-photo { background: var(--ink); }
/* dark overlay only when there's a photo behind the text (keeps gradient heroes bright) */
.hero.has-photo::after { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(43,35,32,.34) 0%, rgba(43,35,32,.68) 100%); }
.hero .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero .inner { position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: clamp(48px, 9vw, 104px) 22px; }
.hero.compact .inner { padding: clamp(40px, 6vw, 64px) 22px; }
.hero h1 { color: #fff; max-width: 16ch; text-shadow: 0 2px 18px rgba(0,0,0,.3); }
.hero p.lede { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 46ch; color: rgba(255,255,255,.94); margin-bottom: 1.6em; }
.eyebrow { display: inline-block; font-family: var(--sans); font-weight: 600; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.hero .eyebrow { color: #f3d9a3; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-weight: 600; font-size: 1rem; text-decoration: none; padding: 13px 24px; border-radius: 99px; cursor: pointer; border: 0; transition: transform .12s ease, box-shadow .2s ease; }
.btn-primary { background: var(--brick); color: #fff; box-shadow: 0 6px 18px rgba(156,44,44,.32); }
.btn-primary:hover { background: var(--brick-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.24); color: #fff; }
.btn-outline { background: transparent; color: var(--brick); border: 1.5px solid var(--brick); }
.btn-outline:hover { background: var(--brick); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- sections ---------- */
section { padding: clamp(40px, 6vw, 72px) 0; }
.section-sand { background: var(--sand); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; margin: 0; }

/* ---------- card grid ---------- */
.grid { display: grid; gap: 24px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .16s ease, box-shadow .2s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card a.cover { display: block; aspect-ratio: 3/2; overflow: hidden; background: var(--sand-deep); }
/* placeholder cover until real photos are added */
.card a.cover.ph { background: linear-gradient(135deg, #9c2c2c 0%, #c4612f 100%); position: relative; }
.card a.cover.ph::after { content: ""; position: absolute; inset: 0; background: radial-gradient(420px 200px at 80% -20%, rgba(199,154,62,.5), transparent 60%); }
.card a.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover a.cover img { transform: scale(1.04); }
.card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.card .kicker { font-size: .76rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 7px; }
.card h3 { font-size: 1.2rem; margin: 0 0 8px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--brick); }
.card p { font-size: .96rem; color: var(--ink-soft); margin: 0 0 14px; }
.card .more { margin-top: auto; font-size: .9rem; font-weight: 600; color: var(--brick); text-decoration: none; }

/* ---------- article / prose ---------- */
.article { padding: clamp(28px, 5vw, 52px) 22px 64px; }
.prose { max-width: var(--maxw-prose); margin: 0 auto; }
.prose > img, .article-hero { border-radius: var(--radius); margin: 1.6em 0; box-shadow: var(--shadow); }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose h2 { scroll-margin-top: 90px; }
.prose h3 { scroll-margin-top: 90px; }
.prose figure { margin: 1.8em 0; }
.prose figure figcaption { font-size: .85rem; color: var(--ink-soft); text-align: center; margin-top: 8px; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--sand-deep); font-style: italic; color: var(--ink-soft); }

/* lead paragraph */
.prose .lead { font-size: 1.2rem; color: var(--ink-soft); }

/* local-tip callout — background+padding, NOT a left accent bar */
.tip { background: var(--sand); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 1.8em 0; }
.tip .tip-label { font-family: var(--sans); font-weight: 700; font-size: .8rem; letter-spacing: .07em; text-transform: uppercase; color: var(--brick); margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.tip p:last-child { margin-bottom: 0; }

/* affiliate / booking widget */
.booking-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 2em 0; box-shadow: var(--shadow); text-align: center; }
.booking-box h3 { margin-top: 0; }
.booking-box p { color: var(--ink-soft); font-size: .98rem; }

/* breadcrumbs */
.breadcrumbs { font-size: .85rem; color: var(--ink-soft); padding: 16px 0 0; }
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brick); }
.breadcrumbs span.sep { margin: 0 7px; opacity: .5; }

/* table of contents */
.toc { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 1.6em 0; }
.toc p { font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; columns: 2; }
.toc li { margin-bottom: 6px; }
@media (max-width: 560px) { .toc ul { columns: 1; } }

/* fact box / quick facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 1.8em 0; }
.facts div { background: var(--white); padding: 16px 18px; }
.facts dt { font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 600; font-size: 1.02rem; }

/* related grid at article foot */
.related { background: var(--sand); }

/* credits table */
.credits-table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 1.4em 0; }
.credits-table th, .credits-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.credits-table th { font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); }
.credits-table td:first-child { white-space: nowrap; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #d9cfc4; padding: 56px 0 28px; font-size: .95rem; }
.site-footer a { color: #e8ddd0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 34px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer .blurb { color: #b9aea2; max-width: 34ch; }
.footer-brand { font-family: var(--serif); font-size: 1.3rem; color: #fff; margin-bottom: 12px; display: inline-block; }
.footer-social { display: flex; gap: 14px; margin-top: 16px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: #9a8f83; font-size: .85rem; }

/* ---------- utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.hide { display: none !important; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 10px 16px; border-radius: 8px; }

/* ---------- mobile: roomier horizontal gutters ---------- */
@media (max-width: 600px) {
  .wrap { padding-left: 26px; padding-right: 26px; }
  .article { padding-left: 26px; padding-right: 26px; }
  .hero .inner { padding-left: 26px; padding-right: 26px; }
  body { font-size: 17px; }
  h1 { max-width: none; }
  .hero p.lede { max-width: none; }
}
