/* ============================================
   STILLNESS UNBOUND — Design System
   stillnessunbound.com
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Libre+Franklin:wght@300;400;500;600&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Color Palette */
  --color-cream:        #F5F0EB;
  --color-linen:        #EDE7DF;
  --color-sand:         #DED5CA;
  --color-text:         #2C2C2C;
  --color-text-soft:    #6B6560;
  --color-text-faint:   #9B9590;
  --color-sage:         #7A8B6F;
  --color-sage-deep:    #5E6E53;
  --color-sage-light:   #9AAD8E;
  --color-gold:         #B8A88A;
  --color-gold-light:   #D4C8B0;
  --color-earth:        #3A342E;
  --color-earth-deep:   #2A2520;
  --color-white:        #FDFCFA;

  /* Typography Scale */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Libre Franklin', 'Helvetica Neue', sans-serif;

  --text-xs:   0.8125rem;   /* 13px */
  --text-sm:   0.875rem;    /* 14px */
  --text-base: 1rem;        /* 16px */
  --text-md:   1.125rem;    /* 18px */
  --text-lg:   1.25rem;     /* 20px */
  --text-xl:   1.5rem;      /* 24px */
  --text-2xl:  2rem;        /* 32px */
  --text-3xl:  2.5rem;      /* 40px */
  --text-4xl:  3.25rem;     /* 52px */
  --text-5xl:  4rem;        /* 64px */

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

  /* Layout */
  --max-width:       1200px;
  --max-width-text:  720px;
  --nav-height:      72px;

  /* Transitions */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration: 0.3s;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-cream);
}

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

a {
  color: var(--color-sage-deep);
  text-decoration: none;
  transition: color var(--duration) var(--ease-out);
}

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

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-text);
}

h1 {
  font-size: var(--text-3xl);
  letter-spacing: 0.01em;
}

h2 {
  font-size: var(--text-2xl);
  letter-spacing: 0.01em;
}

h3 {
  font-size: var(--text-xl);
}

p {
  margin-bottom: 1.25em;
}

p:last-child {
  margin-bottom: 0;
}

.text-soft {
  color: var(--color-text-soft);
}

.text-faint {
  color: var(--color-text-faint);
}

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

.container--narrow {
  max-width: var(--max-width-text);
}

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

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

.section--linen {
  background-color: var(--color-linen);
}

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

.section--earth h2,
.section--earth h3 {
  color: var(--color-cream);
}

.section--earth .text-soft {
  color: var(--color-gold-light);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background-color: rgba(245, 240, 235, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid rgba(184, 168, 138, 0.2);
  transition: background-color var(--duration) var(--ease-out);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.nav__brand {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: 0.03em;
  text-decoration: none;
}

.nav__brand:hover {
  color: var(--color-sage-deep);
}

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

.nav__link {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-soft);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
  transition: color var(--duration) var(--ease-out);
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-sage-deep);
}

.nav__link--active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-sage);
  border-radius: 1px;
}

/* About Dropdown */
.nav__dropdown {
  position: relative;
}

.nav__dropdown-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__dropdown-toggle::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform var(--duration) var(--ease-out);
}

.nav__dropdown:hover .nav__dropdown-toggle::after {
  transform: rotate(-135deg);
}

.nav__dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(42, 37, 32, 0.1);
  padding: var(--space-xs) 0;
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration) var(--ease-out), visibility var(--duration);
}

.nav__dropdown:hover .nav__dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.nav__dropdown-item {
  display: block;
  padding: 8px var(--space-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-soft);
  letter-spacing: 0.02em;
  transition: background-color var(--duration), color var(--duration);
}

.nav__dropdown-item:hover {
  background-color: var(--color-linen);
  color: var(--color-sage-deep);
}

/* Mobile Nav Toggle */
.nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: var(--color-text);
  border-radius: 1px;
  transition: transform var(--duration) var(--ease-out), opacity var(--duration);
}

.nav__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(4.5px, 4.5px);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4.5px, -4.5px);
}

/* Mobile Menu */
.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-cream);
  padding: var(--space-xl) var(--space-md);
  z-index: 999;
  overflow-y: auto;
}

.nav__mobile.active {
  display: block;
  animation: fadeIn 0.3s var(--ease-out);
}

.nav__mobile-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.nav__mobile-link {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--color-sand);
  display: block;
  transition: color var(--duration);
}

.nav__mobile-link:hover {
  color: var(--color-sage-deep);
}

.nav__mobile-link--sub {
  font-size: var(--text-md);
  font-family: var(--font-body);
  font-weight: 400;
  padding-left: var(--space-md);
  color: var(--color-text-soft);
  border-bottom-color: var(--color-linen);
}

.nav__mobile-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-faint);
  padding: var(--space-md) 0 var(--space-xs);
}

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

/* --- Hero Sections --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: var(--space-3xl) 0 var(--space-2xl);
  margin-top: 0;
  overflow: hidden;
}

.hero--compact {
  min-height: 50vh;
  align-items: flex-end;
  padding: var(--space-2xl) 0 var(--space-xl);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(42, 37, 32, 0.75) 0%,
    rgba(42, 37, 32, 0.35) 40%,
    rgba(42, 37, 32, 0.1) 70%,
    transparent 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  width: 100%;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 400;
  color: var(--color-cream);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-xs);
  line-height: 1.1;
}

.hero__subtitle {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  font-style: italic;
  color: var(--color-gold-light);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-lg);
}

.hero__compact-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 400;
  color: var(--color-cream);
  letter-spacing: 0.03em;
  margin-bottom: var(--space-xs);
}

.hero__compact-subtitle {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 400;
  font-style: italic;
  color: var(--color-gold-light);
}

/* Placeholder for hero when no image loaded yet */
.hero__bg--placeholder {
  background: linear-gradient(
    160deg,
    var(--color-earth-deep) 0%,
    var(--color-earth) 40%,
    #4A4035 70%,
    #5A4F42 100%
  );
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration) var(--ease-out);
}

.btn--primary {
  background-color: var(--color-sage);
  color: var(--color-white);
}

.btn--primary:hover {
  background-color: var(--color-sage-deep);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(94, 110, 83, 0.25);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-sage-deep);
  border: 1.5px solid var(--color-sage);
}

.btn--secondary:hover {
  background-color: var(--color-sage);
  color: var(--color-white);
}

.btn--light {
  background-color: rgba(253, 252, 250, 0.15);
  color: var(--color-cream);
  border: 1.5px solid rgba(253, 252, 250, 0.4);
}

.btn--light:hover {
  background-color: rgba(253, 252, 250, 0.25);
  color: var(--color-white);
}

.btn--sm {
  padding: 10px 24px;
  font-size: var(--text-xs);
}

/* Text link with arrow */
.link-arrow {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-sage-deep);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--duration) var(--ease-out), color var(--duration);
}

.link-arrow:hover {
  gap: 10px;
  color: var(--color-sage);
}

.link-arrow::after {
  content: '→';
  font-size: 1.1em;
}

/* --- Pull Quote --- */
.pullquote {
  position: relative;
  padding: var(--space-2xl) 0;
  text-align: center;
}

.pullquote__text {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  font-style: italic;
  line-height: 1.6;
  color: var(--color-text);
  max-width: 640px;
  margin: 0 auto var(--space-sm);
}

.pullquote__source {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  letter-spacing: 0.04em;
}

.pullquote--earth .pullquote__text {
  color: var(--color-cream);
}

.pullquote--earth .pullquote__source {
  color: var(--color-gold-light);
}

/* Decorative divider */
.divider {
  display: block;
  width: 48px;
  height: 1px;
  background-color: var(--color-gold);
  margin: var(--space-lg) auto;
  border: none;
}

.divider--left {
  margin-left: 0;
}

/* --- Event Card --- */
.event-card {
  background-color: var(--color-white);
  border-radius: 10px;
  padding: var(--space-lg);
  box-shadow: 0 2px 16px rgba(42, 37, 32, 0.06);
  border: 1px solid var(--color-sand);
  transition: box-shadow var(--duration) var(--ease-out);
}

.event-card:hover {
  box-shadow: 0 4px 24px rgba(42, 37, 32, 0.1);
}

.event-card__label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-sage);
  margin-bottom: var(--space-xs);
}

.event-card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.event-card__meta {
  font-size: var(--text-sm);
  color: var(--color-text-soft);
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.event-card__meta span {
  display: block;
}

/* --- Email Signup --- */
.signup {
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
}

.signup__heading {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

.signup__text {
  font-size: var(--text-base);
  color: var(--color-text-soft);
  max-width: 480px;
  margin: 0 auto var(--space-lg);
}

.signup__form {
  display: flex;
  gap: var(--space-xs);
  max-width: 440px;
  margin: 0 auto;
}

.signup__input {
  flex: 1;
  font-family: var(--font-body);
  font-size: var(--text-base);
  padding: 14px 18px;
  border: 1.5px solid var(--color-sand);
  border-radius: 6px;
  background-color: var(--color-white);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--duration);
}

.signup__input:focus {
  border-color: var(--color-sage);
}

.signup__input::placeholder {
  color: var(--color-text-faint);
}

/* --- Footer --- */
.footer {
  background-color: var(--color-earth);
  color: var(--color-linen);
  padding: var(--space-2xl) 0 var(--space-lg);
}

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

.footer__brand {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-cream);
  letter-spacing: 0.03em;
  margin-bottom: var(--space-xs);
}

.footer__tagline {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-style: italic;
  color: var(--color-gold-light);
}

.footer__heading {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--color-linen);
  opacity: 0.7;
  transition: opacity var(--duration);
}

.footer__link:hover {
  opacity: 1;
  color: var(--color-cream);
}

.footer__contact-item {
  font-size: var(--text-sm);
  color: var(--color-linen);
  opacity: 0.7;
  margin-bottom: 6px;
}

.footer__contact-item a {
  color: var(--color-linen);
  transition: opacity var(--duration);
}

.footer__contact-item a:hover {
  opacity: 1;
  color: var(--color-cream);
}

.footer__social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.footer__social a {
  color: var(--color-linen);
  opacity: 0.6;
  transition: opacity var(--duration);
  font-size: var(--text-sm);
}

.footer__social a:hover {
  opacity: 1;
}

/* Footer email signup */
.footer__signup {
  border-top: 1px solid rgba(184, 168, 138, 0.2);
  padding-top: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer__signup .signup__form {
  max-width: 400px;
  margin: 0;
}

.footer__signup .signup__heading {
  font-size: var(--text-lg);
  color: var(--color-cream);
  text-align: left;
  margin-bottom: var(--space-xs);
}

.footer__signup .signup__text {
  text-align: left;
  color: var(--color-gold-light);
  font-size: var(--text-sm);
  margin: 0 0 var(--space-sm);
  max-width: none;
}

.footer__signup .signup__input {
  background-color: rgba(253, 252, 250, 0.08);
  border-color: rgba(184, 168, 138, 0.3);
  color: var(--color-cream);
}

.footer__signup .signup__input::placeholder {
  color: rgba(237, 231, 223, 0.4);
}

.footer__signup .signup__input:focus {
  border-color: var(--color-sage-light);
}

.footer__bottom {
  border-top: 1px solid rgba(184, 168, 138, 0.15);
  padding-top: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-align: center;
}

/* --- Prose Content (for essay pages) --- */
.prose {
  max-width: var(--max-width-text);
  margin: 0 auto;
}

.prose p {
  font-size: var(--text-md);
  line-height: 1.85;
  margin-bottom: 1.5em;
}

.prose h2 {
  margin-top: 2em;
  margin-bottom: 0.75em;
}

.prose h3 {
  margin-top: 1.75em;
  margin-bottom: 0.5em;
}

/* --- Contact Form --- */
.form__group {
  margin-bottom: var(--space-md);
}

.form__label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-soft);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.form__input,
.form__textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-base);
  padding: 14px 18px;
  border: 1.5px solid var(--color-sand);
  border-radius: 6px;
  background-color: var(--color-white);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--duration);
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--color-sage);
}

.form__textarea {
  min-height: 160px;
  resize: vertical;
}

/* --- Page Body Offset for Fixed Nav --- */
.page-body {
  padding-top: var(--nav-height);
}

/* --- Responsive --- */

/* Tablet and up */
@media (min-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }

  .hero__title {
    font-size: var(--text-5xl);
  }

  .hero__subtitle {
    font-size: var(--text-xl);
  }

  .section { padding: var(--space-3xl) 0; }
  .section--lg { padding: var(--space-4xl) 0; }

  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .pullquote__text {
    font-size: var(--text-2xl);
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .nav__links {
    display: flex;
  }

  .nav__toggle {
    display: none;
  }

  .signup__form {
    flex-direction: row;
  }
}

/* Mobile-specific */
@media (max-width: 1023px) {
  .signup__form {
    flex-direction: column;
  }

  .signup__form .btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 767px) {
  .hero {
    min-height: 85vh;
  }

  .hero--compact {
    min-height: 40vh;
  }

  .hero__title {
    font-size: var(--text-3xl);
  }

  .event-card {
    padding: var(--space-md);
  }
}

/* --- Animations (load-in) --- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }
