/* Shanina — design tokens and global styles.
   Palette comes from the logo (blues → teal) and the watercolor florals (lavender, violet). */

:root {
  --ink: #232c55;
  --ink-soft: #4b5582;
  --muted: #5d6487;
  --blue: #3464b0;
  --blue-deep: #2a4f93;
  --sky: #669ad3;
  --teal: #217683;
  --lavender: #9a8bd6;
  --violet: #6b51b2;
  --violet-soft: #ece8fa;
  --gold: #b8935a;

  --bg: #fcfcff;
  --bg-tint: #f4f2fc;
  --bg-sky: #eef4fb;
  --surface: #ffffff;
  --line: #e4e1f3;
  --focus: #6b51b2;

  /* One family site-wide. --font-display is the hook for headings and emphasized words:
     point it at another family later to give titles their own voice. */
  --font-body: 'Assistant Variable', 'Assistant', 'Segoe UI', Arial, sans-serif;
  --font-display: var(--font-body);
  /* Headings get their own, lighter voice: Frank Ruhl Libre Light (elegant Hebrew serif)
     in a deep lavender that keeps strong contrast on the light backgrounds. */
  --font-heading: 'Frank Ruhl Libre', 'Assistant Variable', serif;
  --heading: #4f3f94;

  --w: 1160px;
  --w-text: 680px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 22px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgb(35 44 85 / 0.04), 0 10px 30px -12px rgb(52 70 140 / 0.18);
  --shadow-lift: 0 2px 4px rgb(35 44 85 / 0.05), 0 22px 44px -18px rgb(52 70 140 / 0.3);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --text-scale: 1;
  color-scheme: light;
}

/* Accessibility menu toggles (see A11yMenu.astro) */
:root[data-contrast='high'] {
  --ink: #000;
  --ink-soft: #111;
  --muted: #222;
  --blue: #0b3a8c;
  --blue-deep: #002b70;
  --violet: #3d1f8f;
  --bg: #fff;
  --bg-tint: #fff;
  --bg-sky: #fff;
  --line: #333;
  --heading: #1d0f5c;
}
:root[data-links='underline'] a { text-decoration: underline !important; text-underline-offset: 3px; }
:root[data-readable='on'] { --font-display: var(--font-body); --font-heading: var(--font-body); }
:root[data-motion='off'] *, :root[data-motion='off'] *::before, :root[data-motion='off'] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

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

html {
  font-size: calc(100% * var(--text-scale));
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--violet); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 300;
  line-height: 1.25;
  color: var(--heading);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 1.7rem + 3.5vw, 4.4rem); }
h2 { font-size: clamp(1.95rem, 1.45rem + 1.9vw, 2.9rem); }
h3 { font-size: clamp(1.45rem, 1.25rem + 0.7vw, 1.75rem); }
p { margin: 0 0 1em; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.container { width: min(100% - 2 * var(--gutter), var(--w)); margin-inline: auto; }
.container--text { width: min(100% - 2 * var(--gutter), var(--w-text)); margin-inline: auto; }

.section { padding-block: clamp(56px, 8vw, 112px); position: relative; }
.section--tight { padding-block: clamp(36px, 5vw, 64px); }
.section--tint { background: linear-gradient(180deg, var(--bg-tint), color-mix(in srgb, var(--bg-tint) 40%, var(--bg))); }
.section--sky { background: linear-gradient(180deg, var(--bg-sky), var(--bg)); }

.section-head { text-align: center; margin-bottom: clamp(20px, 2.6vw, 32px); }
/* The page title flows straight into the first section, without a full section gap. */
.page-header + section { padding-top: clamp(20px, 3vw, 40px); }
.section-head h2 { margin-bottom: 0.25em; }
.section-head p { color: var(--ink-soft); margin: 0 auto; max-width: 56ch; }
.section-head .ornament { margin: 14px auto 0; }

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.95rem; letter-spacing: 0.02em; color: var(--violet); font-weight: 600;
}

/* Small botanical ornament under headings */
.ornament {
  display: block; width: 120px; height: 18px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 18'%3E%3Cpath d='M2 9h44M74 9h44' stroke='%239a8bd6' stroke-width='1.2' stroke-linecap='round' opacity='.7'/%3E%3Cg fill='%236b51b2'%3E%3Cellipse cx='60' cy='4.5' rx='2.4' ry='4.2'/%3E%3Cellipse cx='60' cy='13.5' rx='2.4' ry='4.2'/%3E%3Cellipse cx='55.5' cy='9' rx='4.2' ry='2.4'/%3E%3Cellipse cx='64.5' cy='9' rx='4.2' ry='2.4'/%3E%3C/g%3E%3Ccircle cx='60' cy='9' r='1.8' fill='%23f4f2fc'/%3E%3C/svg%3E");
}

/* Buttons */
.btn {
  --btn-bg: var(--blue);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 26px; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font: 600 1.05rem/1.2 var(--font-body); text-decoration: none; border: 1.5px solid transparent;
  box-shadow: 0 8px 20px -10px rgb(52 100 176 / 0.7);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  cursor: pointer;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-2px); background: var(--blue-deep); box-shadow: 0 14px 26px -12px rgb(52 100 176 / 0.8); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--blue-deep); border-color: color-mix(in srgb, var(--blue) 45%, transparent); box-shadow: none; }
.btn--ghost:hover { background: var(--surface); --btn-fg: var(--violet); border-color: var(--violet); box-shadow: var(--shadow); }
.btn--soft { --btn-bg: var(--violet-soft); --btn-fg: var(--violet); box-shadow: none; }
.btn--soft:hover { background: #e2dcf7; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Rich text (Portable Text output) */
.prose { color: var(--ink); font-size: 1.15rem; line-height: 1.85; }
.prose > * + * { margin-top: 0; }
.prose p { margin: 0 0 1.15em; }
.prose .center { text-align: center; }
.prose .lead { font-size: 1.3rem; color: var(--ink-soft); }
.prose h2 { margin: 1.4em 0 0.5em; }
.prose h3 { margin: 1.3em 0 0.4em; }
.prose blockquote {
  margin: 1.6em 0; padding: 0.4em 1.2em; border-inline-start: 3px solid var(--lavender);
  font-family: var(--font-display); font-size: 1.4rem; line-height: 1.6; color: var(--blue-deep);
}
.prose ul, .prose ol { padding-inline-start: 1.4em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--lavender); }
.prose strong { font-weight: 700; color: var(--blue-deep); }
.prose mark { background: linear-gradient(transparent 55%, #e7defc 55%); color: inherit; padding-inline: 2px; }
.prose .u { text-decoration: underline; text-decoration-color: var(--lavender); text-underline-offset: 5px; }
.prose a:not(.btn) { color: var(--violet); }

/* Word-level sizes chosen in the editor */
.fs-sm { font-size: 0.86em; color: var(--ink-soft); }
.fs-lg { font-size: 1.16em; }
.fs-xl { font-size: 1.34em; font-family: var(--font-display); color: var(--blue-deep); line-height: 1.45; }
.fs-xxl { font-size: 1.75em; font-family: var(--font-display); color: var(--blue-deep); line-height: 1.3; }
.accent { color: var(--violet); }
strong .fs-xl, .fs-xl strong, strong .fs-xxl, .fs-xxl strong { font-weight: 600; }

/* Poetic layout: centered stanzas, Shanina's natural writing form */
.prose--poetic { text-align: center; }
.prose--poetic p { margin-bottom: 1.5em; }
/* Lists stay right-aligned inside centered text, so the numbers and bullets line up */
.prose--poetic ol, .prose--poetic ul { text-align: start; }

/* Long-form text: a small floral sprig sits inside the gap between paragraphs (replaces the
   blank space, adds no height). Only after a substantial paragraph – see 'sep' in portable-text.ts. Lists, headings and images keep their usual spacing. */
.prose--flow { --p-gap: 1.5em; }
.prose--flow > p { margin-bottom: var(--p-gap); }
.prose--flow > p.sep { position: relative; }
.prose--flow > p.sep::before {
  content: ''; position: absolute; inset-inline: 0; top: calc(var(--p-gap) / -2); height: 12px; translate: 0 -50%;
  background: center / 60px 12px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 12'%3E%3Cpath d='M9 6.4C17 3.4 24 3.6 30 6s13 2.6 21-.4' fill='none' stroke='%239a8bd6' stroke-width='.8' stroke-linecap='round' opacity='.65'/%3E%3Cg fill='%239a8bd6' opacity='.6'%3E%3Cellipse cx='19.5' cy='3.9' rx='3.4' ry='1.25' transform='rotate(-22 19.5 3.9)'/%3E%3Cellipse cx='40.5' cy='8.1' rx='3.4' ry='1.25' transform='rotate(-22 40.5 8.1)'/%3E%3Ccircle cx='5' cy='6.6' r='.9'/%3E%3Ccircle cx='55' cy='5.4' r='.9'/%3E%3C/g%3E%3Cg fill='%236b51b2' opacity='.8'%3E%3Ccircle cx='30' cy='3.9' r='1.7'/%3E%3Ccircle cx='32' cy='5.4' r='1.7'/%3E%3Ccircle cx='31.2' cy='7.7' r='1.7'/%3E%3Ccircle cx='28.8' cy='7.7' r='1.7'/%3E%3Ccircle cx='28' cy='5.4' r='1.7'/%3E%3C/g%3E%3Ccircle cx='30' cy='6' r='.9' fill='%23f4f2fc'/%3E%3C/svg%3E");
  pointer-events: none;
}

.pt-image { margin: 2em auto; }
.pt-image img { border-radius: var(--radius); width: 100%; }
.pt-image--narrow { max-width: 460px; }
.pt-image figcaption { text-align: center; font-size: 0.95rem; color: var(--muted); margin-top: 8px; }
.pt-video { position: relative; aspect-ratio: 16 / 9; margin: 2em 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.pt-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pt-callout {
  margin: 1.8em 0; padding: 20px 24px; border-radius: var(--radius-sm);
  background: var(--violet-soft); color: var(--ink); font-size: 1.05rem;
}
.pt-callout--info { background: var(--bg-sky); }
.pt-tags { margin: 1.6em 0; }
.pt-tags__title { font-weight: 700; margin-bottom: 0.6em; }
.pt-tags ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pt-tags li {
  margin: 0; padding: 5px 14px; border-radius: 999px; font-size: 0.98rem;
  background: var(--surface); border: 1px solid var(--line); color: var(--blue-deep);
}
.pt-divider { display: flex; justify-content: center; margin: 2.4em 0; }

/* Cards */
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
a.card { color: inherit; text-decoration: none; }
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); color: inherit; }
.card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-tint); position: relative; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
a.card:hover .card__media img { transform: scale(1.04); }
.card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__title { font-size: 1.45rem; margin: 0; }
.card__text { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.7; margin: 0; }
.card__more { margin-top: auto; padding-top: 8px; color: var(--violet); font-weight: 600; font-size: 0.98rem; }
.card__meta { font-size: 0.9rem; color: var(--muted); }

/* Placeholder media when an item has no image: soft watercolor wash + florals */
.media-placeholder {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 70% at 25% 30%, rgb(154 139 214 / 0.35), transparent 70%),
    radial-gradient(55% 60% at 80% 70%, rgb(102 154 211 / 0.3), transparent 70%),
    var(--bg-tint);
}
.media-placeholder img { position: absolute; inset: auto 0 -6% auto; width: 75%; height: auto; object-fit: contain; opacity: 0.85; }

.grid { display: grid; gap: clamp(18px, 2.4vw, 30px); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }

.tag {
  display: inline-flex; align-items: center; padding: 4px 14px; border-radius: 999px;
  background: var(--violet-soft); color: var(--violet); font-size: 0.9rem; font-weight: 600; text-decoration: none;
  border: 1px solid transparent;
}
a.tag:hover { border-color: var(--lavender); color: var(--violet); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* Listing filters */
.filters { display: grid; gap: 16px; justify-items: center; margin: 0 auto clamp(28px, 4vw, 44px); max-width: 760px; }
.search { position: relative; display: block; width: 100%; }
.search svg { position: absolute; inset-inline-start: 18px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.search input { padding-inline-start: 50px; border-radius: 999px; min-height: 54px; box-shadow: var(--shadow); border-color: transparent; }
.filters .tags { justify-content: center; }
.chip {
  font: inherit; font-size: 0.98rem; cursor: pointer; padding: 6px 16px; min-height: 40px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-soft);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip:hover { border-color: var(--lavender); color: var(--violet); }
.chip[aria-pressed='true'] { background: var(--violet); border-color: var(--violet); color: #fff; }
.chip--spice[aria-pressed='true'] { background: var(--teal); border-color: var(--teal); }
[hidden] { display: none !important; }

/* Forms */
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 1rem; }
.field input, .field textarea, .field select, .search input {
  font: inherit; font-size: 1.05rem; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 16px; min-height: 50px; width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field textarea:focus, .search input:focus {
  outline: none; border-color: var(--lavender); box-shadow: 0 0 0 4px rgb(154 139 214 / 0.2);
}
.field textarea { min-height: 140px; resize: vertical; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

@media print {
  .site-header, .site-footer, .a11y, .float-wa, .no-print { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .section { padding-block: 12px; }
}
