/* ============================================================
   Wayfarer's Crossing — Stylesheet
   ============================================================ */


/* === Custom Properties ========================================= */

:root {
  /* Color palette: warm parchment tones with a golden amber accent */
  --color-bg:         #f5f1e8;   /* warm off-white, like aged paper */
  --color-bg-alt:     #ece7da;   /* slightly deeper warm white for alternate sections */
  --color-bg-card:    #faf8f2;   /* near-white card surface */

  --color-text:       #2a2520;   /* soft dark charcoal with warmth */
  --color-text-muted: #6a5f55;   /* warm medium gray for secondary text */

  --color-accent:     #8b6914;   /* golden amber — inspired by old maps, compass brass */
  --color-accent-dark:#6d520e;   /* deeper accent for hover states */

  --color-border:     #cdc7b7;   /* warm, subtle border */

  /* Typography */
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --font-sans:  'Source Sans 3', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --max-width:  860px;
  --gap:        2rem;

  /* Spacing scale */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   2rem;
  --space-lg:   4rem;
  --space-xl:   6rem;

  /* Misc */
  --radius:     4px;
  --transition: 0.2s ease;
}


/* === Reset & Base ============================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem; /* 17px — comfortable for reading */
  line-height: 1.75;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-dark);
}


/* === Skip Link (accessibility) ================================= */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-accent);
  color: var(--color-bg);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  z-index: 100;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
}


/* === Layout Container ========================================== */

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


/* === Hero / Site Header ======================================== */

.site-header {
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.hero {
  max-width: 620px;
  margin: 0 auto;
}

/* Subtle decorative ornament above the site title */
.hero-ornament {
  font-size: 1.1rem;
  color: var(--color-accent);
  letter-spacing: 0.4em;
  margin-bottom: var(--space-sm);
  opacity: 0.7;
}

.site-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6.5vw, 4.25rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--color-text);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
}

.site-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.site-welcome {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.85;
  max-width: 520px;
  margin: 0 auto;
}


/* === Section Shared Styles ===================================== */

.section-header {
  text-align: center;
  margin-bottom: var(--space-md);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  /* Decorative accent underline */
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 36px;
  height: 2px;
  background-color: var(--color-accent);
  margin: 0.5rem auto 0;
  border-radius: 1px;
}

.section-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}


/* === Destinations Section ====================================== */

.destinations-section {
  padding: var(--space-lg) 0;
}

/* CSS Grid: fills columns at 300px min, expands evenly for more cards */
.destinations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: var(--gap);
}

/* === Destination Card ========================================== */

.destination-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-accent); /* accent top border marks the "path" */
  border-radius: var(--radius);
  transition: box-shadow var(--transition), transform var(--transition);
}

.destination-card:hover {
  box-shadow: 0 6px 24px rgba(42, 37, 32, 0.09);
  transform: translateY(-3px);
}

.card-inner {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Small category label above the card title */
.card-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.card-description {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  flex: 1; /* push CTA button to bottom of card */
  margin-bottom: var(--space-md);
}

/* Outlined button that fills on hover */
.card-cta {
  display: inline-block;
  align-self: flex-start;
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius);
  letter-spacing: 0.02em;
  transition:
    background-color var(--transition),
    color var(--transition),
    border-color var(--transition);
}

.card-cta:hover {
  background-color: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
}


/* === About Section ============================================= */

.about-section {
  padding: var(--space-lg) 0;
  background-color: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.about-content {
  max-width: 580px;
  margin: 0 auto;
  text-align: center;
}

.about-content p {
  color: var(--color-text-muted);
  line-height: 1.85;
  margin-bottom: var(--space-sm);
}

.about-content p:last-child {
  margin-bottom: 0;
}


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

.site-footer {
  padding: var(--space-lg) 0;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
}

.footer-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--color-border); /* intentionally very subtle */
  margin-top: var(--space-xs);
}


/* === Responsive ================================================ */

/* Tablets and smaller */
@media (max-width: 680px) {
  :root {
    --space-lg: 3rem;
    --space-xl: 4rem;
  }

  .container {
    padding: 0 var(--space-sm);
  }

  .destinations-grid {
    grid-template-columns: 1fr;
  }
}

/* Larger screens: add more breathing room */
@media (min-width: 1024px) {
  :root {
    --space-xl: 8rem;
  }
}


/* === Focus & Accessibility ===================================== */

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .destination-card,
  .card-cta,
  .skip-link {
    transition: none;
  }
}
