/* ==========================================================================
   Awesome Lisbon — design system
   Palette pulled from the site mark: navy ink, azulejo blue, ceramic gold,
   terracotta roof-tile, cream paper. Signature motif: the eight-point
   azulejo star (see .tile-strip / .star) used throughout as a wayfinding
   device, echoing the tilework Lisbon is actually known for.
   ========================================================================== */

:root{
  --navy: #14233a;
  --navy-2: #0e1a2b;
  --ink: #23303f;
  --teal: #0c4049;
  --azulejo: #2f6a86;
  --azulejo-light: #bcdce1;
  --gold: #d89636;
  --gold-light: #e2b65e;
  --terracotta: #b0592f;
  --cream: #faf4e3;
  --paper: #fdfaf1;
  --cream-deep: #f0e6cc;
  --line: rgba(20,35,58,0.14);
  --line-soft: rgba(20,35,58,0.08);

  --font-display: "Fraunces", "Iowan Old Style", "Georgia", serif;
  --font-body: "Public Sans", "Helvetica Neue", Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20,35,58,0.05), 0 8px 24px -12px rgba(20,35,58,0.18);
  --shadow-lift: 0 4px 6px rgba(20,35,58,0.06), 0 20px 40px -18px rgba(20,35,58,0.28);
  --container: 1180px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body{
  margin:0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img{ max-width: 100%; display:block; }
a{ color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover{ color: var(--terracotta); }
a:focus-visible, button:focus-visible, input:focus-visible{
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

h1,h2,h3,h4{
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.12;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1{ font-size: clamp(2.1rem, 1.6rem + 2.4vw, 3.4rem); font-weight: 600; }
h2{ font-size: clamp(1.5rem, 1.3rem + 1vw, 2.1rem); }
h3{ font-size: 1.28rem; }
p{ margin: 0 0 1.1em; }
.lede{ font-size: 1.18rem; color: #3c4a59; }

.container{ max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.wrap-narrow{ max-width: 760px; }

.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-family: var(--font-body); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--terracotta);
  margin-bottom: 0.9em;
}
.eyebrow .star{ width:9px; height:9px; }

/* ---------- Azulejo star (signature mark) ---------- */
.star{
  display:inline-block; width:14px; height:14px;
  background: var(--gold);
  clip-path: polygon(50% 0%, 61% 35%, 96% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 4% 35%, 39% 35%);
}

.tile-strip{
  height: 14px;
  background-image: radial-gradient(circle, var(--azulejo) 0 1.6px, transparent 1.7px);
  background-size: 16px 16px;
  background-position: center;
  background-color: var(--navy);
  opacity: 0.9;
}
.tile-strip.gold{ background-image: radial-gradient(circle, var(--gold-light) 0 1.6px, transparent 1.7px); background-color: var(--teal); }

/* ---------- Skip link ---------- */
.skip-link{
  position:absolute; left:-999px; top:auto;
  background: var(--navy); color:#fff; padding: 10px 16px; border-radius: 0 0 8px 0;
  z-index: 200; font-weight:600;
}
.skip-link:focus{ left:0; top:0; }

/* ---------- Info bar ---------- */
.infobar{
  background: var(--navy); color: var(--cream);
  font-size: 0.82rem; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.infobar .container{
  display:flex; flex-wrap:wrap; gap: 6px 22px; align-items:center;
  padding-top:9px; padding-bottom:9px;
}
.infobar .item{ display:flex; align-items:center; gap:7px; white-space:nowrap; color: #dfe6ec; }
.infobar .dot{ width:6px; height:6px; border-radius:50%; background: var(--gold); flex:none; }
.infobar strong{ color:#fff; font-weight:700; }
.infobar a{ color:#fff; }

/* ---------- Header / nav ---------- */
header.site{ background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top:0; z-index:100; }
.nav-row{ display:flex; align-items:center; justify-content:space-between; gap: 20px; padding: 12px 0; }
.brand{ display:flex; align-items:center; gap:10px; font-family: var(--font-display); font-weight:600; font-size:1.15rem; color: var(--navy); text-decoration:none; }
.brand img{ height: 46px; width:auto; }
.brand:hover{ color: var(--navy); }

nav.primary{ display:flex; align-items:center; gap: 4px; }
nav.primary a{
  color: var(--navy); text-decoration:none; font-weight:600; font-size:0.95rem;
  padding: 9px 13px; border-radius: 8px; transition: background .15s, color .15s;
}
nav.primary a:hover, nav.primary a[aria-current="page"]{ background: var(--cream-deep); color: var(--terracotta); }

.nav-actions{ display:flex; align-items:center; gap:10px; }
.btn{
  display:inline-flex; align-items:center; gap:8px; justify-content:center;
  font-family: var(--font-body); font-weight:700; font-size:0.92rem;
  padding: 11px 20px; border-radius: 999px; text-decoration:none;
  border: 1.5px solid transparent; cursor:pointer; transition: transform .12s ease, box-shadow .12s ease, background .15s;
}
.btn:hover{ transform: translateY(-1px); }
.btn-gold{ background: var(--gold); color: var(--navy-2); box-shadow: var(--shadow); }
.btn-gold:hover{ background: var(--gold-light); color: var(--navy-2); }
.btn-outline{ border-color: var(--navy); color: var(--navy); background:transparent; }
.btn-outline:hover{ background: var(--navy); color:#fff; }
.btn-ghost{ color: var(--navy); background: transparent; }
.btn-sm{ padding: 8px 15px; font-size: 0.85rem; }

.menu-toggle{
  display:none; background:none; border: 1.5px solid var(--line); border-radius:8px;
  padding: 8px 10px; cursor:pointer;
}
.menu-toggle span{ display:block; width:20px; height:2px; background: var(--navy); margin: 4px 0; }

/* ---------- Hero ---------- */
.hero{ padding: 56px 0 60px; position: relative; overflow:hidden; }
.hero-grid{ display:grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items:center; }
.hero h1{ margin-bottom: 0.4em; }
.hero .lede{ max-width: 46ch; margin-bottom: 1.6em; }
.hero-ctas{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom: 2.2em; }
.hero-art{ position:relative; }
.hero-art img{ border-radius: var(--radius); box-shadow: var(--shadow-lift); }
.hero-art::after{
  content:""; position:absolute; inset: 14px -14px -14px 14px; z-index:-1;
  border-radius: var(--radius);
  background-image: radial-gradient(circle, var(--azulejo) 0 2.2px, transparent 2.3px);
  background-size: 18px 18px;
  opacity:.55;
}

.stat-row{ display:flex; gap: 0; flex-wrap:wrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat{ flex:1 1 140px; padding: 18px 22px; border-right: 1px solid var(--line); }
.stat:last-child{ border-right:none; }
.stat .n{ font-family: var(--font-display); font-size: 1.9rem; color: var(--navy); font-weight:600; display:block; }
.stat .l{ font-size: 0.82rem; color:#5a6675; }

/* ---------- Section scaffolding ---------- */
section{ padding: 58px 0; }
.section-head{ max-width: 640px; margin-bottom: 34px; }
.section-alt{ background: var(--paper); }
.section-navy{ background: var(--navy); color: #dfe6ec; }
.section-navy h2, .section-navy h3{ color:#fff; }
.section-navy a{ color: var(--gold-light); }
.section-navy .eyebrow{ color: var(--gold-light); }

/* ---------- Department / content cards ---------- */
.grid{ display:grid; gap: 22px; }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-2{ grid-template-columns: repeat(2, 1fr); }
.grid-4{ grid-template-columns: repeat(4, 1fr); }

.card{
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow); display:flex; flex-direction:column; gap:10px;
  position:relative; overflow:hidden;
}
.card::before{
  content:""; position:absolute; top:0; left:0; right:0; height:5px;
  background: linear-gradient(90deg, var(--gold) 0 33%, var(--azulejo) 33% 66%, var(--terracotta) 66% 100%);
}
.card .dept-icon{ margin-bottom: 4px; }
.card h3{ margin-bottom:2px; }
.card h3 a{ color: var(--navy); text-decoration:none; }
.card h3 a:hover{ color: var(--terracotta); }
.card p{ color:#4c5866; margin-bottom: 6px; flex:1; }
.card .links{ display:flex; flex-direction:column; gap: 6px; margin: 4px 0 10px; }
.card .links a{ font-size:0.92rem; font-weight:600; text-decoration:none; color: var(--teal); }
.card .links a:hover{ color: var(--terracotta); }
.card .view-all{ font-size:0.86rem; font-weight:700; text-decoration:none; }

.place-card{ background: var(--paper); border:1px solid var(--line); border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow); display:flex; flex-direction:column; }
.place-card .ph{ background: linear-gradient(135deg, var(--azulejo), var(--teal)); position:relative; aspect-ratio: 16/10; display:flex; align-items:center; justify-content:center; }
.place-card .ph .star{ width:34px; height:34px; opacity:.85; }
.place-card .body{ padding: 18px 20px 20px; flex:1; display:flex; flex-direction:column; }
.place-card h3{ margin-bottom:4px; font-size:1.12rem; }
.place-card p{ color:#4c5866; font-size:0.94rem; flex:1; }

/* ---------- Quick-facts / callout boxes ---------- */
.callout{
  border: 1.5px solid var(--azulejo); background: var(--azulejo-light); border-radius: var(--radius-sm);
  padding: 18px 20px; margin: 24px 0;
}
.callout.gold{ border-color: var(--gold); background: #fbead0; }
.callout h4{ margin: 0 0 6px; font-size: 1rem; color: var(--navy); }
.callout p:last-child{ margin-bottom:0; }

.table-wrap{ overflow-x:auto; margin: 20px 0; border:1px solid var(--line); border-radius: var(--radius-sm); }
table{ width:100%; border-collapse: collapse; font-size:0.94rem; }
th, td{ text-align:left; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); }
thead th{ background: var(--cream-deep); color: var(--navy); font-family: var(--font-display); font-weight:600; }
tbody tr:last-child td{ border-bottom:none; }

/* ---------- Ticker / news strip ---------- */
.board{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; }
.board li{ display:flex; gap:16px; align-items:baseline; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
.board li:last-child{ border-bottom:none; }
.board .tag{ font-size:0.68rem; font-weight:800; letter-spacing:.08em; color: var(--navy); background: var(--gold-light); padding: 3px 8px; border-radius: 5px; flex:none; }
.board a{ font-weight:600; text-decoration:none; }
.board a:hover{ text-decoration:underline; }
.board .when{ margin-left:auto; font-size:0.8rem; color:#9fb0bd; flex:none; }

/* ---------- Breadcrumb / article ---------- */
.crumbs{ font-size:0.85rem; color:#6a7683; padding: 16px 0; }
.crumbs a{ color:#6a7683; text-decoration:none; }
.crumbs a:hover{ color: var(--terracotta); }
.crumbs .sep{ margin: 0 6px; opacity:.6; }

.article-head{ padding: 10px 0 30px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.article-head .lede{ margin-top: 10px; }
.meta-row{ display:flex; gap:16px; flex-wrap:wrap; font-size:0.84rem; color:#6a7683; margin-top: 14px; }

.prose{ max-width: 740px; }
.prose h2{ margin-top: 1.6em; }
.prose h2:first-child{ margin-top:0; }
.prose h3{ margin-top: 1.3em; }
.prose ul, .prose ol{ padding-left: 1.3em; }
.prose li{ margin-bottom: 0.5em; }
.prose blockquote{
  margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--gold);
  font-family: var(--font-display); font-size:1.18rem; color: var(--navy); font-style:italic;
}

.toc{ background: var(--paper); border:1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 22px; margin: 26px 0; }
.toc h2{ font-size:0.82rem; text-transform:uppercase; letter-spacing:.1em; font-family: var(--font-body); font-weight:800; color: var(--terracotta); margin-bottom:10px; }
.toc ol{ margin:0; padding-left: 1.2em; columns: 2; column-gap: 24px; }
.toc li{ break-inside: avoid; margin-bottom: 6px; font-size:0.93rem; }

.faq dt{ font-family: var(--font-display); font-weight:600; color: var(--navy); font-size:1.05rem; margin-top:1.3em; }
.faq dd{ margin: 6px 0 0; color:#3c4a59; }

.related{ background: var(--paper); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }

.byline-box{ display:flex; gap:14px; align-items:flex-start; background: var(--cream-deep); border-radius: var(--radius-sm); padding:16px 18px; margin-top: 40px; }
.byline-box .av{ width:42px; height:42px; border-radius:50%; background: var(--navy); flex:none; display:flex; align-items:center; justify-content:center; }
.byline-box .av .star{ background: var(--gold-light); }
.byline-box p{ margin:0; font-size:0.92rem; color:#4c5866; }
.byline-box strong{ color: var(--navy); }

/* ---------- Growth note ---------- */
.growth{ text-align:center; max-width: 700px; margin: 0 auto; }
.progress{ height:10px; border-radius:999px; background: var(--cream-deep); overflow:hidden; margin: 18px 0 10px; border:1px solid var(--line); }
.progress i{ display:block; height:100%; background: linear-gradient(90deg, var(--gold), var(--terracotta)); }
.progress-label{ font-size:0.82rem; color:#5a6675; display:flex; justify-content:space-between; }

/* ---------- Footer ---------- */
footer.site{ background: var(--navy-2); color: #b9c5d1; padding-top: 54px; }
footer.site .container{ padding-bottom: 30px; }
.footer-grid{ display:grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 30px; padding-bottom: 40px; }
.footer-brand img{ height:40px; margin-bottom: 14px; }
.footer-brand p{ font-size:0.9rem; color:#8b98a6; max-width: 30ch; }
footer.site h4{ color:#fff; font-family: var(--font-body); font-size:0.78rem; text-transform:uppercase; letter-spacing:.1em; margin-bottom: 14px; }
footer.site ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:9px; }
footer.site a{ color:#b9c5d1; text-decoration:none; font-size:0.92rem; }
footer.site a:hover{ color: var(--gold-light); }
.footer-bottom{ border-top:1px solid rgba(255,255,255,0.1); padding: 18px 0 22px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; font-size:0.82rem; color:#7c8995; }
.footer-bottom a{ color:#7c8995; }

/* ---------- Utility ---------- */
.text-center{ text-align:center; }
.mt-0{ margin-top:0; } .mb-0{ margin-bottom:0; }
.visually-hidden{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .hero-grid{ grid-template-columns:1fr; }
  .hero-art{ order:-1; }
  .grid-4{ grid-template-columns: repeat(2,1fr); }
  .grid-3{ grid-template-columns: repeat(2,1fr); }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px){
  nav.primary{
    position:absolute; top: 100%; left:0; right:0; background: var(--paper);
    flex-direction:column; align-items:stretch; padding: 10px 16px 16px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display:none;
  }
  nav.primary.open{ display:flex; }
  nav.primary a{ padding: 12px 8px; border-bottom: 1px solid var(--line-soft); border-radius:0; }
  .menu-toggle{ display:inline-block; }
  .nav-actions .btn-outline{ display:none; }
  .grid-3, .grid-2, .grid-4{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .toc ol{ columns:1; }
  .stat-row{ flex-wrap:wrap; }
  .stat{ flex: 1 1 45%; }
  h1{ font-size: 2.1rem; }
  .infobar .container{ overflow-x:auto; flex-wrap:nowrap; }
}
@media (max-width: 520px){
  .footer-grid{ grid-template-columns: 1fr; }
}
