/* ===== SHARED STYLES, The Order of the Tile ===== */
/* Nav, Footer, Variables, Reset, Hamburger Menu     */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display+SC:ital,wght@0,400;0,700;0,900;1,400&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');

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

:root {
  --cloud: #F8F6F2;
  --ivory: #F5F0E8;
  --ink: #1A1412;
  --dusk: #6B6560;
  --lilac: #C9B8C4;
  --melon: #F2A97A;
  --orchid: #9B72A0;
  --butter: #F5E6A3;
  --serif-sc: 'Playfair Display SC', Georgia, serif;
  --serif: 'Playfair Display', Georgia, serif;
  --body: 'Crimson Text', Georgia, serif;
}

html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  background: var(--cloud);
  color: #3D3530;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(248,246,242,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 0.5px solid var(--lilac);
  height: 74px;
  display: flex; align-items: center;
  padding: 0 16px;
  justify-content: space-between;
}

.nav-wordmark {
  font-family: var(--serif-sc);
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-wordmark img { width: 32px; height: 32px; object-fit: contain; }

/* Dropdown menu, anchored to .nav-menu wrapper. */
.nav-links {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  list-style: none;
  flex-direction: column;
  gap: 0;
  min-width: 240px;
  max-width: 280px;
  padding: 8px 0;
  background: rgba(248,246,242,0.98);
  backdrop-filter: blur(10px);
  border: 0.5px solid var(--lilac);
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(26,20,18,0.18);
}
.nav-links.open { display: flex; }
.nav-links li { width: 100%; }
.nav-links a {
  display: block;
  font-family: var(--serif-sc);
  font-size: 16px;
  color: var(--dusk);
  text-decoration: none;
  padding: 10px 22px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  border-bottom: none !important;
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--ivory);
  color: var(--ink);
}
.nav-links li:last-child {
  padding: 6px 22px 10px;
  margin-top: 4px;
  border-top: 0.5px solid var(--lilac);
}

.nav-cta {
  font-family: var(--serif-sc) !important;
  font-size: 13px !important;
  font-weight: 700;
  background: var(--melon);
  color: var(--ink) !important;
  padding: 11px 18px;
  border-radius: 6px;
  border-bottom: none !important;
  box-shadow: 0 3px 0 #d98a5c, 0 4px 10px rgba(26,20,18,0.14);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.2s;
  display: block;
  text-align: center;
}
.nav-cta:hover { filter: brightness(1.04); }
.nav-cta:active { transform: translateY(2px); box-shadow: 0 1px 0 #d98a5c, 0 2px 6px rgba(26,20,18,0.14); }

/* MENU WRAPPER + TOGGLE */
.nav-menu {
  position: relative;
  flex-shrink: 0;
}

.nav-menu-toggle {
  font-family: var(--serif-sc);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}
.nav-menu-toggle:hover { opacity: 0.75; }
.nav-menu-toggle:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.nav-menu-chevron {
  transition: transform 0.2s ease;
  display: block;
}

/* Open state, set by JS for hover (with delayed close), tap, and keyboard */
.nav-menu-toggle[aria-expanded="true"] .nav-menu-chevron {
  transform: rotate(180deg);
}

/* ===== COMMON BUTTONS ===== */
.btn-primary {
  font-family: var(--serif-sc);
  font-size: 15px;
  font-weight: 700;
  background: var(--melon);
  color: var(--ink);
  padding: 14px 34px;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 0 #d98a5c, 0 6px 16px rgba(26,20,18,0.16);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.2s;
}
.btn-primary:hover { filter: brightness(1.04); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 #d98a5c, 0 2px 6px rgba(26,20,18,0.16); }

/* ===== FOOTER ===== */
footer {
  background: var(--ink);
  padding: 48px 56px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-seal { width: 48px; height: 48px; opacity: 0.85; }
.footer-wordmark {
  font-family: var(--serif-sc);
  font-size: 18px;
  font-weight: 400;
  color: var(--cloud);
}
.footer-tagline {
  font-family: var(--body);
  font-size: 13px;
  color: rgba(248,246,242,0.45);
  margin-top: 4px;
  font-style: italic;
}

.social-links { display: flex; align-items: center; gap: 12px; }
.social-link-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(248,246,242,0.3);
  color: rgba(248,246,242,0.7);
  transition: border-color 0.2s, color 0.2s;
  text-decoration: none;
}
.social-link-circle:hover {
  border-color: var(--cloud);
  color: var(--cloud);
}

/* ===== FOOTER MOBILE ===== */
@media (max-width: 600px) {
  footer { padding: 36px 24px; }
  .footer-inner { flex-direction: column; gap: 24px; text-align: center; }
  .footer-brand { flex-direction: column; gap: 10px; }
  .social-links { justify-content: center; }
}

/* ===== ASK PRIM WIDGET ===== */
/* Slim bar pinned just under the fixed 74px nav, on every page except ask.html. */
.ask-bar {
  position: fixed; top: 74px; left: 0; right: 0; z-index: 99;
  height: 46px; display: flex; align-items: center; gap: 10px;
  padding: 0 16px; cursor: pointer;
  background: linear-gradient(90deg, #8E6594 0%, #9B72A0 45%, #B083B6 100%);
  border-bottom: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 3px 14px rgba(155,114,160,0.32);
  font-family: var(--body); color: #fff;
  transition: filter 0.15s, box-shadow 0.15s;
  animation: askBarGlow 3.4s ease-in-out infinite;
}
@keyframes askBarGlow {
  0%, 100% { box-shadow: 0 3px 14px rgba(155,114,160,0.30); }
  50%      { box-shadow: 0 3px 22px rgba(155,114,160,0.58); }
}
.ask-bar:hover { filter: brightness(1.06); box-shadow: 0 3px 24px rgba(155,114,160,0.62); }
.ask-bar:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.ask-bar-icon { font-size: 18px; flex: 0 0 auto; }
.ask-bar-text {
  font-size: 15px; letter-spacing: 0.01em; color: #fff;
  flex: 1 1 auto; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ask-bar-text strong { font-style: italic; font-weight: 700; }
.ask-bar-cta {
  flex: 0 0 auto;
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--orchid); background: #fff;
  padding: 5px 14px; border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
@media (prefers-reduced-motion: reduce) {
  .ask-bar { animation: none; }
}

/* Pop-up over the page (used everywhere except the dedicated ask page). */
.ask-modal {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: flex-start; justify-content: center;
  padding: 88px 16px 24px;
  background: rgba(26,20,18,0.45); overflow-y: auto;
}
.ask-modal.open { display: flex; }
.ask-modal-card {
  position: relative; width: 100%; max-width: 600px;
  background: #fff; border-radius: 14px; padding: 30px 26px 26px;
  box-shadow: 0 18px 50px rgba(26,20,18,0.28);
}
.ask-modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; font-size: 26px; line-height: 1;
  color: var(--dusk); cursor: pointer; padding: 4px;
}
.ask-modal-close:hover { color: var(--ink); }
.ask-modal-title {
  font-family: var(--serif); font-weight: 500; font-size: 26px;
  color: var(--ink); margin: 0 0 16px;
}
.ask-modal-title em { font-style: italic; color: var(--orchid); }

/* Shared form bits (modal + the dedicated ask.html page reuse these). */
.ask-form { display: flex; flex-direction: column; gap: 12px; }
.ask-q {
  font-family: var(--body); font-size: 17px; color: var(--ink); background: #fff;
  border: 1px solid var(--lilac); border-radius: 10px; padding: 13px 14px;
  resize: vertical; min-height: 60px; line-height: 1.45;
}
.ask-q:focus { outline: none; border-color: var(--orchid); }
.ask-btn {
  align-self: flex-start; font-family: var(--body); font-size: 16px; font-weight: 600;
  letter-spacing: 0.01em; color: #fff; background: var(--orchid);
  border: none; border-radius: 10px; padding: 11px 22px; cursor: pointer;
  box-shadow: 0 3px 0 #6E4F73; transition: transform 0.06s, box-shadow 0.06s;
}
.ask-btn:hover { box-shadow: 0 4px 0 #6E4F73; }
.ask-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #6E4F73; }
.ask-btn:disabled { opacity: 0.55; cursor: default; box-shadow: 0 3px 0 #6E4F73; transform: none; }
.ask-answer { margin-top: 18px; display: none; }
.ask-answer.show { display: block; }
.ask-answer-text {
  font-family: var(--body); font-size: 17px; line-height: 1.65; color: #3D3530;
  margin: 0 0 12px; white-space: pre-wrap;
}
.ask-sources {
  font-family: var(--body); font-size: 14px; color: var(--dusk);
  border-top: 1px solid var(--lilac); padding-top: 12px;
}
.ask-sources a { color: var(--orchid); text-decoration: none; }
.ask-sources a:hover { text-decoration: underline; }
.ask-feedback {
  display: none; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--lilac); font-family: var(--body); flex-wrap: wrap;
}
.ask-fb-label { font-size: 14px; color: var(--dusk); }
.ask-fb-btn {
  font-size: 17px; line-height: 1; background: #fff; border: 1px solid var(--lilac);
  border-radius: 8px; padding: 5px 10px; cursor: pointer; transition: border-color .1s, transform .06s;
}
.ask-fb-btn:hover { border-color: var(--orchid); }
.ask-fb-btn:active { transform: translateY(1px); }
.ask-fb-thanks { font-size: 14px; font-style: italic; color: var(--orchid); }

@media (max-width: 600px) {
  .ask-bar { height: 44px; padding: 0 12px; gap: 8px; }
  .ask-bar-text { font-size: 13.5px; }
  .ask-bar-cta { font-size: 12px; padding: 4px 11px; }
  .ask-modal { padding: 80px 12px 20px; }
  .ask-modal-card { padding: 26px 18px 20px; }
  .ask-btn { align-self: stretch; }
}
