/*
  Barcelona Companion - V4 (Dual Entry)
  Shared Design System
*/

:root {
  /* Warm, welcoming color palette */
  --bg-color: #F9F8F6;
  --text-primary: #222220;
  --text-secondary: #767571;
  --border-color: #E8E6E1;
  --accent-color: #222220;

  /* Pure system typography */
  --font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-regular: 400;
  --font-medium: 500;
  
  /* Restrained, elegant spacing */
  --spacing-xs: 8px;
  --spacing-sm: 24px;
  --spacing-md: 48px;
  --spacing-lg: 80px;
  --spacing-xl: 140px;

  /* Mobile standard side padding */
  --page-padding: 24px;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-weight: var(--font-regular);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-color);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  color: var(--text-secondary);
  text-decoration-color: var(--text-secondary);
}

.clean-list {
  list-style: none;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: var(--spacing-lg) 0;
  width: 100%;
}

/* ==========================================================================
   MOBILE LAYOUT (iPhone First)
   ========================================================================== */

.page-wrapper {
  padding: var(--spacing-xl) var(--page-padding) 120px var(--page-padding);
  max-width: 500px; /* Comfortable reading width on mobile */
  margin: 0 auto;
}

/* Opening (Emotional & Welcoming) */
.opening-section {
  margin-bottom: var(--spacing-lg);
}

.opening-text {
  font-size: 20px;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  max-width: 32ch; /* Ensure text wraps beautifully */
}

.opening-subtext {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 40ch;
}

/* Common Section Structure */
.info-section {
  margin-bottom: var(--spacing-lg);
}

.section-title {
  font-size: 14px;
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-sm);
}

.section-intro {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
  line-height: 1.5;
}

/* Save the Date & Actions */
.action-group {
  margin-top: var(--spacing-sm);
}

.primary-action {
  display: inline-block;
  font-size: 15px;
  font-weight: var(--font-medium);
  text-decoration: none;
  border: 1px solid var(--border-color);
  padding: 12px 20px;
  border-radius: 4px;
  margin-top: 12px;
}

.primary-action:hover {
  border-color: var(--text-secondary);
}

/* The Evening (Programme) */
.programme {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: 32px; /* Tighter margin before the host note */
}

.programme-item {
  display: flex;
  flex-direction: column;
}

.programme-time {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.programme-event {
  font-size: 18px;
  font-weight: var(--font-medium);
}

.host-note {
  font-size: 15px;
  color: var(--text-secondary);
  font-style: italic; /* Visually quieter, friendly note */
}

/* Accommodation */
.hotel-tier {
  margin-bottom: var(--spacing-md);
}

.tier-name {
  font-size: 16px;
  font-weight: var(--font-medium);
  margin-bottom: 12px;
}

.hotel-list li {
  margin-bottom: 8px;
}

.hotel-list a {
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2px;
}

.hotel-list a:hover {
  border-bottom-color: var(--text-primary);
}

/* Venue & Map Links */
.venue-details {
  font-style: normal;
  font-size: 16px;
  margin-bottom: var(--spacing-sm);
}

.venue-name {
  font-size: 18px;
  font-weight: var(--font-medium);
  display: block;
  margin-bottom: 4px;
}

.map-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Transport */
.transport-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.transport-list li {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.transport-mode {
  font-weight: var(--font-medium);
  color: var(--text-primary);
  display: block;
  margin-bottom: 2px;
}

/* Confirmation (Personal Closing) */
.closing-section {
  margin-top: var(--spacing-lg);
}

.closing-message {
  font-size: 18px;
  margin-bottom: var(--spacing-sm);
}

.closing-note {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 24px;
}

/* ==========================================================================
   TABLET LAYOUT (iPad)
   ========================================================================== */

@media (min-width: 768px) {
  .page-wrapper {
    padding: 120px 48px;
    max-width: 720px;
  }

  .opening-text {
    font-size: 24px;
    max-width: 38ch;
  }

  .opening-subtext {
    font-size: 18px;
  }

  .programme-item {
    flex-direction: row;
    align-items: baseline;
    gap: 32px;
  }

  .programme-time {
    min-width: 80px;
    font-size: 16px;
  }

  .host-note {
    margin-left: 112px; /* Aligns with event text */
  }

  .transport-list li {
    display: flex;
    gap: 16px;
  }

  .transport-mode {
    min-width: 140px;
    margin-bottom: 0;
  }
}

/* ==========================================================================
   DESKTOP LAYOUT
   ========================================================================== */

@media (min-width: 1024px) {
  .page-wrapper {
    max-width: 900px;
    padding: 160px 64px;
  }

  /* Structural Grid for clarity and organization */
  .info-section {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 48px;
    align-items: baseline;
  }

  .section-title {
    margin-bottom: 0;
  }

  .section-content-wrapper {
    grid-column: 2;
  }
}
