/* ============================================================
   Bridgeland Key Club — shared design tokens & utilities
   ============================================================ */

:root {
  /* Bridgeland palette */
  --navy-900: #0a1f3d;
  --navy-800: #0e2a4e;
  --navy-700: #16386a;
  --navy-600: #1f4682;
  --silver-300: #d8dbe0;
  --silver-200: #e8eaee;
  --silver-100: #f3f4f7;
  --red-600:  #e87722;
  --red-500:  #f08a3a;
  --red-100:  #fde9d4;

  /* Warm playful accents (Direction 1 default) */
  --cream:    #faf6ee;
  --cream-2:  #f4ecd8;
  --butter:   #f5c451;
  --butter-2: #e8a93b;
  --mint:     #b9e2c8;
  --peach:    #f7c8a8;
  --sky:      #c6dcef;
  --ink:      #1a1a1a;
  --ink-2:    #2c2c2c;
  --paper:    #fffaf0;

  /* Dark mode */
  --dark-bg:  #0a1326;
  --dark-card:#152340;
  --dark-fg:  #f3f4f7;

  /* Type */
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --display: "Instrument Serif", "Fraunces", Georgia, serif;
  --hand: "Caveat", "Bradley Hand", cursive;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;

  --maxw: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

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

/* Subtle grain so cream backgrounds don't feel flat */
.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Container */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}

/* ============================================================
   Sticker / scrapbook utilities (Direction 1)
   ============================================================ */

.tape {
  position: absolute;
  background: rgba(245, 196, 81, 0.55);
  height: 22px;
  width: 90px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
  pointer-events: none;
}
.tape.washi-mint { background: rgba(185, 226, 200, 0.7); }
.tape.washi-peach { background: rgba(247, 200, 168, 0.7); }
.tape.washi-red { background: rgba(200,16,46,0.25); }

.polaroid {
  background: white;
  padding: 12px 12px 44px;
  box-shadow: 0 12px 28px -8px rgba(10,31,61,0.25), 0 2px 4px rgba(0,0,0,0.06);
  display: inline-block;
  position: relative;
  font-family: var(--hand);
  text-align: center;
  font-size: 22px;
  color: var(--navy-800);
}
.polaroid .pic {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--silver-200);
  display: block;
  margin-bottom: 8px;
  background-image: linear-gradient(135deg, var(--navy-700), var(--navy-800));
  position: relative;
  overflow: hidden;
}

.sticker-key {
  width: 56px;
  height: 56px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--butter);
  color: var(--navy-900);
  font-weight: 800;
  box-shadow: 0 4px 0 rgba(0,0,0,0.12), inset 0 -3px 0 rgba(0,0,0,0.08);
  position: relative;
}

.handnote {
  font-family: var(--hand);
  color: var(--red-600);
  transform: rotate(-3deg);
  display: inline-block;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--navy-800);
  color: white;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 0 var(--navy-900);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--navy-900); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--navy-900); }

.btn.red { background: var(--red-600); box-shadow: 0 6px 0 #a55514; }
.btn.red:hover { box-shadow: 0 8px 0 #a55514; }
.btn.butter { background: var(--butter); color: var(--navy-900); box-shadow: 0 6px 0 var(--butter-2); }
.btn.butter:hover { box-shadow: 0 8px 0 var(--butter-2); }
.btn.ghost { background: transparent; color: var(--navy-800); box-shadow: inset 0 0 0 2px var(--navy-800); }
.btn.ghost:hover { background: var(--navy-800); color: white; }

/* ============================================================
   Section headers
   ============================================================ */

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red-600);
  font-weight: 600;
}

.h-display {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--navy-900);
  margin: 0;
  text-wrap: balance;
}

.h-section {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--navy-900);
  margin: 0 0 24px;
}

.h-card {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--navy-900);
  margin: 0;
}

.body-lg {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.body { font-size: 16px; line-height: 1.6; color: var(--ink-2); }

/* ============================================================
   Cards
   ============================================================ */

.card {
  background: white;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 1px 0 rgba(10,31,61,0.06), 0 12px 32px -16px rgba(10,31,61,0.18);
  position: relative;
}

.card.bordered {
  border: 1.5px solid var(--navy-900);
  box-shadow: 6px 6px 0 var(--navy-900);
}

.tilt-l { transform: rotate(-1.5deg); }
.tilt-r { transform: rotate(1.8deg); }
.tilt-l-lg { transform: rotate(-3deg); }
.tilt-r-lg { transform: rotate(3deg); }

/* ============================================================
   Nav
   ============================================================ */

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 1.5px solid var(--navy-900);
  backdrop-filter: blur(8px);
}
.topnav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.topnav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 20px;
  color: var(--navy-900);
  text-decoration: none;
  font-weight: 500;
}
.topnav-brand img { width: 38px; height: 38px; border-radius: 50%; }
.topnav-links {
  display: flex;
  gap: 6px;
  margin-left: auto;
  flex-wrap: wrap;
}
.topnav-link {
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--navy-800);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s;
}
.topnav-link:hover { background: var(--silver-200); }
.topnav-link.active { background: var(--navy-800); color: white; }

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--navy-900);
  color: var(--silver-200);
  padding: 64px 0 32px;
  margin-top: 96px;
  position: relative;
  z-index: 2;
}
.site-footer a { color: var(--silver-200); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-grid h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--butter);
  margin: 0 0 16px;
  font-weight: 600;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer-grid a { text-decoration: none; opacity: 0.8; }
.footer-grid a:hover { opacity: 1; color: var(--butter); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silver-300);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-credit {
  font-family: var(--hand);
  font-size: 22px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--butter);
}
.footer-logos { display: flex; gap: 12px; margin-top: 16px; align-items: center; }
.footer-logos img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }

/* ============================================================
   Photo placeholder system (no fake photos drawn)
   ============================================================ */

.photo-ph {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(14,42,78,0.06) 0 8px,
      rgba(14,42,78,0.10) 8px 16px
    ),
    var(--silver-200);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--navy-700);
  text-align: center;
  padding: 16px;
  overflow: hidden;
}
.photo-ph::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1.5px dashed rgba(14,42,78,0.35);
  border-radius: inherit;
  pointer-events: none;
}

/* ============================================================
   Dark mode (applied to body[data-theme="dark"])
   ============================================================ */

body[data-theme="dark"] {
  --cream: #0a1326;
  --cream-2: #14213f;
  --paper: #14213f;
  --silver-100: #1d2c4d;
  --silver-200: #25365b;
  --ink: #f3f4f7;
  --ink-2: #c7cdd9;
  --navy-900: #f5e6c8;
  --navy-800: #f0d99f;
}
body[data-theme="dark"] .topnav { background: rgba(10,19,38,0.85); border-bottom-color: rgba(255,255,255,0.1); }
body[data-theme="dark"] .topnav-link { color: var(--silver-200); }
body[data-theme="dark"] .topnav-link:hover { background: rgba(255,255,255,0.1); }
body[data-theme="dark"] .topnav-link.active { background: var(--butter); color: var(--navy-900); }
body[data-theme="dark"] .card { background: var(--cream-2); }
body[data-theme="dark"] .photo-ph { background: repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 8px, rgba(255,255,255,0.07) 8px 16px), #1d2c4d; color: #c7cdd9; }
body[data-theme="dark"] .btn { background: var(--butter); color: var(--navy-900); box-shadow: 0 6px 0 var(--butter-2); }

/* Prevent horizontal overflow globally */
html { overflow-x: hidden; }
body { overflow-x: hidden; }

/* Responsive */
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .topnav-links { display: none; }
  .topnav .menu-btn { display: inline-flex; }
}

@media (max-width: 640px) {
  .body-lg { font-size: 17px; }
  .btn { padding: 11px 18px; font-size: 14px; }
  .topnav-brand span { display: none; }
  .site-footer { margin-top: 60px; padding-top: 44px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-logos img { width: 36px; height: 36px; }
  .card { padding: 18px; }
}

/* Mobile nav open state */
body.nav-open .topnav-links {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--navy-900);
  padding: 12px 0 20px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
body.nav-open .topnav-link {
  color: var(--cream);
  padding: 10px 24px;
  font-size: 15px;
  border-radius: 0;
}
body.nav-open .topnav-link:hover,
body.nav-open .topnav-link.active { background: rgba(255,255,255,.08); }

.menu-btn {
  display: none;
  margin-left: auto;
  background: var(--navy-800);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-height: 44px;
  cursor: pointer;
}

/* Scroll-reveal helper */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
}
[data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}
