/* ============================================
   Clearview Creations Jewelry
   clearviewcreationsjewelry.ca
   Palette: white bg, #9124F3 purple, #1A1A1A black, #FF8604 orange
   Whimsical pages: Nunito + Lato
   Functional pages: Montserrat + Arvo
   ============================================ */

:root {
  /* Colour palette */
  --bg:            #FFFFFF;
  --surface:       #F3E8FF;   /* pale lavender — card backgrounds */
  --surface-mid:   #E8D5FF;   /* slightly deeper lavender */
  --purple:        #9124F3;   /* primary accent */
  --purple-light:  #B060FF;   /* hover state */
  --purple-dark:   #6A0FBF;   /* active / pressed */
  --purple-footer: #2D0A5E;   /* dark footer bg */
  --orange:        #FF8604;   /* secondary accent */
  --orange-light:  #FFB040;   /* orange hover */
  --text:          #1A1A1A;   /* primary text */
  --text-muted:    #6B6B6B;   /* subdued text */
  --text-light:    #FFFFFF;   /* text on dark surfaces */
  --text-muted-light: #D4B8F0; /* subdued text on dark footer */
  --border:        rgba(145,36,243,0.2);

  /* Typography */
  --whimsy:  'Nunito', 'Comic Sans MS', cursive;    /* headings on whimsical pages */
  --body-w:  'Lato', system-ui, sans-serif;
  --display: 'Montserrat', system-ui, sans-serif;
  --serif:   'Arvo', Georgia, serif;
  --body:    'Lato', system-ui, sans-serif;

  /* Layout */
  --max-w:     1100px;
  --radius:    18px;
  --radius-sm: 10px;
}

/* ============================================
   Reset & base
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.2;
  color: var(--text);
}

p { margin: 0 0 1em; }

a {
  color: var(--purple);
  text-decoration: none;
}
a:hover { color: var(--purple-light); text-decoration: underline; }

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

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Whimsical pages */
body.page-whimsy { font-family: var(--body-w); }
body.page-whimsy h1,
body.page-whimsy h2,
body.page-whimsy h3,
body.page-whimsy h4 {
  font-family: var(--whimsy);
  font-weight: 800;
}

/* Functional pages */
body.page-functional { font-family: var(--serif); }
body.page-functional h1,
body.page-functional h2,
body.page-functional h3,
body.page-functional h4 {
  font-family: var(--display);
  font-weight: 700;
}

/* ============================================
   Accessibility
   ============================================ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--purple);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============================================
   Header / Nav
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--purple-footer);
  border-bottom: 3px solid var(--purple);
  transition: box-shadow 0.5s ease;
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(145,36,243,0.3);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1400px;
  margin: 0 auto;
  gap: 16px;
  transition: padding 0.5s ease;
}

.site-header.scrolled .nav-wrap {
  padding-top: 8px;
  padding-bottom: 8px;
}

/* Brand / logo */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }

.brand-logo {
  width: 200px;
  height: 160px;
  object-fit: contain;
  flex-shrink: 0;
  transition: width 0.5s ease, height 0.5s ease;
}

.site-header.scrolled .brand-logo {
  width: 88px;
  height: 70px;
}

.brand-namestack {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--whimsy);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--purple);
  transition: font-size 0.5s ease;
  white-space: nowrap;
}

.brand-tagline {
  font-family: var(--body-w);
  font-size: 0.72rem;
  color: var(--orange);
  letter-spacing: 0.04em;
  transition: font-size 0.5s ease, opacity 0.5s ease;
  white-space: nowrap;
}

.site-header.scrolled .brand-name    { font-size: 0.85rem; }
.site-header.scrolled .brand-tagline { font-size: 0; opacity: 0; }

/* Main nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.main-nav a {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-muted-light);
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: var(--purple);
  color: #fff;
  text-decoration: none;
}

.nav-cta {
  background: var(--orange) !important;
  color: #fff !important;
  font-weight: 700 !important;
}
.nav-cta:hover {
  background: var(--orange-light) !important;
  color: #fff !important;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--text-muted-light);
  color: var(--text-muted-light);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding-bottom: 12px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { text-align: center; }
  .nav-wrap { flex-wrap: wrap; }
  .brand-logo { width: 120px; height: 96px; }
}

/* ============================================
   Sections
   ============================================ */
.section {
  padding: 72px 0;
  position: relative;
}

.section-dark    { background: var(--bg); }
.section-surface { background: var(--surface); }
.section-mid     { background: var(--surface-mid); }

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}

.section-eyebrow {
  font-family: var(--display);
  color: var(--orange);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin-bottom: 10px;
}

.section h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: var(--text);
}

.section-sub {
  color: var(--text-muted);
  margin-top: 12px;
  font-size: 1.05rem;
}

/* Purple ruled divider */
.gold-rule {
  width: 64px;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), var(--orange));
  border-radius: 2px;
  margin: 16px auto 0;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 999px;
  display: inline-block;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  text-align: center;
}

.btn-primary {
  background: var(--purple);
  color: #fff;
}
.btn-primary:hover {
  background: var(--purple-light);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 0 18px rgba(145,36,243,0.35);
}

.btn-teal {
  background: var(--purple-dark);
  color: #fff;
}
.btn-teal:hover {
  background: var(--purple);
  color: #fff;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  border-color: var(--purple);
  color: var(--purple);
}
.btn-ghost:hover {
  background: var(--purple);
  color: #fff;
  text-decoration: none;
}

.btn-ghost-teal {
  background: transparent;
  border-color: var(--purple);
  color: var(--purple);
}
.btn-ghost-teal:hover {
  background: var(--purple);
  color: #fff;
  text-decoration: none;
}

.btn-orange {
  background: var(--orange);
  color: #fff;
}
.btn-orange:hover {
  background: var(--orange-light);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 0 18px rgba(255,134,4,0.4);
}

/* ============================================
   Hero — index page
   ============================================ */
.hero {
  background: var(--bg);
  padding: 72px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(ellipse at center,
    rgba(145,36,243,0.06) 0%,
    rgba(255,134,4,0.03) 50%,
    transparent 72%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-logo-wrap {
  margin: 0 auto 32px;
  width: 600px;
  height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-eyebrow {
  font-family: var(--display);
  color: var(--orange);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.82rem;
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--whimsy);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--text);
  margin-bottom: 18px;
  line-height: 1.2;
}

.hero-tagline {
  font-family: var(--body-w);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  position: relative;
}

.card-hover {
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(145,36,243,0.15);
  border-color: var(--purple);
}

/* ============================================
   How it Works grid (index page)
   ============================================ */
.how-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 720px;
  margin: 0 auto;
}

@media (max-width: 600px) { .how-grid { grid-template-columns: 1fr; max-width: 480px; } }

.how-icon {
  font-size: 2.4rem;
  margin-bottom: 16px;
  line-height: 1;
}

.how-grid .card h3 {
  font-family: var(--whimsy);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 12px;
}

.how-grid .card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============================================
   Event cards
   ============================================ */
.event-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: var(--max-w);
  margin: 0 auto;
}

@media (max-width: 880px) { .event-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 580px) { .event-grid { grid-template-columns: 1fr; } }

.event-card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s;
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(145,36,243,0.2);
  border-color: var(--purple);
  text-decoration: none;
}

.event-card-img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  display: block;
}

.event-card-body {
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.event-countdown-badge {
  border: 1px solid var(--orange);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.78rem;
  color: var(--orange);
  margin-bottom: 14px;
}

.event-card-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.25;
}

.event-card-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.event-card-btn { margin-top: auto; }

.event-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================
   Upcoming events teaser strip (index page)
   ============================================ */
.event-teaser {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 8px;
}

/* ============================================
   Forms
   ============================================ */
.form-section { max-width: 560px; margin: 0 auto; }

.form-pair {
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 720px) {
  .form-pair { grid-template-columns: 1fr; gap: 48px; }
}

.form-divider {
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--purple), transparent);
  align-self: stretch;
}

@media (max-width: 720px) {
  .form-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--purple), transparent);
  }
}

.form-block-title {
  font-family: var(--whimsy);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 20px;
}

.form-row { margin-bottom: 18px; }

label {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #D0B0F0;
  border-radius: var(--radius-sm);
  font-family: var(--body);
  font-size: 1rem;
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--purple);
  outline: none;
}

select option { background: #fff; }

.form-success {
  background: var(--purple);
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  display: none;
  text-align: center;
}

/* ============================================
   Social icons
   ============================================ */
.social-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.social-row a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(145,36,243,0.15);
  border: 1px solid rgba(145,36,243,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.2s, border-color 0.2s;
}

.social-row a:hover {
  background: var(--purple);
  border-color: var(--purple);
  text-decoration: none;
}

.social-row svg { width: 20px; height: 20px; }

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--purple-footer);
  color: var(--text-muted-light);
  padding: 48px 0 32px;
  text-align: center;
  border-top: 3px solid var(--purple);
}

.footer-logo {
  width: 200px;
  height: 160px;
  object-fit: contain;
  margin: 0 auto 12px;
}

.footer-brand {
  font-family: var(--whimsy);
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 4px;
}

.footer-tagline {
  font-size: 0.82rem;
  color: var(--orange);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.footer-nav {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 20px 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.88rem;
}

.footer-nav a { color: var(--text-muted-light); }
.footer-nav a:hover { color: #fff; text-decoration: none; }

.footer-contact {
  font-size: 0.88rem;
  color: var(--text-muted-light);
  margin-top: 12px;
}

.footer-contact a { color: var(--orange); }
.footer-contact a:hover { color: var(--orange-light); }

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  margin-top: 24px;
}

/* ============================================
   About page
   ============================================ */
.about-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 52px;
  align-items: start;
}

@media (max-width: 760px) {
  .about-layout { grid-template-columns: 1fr; text-align: center; }
}

.about-photo {
  border-radius: var(--radius);
  border: 3px solid var(--purple);
  box-shadow: 0 0 32px rgba(145,36,243,0.15);
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}

/* ============================================
   Placeholder note banner (dev only)
   ============================================ */
.placeholder-note {
  background: rgba(145,36,243,0.08);
  border: 1px dashed var(--purple);
  color: var(--purple);
  font-size: 0.78rem;
  padding: 6px 10px;
  border-radius: 6px;
  text-align: center;
  margin-top: 8px;
}

/* ============================================
   Lightbox
   ============================================ */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.active { display: flex; }

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 2px solid var(--purple);
}

.lightbox-caption {
  color: #ddd;
  font-size: 0.9rem;
  margin-top: 12px;
  text-align: center;
  font-style: italic;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: var(--purple-light);
  font-size: 2rem;
  cursor: pointer;
  padding: 4px 8px;
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 2px solid var(--purple);
  color: var(--purple-light);
  font-size: 1.6rem;
  padding: 12px 16px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
  z-index: 1001;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-prev:hover,
.lightbox-next:hover { background: var(--purple); color: #fff; }

/* ============================================
   Responsive utilities
   ============================================ */
.text-center { text-align: center; }
.mt-8  { margin-top:  8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

@media (max-width: 480px) {
  .section { padding: 48px 0; }
  .hero { padding: 48px 0 56px; }
  .hero-logo-wrap { width: 320px; height: 256px; }
}
