/* ==========================================================================
   Tapas Trails — Design System
   "Sobremesa" palette: terracotta, olive, saffron, bone
   ========================================================================== */

:root {
  /* Colors */
  --terracotta: #C8553D;
  --terracotta-deep: #A8412C;
  --olive: #3D4A2A;
  --olive-light: #5A6B40;
  --saffron: #E8A33D;
  --bone: #F5EFE6;
  --bone-warm: #EDE4D3;
  --ink: #1A1611;
  --ink-soft: #4A413A;

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Spacing scale */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* Layout */
  --max-w: 1280px;
  --max-w-prose: 680px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bone);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--terracotta);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--terracotta-deep);
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 400;
}

h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  font-weight: 500;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: var(--space-sm);
  display: inline-block;
}

.italic {
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 768px) {
  .container { padding: 0 var(--space-lg); }
}

.section {
  padding: var(--space-2xl) 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.95rem 1.75rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  text-decoration: none;
}

.btn-primary {
  background: var(--terracotta);
  color: var(--bone);
}

.btn-primary:hover {
  background: var(--terracotta-deep);
  color: var(--bone);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px rgba(200, 85, 61, 0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--bone);
}

.btn-arrow::after {
  content: '→';
  transition: transform 0.25s var(--ease);
}

.btn:hover .btn-arrow::after,
.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 239, 230, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26, 22, 17, 0.08);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo .italic {
  color: var(--terracotta);
}

.nav-menu {
  display: none;
  list-style: none;
  gap: var(--space-lg);
  align-items: center;
}

.nav-menu a {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-menu a:hover {
  color: var(--terracotta);
}

@media (min-width: 768px) {
  .nav-menu { display: flex; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: var(--space-2xl) 0 var(--space-xl);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 45%;
  height: 100%;
  background: var(--bone-warm);
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 1fr;
    gap: var(--space-2xl);
  }
}

.hero-text {
  animation: fadeUp 1s var(--ease) 0.1s both;
}

.hero h1 {
  margin-bottom: var(--space-md);
}

.hero h1 .accent {
  color: var(--terracotta);
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}

.hero-lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin-bottom: var(--space-lg);
  max-width: 540px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  animation: fadeIn 1.2s var(--ease) 0.3s both;
}

.hero-image {
  position: relative;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, var(--terracotta) 0%, var(--saffron) 100%);
  border-radius: 2px;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
  filter: grayscale(15%) contrast(1.05);
}

.hero-tag {
  position: absolute;
  bottom: var(--space-md);
  left: var(--space-md);
  background: var(--bone);
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  z-index: 2;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================================
   Trust bar
   ========================================================================== */

.trust-bar {
  background: var(--olive);
  color: var(--bone);
  padding: var(--space-md) 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  text-align: center;
}

@media (min-width: 768px) {
  .trust-grid { grid-template-columns: repeat(3, 1fr); }
}

.trust-item {
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.trust-item::before {
  content: '✓ ';
  color: var(--saffron);
  font-weight: 600;
  margin-right: 0.3em;
}

/* ==========================================================================
   Cities section
   ========================================================================== */

.cities-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

@media (min-width: 900px) {
  .cities-intro {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: end;
  }
}

.cities-intro p {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 480px;
}

.cities-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .cities-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .cities-grid { grid-template-columns: repeat(3, 1fr); }
}

.city-card {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bone-warm);
  cursor: pointer;
  transition: transform 0.4s var(--ease);
}

.city-card:hover {
  transform: translateY(-4px);
}

.city-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.4s var(--ease);
  filter: brightness(0.85);
}

.city-card:hover img {
  transform: scale(1.05);
  filter: brightness(0.95);
}

.city-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 22, 17, 0.8) 0%, rgba(26, 22, 17, 0) 60%);
  pointer-events: none;
}

.city-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  color: var(--bone);
  z-index: 1;
}

.city-card h3 {
  color: var(--bone);
  margin-bottom: 0.3em;
}

.city-card p {
  font-size: 0.92rem;
  opacity: 0.9;
  margin-bottom: var(--space-xs);
}

.city-card .city-cta {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--saffron);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.city-card.coming-soon::before {
  content: 'Coming soon';
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 2;
  background: var(--bone);
  color: var(--ink);
  padding: 0.3em 0.7em;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 2px;
}

/* ==========================================================================
   How it works
   ========================================================================== */

.how-section {
  background: var(--bone-warm);
}

.how-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

@media (min-width: 768px) {
  .how-grid { grid-template-columns: repeat(3, 1fr); }
}

.how-step {
  position: relative;
  padding-top: var(--space-md);
}

.how-step .step-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 4rem;
  color: var(--terracotta);
  line-height: 1;
  opacity: 0.9;
  margin-bottom: var(--space-xs);
  font-weight: 400;
}

.how-step h3 {
  margin-bottom: var(--space-xs);
}

.how-step p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.6;
}

/* ==========================================================================
   About section
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-2xl);
  }
}

.about-image {
  aspect-ratio: 4 / 5;
  background: var(--olive);
  position: relative;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text h2 {
  margin-bottom: var(--space-md);
}

.about-text p {
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin-bottom: var(--space-sm);
  line-height: 1.7;
}

.about-text p.lead {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: var(--space-md);
}

.about-signoff {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--terracotta);
  margin-top: var(--space-md);
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-section {
  background: var(--bone-warm);
}

.faq-list {
  max-width: var(--max-w-prose);
  margin: var(--space-xl) auto 0;
}

.faq-item {
  border-bottom: 1px solid rgba(26, 22, 17, 0.15);
  padding: var(--space-md) 0;
}

.faq-item summary {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--terracotta);
  transition: transform 0.3s var(--ease);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin-top: var(--space-sm);
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--ink);
  color: var(--bone);
  padding: var(--space-2xl) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

.footer-brand .logo {
  color: var(--bone);
  font-size: 1.75rem;
  margin-bottom: var(--space-sm);
  display: inline-block;
}

.footer-brand p {
  color: rgba(245, 239, 230, 0.65);
  max-width: 380px;
  font-size: 0.95rem;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: var(--space-sm);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: var(--space-xs);
}

.footer-col a {
  color: rgba(245, 239, 230, 0.85);
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: var(--saffron);
}

.footer-bottom {
  border-top: 1px solid rgba(245, 239, 230, 0.15);
  padding-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: rgba(245, 239, 230, 0.6);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.affiliate-disclosure {
  background: rgba(232, 163, 61, 0.1);
  border-left: 3px solid var(--saffron);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
  font-size: 0.85rem;
  color: rgba(245, 239, 230, 0.85);
  max-width: 800px;
}

/* ==========================================================================
   Tour cards (used on Barcelona page)
   ========================================================================== */

.tour-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

@media (min-width: 768px) {
  .tour-list { grid-template-columns: repeat(2, 1fr); }
}

.tour-card {
  background: var(--bone);
  border: 1px solid rgba(26, 22, 17, 0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.tour-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(26, 22, 17, 0.15);
}

.tour-card .tour-image {
  aspect-ratio: 16/10;
  background: var(--bone-warm);
  overflow: hidden;
  position: relative;
}

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

.tour-rank {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-display);
  font-style: italic;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.tour-content {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tour-content h3 {
  margin-bottom: var(--space-xs);
}

.tour-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: var(--space-sm);
}

.tour-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

.tour-rating {
  color: var(--saffron);
  font-weight: 600;
}

.tour-content p {
  color: var(--ink-soft);
  margin-bottom: var(--space-md);
  flex: 1;
}

.tour-card .btn {
  align-self: flex-start;
}

/* ==========================================================================
   Article (blog post)
   ========================================================================== */

.article-hero {
  padding: var(--space-2xl) 0 var(--space-lg);
}

.article-meta {
  display: flex;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: var(--space-md);
}

.article-content {
  max-width: var(--max-w-prose);
  margin: 0 auto;
  padding-bottom: var(--space-2xl);
}

.article-content > * {
  margin-bottom: var(--space-md);
}

.article-content h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.article-content h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
}

.article-content p {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--ink);
}

.article-content .lead {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--ink);
}

.article-content blockquote {
  border-left: 3px solid var(--terracotta);
  padding-left: var(--space-md);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink);
  margin: var(--space-lg) 0;
}

/* ==========================================================================
   Page header (for inner pages)
   ========================================================================== */

.page-header {
  padding: var(--space-2xl) 0 var(--space-lg);
  border-bottom: 1px solid rgba(26, 22, 17, 0.08);
}

.page-header h1 {
  max-width: 800px;
  margin-bottom: var(--space-md);
}

.page-header .lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 640px;
  line-height: 1.55;
}

.breadcrumb {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin-bottom: var(--space-sm);
}

.breadcrumb a {
  color: var(--ink-soft);
}

.breadcrumb a:hover {
  color: var(--terracotta);
}

/* ==========================================================================
   Cookie consent banner
   ========================================================================== */

#cookie-banner {
  position: fixed;
  bottom: var(--space-md);
  left: var(--space-md);
  right: var(--space-md);
  z-index: 1000;
  background: var(--ink);
  color: var(--bone);
  border-radius: 4px;
  box-shadow: 0 20px 60px -10px rgba(0,0,0,0.4);
  animation: slideUp 0.4s var(--ease) both;
  max-width: 700px;
  margin: 0 auto;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.cb-inner {
  padding: var(--space-md);
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 700px) {
  .cb-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.cb-text strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  display: block;
  margin-bottom: 0.3em;
  color: var(--bone);
}

.cb-text p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(245, 239, 230, 0.85);
  margin: 0;
}

.cb-text a {
  color: var(--saffron);
  text-decoration: underline;
}

.cb-actions {
  display: flex;
  gap: var(--space-xs);
  flex-shrink: 0;
}

.cb-btn {
  padding: 0.65rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  flex: 1;
}

@media (min-width: 700px) {
  .cb-btn { flex: 0 0 auto; }
}

.cb-accept {
  background: var(--terracotta);
  color: var(--bone);
}

.cb-accept:hover {
  background: var(--terracotta-deep);
}

.cb-reject {
  background: transparent;
  color: var(--bone);
  border: 1px solid rgba(245, 239, 230, 0.4);
}

.cb-reject:hover {
  border-color: var(--bone);
  background: rgba(245, 239, 230, 0.05);
}

/* ==========================================================================
   Tour groups (Barcelona page)
   ========================================================================== */

.tour-group {
  margin-bottom: var(--space-2xl);
}

.tour-group-header {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(26, 22, 17, 0.15);
}

.tour-group-header h2 {
  margin-bottom: var(--space-xs);
}

.tour-group-header p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 600px;
}

/* ==========================================================================
   Legal pages (privacy, cookies, disclosure)
   ========================================================================== */

.legal-content {
  max-width: var(--max-w-prose);
  margin: 0 auto;
  padding: var(--space-xl) 0;
}

.legal-content h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: var(--space-md);
}

.legal-content h2 {
  font-size: 1.4rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.legal-content p,
.legal-content li {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: var(--space-sm);
}

.legal-content ul {
  padding-left: var(--space-md);
  margin-bottom: var(--space-md);
}

.legal-content .meta {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: var(--space-lg);
  font-style: italic;
}
