/* ================================================================
   THE ORDER OF THE SILVER THORN — Global Stylesheet
   thorn.css  |  v1.0
   
   TABLE OF CONTENTS
   -----------------
   1.  Design Tokens (CSS Custom Properties)
   2.  Reset & Base
   3.  Typography
   4.  Layout Utilities
   5.  Decorative Elements
   6.  Buttons
   7.  Cards
   8.  Header / Nav
   9.  Hero
   10. About Section
   11. Join / Social Chips
   12. Events
   13. Contact / Form
   14. Footer
   15. Toast Notification
   16. Animations & Entrance Effects
   17. Responsive Overrides
================================================================ */


/* ================================================================
   1. DESIGN TOKENS
================================================================ */
:root {

  /* --- Background layers --- */
  --color-bg:           #0d0f0b;
  --color-bg-mid:       #111510;
  --color-surface:      #181d14;
  --color-surface-2:    #1f261a;

  /* --- Borders --- */
  --color-border:       rgba(192, 192, 160, .18);
  --color-border-gold:  rgba(196, 162, 80, .35);

  /* --- Brand palette --- */
  --color-silver:       #c8cfc8;
  --color-silver-lt:    #e2e8e2;
  --color-gold:         #c4a250;
  --color-gold-lt:      #dbb96a;
  --color-green:        #3a6b42;
  --color-green-lt:     #4e8e58;
  --color-parchment:    #d8c9a3;
  --color-parchment-lt: #ede3c8;

  /* --- Text --- */
  --color-text:         #cac9be;
  --color-text-lt:      #e8e6de;
  --color-text-dim:     #7a7a6e;

  /* --- Typography --- */
  --font-display:       'Cinzel Decorative', serif;
  --font-heading:       'Cinzel', serif;
  --font-body:          'EB Garamond', serif;

  /* --- Spacing scale --- */
  --space-xs:   .35rem;
  --space-sm:   .75rem;
  --space-md:   1.25rem;
  --space-lg:   2.25rem;
  --space-xl:   4rem;
  --space-2xl:  7rem;

  /* --- Border radii --- */
  --radius-sm:   6px;
  --radius-md:   14px;
  --radius-lg:   24px;
  --radius-pill: 999px;

  /* --- Shadows --- */
  --shadow-card:        0 4px 32px rgba(0, 0, 0, .45), 0 1px 0 rgba(192, 192, 160, .07) inset;
  --shadow-glow-gold:   0 0 40px rgba(196, 162, 80, .12);
  --shadow-glow-green:  0 0 60px rgba(58, 107, 66, .18);

  /* --- Motion --- */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur:  260ms;
}


/* ================================================================
   2. RESET & BASE
================================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Subtle noise-grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: .6;
}

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

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

a:hover {
  color: var(--color-gold-lt);
}

ul {
  list-style: none;
}


/* ================================================================
   3. TYPOGRAPHY
================================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-silver-lt);
  line-height: 1.15;
  letter-spacing: .02em;
}

/* Large decorative display text — use on hero titles */
.display {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.5vw, 3rem);
  color: var(--color-silver-lt);
  line-height: 1.1;
  letter-spacing: .03em;
}

/* Small all-caps label above headings */
.kicker {
  font-family: var(--font-heading);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--color-gold);
}


/* ================================================================
   4. LAYOUT UTILITIES
================================================================ */

/* Centered content wrapper */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

/* Standard section vertical rhythm */
.section {
  padding-block: var(--space-xl);
}

/* Section intro block */
.section__header {
  margin-bottom: var(--space-lg);
}

.section__header h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--color-silver-lt);
}

.section__header p {
  max-width: 60ch;
  margin-top: var(--space-sm);
  color: var(--color-text);
  font-size: 1.1rem;
}

/* Two-column split layout */
.split {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}

/* Three-column card grid */
.grid-3 {
  display: grid;
  gap: var(--space-md);
}

/* Two-column grid (equal) */
.grid-2 {
  display: grid;
  gap: var(--space-md);
}

/* Four-column grid */
.grid-4 {
  display: grid;
  gap: var(--space-md);
}

/* Centered text block (for narrow prose sections) */
.text-center {
  text-align: center;
}

.prose {
  max-width: 68ch;
  margin-inline: auto;
}


/* ================================================================
   5. DECORATIVE ELEMENTS
================================================================ */

/* Simple gradient line */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-gold) 30%, var(--color-gold) 70%, transparent);
  opacity: .25;
  border: 0;
  margin-block: var(--space-xl);
}

/* Line + ornament glyph */
.divider-ornament {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-block: var(--space-xl);
}

.divider-ornament::before,
.divider-ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(196, 162, 80, .3));
}

.divider-ornament::after {
  background: linear-gradient(to left, transparent, rgba(196, 162, 80, .3));
}

.divider-ornament span {
  color: var(--color-gold);
  font-size: 1.4rem;
  opacity: .7;
}


/* ================================================================
   6. BUTTONS
================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.6rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: all var(--dur) var(--ease);
  cursor: pointer;
  border: none;
}

/* Gold filled — primary CTA */
.btn-primary {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-lt));
  color: #0d0f0b;
  box-shadow: 0 2px 20px rgba(196, 162, 80, .3);
}

.btn-primary:hover {
  color: #0d0f0b;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(196, 162, 80, .45);
}

/* Outlined — secondary CTA */
.btn-outline {
  background: transparent;
  color: var(--color-silver-lt);
  border: 1.5px solid rgba(200, 207, 200, .35);
}

.btn-outline:hover {
  color: var(--color-silver-lt);
  border-color: var(--color-silver-lt);
  background: rgba(200, 207, 200, .07);
  transform: translateY(-2px);
}

/* Ghost (subtle, dark) */
.btn-ghost {
  background: transparent;
  color: var(--color-gold);
  border: 1.5px solid var(--color-border-gold);
}

.btn-ghost:hover {
  color: var(--color-gold-lt);
  background: rgba(196, 162, 80, .08);
  transform: translateY(-2px);
}

/* Row of buttons */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: var(--space-lg);
}


/* ================================================================
   7. CARDS
================================================================ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

/* Subtle gold-tinted gradient wash inside card */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(196, 162, 80, .04) 0%, transparent 60%);
  pointer-events: none;
}

/* Gold border variant */
.card--accent {
  border-color: var(--color-border-gold);
}

/* Green border variant */
.card--green {
  border-color: rgba(58, 107, 66, .5);
  border-top: 3px solid var(--color-green);
}

/* Hover lift for interactive cards */
.card--hover {
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.card--hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--shadow-glow-gold);
}

/* Card sub-elements */
.card__label {
  font-family: var(--font-heading);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

.card__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-silver-lt);
  margin-bottom: var(--space-xs);
}

.card__body {
  font-size: 1rem;
  color: var(--color-text);
}


/* ================================================================
   8. HEADER / NAV
================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 15, 11, .82);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: .65rem;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: .85rem;
  font-family: var(--font-heading);
  font-size: .9rem;
  font-weight: 700;
  color: var(--color-silver-lt);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nav__brand:hover {
  color: var(--color-silver-lt);
}

.nav__brand img {
  height: 56px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(196, 162, 80, .3));
  transition: filter var(--dur) var(--ease);
}

.nav__brand img:hover {
  filter: drop-shadow(0 0 14px rgba(196, 162, 80, .6));
}

.nav__links {
  display: flex;
  gap: var(--space-md);
}

.nav__links a {
  font-family: var(--font-heading);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-text);
  position: relative;
  padding-bottom: 2px;
}

/* Animated underline on nav links */
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}

.nav__links a:hover {
  color: var(--color-gold);
}

.nav__links a:hover::after {
  transform: scaleX(1);
}

/* Active page indicator (add .nav__link--active via JS or static markup) */
.nav__links a.active {
  color: var(--color-gold);
}

.nav__links a.active::after {
  transform: scaleX(1);
}


/* ================================================================
   9. HERO
================================================================ */
.hero {
  position: relative;
  padding-block: var(--space-2xl) var(--space-xl);
  text-align: center;
  overflow: hidden;
}

/* Background glow behind hero content */
.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(
    ellipse at center,
    rgba(58, 107, 66, .22) 0%,
    rgba(196, 162, 80, .08) 40%,
    transparent 70%
  );
  pointer-events: none;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem 1rem;
  border: 1px solid var(--color-border-gold);
  border-radius: var(--radius-pill);
  background: rgba(196, 162, 80, .06);
  font-family: var(--font-heading);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-lg);
}

.hero__badge span { opacity: .5; }

.hero__logo {
  width: clamp(160px, 22vw, 260px);
  margin-inline: auto;
  margin-bottom: var(--space-lg);
  filter:
    drop-shadow(0 0 30px rgba(196, 162, 80, .25))
    drop-shadow(0 0 60px rgba(58, 107, 66, .15));
  animation: float 6s ease-in-out infinite;
}

.hero__tagline {
  font-family: var(--font-heading);
  font-size: clamp(.85rem, 2vw, 1rem);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-lg);
}

.hero__tagline span { margin-inline: .5rem; opacity: .5; }

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2.6rem);
  color: var(--color-silver-lt);
  line-height: 1.1;
  letter-spacing: .04em;
  margin-bottom: var(--space-md);
}

.hero__sub {
  max-width: 62ch;
  margin-inline: auto;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--color-text);
  margin-bottom: var(--space-lg);
}

.hero__sub strong { color: var(--color-silver-lt); }

/* Compact hero variant for interior pages (e.g. /about, /events) */
.hero--compact {
  padding-block: var(--space-xl) var(--space-lg);
}

.hero--compact .hero__logo {
  width: clamp(80px, 10vw, 120px);
  margin-bottom: var(--space-md);
}


/* ================================================================
   10. ABOUT SECTION
================================================================ */
.callout {
  background: linear-gradient(135deg, rgba(58, 107, 66, .12), rgba(196, 162, 80, .06));
  border: 1px solid var(--color-border-gold);
  border-left: 4px solid var(--color-gold);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-top: var(--space-md);
}

.callout__label {
  font-family: var(--font-heading);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

.value-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: var(--space-sm);
}

.value-list li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  color: var(--color-text-lt);
  font-size: 1.05rem;
}

.value-list li::before {
  content: '✦';
  color: var(--color-gold);
  font-size: .7rem;
  margin-top: .35rem;
  flex-shrink: 0;
}

/* Numbered fact list inside cards */
.facts-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.fact {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.fact__num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1.5px solid var(--color-gold);
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-size: .8rem;
  font-weight: 700;
  color: var(--color-gold);
}

.fact__text {
  color: var(--color-text);
  font-size: 1rem;
  padding-top: .3rem;
}


/* ================================================================
   11. JOIN / SOCIAL CHIPS
================================================================ */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: var(--space-lg);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  border: 1.5px solid rgba(200, 207, 200, .25);
  border-radius: var(--radius-pill);
  background: rgba(200, 207, 200, .05);
  font-family: var(--font-heading);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--color-silver-lt);
  transition: all var(--dur) var(--ease);
}

.chip:hover {
  color: var(--color-silver-lt);
  border-color: var(--color-gold);
  background: rgba(196, 162, 80, .1);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(196, 162, 80, .2);
}


/* ================================================================
   12. EVENTS
================================================================ */
.event-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--shadow-glow-gold);
}

.event-card--upcoming {
  border-top: 3px solid var(--color-gold);
}

.event-card--past {
  border-top: 3px solid var(--color-green);
  opacity: .85;
}

.event-card__type {
  font-family: var(--font-heading);
  font-size: .65rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-xs);
}

.event-card--past .event-card__type {
  color: var(--color-green-lt);
}

.event-card__name {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-silver-lt);
  margin-bottom: var(--space-xs);
}

.event-card__meta {
  font-size: .95rem;
  color: var(--color-text-dim);
}

.event-card__note {
  margin-top: var(--space-sm);
  font-size: .95rem;
  color: var(--color-gold-lt);
  font-style: italic;
}


/* ================================================================
   13. CONTACT / FORM
================================================================ */
.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.form__label {
  font-family: var(--font-heading);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.form__input,
.form__textarea,
.form__select {
  width: 100%;
  padding: .8rem 1rem;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-lt);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  outline: none;
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  border-color: rgba(196, 162, 80, .5);
  box-shadow: 0 0 0 3px rgba(196, 162, 80, .1);
}

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

.form__select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23c4a250' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form__select option {
  background: var(--color-surface-2);
  color: var(--color-text-lt);
}


/* ================================================================
   14. FOOTER
================================================================ */
.site-footer {
  padding-block: var(--space-xl);
  border-top: 1px solid var(--color-border);
  background: linear-gradient(to top, rgba(58, 107, 66, .06), transparent);
  text-align: center;
}

.footer__logo {
  width: 70px;
  margin-inline: auto;
  margin-bottom: var(--space-md);
  opacity: .7;
  filter: drop-shadow(0 0 10px rgba(196, 162, 80, .2));
}

.footer__name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-silver-lt);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.footer__tagline {
  font-style: italic;
  color: var(--color-text-dim);
  font-size: 1rem;
}

.footer__copy {
  margin-top: var(--space-lg);
  font-size: .8rem;
  color: var(--color-text-dim);
  letter-spacing: .05em;
}

/* Optional footer link row */
.footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.footer__links a {
  font-family: var(--font-heading);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-text-dim);
}

.footer__links a:hover {
  color: var(--color-gold);
}


/* ================================================================
   15. TOAST NOTIFICATION
================================================================ */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-gold);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  color: var(--color-silver-lt);
  font-family: var(--font-heading);
  font-size: .9rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .5);
  transform: translateY(100px);
  opacity: 0;
  transition: all .4s var(--ease);
  z-index: 9000;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}


/* ================================================================
   16. ANIMATIONS & ENTRANCE EFFECTS
================================================================ */

/* Fade-up: add .in when element enters viewport (via JS observer) */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

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

/* Floating bob — used on hero logo */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* Shimmer — use on decorative text or badge elements */
@keyframes shimmer {
  0%   { opacity: .6; }
  50%  { opacity: 1; }
  100% { opacity: .6; }
}

.shimmer {
  animation: shimmer 3s ease-in-out infinite;
}


/* ================================================================
   17. RESPONSIVE OVERRIDES
================================================================ */

/* Tablet */
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Desktop */
@media (min-width: 740px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 820px) {
  .split { grid-template-columns: 1.1fr .9fr; }
}

@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Mobile: hide nav links (burger menu can be added per-page if needed) */
@media (max-width: 640px) {
  .nav__links    { display: none; }
  .nav__brand    { font-size: .75rem; }
  .hero__title   { font-size: 1.5rem; }
  .btn-group     { flex-direction: column; align-items: center; }
}
