/* ============================================================
   The Mushroom Conservatory — Workshop Site Styles
   ============================================================ */

:root {
  --green-dark: #1E3A1B;
  --green-mid: #2D5A27;
  --green-light: #4A7C3F;
  --green-pale: #d4e8cc;
  --cream: #F7F3ED;
  --cream-dark: #EDE8DF;
  --gold: #B8860B;
  --gold-light: #D4A017;
  --brown: #5C3D1E;
  --text: #1A1A1A;
  --text-muted: #5A5A5A;
  --white: #FDFCFA;
  --shadow: 0 2px 16px rgba(30,58,27,.12);
  --shadow-lg: 0 8px 40px rgba(30,58,27,.18);
  --radius: 10px;
  --radius-sm: 6px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  line-height: 1.25;
}

a { color: var(--green-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---- Navigation ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--green-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white) !important;
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none !important;
}

.nav-logo .logo-icon { font-size: 24px; }

.nav-links { display: flex; gap: 24px; }

.nav-links a {
  color: rgba(255,255,255,.85);
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
  text-decoration: none;
}

.nav-links a:hover { color: var(--white); }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(160deg, var(--green-dark) 0%, #2a5a1f 60%, #3d7a30 100%);
  color: var(--white);
  padding: 96px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner { position: relative; max-width: 720px; margin: 0 auto; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 13px;
  margin-bottom: 24px;
  color: #c8e8b8;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 58px);
  margin-bottom: 18px;
  color: var(--white);
}

.hero h1 span { color: #a8e090; }

.hero p {
  font-size: 18px;
  color: rgba(255,255,255,.82);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  padding: 14px 36px;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 600;
  transition: background .2s, transform .1s;
  text-decoration: none;
}

.hero-cta:hover { background: var(--gold-light); transform: translateY(-1px); text-decoration: none; }

/* ---- Sections ---- */
.section { padding: 72px 24px; }
.section-inner { max-width: 1100px; margin: 0 auto; }

.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: clamp(28px, 4vw, 40px); color: var(--green-dark); margin-bottom: 12px; }
.section-header p { color: var(--text-muted); font-size: 17px; max-width: 560px; margin: 0 auto; }

.section--alt { background: var(--cream); }

/* ---- Workshop Grid ---- */
.workshops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.workshop-card {
  background: var(--white);
  border: 1px solid #e0d8cc;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}

.workshop-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.card-img {
  height: 180px;
  background: linear-gradient(135deg, var(--green-mid), var(--green-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  flex-shrink: 0;
}

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

.card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }

.card-date {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--green-mid);
  margin-bottom: 8px;
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--green-dark);
  margin-bottom: 10px;
  line-height: 1.3;
}

.card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.card-meta span { display: flex; align-items: center; gap: 5px; }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #ede8e0;
}

.card-price {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--green-dark);
}

.card-price small { font-size: 13px; font-family: Inter, sans-serif; font-weight: 400; color: var(--text-muted); }

.spots-badge {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 100px;
  font-weight: 600;
}

.spots-badge--ok { background: #e6f4e0; color: var(--green-mid); }
.spots-badge--low { background: #fff3cd; color: #856404; }
.spots-badge--sold { background: #f8d7da; color: #842029; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .2s, transform .1s, opacity .2s;
  text-decoration: none;
}

.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn--primary { background: var(--green-mid); color: var(--white); }
.btn--primary:hover { background: var(--green-light); }
.btn--secondary { background: var(--cream-dark); color: var(--text); }
.btn--secondary:hover { background: #ddd8d0; }
.btn--gold { background: var(--gold); color: var(--white); }
.btn--gold:hover { background: var(--gold-light); }
.btn--sm { padding: 7px 16px; font-size: 13px; }
.btn--full { width: 100%; }

/* ---- Loading / Error states ---- */
.loading-state, .error-state, .empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid var(--green-pale);
  border-top-color: var(--green-mid);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white);
  border-radius: 14px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(.96) translateY(8px);
  transition: transform .2s;
}

.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  background: var(--green-dark);
  color: var(--white);
  padding: 22px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-header h3 {
  font-size: 19px;
  color: var(--white);
  font-family: 'Playfair Display', serif;
}

.modal-header p { font-size: 13px; color: #a8c898; margin-top: 4px; }

.modal-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 22px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.modal-close:hover { color: var(--white); }

.modal-body { padding: 24px; }

/* ---- Form ---- */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group label .req { color: #c00; margin-left: 2px; }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d0c8bc;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(45,90,39,.12);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-divider {
  border: none;
  border-top: 1px solid #ede8e0;
  margin: 20px 0;
}

/* Square card container */
#card-container {
  border: 1.5px solid #d0c8bc;
  border-radius: var(--radius-sm);
  padding: 14px;
  min-height: 56px;
  background: var(--white);
}

.order-summary {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 14px;
}

.order-summary .row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.order-summary .row--total {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  border-top: 1px solid #ddd8d0;
  padding-top: 8px;
  margin-top: 8px;
  margin-bottom: 0;
}

.form-error {
  color: #b91c1c;
  font-size: 13px;
  margin-top: 12px;
  padding: 10px 14px;
  background: #fef2f2;
  border-radius: var(--radius-sm);
  border: 1px solid #fecaca;
  display: none;
}

/* ---- Success state ---- */
.success-state {
  text-align: center;
  padding: 32px 24px;
}

.success-icon {
  width: 72px;
  height: 72px;
  background: #e6f4e0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 20px;
}

.success-state h3 { font-size: 24px; color: var(--green-dark); margin-bottom: 10px; }
.success-state p { color: var(--text-muted); font-size: 15px; }

/* ---- About section ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h2 { font-size: clamp(26px, 3vw, 36px); color: var(--green-dark); margin-bottom: 16px; }
.about-text p { color: var(--text-muted); line-height: 1.75; margin-bottom: 16px; font-size: 16px; }

.about-img {
  background: linear-gradient(135deg, var(--green-mid), var(--green-dark));
  border-radius: 16px;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.75);
  padding: 48px 24px 32px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-brand h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--white);
  margin-bottom: 10px;
}

.footer-brand p { font-size: 14px; line-height: 1.7; }

.footer-col h4 { color: var(--white); font-size: 13px; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { color: rgba(255,255,255,.7); font-size: 14px; text-decoration: none; transition: color .15s; }
.footer-col ul a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-bottom a { color: rgba(255,255,255,.6); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-img { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .workshops-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 24px 56px; }
}

@media (max-width: 480px) {
  .card-footer { flex-direction: column; align-items: flex-start; gap: 10px; }
  .card-footer .btn { width: 100%; }
}
