/* ==========================================================================
   Styles — Agape Labs (Notebook)
   ========================================================================== */

/* --- Lined paper background on body --- */
body {
  font-family: var(--font-serif);
  color: var(--ink);
  background-color: var(--paper);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc(var(--line-height) - 1px),
    var(--rule-color) calc(var(--line-height) - 1px),
    var(--rule-color) var(--line-height)
  );
  background-size: 100% var(--line-height);
  font-size: var(--text-base);
  line-height: var(--line-height);
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1rem;
  z-index: var(--z-skip);
  font-size: var(--text-sm);
}

.skip-link:focus {
  top: 1rem;
}

/* --- Screen reader only --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc(var(--line-height) - 1px),
    var(--rule-color) calc(var(--line-height) - 1px),
    var(--rule-color) var(--line-height)
  );
  background-size: 100% var(--line-height);
  border-bottom: 1px solid var(--rule-color);
  padding: 0.5rem 0;
  transition: box-shadow 0.2s ease;
}

.site-nav.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .site-nav.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

/* Logo: multiply blends cream bg into paper on light mode */
.nav__logo-link img,
.footer__logo {
  mix-blend-mode: multiply;
}

/* Dark mode: invert so dark sketch lines become light on dark paper */
[data-theme="dark"] .nav__logo-link img,
[data-theme="dark"] .footer__logo {
  mix-blend-mode: normal;
  filter: invert(1) hue-rotate(180deg) brightness(1.1);
}

.nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo-link {
  display: flex;
  align-items: center;
}

.nav__logo-link img {
  height: 120px;
  width: auto;
}

.nav__links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav__link {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--ink-light);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav__link:hover {
  color: var(--ink);
}

.nav__link--active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Theme toggle (in nav) */
.theme-toggle {
  padding: 0.4rem;
  color: var(--ink-light);
  opacity: 0.6;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
}

.theme-toggle:hover {
  opacity: 1;
}

/* Hamburger toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.4rem;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Mobile nav */
.nav__mobile {
  display: none;
  flex-direction: column;
  background: var(--paper);
  border-bottom: 1px solid var(--rule-color);
  padding: 0.5rem 2rem 1rem;
}

.nav__mobile--open {
  display: flex;
}

.nav__mobile-link {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--ink);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule-color);
  text-decoration: none;
}

.nav__mobile-link:last-child {
  border-bottom: none;
}

.nav__mobile-link:hover {
  color: var(--accent);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container--narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
}

.section--alt {
  background-color: var(--paper-cover);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc(var(--line-height) - 1px),
    var(--rule-color) calc(var(--line-height) - 1px),
    var(--rule-color) var(--line-height)
  );
  background-size: 100% var(--line-height);
}

.section__label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 1.5rem + 1.5vw, 2.8rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.section__subtitle {
  font-family: var(--font-serif);
  color: var(--ink-light);
  max-width: 600px;
  line-height: 1.7;
}

.section__header {
  margin-bottom: 3rem;
}

.section__header--center {
  text-align: center;
}

.section__header--center .section__subtitle {
  margin: 0 auto;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-serif);
  font-size: var(--text-base);
  color: var(--ink);
  background: none;
  border: 1.5px dashed var(--ink);
  padding: 0.6rem 1.5rem;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  border-radius: 0;
  line-height: 1.4;
}

.btn:hover {
  opacity: 0.75;
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
  border: 1.5px solid var(--ink);
}

.btn--primary:hover {
  opacity: 0.85;
}

.btn--secondary {
  background: var(--paper);
  border: 1.5px dashed var(--ink);
  color: var(--ink);
}

.btn--secondary:hover {
  border-color: var(--ink-light);
  color: var(--ink-light);
}

.btn--lg {
  padding: 0.8rem 2rem;
  font-size: var(--text-lg);
}

.btn--sm {
  padding: 0.35rem 1rem;
  font-size: var(--text-sm);
}

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

.card {
  background: var(--paper-cover);
  border: 1px solid var(--rule-color);
  padding: 1.5rem;
  position: relative;
  border-top: 3px solid var(--accent);
}

.card__icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
  margin-bottom: 1rem;
}

.card__icon svg {
  width: 100%;
  height: 100%;
}

.card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--ink);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.card__text {
  font-family: var(--font-serif);
  color: var(--ink-light);
  line-height: 1.7;
  font-size: var(--text-base);
}

.card__link {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-serif);
  color: var(--accent);
  text-decoration: none;
  font-size: var(--text-sm);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.card__link:hover {
  border-bottom-color: var(--accent);
}

.link {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.link:hover {
  border-bottom-color: var(--accent);
}

/* ==========================================================================
   Grid
   ========================================================================== */

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  background-color: var(--paper-cover);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc(var(--line-height) - 1px),
    var(--rule-color) calc(var(--line-height) - 1px),
    var(--rule-color) var(--line-height)
  );
  background-size: 100% var(--line-height);
  border-bottom: 1px solid var(--rule-color);
  padding: 4rem 0 3rem;
}

.hero__breadcrumb {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-light);
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.hero__breadcrumb a {
  color: var(--ink-light);
  text-decoration: none;
  transition: color 0.15s ease;
}

.hero__breadcrumb a:hover {
  color: var(--accent);
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 2rem + 3vw, 4rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}

.hero__subtitle {
  font-family: var(--font-serif);
  color: var(--ink-light);
  max-width: 600px;
  line-height: 1.7;
  margin-top: 1rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero--home {
  padding: 6rem 0 5rem;
}

/* ==========================================================================
   Service Detail
   ========================================================================== */

.service-detail {
  max-width: 720px;
  margin: 0 auto;
}

.service-detail__icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin-bottom: 1rem;
}

.service-detail__icon svg {
  width: 100%;
  height: 100%;
}

.service-detail__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 1.5rem + 1.5vw, 2.8rem);
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.service-detail__text {
  font-family: var(--font-serif);
  color: var(--ink-light);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.service-detail__features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.service-detail__feature {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-light);
  border: 1.5px dashed var(--ink-light);
  padding: 0.3rem 0.75rem;
  opacity: 0.8;
  border-radius: 0;
}

/* ==========================================================================
   Process Steps
   ========================================================================== */

.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.process__step {
  text-align: center;
  position: relative;
}

.process__step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 1.5rem;
  right: -1rem;
  width: 2rem;
  height: 1px;
  border-top: 1.5px dashed var(--ink-light);
  opacity: 0.4;
}

.process__number {
  display: block;
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.process__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.process__text {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--ink-light);
  line-height: 1.6;
}

/* ==========================================================================
   Timeline
   ========================================================================== */

.timeline {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.timeline__line {
  position: absolute;
  left: 19px;
  top: 0;
  bottom: 0;
  width: 1px;
  border-left: 1px dashed var(--ink-light);
  opacity: 0.3;
}

.timeline__item {
  display: flex;
  gap: 1.5rem;
  padding-bottom: 3rem;
  position: relative;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__marker {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper-cover);
  border: 1.5px solid var(--ink-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.timeline__marker svg {
  width: 18px;
  height: 18px;
}

.timeline__content {
  flex: 1;
  padding-top: 0.5rem;
}

.timeline__week {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.timeline__heading {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.timeline__text {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--ink-light);
  line-height: 1.7;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */

.faq {
  max-width: 680px;
  margin: 0 auto;
}

.faq__item {
  border-bottom: 1px solid var(--rule-color);
}

.faq__question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  gap: 1rem;
  background: none;
  border: none;
  line-height: 1.3;
}

.faq__icon {
  flex-shrink: 0;
  transition: transform 0.25s ease;
  color: var(--ink-light);
}

.faq__question[aria-expanded="true"] .faq__icon {
  transform: rotate(45deg);
}

.faq__answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}

.faq__answer.open {
  max-height: 500px;
}

.faq__answer-inner {
  padding: 0 0 1.25rem;
  font-family: var(--font-serif);
  color: var(--ink-light);
  line-height: 1.7;
}

/* ==========================================================================
   Contact Form
   ========================================================================== */

.contact-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form__label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-light);
}

.form__input,
.form__select,
.form__textarea {
  border: 1px solid rgba(122, 114, 104, 0.4);
  background: var(--paper);
  padding: 0.6rem 0.8rem;
  font-family: var(--font-serif);
  font-size: var(--text-base);
  color: var(--ink);
  border-radius: 0;
  outline: none;
  transition: border-color 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  border-color: var(--accent);
}

.form__textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form__consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 0 0;
}

.form__consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

.form__consent label {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--ink-light);
  line-height: 1.6;
}

.form__consent label a {
  color: var(--accent);
}

/* Multi-step form */
.mf-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2rem;
}

.mf-indicator__step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px dashed var(--ink-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: var(--text-base);
  color: var(--ink-light);
  flex-shrink: 0;
}

.mf-indicator__step--active {
  border-color: var(--accent);
  border-style: solid;
  color: var(--accent);
}

.mf-indicator__step--done {
  border-color: var(--accent);
  border-style: solid;
  background: var(--accent);
  color: var(--paper);
}

.mf-indicator__line {
  flex: 1;
  height: 1px;
  border-top: 1px dashed var(--ink-light);
  opacity: 0.5;
}

.mf-step {
  display: none;
}

.mf-step--active {
  display: block;
}

.mf-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
}

/* Contact info */
.contact-info__card {
  background: var(--paper-cover);
  border: 1px solid var(--rule-color);
  padding: 1.5rem;
}

.contact-info__item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule-color);
  align-items: flex-start;
}

.contact-info__item:first-child {
  padding-top: 0;
}

.contact-info__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-info__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--rule-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.contact-info__label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-light);
  display: block;
  margin-bottom: 0.2rem;
}

.contact-info__value {
  font-family: var(--font-serif);
  color: var(--ink);
  line-height: 1.5;
}

/* ==========================================================================
   Founder Section
   ========================================================================== */

.founder {
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin-top: 2rem;
}

.founder__name {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.founder__role {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-light);
  margin-bottom: 0.75rem;
}

.founder__bio {
  font-family: var(--font-serif);
  color: var(--ink-light);
  line-height: 1.8;
}

/* ==========================================================================
   Mission / Vision
   ========================================================================== */

.mission-vision {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.mission-vision__card {
  background: var(--paper-cover);
  border: 1px solid var(--rule-color);
  border-top: 3px solid var(--accent);
  padding: 1.5rem;
  border-left: 3px solid var(--accent);
}

.mission-vision__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.mission-vision__text {
  font-family: var(--font-serif);
  color: var(--ink-light);
  line-height: 1.7;
}

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

.value-card {
  background: var(--paper-cover);
  border: 1px solid var(--rule-color);
  border-top: 3px solid var(--accent);
  padding: 1.5rem;
}

.value-card__icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
  margin-bottom: 1rem;
}

.value-card__icon svg {
  width: 100%;
  height: 100%;
}

.value-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.value-card__text {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--ink-light);
  line-height: 1.7;
}

/* ==========================================================================
   CTA Banner
   ========================================================================== */

.cta-banner {
  background: var(--paper-cover);
  border: 1px dashed var(--ink-light);
  padding: 4rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.cta-banner__title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 1.4rem + 1.75vw, 2.5rem);
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.cta-banner__text {
  font-family: var(--font-serif);
  color: var(--ink-light);
  margin-bottom: 1.5rem;
  line-height: 1.7;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

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

.footer {
  border-top: 1px solid var(--rule-color);
  background-color: var(--paper-cover);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc(var(--line-height) - 1px),
    var(--rule-color) calc(var(--line-height) - 1px),
    var(--rule-color) var(--line-height)
  );
  background-size: 100% var(--line-height);
  padding: 3rem 0 2rem;
}

.footer__top {
  margin-bottom: 2rem;
}

.footer__logo {
  height: 150px;
  width: auto;
  margin-bottom: 0.75rem;
}

.footer__desc {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--ink-light);
  max-width: 400px;
  line-height: 1.7;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer__heading {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer__link {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--ink-light);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer__link:hover {
  color: var(--accent);
}

.footer__bottom {
  border-top: 1px solid var(--rule-color);
  padding-top: 1rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-light);
}

/* ==========================================================================
   Back to Top
   ========================================================================== */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper-cover);
  border: 1px solid var(--ink-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 40;
  cursor: pointer;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ==========================================================================
   Cookie Banner
   ========================================================================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--paper-cover);
  border-top: 1px solid var(--rule-color);
  padding: 1rem 2rem;
  display: none;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  z-index: 45;
}

.cookie-banner.visible {
  display: flex;
}

.cookie-banner__text {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--ink-light);
  flex: 1;
  line-height: 1.5;
}

.cookie-banner__text a {
  color: var(--accent);
}

.cookie-banner__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Reveal Animations
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Single-page (homepage cover / notebook) — preserved for index
   ========================================================================== */

.cover {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--paper-cover);
}

.cover::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.04);
  pointer-events: none;
}

[data-theme="dark"] .cover::after {
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.15);
}

.cover img {
  width: clamp(200px, 40vw, 340px);
  height: auto;
  mix-blend-mode: multiply;
}

[data-theme="dark"] .cover img {
  mix-blend-mode: screen;
  filter: invert(1) brightness(0.85);
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  color: var(--ink-light);
  opacity: 0.35;
  animation: float 2.5s ease-in-out infinite;
  transition: opacity 0.4s ease;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.pages {
  position: relative;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc(var(--line-height) - 1px),
    var(--rule-color) calc(var(--line-height) - 1px),
    var(--rule-color) var(--line-height)
  );
  background-size: 100% var(--line-height);
}

.pages::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - var(--page-max) / 2 + var(--margin-offset));
  width: 1px;
  background: var(--margin-color);
  opacity: 0.5;
}

.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 6rem var(--page-padding) 8rem calc(var(--margin-offset) + 1.5rem);
  position: relative;
}

.page + .page {
  border-top: 1px dashed var(--rule-color);
}

.write {
  margin-bottom: var(--line-height);
  position: relative;
}

.write:last-child {
  margin-bottom: 0;
}

.w {
  color: transparent;
}

.w.shown {
  color: inherit;
}

.w.cursor-after::after {
  content: '\2502';
  color: var(--ink);
  font-weight: 300;
  animation: blink 0.9s step-end infinite;
  margin-left: 1px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.opening {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 2rem + 2vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: calc(var(--line-height) * 2);
  letter-spacing: -0.01em;
}

h2.write {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 1.5rem + 1vw, 2.4rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: calc(var(--line-height) * 1.5);
}

.email {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-base);
  color: var(--accent);
  text-decoration: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='6'%3E%3Cpath d='M0 3 Q10 1 20 3 Q30 5 40 3 Q50 1 60 3 Q70 5 80 3 Q90 1 100 3' fill='none' stroke='%238b6914' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: 0 100%;
  background-size: 60px 6px;
  padding-bottom: 6px;
  margin-top: var(--line-height);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.email:hover {
  opacity: 0.65;
}

.cover::before {
  content: '';
  position: absolute;
  inset: 1.5rem;
  border: 1.5px solid var(--ink);
  opacity: 0.07;
  pointer-events: none;
  border-radius: 1px;
}

.page:first-child::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 28px 28px 0;
  border-color: transparent var(--paper) transparent transparent;
  filter: drop-shadow(-2px 2px 1px rgba(0,0,0,0.06));
}

/* ==========================================================================
   Portal / Status Page
   ========================================================================== */

.portal-card {
  display: flex;
  flex-direction: column;
}

.portal-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.portal-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.portal-card__desc {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--ink-light);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}

.portal-card__date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-light);
}

.portal-card__badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
}

.portal-card__badge--progress {
  background: rgba(139, 105, 20, 0.12);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.portal-card__badge--review {
  background: rgba(59, 130, 246, 0.08);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.portal-card__badge--complete {
  background: rgba(52, 211, 153, 0.08);
  color: #059669;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.portal-card__progress {
  margin-bottom: 1rem;
}

.portal-card__progress-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-light);
  margin-bottom: 0.4rem;
}

.portal-card__bar {
  height: 4px;
  background: var(--rule-color);
  border-radius: 2px;
  overflow: hidden;
}

.portal-card__bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.6s ease;
}

.portal-card__bar-fill--done {
  background: #059669;
}

.portal-card__phases {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.portal-phase {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-light);
}

.portal-phase__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rule-color);
  border: 1px solid var(--ink-light);
  opacity: 0.4;
}

.portal-phase--done .portal-phase__dot {
  background: #059669;
  border-color: #059669;
  opacity: 1;
}

.portal-phase--active .portal-phase__dot {
  background: var(--accent);
  border-color: var(--accent);
  opacity: 1;
}

.portal-phase--done {
  color: #059669;
}

.portal-phase--active {
  color: var(--accent);
}

.portal-error {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: #b91c1c;
}

/* ==========================================================================
   Legal Content
   ========================================================================== */

.legal-content h2 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--ink);
  margin-bottom: 1rem;
  margin-top: 2.5rem;
  font-weight: 700;
}

.legal-content h3 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--ink);
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
}

.legal-content p {
  color: var(--ink-light);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.legal-content ul,
.legal-content ol {
  color: var(--ink-light);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.4rem;
}

.legal-content strong {
  color: var(--ink);
}

.legal-content a {
  color: var(--accent);
}

.legal-content a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Schedule Page
   ========================================================================== */

.schedule-service-card {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.schedule-service-card:hover,
.schedule-service-card:focus {
  border-color: var(--accent);
  outline: none;
}

.schedule-service-card[aria-checked="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.schedule-summary {
  background: var(--paper-cover);
  border: 1px solid var(--rule-color);
  padding: 2rem;
  max-width: 500px;
  margin: 0 auto 2rem;
}

/* ==========================================================================
   Capabilities Page (demo components)
   ========================================================================== */

/* --- Micro-interactions Gallery --- */

.micro-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.micro-item {
  background: var(--paper-cover);
  border: 1px solid var(--rule-color);
  border-top: 3px solid var(--accent);
  display: flex;
  flex-direction: column;
}

.micro-item__demo {
  flex: 1;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  position: relative;
}

.micro-item__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-light);
  padding: 0.4rem 0.75rem;
  border-top: 1px solid var(--rule-color);
  background: var(--paper);
}

/* Shared micro button base */
.micro-ripple-btn,
.micro-toast-btn,
.micro-magnetic-btn,
.micro-confetti-btn {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px dashed var(--ink);
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.15s ease, color 0.15s ease;
}

.micro-ripple-btn:hover,
.micro-toast-btn:hover,
.micro-magnetic-btn:hover,
.micro-confetti-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

/* 1. Ripple */
.micro-ripple {
  position: absolute;
  border-radius: 50%;
  width: 10px;
  height: 10px;
  background: var(--accent);
  opacity: 0.6;
  transform: translate(-50%, -50%) scale(0);
  animation: rippleExpand 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes rippleExpand {
  to { transform: translate(-50%, -50%) scale(20); opacity: 0; }
}

/* 2. Glow Card */
.micro-glow-card {
  width: 120px;
  height: 80px;
  background: var(--paper);
  border: 1.5px solid var(--rule-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--ink-light);
  cursor: crosshair;
  position: relative;
  overflow: hidden;
}

.micro-glow-card::before {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,105,20,0.25) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  left: var(--glow-x, 50%);
  top: var(--glow-y, 50%);
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* 3. Flip Card */
.micro-flip-card {
  width: 110px;
  height: 70px;
  perspective: 600px;
  cursor: pointer;
}

.micro-flip-card__inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.micro-flip-card:hover .micro-flip-card__inner {
  transform: rotateY(180deg);
}

.micro-flip-card__front,
.micro-flip-card__back {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  border: 1.5px dashed var(--ink-light);
  backface-visibility: hidden;
}

.micro-flip-card__front { background: var(--paper); color: var(--ink); }
.micro-flip-card__back  { background: var(--ink); color: var(--paper); transform: rotateY(180deg); }

/* 4. Magnetic button — uses base styles */
.micro-magnetic-btn {
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

/* 5. Skeleton */
.micro-skeleton {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  width: 100%;
  max-width: 200px;
}

.micro-skeleton__circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--rule-color);
  flex-shrink: 0;
  animation: shimmer 1.4s ease infinite;
}

.micro-skeleton__lines { flex: 1; display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }

.micro-skeleton__line {
  height: 10px;
  background: var(--rule-color);
  animation: shimmer 1.4s ease infinite;
}

.micro-skeleton__line--long   { width: 100%; }
.micro-skeleton__line--medium { width: 70%; animation-delay: 0.1s; }
.micro-skeleton__line--short  { width: 45%; animation-delay: 0.2s; }

@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

/* 6. Toast — button only, toast itself renders outside */
.micro-toast-btn { font-size: 1rem; }

/* 7. Toggle */
.micro-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.micro-toggle__input { display: none; }

.micro-toggle__slider {
  width: 44px;
  height: 24px;
  background: var(--rule-color);
  border: 1.5px solid var(--ink-light);
  position: relative;
  transition: background 0.2s ease;
}

.micro-toggle__slider::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--ink-light);
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.micro-toggle__input:checked ~ .micro-toggle__slider {
  background: var(--accent);
  border-color: var(--accent);
}

.micro-toggle__input:checked ~ .micro-toggle__slider::after {
  transform: translateX(20px);
  background: var(--paper);
}

.micro-toggle__label {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--ink-light);
}

/* 8. Tooltip */
.micro-tooltip-btn {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--ink-light);
  background: none;
  border: 1.5px dashed var(--ink-light);
  padding: 0.4rem 1rem;
  cursor: default;
  position: relative;
}

.micro-tooltip-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.micro-tooltip-btn:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 9. Tilt card */
.micro-tilt-card {
  width: 110px;
  height: 70px;
  background: var(--paper);
  border: 1.5px solid var(--rule-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--ink-light);
  cursor: crosshair;
  transition: transform 0.1s ease;
  will-change: transform;
}

.micro-tilt-card__icon { color: var(--accent); font-size: 1rem; }

/* 10. Morphing button */
.micro-morph-btn {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--paper);
  background: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 0.5rem 1.5rem;
  cursor: pointer;
  min-width: 100px;
  position: relative;
  transition: background 0.3s ease;
}

.micro-morph-btn--loading {
  background: var(--ink-light);
  cursor: wait;
}

.micro-morph-btn--loading::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--paper);
  border-top-color: transparent;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: spin 0.7s linear infinite;
}

.micro-morph-btn--done { background: var(--color-success); border-color: var(--color-success); }

@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* 11. Drag list */
.micro-drag-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 140px;
}

.micro-drag-item {
  background: var(--paper);
  border: 1px solid var(--rule-color);
  padding: 0.4rem 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-light);
  cursor: grab;
  user-select: none;
  transition: background 0.15s ease;
}

.micro-drag-item--dragging { opacity: 0.4; cursor: grabbing; }
.micro-drag-item--over { border-color: var(--accent); color: var(--accent); }

/* 12. Elastic */
.micro-elastic {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: grab;
  user-select: none;
}

.micro-elastic__ball {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  cursor: grab;
}

.micro-elastic__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-light);
}

/* 13. Typewriter */
.micro-typewriter {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--ink);
  border-right: 2px solid var(--accent);
  padding-right: 3px;
  animation: cursorBlink 0.9s step-end infinite;
  min-width: 2ch;
  display: inline-block;
}

@keyframes cursorBlink {
  0%, 100% { border-color: var(--accent); }
  50%       { border-color: transparent; }
}

/* 14. Count-up */
.micro-countup {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--ink);
  font-weight: 700;
}

/* 15. Confetti */
.micro-confetti-btn { position: relative; overflow: visible; }

.micro-confetti-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  bottom: 45%;
  border-radius: 1px;
  animation: confettiBurst 0.9s ease-out forwards;
  pointer-events: none;
}

@keyframes confettiBurst {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; }
}

/* 16. Progress ring */
.micro-progress-ring {
  position: relative;
  width: 80px;
  height: 80px;
  cursor: pointer;
}

.micro-progress-ring__bg  { stroke: var(--rule-color); }
.micro-progress-ring__bar { stroke: var(--accent); }

.micro-progress-ring__value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--ink);
}

/* 17. Cursor trail */
.micro-trail-zone {
  width: 100%;
  min-height: 120px;
  cursor: crosshair;
  position: relative;
}

.micro-trail-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-light);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.micro-trail-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  opacity: 0.7;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* 18. Shake input */
.micro-shake-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  max-width: 180px;
}

.micro-shake-input {
  width: 100%;
  border: 1px solid var(--ink-light);
  background: var(--paper);
  padding: 0.4rem 0.6rem;
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--ink);
  outline: none;
}

.micro-shake-input:focus { border-color: var(--accent); }

.micro-shake-input--error {
  border-color: var(--color-error);
  animation: shake 0.4s ease;
}

.micro-shake-input--success { border-color: var(--color-success); }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

.micro-shake-msg {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* 19. Accordion */
.micro-accordion {
  width: 100%;
  max-width: 220px;
}

.micro-accordion__item { border-bottom: 1px solid var(--rule-color); }

.micro-accordion__trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.micro-accordion__icon {
  font-size: 1rem;
  color: var(--ink-light);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.micro-accordion__item--open .micro-accordion__icon { transform: rotate(45deg); }

.micro-accordion__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.micro-accordion__content {
  padding: 0.25rem 0 0.75rem;
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--ink-light);
  line-height: 1.6;
}

/* 20. Hover underline */
.micro-underline-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.micro-underline-link {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--ink);
  cursor: pointer;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: left bottom;
  padding-bottom: 1px;
  transition: background-size 0.3s ease, color 0.2s ease;
}

.micro-underline-link:hover {
  background-size: 100% 2px;
  color: var(--accent);
}

/* Performance Metrics Dashboard */
.perf-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
}

.perf-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  background: var(--paper-cover);
  border: 1px solid var(--rule-color);
  border-top: 3px solid var(--accent);
}

.perf-gauge__svg {
  width: 80px;
  height: 80px;
}

.perf-gauge__value {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--ink);
  font-weight: 700;
  line-height: 1;
}

.perf-gauge__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.perf-gauge__desc {
  font-family: var(--font-serif);
  font-size: 0.7rem;
  color: var(--ink-light);
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .perf-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

/* Fluid demo inherits from capabilities JS — just ensure container styles */
.fluid-demo {
  border: 1px solid var(--rule-color);
  overflow: hidden;
}

.fluid-demo__canvas-wrap {
  position: relative;
  height: 400px;
}

.fluid-demo__canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.fluid-demo__hint {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  white-space: nowrap;
}

.fluid-demo__controls {
  display: flex;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  background: var(--paper-cover);
  border-top: 1px solid var(--rule-color);
  flex-wrap: wrap;
  align-items: center;
}

.fluid-demo__field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fluid-demo__label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-light);
  white-space: nowrap;
}

.fluid-demo__palette {
  display: flex;
  gap: 0.4rem;
}

.fluid-demo__swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.fluid-demo__swatch--active,
.fluid-demo__swatch:hover {
  border-color: var(--ink);
  transform: scale(1.1);
}

.fluid-demo__range {
  accent-color: var(--accent);
  width: 80px;
}

.fluid-demo__clear {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-light);
  border: 1px dashed var(--ink-light);
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  background: none;
  transition: color 0.15s ease, border-color 0.15s ease;
  margin-left: auto;
}

.fluid-demo__clear:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.before-after {
  position: relative;
  overflow: hidden;
  height: 400px;
  border: 1px solid var(--rule-color);
  cursor: ew-resize;
}

.before-after__labels {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-light);
}

.micro-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 1024px) {
  .process {
    grid-template-columns: repeat(2, 1fr);
  }
  .process__step:nth-child(2)::after {
    display: none;
  }
}

@media (max-width: 768px) {
  /* Nav */
  .nav__links {
    display: none;
  }
  .nav__toggle {
    display: flex;
  }

  /* Hero */
  .hero--home {
    padding: 4rem 0 3rem;
  }

  /* Grids */
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .form__row {
    grid-template-columns: 1fr;
  }

  .mission-vision {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cta-banner {
    padding: 2.5rem 1.5rem;
  }

  .process {
    grid-template-columns: 1fr 1fr;
  }

  .process__step::after {
    display: none;
  }

  /* Old single-page */
  .cover img {
    width: clamp(160px, 55vw, 260px);
  }

  .page {
    padding: 5rem var(--page-padding) 6rem var(--page-padding);
  }

  .pages::before {
    display: none;
  }
}

@media (max-width: 480px) {
  :root {
    --page-padding: 1.25rem;
    --line-height: 1.75rem;
  }

  .container,
  .container--narrow {
    padding: 0 1.25rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .hero__title {
    font-size: clamp(2rem, 1.6rem + 2vw, 2.8rem);
  }

  .process {
    grid-template-columns: 1fr;
  }

  .cookie-banner {
    padding: 1rem;
  }

  .opening {
    margin-bottom: calc(var(--line-height) * 1.5);
  }

  h2.write {
    margin-bottom: var(--line-height);
  }
}

/* ==========================================================================
   Accessibility Toolbar
   ========================================================================== */

.a11y-trigger {
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  opacity: 0.65;
  transition: opacity 0.15s, color 0.15s;
  flex-shrink: 0;
}

.a11y-trigger:hover,
.a11y-trigger--active {
  opacity: 1;
  color: var(--accent);
}

.a11y-trigger__icon {
  width: 1.125rem;
  height: 1.125rem;
}

.a11y-panel {
  position: fixed;
  top: 4rem;
  right: 1.25rem;
  z-index: 901;
  width: 17rem;
  background: var(--paper);
  border: 1.5px solid var(--accent);
  border-radius: 0;
  box-shadow: 3px 3px 0 var(--ink-faint, rgba(42,37,32,0.2));
  font-family: var(--font-body, serif);
  font-size: 0.875rem;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
  /* Lined paper inside panel */
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc(var(--line-height, 1.5rem) - 1px),
    rgba(139,105,20,0.08) calc(var(--line-height, 1.5rem) - 1px),
    rgba(139,105,20,0.08) var(--line-height, 1.5rem)
  );
}

.a11y-panel--open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.a11y-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.875rem;
  border-bottom: 1.5px dashed var(--accent);
}

.a11y-panel__title {
  font-family: var(--font-heading, 'Caveat', cursive);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.a11y-panel__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: 0.125rem;
  display: flex;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.a11y-panel__close:hover {
  opacity: 1;
}

.a11y-panel__body {
  padding: 0.5rem 0;
}

.a11y-panel__footer {
  padding: 0.625rem 0.875rem;
  border-top: 1.5px dashed var(--accent);
}

.a11y-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.875rem;
  gap: 0.5rem;
}

.a11y-control__label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--ink);
  flex: 1;
  min-width: 0;
}

.a11y-control__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.a11y-control__desc {
  font-size: 0.7rem;
  color: var(--ink);
  opacity: 0.55;
  line-height: 1.3;
}

.a11y-control__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--accent);
}

/* Font size stepper */
.a11y-stepper {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.a11y-stepper__btn {
  background: none;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-heading, 'Caveat', cursive);
  font-size: 0.8125rem;
  font-weight: 600;
  width: 2rem;
  height: 1.625rem;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}

.a11y-stepper__btn:hover {
  background: var(--accent);
  color: var(--paper);
}

.a11y-stepper__value {
  font-size: 0.75rem;
  color: var(--ink);
  min-width: 2.5rem;
  text-align: center;
  font-family: var(--font-mono, monospace);
}

/* Toggle switch */
.a11y-toggle {
  position: relative;
  width: 2.5rem;
  height: 1.375rem;
  background: var(--ink-faint, rgba(42,37,32,0.15));
  border: 1.5px solid var(--accent);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  padding: 0;
}

.a11y-toggle--on {
  background: var(--accent);
}

.a11y-toggle__knob {
  position: absolute;
  top: 0.1rem;
  left: 0.1rem;
  width: 0.9rem;
  height: 0.9rem;
  background: var(--paper);
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 1px 1px 0 rgba(42,37,32,0.2);
}

.a11y-toggle--on .a11y-toggle__knob {
  transform: translateX(1.1rem);
}

/* Reset button */
.a11y-reset-btn {
  width: 100%;
  background: none;
  border: 1.5px dashed var(--accent);
  color: var(--accent);
  font-family: var(--font-heading, 'Caveat', cursive);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.15s, color 0.15s;
}

.a11y-reset-btn:hover {
  background: var(--accent);
  color: var(--paper);
}

/* Reading guide */
.a11y-reading-guide {
  position: fixed;
  left: 0;
  right: 0;
  height: 2rem;
  background: rgba(139,105,20,0.12);
  border-top: 1px solid rgba(139,105,20,0.3);
  border-bottom: 1px solid rgba(139,105,20,0.3);
  pointer-events: none;
  z-index: 9998;
  transform: translateY(-50%);
}

/* ==========================================================================
   Accessibility Overrides (data-a11y-* on <html>)
   ========================================================================== */

/* High contrast */
[data-a11y-contrast="high"] {
  --paper: #fff;
  --ink: #000;
  --accent: #8b0000;
  filter: contrast(1.25);
}

[data-a11y-contrast="high"] .site-nav,
[data-a11y-contrast="high"] .footer {
  border-color: #000;
}

/* Dyslexia font */
[data-a11y-font="dyslexia"] body,
[data-a11y-font="dyslexia"] p,
[data-a11y-font="dyslexia"] li,
[data-a11y-font="dyslexia"] td,
[data-a11y-font="dyslexia"] input,
[data-a11y-font="dyslexia"] textarea {
  font-family: 'OpenDyslexic', serif !important;
  line-height: 1.8 !important;
}

/* Highlight links */
[data-a11y-links="highlight"] a {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
  background: rgba(139,105,20,0.12) !important;
  padding: 0 0.15em !important;
}

/* Pause animations */
[data-a11y-motion="paused"] *,
[data-a11y-motion="paused"] *::before,
[data-a11y-motion="paused"] *::after {
  animation-play-state: paused !important;
  transition-duration: 0.01ms !important;
}

/* Text spacing */
[data-a11y-spacing="wide"] body {
  letter-spacing: 0.05em;
  word-spacing: 0.15em;
  line-height: 1.9;
}

[data-a11y-spacing="wide"] p {
  margin-bottom: 1.5em;
}

/* ==========================================================================
   Chatbot
   ========================================================================== */

/* Toggle button */
.chat-toggle {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 900;
  transition: bottom 0.25s ease;
  height: 2.5rem;
  padding: 0 1rem;
  border-radius: 1.25rem;
  background: var(--accent);
  border: 2px solid var(--accent);
  color: var(--paper);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(42,37,32,0.25);
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  font-family: var(--font-body, serif);
  font-size: 0.8rem;
  font-weight: 600;
}

.chat-toggle:hover {
  background: var(--ink);
  border-color: var(--ink);
  transform: translateY(-1px);
}

.chat-toggle--active {
  background: var(--ink);
  border-color: var(--ink);
}

.chat-toggle__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.chat-toggle__label {
  letter-spacing: 0.02em;
}

.chat-toggle__dot {
  width: 0.5rem;
  height: 0.5rem;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
  animation: chatDotPulse 2s ease-in-out infinite;
}

@keyframes chatDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

/* Chat window */
.chat-window {
  position: fixed;
  bottom: 5rem;
  left: 1.25rem;
  transition: bottom 0.25s ease;
  z-index: 901;
  width: 22rem;
  max-width: calc(100vw - 2.5rem);
  height: 30rem;
  max-height: calc(100vh - 6rem);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1.5px solid var(--accent);
  box-shadow: 4px 4px 0 rgba(42,37,32,0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem) scale(0.97);
  transform-origin: bottom left;
  transition: opacity 0.22s ease, transform 0.22s ease;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc(var(--line-height, 1.5rem) - 1px),
    rgba(139,105,20,0.07) calc(var(--line-height, 1.5rem) - 1px),
    rgba(139,105,20,0.07) var(--line-height, 1.5rem)
  );
}

.chat-window--open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Header */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.875rem;
  border-bottom: 1.5px dashed var(--accent);
  flex-shrink: 0;
  background: var(--paper);
}

.chat-header__info {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.chat-header__avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--font-heading, 'Caveat', cursive);
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-header__name {
  font-family: var(--font-heading, 'Caveat', cursive);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.chat-header__status {
  font-size: 0.7rem;
  color: var(--ink);
  opacity: 0.55;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.chat-status-dot {
  width: 0.45rem;
  height: 0.45rem;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
}

.chat-header__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  opacity: 0.5;
  padding: 0.25rem;
  display: flex;
  transition: opacity 0.15s;
}

.chat-header__close:hover { opacity: 1; }

/* Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--accent); opacity: 0.4; border-radius: 2px; }

.chat-msg {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  max-width: 88%;
  animation: chatMsgIn 0.2s ease;
}

@keyframes chatMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-msg--bot { align-self: flex-start; }
.chat-msg--user { align-self: flex-end; }

.chat-bubble {
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--accent);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

.chat-msg--bot .chat-bubble {
  border-radius: 0 0.5rem 0.5rem 0.5rem;
  background: var(--paper);
}

.chat-msg--user .chat-bubble {
  border-radius: 0.5rem 0 0.5rem 0.5rem;
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}

/* Typing indicator */
.chat-typing .chat-bubble {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 0.6rem 0.875rem;
}

.chat-typing .chat-bubble span {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: chatTypingBounce 1.2s ease-in-out infinite;
}

.chat-typing .chat-bubble span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing .chat-bubble span:nth-child(3) { animation-delay: 0.4s; }

@keyframes chatTypingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* Quick replies */
.chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chat-quick-reply {
  background: none;
  border: 1.5px dashed var(--accent);
  color: var(--accent);
  font-family: var(--font-body, serif);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-radius: 1rem;
  white-space: nowrap;
}

.chat-quick-reply:hover {
  background: var(--accent);
  color: var(--paper);
}

/* Action button (link) */
.chat-action-btn {
  display: inline-block;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--font-body, serif);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.875rem;
  border: 1.5px solid var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s;
  align-self: flex-start;
}

.chat-action-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* Input area */
.chat-input-row {
  display: flex;
  align-items: center;
  border-top: 1.5px dashed var(--accent);
  flex-shrink: 0;
  background: var(--paper);
}

.chat-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 0.65rem 0.875rem;
  font-family: var(--font-body, serif);
  font-size: 0.8125rem;
  color: var(--ink);
}

.chat-input::placeholder { opacity: 0.45; }

.chat-send {
  background: none;
  border: none;
  border-left: 1.5px dashed var(--accent);
  color: var(--accent);
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.chat-send:hover {
  background: var(--accent);
  color: var(--paper);
}

@media (max-width: 480px) {
  .chat-window {
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    max-width: none;
    bottom: 4.5rem;
  }

  .chat-toggle {
    left: 0.75rem;
    bottom: 0.75rem;
  }
}

/* ==========================================================================
   Consultation Popup
   ========================================================================== */

.cpopup-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(42, 37, 32, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cpopup-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

.cpopup {
  position: relative;
  background: var(--paper);
  border: 2px solid var(--accent);
  box-shadow: 6px 6px 0 rgba(42, 37, 32, 0.25);
  max-width: 30rem;
  width: 100%;
  padding: 2.25rem 2rem 1.75rem;
  transform: translateY(1rem) scale(0.97);
  transition: transform 0.3s ease;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc(var(--line-height, 1.5rem) - 1px),
    rgba(139, 105, 20, 0.07) calc(var(--line-height, 1.5rem) - 1px),
    rgba(139, 105, 20, 0.07) var(--line-height, 1.5rem)
  );
}

.cpopup-overlay--open .cpopup {
  transform: translateY(0) scale(1);
}

.cpopup__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  opacity: 0.45;
  padding: 0.25rem;
  display: flex;
  transition: opacity 0.15s;
}

.cpopup__close:hover { opacity: 1; }

.cpopup__tag {
  display: inline-block;
  font-family: var(--font-body, serif);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1.5px dashed var(--accent);
  padding: 0.2rem 0.6rem;
  margin-bottom: 1rem;
}

.cpopup__title {
  font-family: var(--font-heading, 'Caveat', cursive);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.cpopup__body {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink);
  opacity: 0.85;
  margin-bottom: 1.5rem;
}

.cpopup__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cpopup__btn {
  flex: 1;
  min-width: 10rem;
  text-align: center;
  white-space: nowrap;
}

.cpopup__note {
  font-size: 0.75rem;
  color: var(--ink);
  opacity: 0.5;
  text-align: center;
  margin: 0;
}

@media (max-width: 480px) {
  .cpopup {
    padding: 1.75rem 1.25rem 1.5rem;
  }

  .cpopup__actions {
    flex-direction: column;
  }

  .cpopup__btn {
    min-width: unset;
  }
}

/* ==========================================================================
   Scroll Progress Bar
   ========================================================================== */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent);
  z-index: 9999;
  transition: width 0.1s linear;
  pointer-events: none;
}

.scroll-progress::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ==========================================================================
   Margin Rule
   ========================================================================== */

@media (min-width: 1100px) {
  body::before {
    content: '';
    position: fixed;
    left: 2.25rem;
    top: 0;
    bottom: 0;
    width: 1.5px;
    background: rgba(200, 70, 70, 0.28);
    pointer-events: none;
    z-index: 0;
  }
}

/* ==========================================================================
   Hand-drawn Section Dividers
   ========================================================================== */

.section + .section,
.section--alt + .section,
.section + .section--alt {
  position: relative;
}

.section + .section::before,
.section--alt + .section::before,
.section + .section--alt::before {
  content: '';
  display: block;
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='28' viewBox='0 0 1200 28' preserveAspectRatio='none'%3E%3Cpath d='M0,18 L8,10 L14,24 L22,6 L30,20 L40,9 L48,26 L58,12 L66,22 L76,5 L84,16 L94,27 L104,8 L112,21 L122,7 L130,24 L140,13 L148,22 L158,4 L166,19 L176,9 L186,25 L196,11 L204,20 L214,3 L222,18 L232,8 L240,23 L250,12 L258,22 L268,5 L276,17 L286,26 L296,9 L304,21 L314,6 L322,18 L332,8 L342,24 L350,13 L360,22 L370,4 L378,18 L388,9 L396,25 L406,11 L414,21 L424,3 L432,17 L442,27 L452,8 L460,20 L470,6 L480,22 L490,12 L498,25 L508,10 L516,21 L526,5 L534,18 L544,8 L554,23 L562,11 L572,22 L582,4 L590,19 L600,9 L610,25 L618,12 L628,22 L638,5 L646,17 L656,26 L664,10 L674,21 L684,6 L692,19 L702,8 L712,24 L720,13 L730,22 L740,4 L748,18 L758,9 L766,25 L776,11 L786,21 L794,3 L804,17 L812,27 L822,8 L830,20 L840,6 L850,22 L860,12 L868,25 L878,10 L888,21 L896,5 L906,18 L916,8 L924,23 L934,11 L944,22 L952,4 L962,19 L972,9 L980,25 L990,12 L1000,22 L1008,5 L1018,17 L1026,26 L1036,9 L1046,21 L1054,6 L1064,19 L1072,8 L1082,24 L1090,13 L1100,22 L1110,4 L1118,18 L1128,9 L1136,25 L1146,11 L1156,21 L1164,3 L1172,17 L1182,27 L1190,8 L1200,18' stroke='%238b6914' stroke-width='1.5' stroke-opacity='0.45' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}

/* ==========================================================================
   Graph Paper (technical sections)
   ========================================================================== */

.section--graph {
  background-image:
    linear-gradient(rgba(139,105,20,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,105,20,0.08) 1px, transparent 1px),
    linear-gradient(rgba(139,105,20,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,105,20,0.04) 1px, transparent 1px) !important;
  background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px !important;
  background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px !important;
}

/* ==========================================================================
   Dog-eared Card Corners
   ========================================================================== */

.card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 1.5rem 1.5rem 0 0;
  border-color: rgba(139,105,20,0.18) transparent transparent transparent;
}

/* Fold crease shadow */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1.5rem;
  height: 1.5rem;
  background: linear-gradient(
    315deg,
    rgba(139,105,20,0.1) 0%,
    transparent 60%
  );
  pointer-events: none;
}

/* ==========================================================================
   Back to Top — notebook restyle
   ========================================================================== */

.back-to-top {
  width: 2.5rem !important;
  height: 2.5rem !important;
  border-radius: 0 !important;
  background: var(--paper) !important;
  border: 2px dashed var(--accent) !important;
  color: var(--accent) !important;
  box-shadow: 2px 2px 0 rgba(42,37,32,0.2) !important;
  transition: background 0.2s, color 0.2s, transform 0.15s, opacity 0.2s ease !important;
}

.back-to-top:hover {
  background: var(--accent) !important;
  color: var(--paper) !important;
  transform: translateY(-2px) !important;
}

/* ==========================================================================
   Active Nav Link — hand-drawn underline
   ========================================================================== */

.nav__link--active {
  color: var(--ink) !important;
  border-bottom: none !important;
  position: relative;
}

.nav__link--active::after {
  content: '';
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -3px;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='8' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M0,5 C15,2 30,7 45,4 C60,1 75,7 90,4 L100,5' stroke='%238b6914' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}

/* ==========================================================================
   Highlighter Text
   ========================================================================== */

.highlight {
  background: linear-gradient(
    104deg,
    rgba(255, 215, 40, 0) 0.9%,
    rgba(255, 215, 40, 0.75) 2.4%,
    rgba(255, 215, 40, 0.6) 5.8%,
    rgba(255, 215, 40, 0.75) 93%,
    rgba(255, 215, 40, 0.4) 96%,
    rgba(255, 215, 40, 0) 98%
  );
  padding: 0.05em 0.2em;
  border-radius: 1px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

[data-theme="dark"] .highlight {
  background: linear-gradient(
    104deg,
    rgba(180, 120, 0, 0) 0.9%,
    rgba(180, 120, 0, 0.45) 2.4%,
    rgba(180, 120, 0, 0.35) 5.8%,
    rgba(180, 120, 0, 0.45) 93%,
    rgba(180, 120, 0, 0.25) 96%,
    rgba(180, 120, 0, 0) 98%
  );
}

/* ==========================================================================
   Margin Annotations
   ========================================================================== */

.margin-note {
  display: none;
}

@media (min-width: 1280px) {
  .margin-note {
    display: block;
    position: absolute;
    right: calc(100% + 1.5rem);
    top: 50%;
    transform: translateY(-50%) rotate(-4deg);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--accent);
    opacity: 0.75;
    width: 9rem;
    text-align: right;
    line-height: 1.35;
    pointer-events: none;
    white-space: normal;
  }

  .margin-note--right {
    right: auto;
    left: calc(100% + 1.5rem);
    text-align: left;
    transform: translateY(-50%) rotate(3deg);
  }

  .margin-note::after {
    content: '';
    display: block;
    width: 1.5rem;
    height: 1px;
    background: var(--accent);
    opacity: 0.45;
    margin-top: 0.3rem;
    margin-left: auto;
  }

  .margin-note--right::after {
    margin-left: 0;
  }
}

/* ==========================================================================
   Copy Email
   ========================================================================== */

.copy-email {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  border-bottom: 1px dashed var(--accent);
  padding-bottom: 1px;
  transition: opacity 0.15s;
}

.copy-email:hover { opacity: 0.75; }

.copy-email__icon {
  display: inline-flex;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.15s, transform 0.15s;
}

.copy-email:hover .copy-email__icon { opacity: 1; }

.copy-email--copied .copy-email__icon svg {
  stroke: #059669;
}

/* ==========================================================================
   Form Validation
   ========================================================================== */

.form__input--error,
.form__select--error,
.form__textarea--error {
  border-color: #dc2626 !important;
  outline: none;
}

.form__error {
  display: block;
  font-size: 0.8rem;
  color: #dc2626;
  margin-top: 0.3rem;
  font-family: var(--font-serif);
  min-height: 1.1rem;
}

/* ==========================================================================
   Print Styles (Terms & Privacy pages)
   ========================================================================== */

@media print {
  .site-nav,
  .back-to-top,
  .cookie-banner,
  .footer__top,
  .footer__grid,
  .scroll-progress,
  .chat-toggle,
  .chat-window,
  .a11y-trigger,
  .a11y-panel,
  .cpopup-overlay {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
    line-height: 1.6;
  }

  body::before { display: none !important; }

  .legal-content {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .legal-content h2 {
    font-size: 14pt;
    margin-top: 1.5em;
    page-break-after: avoid;
  }

  .legal-content p,
  .legal-content li {
    orphans: 3;
    widows: 3;
    font-size: 11pt;
  }

  .footer__bottom {
    border-top: 1pt solid #ccc;
    padding-top: 0.5em;
    font-size: 9pt;
  }

  .hero {
    padding: 1rem 0 !important;
    background: none !important;
  }

  .hero__title { font-size: 20pt !important; }
  .hero__subtitle { font-size: 11pt !important; }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
  }

  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }
}

/* ==========================================================================
   Availability Calendar (contact form step 3)
   ========================================================================== */

.cal-widget {
  margin-bottom: 1.5rem;
}

#availabilityCalendar {
  border: 1.5px solid var(--rule-color);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cal-header {
  display: grid;
  grid-template-columns: 5.5rem repeat(5, 1fr);
  border-bottom: 1.5px dashed var(--accent);
  background: var(--paper-cover);
}

.cal-header__spacer {
  border-right: 1.5px dashed var(--accent);
}

.cal-header .cal-day {
  padding: 0.4rem 0.25rem;
  text-align: center;
  border-left: 1px solid var(--rule-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.cal-day__name {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-light);
}

.cal-day__date {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.cal-day--today .cal-day__date {
  background: var(--accent);
  color: var(--paper);
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.cal-grid {
  background: var(--paper);
}

.cal-row {
  display: grid;
  grid-template-columns: 5.5rem repeat(5, 1fr);
  border-bottom: 1px solid var(--rule-color);
}

.cal-row:last-child {
  border-bottom: none;
}

.cal-time {
  padding: 0.5rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-light);
  display: flex;
  align-items: center;
  border-right: 1.5px dashed var(--accent);
  white-space: nowrap;
  background: var(--paper-cover);
}

.cal-slot {
  padding: 0.45rem 0.25rem;
  text-align: center;
  font-size: 0.75rem;
  border-left: 1px solid var(--rule-color);
  cursor: default;
  transition: background 0.15s, color 0.15s;
  min-height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-slot--open {
  color: #059669;
  cursor: pointer;
  font-weight: 700;
}

.cal-slot--open:hover {
  background: rgba(5, 150, 105, 0.1);
}

.cal-slot--taken {
  color: var(--ink-light);
  opacity: 0.35;
  cursor: not-allowed;
  font-size: 1rem;
}

.cal-slot--selected {
  background: var(--accent) !important;
  color: var(--paper) !important;
  font-weight: 700;
}

.cal-legend {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.75rem;
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--ink-light);
}

.cal-legend__dot {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  margin-right: 0.3rem;
  vertical-align: middle;
}

/* ASAP option */
.cal-asap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  margin-bottom: 0.75rem;
  background: transparent;
  border: 1.5px dashed var(--accent);
  border-radius: 4px;
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--accent);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.cal-asap:hover {
  background: rgba(139, 105, 20, 0.06);
}

.cal-asap--selected {
  background: rgba(5, 150, 105, 0.08) !important;
  border-color: #059669 !important;
  color: #059669 !important;
  border-style: solid !important;
}

.cal-asap__text {
  flex: 1;
}

/* Week navigation */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0;
}

.cal-nav__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: 1.5px dashed var(--accent);
  border-radius: 3px;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s;
}

.cal-nav__btn:hover:not(:disabled) {
  background: rgba(139, 105, 20, 0.08);
}

.cal-nav__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.cal-nav__range {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 600;
}

/* ASAP wrap on schedule page */
.schedule-asap-wrap {
  margin-top: 1.25rem;
  text-align: center;
}

.schedule-asap__label {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--ink-light);
  margin-bottom: 0.5rem;
}

.schedule-asap-wrap .cal-asap {
  display: inline-flex;
  width: auto;
  margin: 0 auto;
}

@media (max-width: 560px) {
  .cal-header,
  .cal-row {
    grid-template-columns: 4.5rem repeat(5, minmax(2.5rem, 1fr));
  }

  .cal-time {
    font-size: 0.65rem;
    padding: 0.4rem 0.3rem;
  }
}

/* ==========================================================================
   Schedule Page — Service Cards
   ========================================================================== */

.schedule-service-card {
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  user-select: none;
}

.schedule-service-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.schedule-service-card--selected {
  border-color: var(--accent) !important;
  border-width: 2px !important;
  box-shadow: 3px 3px 0 rgba(139,105,20,0.2);
}

.schedule-service-card--selected::after {
  border-color: var(--accent) transparent transparent transparent !important;
}

/* ==========================================================================
   Schedule Calendar
   ========================================================================== */

.schedule-calendar {
  max-width: 860px;
  margin: 0 auto;
}

/* Week navigation */
.schedule-calendar__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0;
}

.schedule-calendar__nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--paper);
  border: 1.5px dashed var(--accent);
  color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.schedule-calendar__nav-btn:hover {
  background: var(--accent);
  color: var(--paper);
}

.schedule-calendar__range {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  letter-spacing: 0.02em;
}

/* Desktop grid */
.schedule-calendar__grid {
  display: grid;
  grid-template-columns: 5.5rem repeat(5, 1fr);
  border: 1.5px solid var(--rule-color);
  overflow: hidden;
}

.schedule-calendar__corner {
  background: var(--paper-cover);
  border-right: 1.5px dashed var(--accent);
  border-bottom: 1.5px dashed var(--accent);
}

.schedule-calendar__day-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.25rem;
  background: var(--paper-cover);
  border-left: 1px solid var(--rule-color);
  border-bottom: 1.5px dashed var(--accent);
  gap: 0.1rem;
}

.schedule-calendar__day-header--today {
  background: rgba(139,105,20,0.08);
}

.schedule-calendar__day-name {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.schedule-calendar__day-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-light);
}

.schedule-calendar__day-header--today .schedule-calendar__day-date {
  color: var(--accent);
  font-weight: 700;
}

.schedule-calendar__time-label {
  padding: 0 0.5rem;
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-light);
  background: var(--paper-cover);
  border-right: 1.5px dashed var(--accent);
  border-bottom: 1px solid var(--rule-color);
  min-height: 2.75rem;
  white-space: nowrap;
}

.schedule-calendar__slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-left: 1px solid var(--rule-color);
  border-bottom: 1px solid var(--rule-color);
  font-size: 0.72rem;
  font-family: var(--font-serif);
  transition: background 0.15s, color 0.15s;
  padding: 0.25rem;
  text-align: center;
  width: 100%;
}

.schedule-calendar__slot--available {
  color: #059669;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border-left: 1px solid var(--rule-color);
  border-bottom: 1px solid var(--rule-color);
}

.schedule-calendar__slot--available:hover {
  background: rgba(5,150,105,0.1);
}

.schedule-calendar__slot--taken {
  color: var(--ink-light);
  opacity: 0.35;
  cursor: not-allowed;
  background: none;
  font-size: 0.7rem;
}

.schedule-calendar__slot--selected {
  background: var(--accent) !important;
  color: var(--paper) !important;
  font-weight: 700;
  cursor: pointer;
}

/* Mobile list view */
.schedule-calendar__mobile-list {
  display: none;
}

.schedule-calendar__mobile-day {
  margin-bottom: 1.25rem;
}

.schedule-calendar__mobile-day-header {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1.5px dashed var(--accent);
  padding-bottom: 0.35rem;
  margin-bottom: 0.5rem;
}

.schedule-calendar__mobile-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.schedule-calendar__mobile-slot {
  padding: 0.35rem 0.75rem;
  font-family: var(--font-serif);
  font-size: 0.8125rem;
  border: 1.5px solid var(--rule-color);
  background: var(--paper);
  color: #059669;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.schedule-calendar__mobile-slot:hover {
  background: rgba(5,150,105,0.1);
  border-color: #059669;
}

.schedule-calendar__mobile-slot--taken {
  color: var(--ink-light);
  opacity: 0.4;
  cursor: not-allowed;
  border-style: dashed;
}

.schedule-calendar__mobile-slot--selected {
  background: var(--accent) !important;
  color: var(--paper) !important;
  border-color: var(--accent) !important;
  font-weight: 700;
}

@media (max-width: 640px) {
  .schedule-calendar__grid {
    display: none;
  }

  .schedule-calendar__mobile-list {
    display: block;
  }
}

/* ==========================================================================
   Schedule Summary
   ========================================================================== */

.schedule-summary {
  margin-bottom: 1.5rem;
}

.schedule-summary__inner {
  background: var(--paper-cover);
  border: 1.5px solid var(--accent);
  padding: 1.5rem;
  box-shadow: 3px 3px 0 rgba(139,105,20,0.15);
}

.schedule-summary__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1.5px dashed var(--accent);
}

.schedule-summary__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.schedule-summary__item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.schedule-summary__item--full {
  grid-column: 1 / -1;
}

.schedule-summary__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-light);
}

.schedule-summary__value {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 600;
}

/* Success state */
.schedule-summary__inner--success {
  text-align: center;
  padding: 2rem;
}

.schedule-summary__check {
  width: 3rem;
  height: 3rem;
  background: rgba(5,150,105,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: #059669;
}

.schedule-summary__check svg {
  width: 1.5rem;
  height: 1.5rem;
}

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

/* ==========================================================================
   Paper Grain Texture
   ========================================================================== */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

[data-theme="dark"] body::after {
  opacity: 0.06;
}

/* ==========================================================================
   Typewriter Cycling Text
   ========================================================================== */

.typer-wrap {
  display: inline;
  white-space: nowrap;
}

.typer-cursor {
  display: inline-block;
  width: 2px;
  height: 0.85em;
  background: currentColor;
  margin-left: 2px;
  vertical-align: middle;
  animation: typer-blink 0.9s step-end infinite;
  border-radius: 1px;
}

@keyframes typer-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ==========================================================================
   Spiral Binding
   ========================================================================== */

.spiral-left {
  position: relative;
}

@media (min-width: 640px) {
  .spiral-left {
    margin-left: 1.75rem;
  }

  .spiral-left::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 1.75rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='32' viewBox='0 0 28 32'%3E%3Ccircle cx='14' cy='16' r='7' fill='none' stroke='%238b6914' stroke-width='1.5' opacity='0.38'/%3E%3Ccircle cx='14' cy='16' r='3.5' fill='%23f5f0e8' stroke='none' opacity='0.9'/%3E%3C/svg%3E");
    background-repeat: repeat-y;
    background-size: 28px 32px;
    pointer-events: none;
  }

  [data-theme="dark"] .spiral-left::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='32' viewBox='0 0 28 32'%3E%3Ccircle cx='14' cy='16' r='7' fill='none' stroke='%23c49a6c' stroke-width='1.5' opacity='0.35'/%3E%3Ccircle cx='14' cy='16' r='3.5' fill='%231a1815' stroke='none' opacity='0.9'/%3E%3C/svg%3E");
  }
}

/* ==========================================================================
   Sketch Button Border (draw-in on hover)
   ========================================================================== */

.btn {
  position: relative;
  overflow: visible;
}

.btn-sketch-svg {
  position: absolute;
  inset: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  pointer-events: none;
  overflow: visible;
}

.btn-sketch-rect {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  opacity: 0.55;
  transition: stroke-dashoffset 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover .btn-sketch-rect,
.btn:focus-visible .btn-sketch-rect {
  stroke-dashoffset: 0;
}

/* ==========================================================================
   Washi Tape
   ========================================================================== */

/* Tape behind section labels */
.section__label {
  position: relative;
}

.section__label::before {
  content: '';
  position: absolute;
  inset: -0.2rem -0.6rem;
  background: rgba(255, 218, 50, 0.28);
  border: 1px solid rgba(200, 168, 0, 0.18);
  transform: rotate(-0.6deg);
  z-index: -1;
  pointer-events: none;
}

/* Tape strips injected by JS */
.washi-tape-strip {
  position: absolute;
  height: 1.15rem;
  pointer-events: none;
  z-index: 5;
}

/* ==========================================================================
   Animated SVG Draw-In
   ========================================================================== */

.sketch-draw-wrap {
  text-align: center;
  margin: 2rem auto 2.5rem;
  max-width: 520px;
}

.sketch-draw {
  width: 100%;
  color: var(--accent);
  opacity: 0.42;
  display: block;
}

.sketch-draw [style*="--len"] {
  stroke-dasharray: var(--len, 500);
  stroke-dashoffset: var(--len, 500);
}

.sketch-draw.drawn [style*="--len"] {
  animation: sketch-draw-in 0.55s ease forwards;
}

@keyframes sketch-draw-in {
  to { stroke-dashoffset: 0; }
}

.sketch-draw__caption {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--ink-light);
  opacity: 0.6;
  margin-top: 0.5rem;
  transform: rotate(-1deg);
  display: inline-block;
}

/* ==========================================================================
   FAQ Search Filter
   ========================================================================== */

.faq-search-wrap {
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

.faq-search-field {
  position: relative;
}

.faq-search__icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-light);
  pointer-events: none;
}

.faq-search__input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--ink);
  background: var(--paper);
  border: 1.5px dashed var(--accent);
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s;
}

.faq-search__input:focus {
  border-style: solid;
  border-color: var(--accent);
}

.faq-search__input::placeholder {
  color: var(--ink-light);
  opacity: 0.6;
}

.faq-no-results {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--ink-light);
  text-align: center;
  margin-top: 0.75rem;
}

.faq-search__clear {
  background: none;
  border: none;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.faq__item[hidden] {
  display: none;
}

/* Push chatbot above cookie banner when it's visible */
body:has(.cookie-banner.visible) .chat-toggle {
  bottom: calc(1.25rem + 76px);
}

body:has(.cookie-banner.visible) .chat-window {
  bottom: calc(5rem + 76px);
}
