/* ===== BEACON - Global Styles ===== */

/* --- Color Palette --- */
:root {
  --plum-dark: #594243;
  --earth-brown: #977F6B;
  --wine: #4C3439;
  --mauve: #87575D;
  --tan: #C9B196;
  --sage: #7D7C6A;
  --cream: #EDDDCB;
  --dusty-rose: #B18B85;

  --bg-primary: #F5EDE3;
  --bg-section-alt: #EDDDCB;
  --text-primary: #4C3439;
  --text-secondary: #594243;
  --text-light: #EDDDCB;
  --border-color: #C9B196;

  /* High-contrast alternatives for accessibility */
  --nav-text: #FFFFFF;
  --nav-text-muted: #E8D5C4;
  --footer-text: #FFFFFF;
  --subtitle-text: #6B5044;
  --tagline-text: #6B4550;
  --review-author-text: #6B4550;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'EB Garamond', 'Georgia', serif;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-weight: 400;
  line-height: 1.2;
  color: var(--wine);
}

h1 { font-size: 3.5rem; letter-spacing: 0.15em; }
h2 { font-size: 2.2rem; margin-bottom: 1rem; }
h3 { font-size: 1.6rem; margin-bottom: 0.75rem; }

p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

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

a:hover {
  color: var(--wine);
}

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

/* --- Focus Indicators --- */
*:focus-visible {
  outline: 3px solid var(--mauve);
  outline-offset: 2px;
}

.form-group input:focus-visible,
.form-group textarea:focus-visible,
.form-group select:focus-visible {
  outline: 3px solid var(--mauve);
  outline-offset: 0;
  border-color: var(--mauve);
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  background: var(--wine);
  color: var(--nav-text);
  padding: 0.75rem 1.5rem;
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
}

.skip-link:focus {
  top: 0.5rem;
  outline: 3px solid var(--nav-text);
  outline-offset: 2px;
  color: var(--nav-text);
}

/* --- Layout --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 4rem 0;
}

/* --- Folk Art Border --- */
.folk-border {
  position: relative;
  border: 3px solid var(--earth-brown);
  border-radius: 4px;
  padding: 8px;
  background: var(--cream);
}

.folk-border::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1.5px solid var(--tan);
  border-radius: 2px;
  pointer-events: none;
}

.folk-border-accent {
  border-color: var(--mauve);
}

.folk-border-accent::before {
  border-color: var(--dusty-rose);
}

/* --- Navigation --- */
.site-nav {
  background: var(--wine);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(76, 52, 57, 0.15);
}

.site-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  color: var(--nav-text);
  letter-spacing: 0.15em;
  font-weight: 600;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--nav-text-muted);
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  letter-spacing: 0.05em;
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--nav-text);
}

.nav-links a:focus-visible {
  outline-color: var(--nav-text);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle:focus-visible {
  outline-color: var(--nav-text);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--nav-text);
  margin: 5px 0;
  transition: 0.3s;
}

/* --- Hero Section --- */
.hero {
  text-align: center;
  padding: 5rem 0 3rem;
  background: var(--bg-primary);
}

.hero h1 {
  font-size: 4.5rem;
  color: var(--wine);
  margin-bottom: 0.5rem;
  font-weight: 300;
}

.hero .tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: var(--tagline-text);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.hero .subtitle {
  font-style: italic;
  color: var(--subtitle-text);
  font-size: 1.15rem;
  max-width: 500px;
  margin: 0 auto 2.5rem;
}

/* --- Logo Placeholder --- */
.logo-placeholder {
  width: 180px;
  height: 180px;
  margin: 0 auto 2rem;
  border-radius: 50%;
  background: var(--cream);
  border: 3px solid var(--earth-brown);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.logo-placeholder::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1.5px solid var(--tan);
}

.logo-placeholder span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  color: var(--earth-brown);
  text-align: center;
  padding: 1rem;
  line-height: 1.3;
}

/* --- Service Cards --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 2rem 0;
}

.service-card {
  text-align: center;
  transition: transform 0.3s ease;
}

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

.service-card .card-image {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  margin-bottom: 0;
}

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

.service-card .card-image .placeholder-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: italic;
  color: var(--earth-brown);
  font-size: 0.9rem;
  background: var(--cream);
}

.service-card .card-label {
  padding: 1rem;
  background: var(--wine);
}

.service-card .card-label h2 {
  color: var(--nav-text);
  margin-bottom: 0;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
}

.service-card .card-label h2::after {
  display: none;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  padding: 0.85rem 2.5rem;
  border: 2px solid var(--wine);
  color: var(--wine);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.btn:hover {
  background: var(--wine);
  color: var(--cream);
}

.btn-primary {
  background: var(--wine);
  color: var(--nav-text);
}

.btn-primary:hover {
  background: var(--plum-dark);
  border-color: var(--plum-dark);
  color: var(--nav-text);
}

.btn-small {
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
}

/* --- Page Header --- */
.page-header {
  text-align: center;
  padding: 4rem 0 2rem;
  background: var(--bg-primary);
}

.page-header h1 {
  font-size: 3rem;
}

.page-header .subtitle {
  font-style: italic;
  color: var(--subtitle-text);
  font-size: 1.15rem;
  margin-top: 0.5rem;
}

/* --- Content Sections --- */
.content-section {
  padding: 3rem 0;
}

.content-section:nth-child(even) {
  background: var(--bg-section-alt);
}

.content-section h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.content-section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--dusty-rose);
  margin: 0.75rem auto 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.two-col.reverse {
  direction: rtl;
}

.two-col.reverse > * {
  direction: ltr;
}

.section-image {
  max-width: 400px;
  margin: 0 auto;
}

/* --- FAQ Accordion --- */
.faq-item {
  border-bottom: 1px solid var(--tan);
  padding: 1rem 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: var(--wine);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--mauve);
  transition: transform 0.3s;
}

.faq-item.open .faq-question::after {
  content: '\2212';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding: 0.5rem 0 1rem;
  color: var(--text-secondary);
}

/* --- Fees Table --- */
.fees-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  background: var(--bg-primary);
  border-radius: 6px;
  overflow: hidden;
}

.fees-table th,
.fees-table td {
  text-align: left;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.fees-table thead th {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--tan);
}

.fees-table td:first-child {
  max-width: 20rem;
}

.fees-table tbody tr:last-child td {
  border-bottom: none;
}

.fees-table td:last-child,
.fees-table th:last-child {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

/* --- Reviews --- */
.review-card {
  background: var(--bg-primary);
  padding: 2rem;
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--dusty-rose);
}

.review-card .folk-border-inner {
  padding: 1.5rem;
}

.review-text {
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.review-author {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: var(--review-author-text);
  letter-spacing: 0.05em;
}

/* --- Contact Form --- */
.contact-section {
  padding: 4rem 0;
  background: var(--bg-section-alt);
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--wine);
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
}

.required-marker {
  color: var(--mauve);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  border: 1.5px solid var(--tan);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.3s;
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* --- Form Status --- */
.form-status {
  text-align: center;
  margin-top: 1rem;
  font-size: 1.05rem;
  min-height: 1.5em;
}

.form-status.success {
  color: var(--sage);
}

.form-status.error {
  color: var(--mauve);
}

/* --- Footer --- */
.site-footer {
  background: var(--wine);
  color: var(--footer-text);
  text-align: center;
  padding: 2.5rem 0;
}

.site-footer p {
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--tan);
}

.footer-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.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;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Responsive --- */
.desktop-break {
  display: inline;
}

@media (max-width: 768px) {
  .desktop-break {
    display: none;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero .tagline {
    font-size: 1.1rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .two-col.reverse {
    direction: ltr;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--wine);
    padding: 1rem 2rem 1.5rem;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav .container {
    position: relative;
  }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.8rem; }

  .section-image {
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .container {
    padding: 0 1.25rem;
  }
}
