/* Shoko Designs: shared tokens, type, layout, and components. */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/fonts/cormorant-garamond-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/fonts/cormorant-garamond-600-italic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Two themes: light (default) and dark, set by data-theme on <html>. The homepage hero is
   always dark so the white dove reads; the header and index navigator borrow the dark set
   while they sit over it. Contrast notes are against --bg and --bg-2. */
:root {
  --bg: #f6f7f4;
  --bg-rgb: 246, 247, 244;
  --bg-2: #eef1ee;
  --bg-3: #fbfbf9;
  --text: #25302f;
  --text-2: #36423f;
  --muted: #586563; /* 5.7:1 and 5.3:1 */
  --line: rgba(37, 48, 47, 0.1);
  --line-strong: rgba(37, 48, 47, 0.24);
  --accent: #2b736b; /* 5.2:1 and 4.9:1; --accent-ink on accent is 5.4:1 */
  --accent-hover: #24625b;
  --accent-ink: #fbfbf9;
  --field-bg: #fbfbf9;
  --placeholder: #707c7a;
  --error: #a83f2c;
  --confirm-line: #b98a3a;
  --confirm-text: #7a5615;
  --shadow: 0 1rem 2.5rem rgba(37, 48, 47, 0.12);
  color-scheme: light;
}
:root[data-theme="dark"],
.hero,
.site-header.is-over-hero,
.indexnav:not(.is-light) {
  --bg: #151b1e;
  --bg-rgb: 21, 27, 30;
  --bg-2: #1a2226;
  --bg-3: #20292d;
  --text: #e4e9e7;
  --text-2: #c9d1cf;
  --muted: #a3aeac; /* 7.9:1 and 7.4:1 */
  --line: rgba(228, 233, 231, 0.12);
  --line-strong: rgba(228, 233, 231, 0.28);
  --accent: #72b4ac; /* 7.4:1 on --bg, 4.7:1 on the hero's lightest area; --accent-ink for text on accent */
  --accent-hover: #88c2bb;
  --accent-ink: #151b1e;
  --field-bg: rgba(21, 27, 30, 0.6);
  --placeholder: #8d9896;
  --error: #eeb0a4;
  --confirm-line: #d9b676;
  --confirm-text: #ead0a0;
  --shadow: 0 1rem 3rem rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}
.hero,
.site-header.is-over-hero,
.indexnav:not(.is-light) { color: var(--text); }

:root {
  --font-display: "Cormorant Garamond", "EB Garamond", Garamond, "Times New Roman", serif;
  --font-body: "Inter", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --header-h: 4.5rem;
  --indexnav-h: 4.25rem;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

body:not(.home) { --indexnav-h: 0px; }

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  -webkit-text-size-adjust: 100%;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  margin: 0 0 0.75em;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h2 { font-size: clamp(1.625rem, 2.6vw, 2.25rem); }
h3 { font-size: 1.1875rem; font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 1em; }
p, li { text-wrap: pretty; }

a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.2s var(--ease), color 0.2s var(--ease);
}
a:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

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

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header (reference-style minimal chrome) ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--gutter);
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  color: var(--text);
  transition: background-color 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(var(--bg-rgb), 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__left,
.site-header__right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.site-header a { text-decoration: none; }
.site-header a:hover { text-decoration: underline; text-decoration-color: var(--line-strong); }
.site-header__home {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.site-header > .site-header__home {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
@media (max-width: 46rem) {
  .site-header__left > a[href="/"] { display: none; }
  .site-header > .site-header__home {
    position: static;
    transform: none;
    margin: 0 auto 0 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    white-space: nowrap;
  }
  .site-header__right .slash { padding-inline: 0.2em; }
}
@media (max-width: 22rem) {
  .site-header > .site-header__home { letter-spacing: 0.06em; }
  .site-header__right { font-size: 0.875rem; gap: 0.5rem; }
}
.slash { color: var(--muted); padding-inline: 0.35em; }
@media (max-width: 63.99rem) {
  /* Below this width Services would run into the centered wordmark; it stays in the menu. */
  .site-header__extra,
  .site-header__extra + .slash { display: none; }
}
@media (max-width: 77.99rem) {
  /* Same for Reviews, which needs more room; it stays in the menu and footer. */
  .site-header__extra--wide,
  .site-header__extra--wide + .slash { display: none; }
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 -0.5rem 0 0.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}
.theme-toggle:hover { background: var(--line); }
.theme-toggle svg { width: 1.125rem; height: 1.125rem; }
.theme-toggle__sun,
[data-theme="dark"] .theme-toggle__moon { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: block; }
@media (max-width: 46rem) {
  /* Phones get the theme switch from the menu; the header has no room. */
  .site-header .theme-toggle { display: none; }
}

.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: -0.6rem;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
}
.menu-toggle__bars {
  position: relative;
  width: 1.375rem;
  height: 0.75rem;
}
.menu-toggle__bars::before,
.menu-toggle__bars::after,
.menu-toggle__bars span {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
}
.menu-toggle__bars::before { top: 0; }
.menu-toggle__bars span { top: 50%; transform: translateY(-50%); }
.menu-toggle__bars::after { bottom: 0; }

/* ---------- Image lightbox ---------- */

.zoom {
  position: relative;
  display: block;
  border-radius: var(--radius);
  cursor: zoom-in;
}
.zoom:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.zoom__hint {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(21, 27, 30, 0.72)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5' fill='none' stroke='%23f6f7f4' stroke-width='1.5'/%3E%3Cpath d='M12.5 12.5 17 17M8.5 6v5M6 8.5h5' stroke='%23f6f7f4' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E")
    center / 1.25rem no-repeat;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  pointer-events: none;
}
.zoom:hover .zoom__hint,
.zoom:focus-visible .zoom__hint { opacity: 1; transform: none; }
@media (hover: none) { .zoom__hint { opacity: 1; transform: none; } }

.has-lightbox { overflow: hidden; }
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(14, 18, 21, 0.94);
  color: #e4e9e7;
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; animation: menu-in 0.25s var(--ease); }
.lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: var(--gutter);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  height: 2.75rem;
  padding: 0 0.75rem;
  background: rgba(14, 18, 21, 0.6);
  border: 1px solid rgba(228, 233, 231, 0.24);
  border-radius: 999px;
  color: inherit;
  font: inherit;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.lightbox__close:focus-visible { outline: 2px solid #72b4ac; outline-offset: 3px; }
.lightbox__close svg { width: 1rem; height: 1rem; }
.lightbox__figure {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  justify-items: center;
  gap: 1rem;
  margin: 0;
  padding: 4.25rem var(--gutter) 1.5rem;
  min-height: 0;
  cursor: zoom-out;
}
.lightbox__figure img {
  --ratio: 1.6;
  display: block;
  /* Fit inside the viewport at the image's own aspect ratio, before it has loaded. */
  width: min(100%, 110rem, calc((100svh - 9rem) * var(--ratio)));
  height: auto;
  aspect-ratio: var(--ratio);
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.45);
  cursor: default;
}
.lightbox__caption {
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #c9d1cf;
}

/* ---------- Menu dialog ---------- */

.menu {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(var(--bg-rgb), 0.97);
  color: var(--text);
}
.menu::backdrop { background: rgba(21, 27, 30, 0.4); }
.menu[open] { animation: menu-in 0.35s var(--ease); }
@keyframes menu-in { from { opacity: 0; } to { opacity: 1; } }
.menu__inner {
  display: grid;
  grid-template-rows: var(--header-h) 1fr auto;
  min-height: 100%;
  padding-inline: var(--gutter);
}
.menu__close {
  align-self: center;
  justify-self: start;
  margin-left: -0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  height: 2.75rem;
  padding: 0 0.6rem;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.menu__close svg { width: 1.125rem; height: 1.125rem; }
.menu__list {
  align-self: center;
  list-style: none;
  margin: 0;
  padding: 2rem 0;
  display: grid;
  gap: 0.35rem;
}
.menu__list a {
  display: inline-flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.3rem 0;
  font-size: clamp(1.375rem, 3vw, 2rem);
  font-weight: 500;
  text-decoration: none;
}
.menu__list a:hover .menu__label { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.menu__list .num { min-width: 3.5rem; }
.menu__foot {
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---------- Section numbers (reference-style italic index) ---------- */

.num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--accent);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.8rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
}
.btn--ghost:hover { border-color: var(--text); }
.btn__arrow {
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  position: relative;
}
.btn__arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}
.btn:disabled { opacity: 0.6; cursor: progress; }

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(4.5rem, 10vw, 8rem);
  border-top: 1px solid var(--line);
}
.section--alt { background: var(--bg-2); }
.section__head {
  display: grid;
  gap: 0.9rem;
  max-width: 46rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section__head h2 { margin: 0; }
.section__lede { color: var(--muted); margin: 0; max-width: 40rem; }
.muted { color: var(--muted); }

.list-plain {
  list-style: none;
  margin: 0;
  padding: 0;
}

.note {
  padding: 1.25rem 1.5rem;
  border-left: 2px solid var(--accent);
  background: rgba(95, 168, 160, 0.07);
}
.note h3 { margin-bottom: 0.4rem; font-size: 1rem; letter-spacing: 0.04em; text-transform: uppercase; }
.note p:last-child { margin-bottom: 0; }

/* ---------- Forms ---------- */

.form {
  display: grid;
  gap: 1.25rem;
}
.form__row {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 40rem) {
  .form__row { grid-template-columns: 1fr 1fr; }
}
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.9375rem; font-weight: 500; }
.field input {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--field-bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
.field input::placeholder { color: var(--placeholder); }
.field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field__error { min-height: 1.25rem; margin: 0; color: var(--error); font-size: 0.9375rem; }
.field--trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form__status { margin: 0; min-height: 1.5rem; }
.form__status.is-error { color: var(--error); }
.form__fine { color: var(--muted); font-size: 0.9375rem; margin: 0; }
/* Google allows hiding the badge when the reCAPTCHA notice is shown with the form (.form__fine). */
.grecaptcha-badge { visibility: hidden; }

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 3rem calc(3rem + var(--indexnav-h, 0px));
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  font-size: 0.9375rem;
}
.site-footer__grid {
  display: grid;
  gap: 1.75rem;
}
@media (min-width: 52rem) {
  .site-footer__grid { grid-template-columns: 1.4fr 1fr; align-items: start; }
}
.site-footer p { margin: 0 0 0.6rem; }
.site-footer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
@media (min-width: 52rem) {
  .site-footer nav ul { justify-content: flex-end; }
}
.linklike {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.22em;
  cursor: pointer;
}
.linklike:hover { text-decoration-color: currentColor; }
.site-footer__brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text);
}

/* ---------- Consent banner ---------- */

.consent {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(var(--indexnav-h, 0px) + 1rem);
  z-index: 60;
  max-width: 34rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line-strong);
  background: var(--bg-3);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 0.9375rem;
}
.consent[hidden] { display: none; }
.consent p { margin-bottom: 1rem; }
.consent__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.consent .btn { min-height: 2.75rem; padding: 0.6rem 1.1rem; font-size: 0.9375rem; }

/* ---------- Inner pages ---------- */

.page-hero {
  padding-top: calc(var(--header-h) + clamp(2.5rem, 6vw, 4.5rem));
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60rem 30rem at 85% 0%, rgba(95, 168, 160, 0.1), transparent 60%),
    var(--bg-2);
}
.page-hero .eyebrow {
  display: block;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}
.page-hero h1 {
  max-width: 48rem;
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 0;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-wrap: pretty;
}
.page-hero h1 + p { margin-top: 1.25rem; }
.page-hero p { max-width: 42rem; color: var(--muted); font-size: 1.125rem; }

.prose { max-width: 44rem; }
.prose h2 { margin-top: 2.5rem; font-size: 1.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
