/* ------------------------------------------------------------------
   Shared tokens for the client galleries and the studio.
   Warm paper, near-black ink, one hairline. The photographs carry the
   colour; the interface stays out of their way.
   ------------------------------------------------------------------ */

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

/* Senography's wordmark face: Sugar Candy by Suandana I Pande Made,
   whose licence note allows personal and commercial use. */
@font-face {
  font-family: "Sugar Candy";
  src: url("/assets/fonts/sugar-candy.woff") format("woff");
  font-display: swap;
}

:root {
  --paper: #faf9f6;
  --paper-2: #f3f1ec;
  --paper-3: #e9e6df;
  --card: #ffffff;
  --ink: #171615;
  --ink-2: #5f5c56;
  --ink-3: #9a968e;
  --line: rgba(23, 22, 21, 0.09);
  --line-2: rgba(23, 22, 21, 0.16);
  --danger: #a8402e;
  --ok: #2f7a4b;
  --focus: rgba(23, 22, 21, 0.35);

  --brand: "Sugar Candy", "Cormorant", Georgia, serif;
  --serif: "Cormorant", "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --shadow-sm: 0 1px 2px rgba(23, 22, 21, 0.05), 0 2px 8px -2px rgba(23, 22, 21, 0.06);
  --shadow: 0 0 0 1px rgba(23, 22, 21, 0.05), 0 2px 4px rgba(23, 22, 21, 0.04), 0 24px 64px -24px rgba(23, 22, 21, 0.28);
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

::selection {
  background: rgba(23, 22, 21, 0.12);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------- type */

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

/* The studio's name, set like a signature: never spaced out or
   capitalised, which script faces don't survive. */
.wordmark {
  font-family: var(--brand);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.1;
}

.display {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.02;
}

/* ------------------------------------------------------- buttons */

.btn {
  --h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--h);
  padding: 0 22px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    transform 0.25s var(--ease),
    opacity 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active {
  transform: scale(0.98);
}
.btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
}
.btn .icon {
  width: 17px;
  height: 17px;
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}
.btn-dark:hover {
  background: #2c2a28;
}

.btn-light {
  background: var(--card);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn-light:hover {
  box-shadow: inset 0 0 0 1px var(--ink);
}

.btn-ghost {
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--paper-2);
}

.btn-sm {
  --h: 36px;
  padding: 0 16px;
  font-size: 11px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: inherit;
  position: relative;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover {
  background: rgba(23, 22, 21, 0.06);
}
.icon-btn:active {
  transform: scale(0.94);
}
.icon-btn .badge {
  position: absolute;
  top: 3px;
  right: 1px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 17px;
  text-align: center;
  letter-spacing: 0;
}

/* --------------------------------------------------------- forms */

.field {
  display: grid;
  gap: 7px;
}
.field > span {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
}
.field small {
  font-size: 12px;
  color: var(--ink-3);
}

.input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--card);
  outline: none;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
textarea.input {
  height: auto;
  min-height: 92px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.5;
}
.input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(23, 22, 21, 0.07);
}
.input::placeholder {
  color: var(--ink-3);
}

/* ------------------------------------------------- modal + sheet */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 15, 14, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade-in 0.3s var(--ease);
}
.scrim.closing {
  animation: fade-out 0.22s var(--ease) forwards;
}

.modal {
  width: min(460px, 100%);
  max-height: calc(100svh - 40px);
  overflow: auto;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 32px;
  animation: rise 0.45s var(--ease);
}
.scrim.closing .modal {
  animation: sink 0.22s var(--ease) forwards;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.modal-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.05;
}
.modal-head p {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 14px;
}
.modal-head .icon-btn {
  margin: -8px -10px 0 0;
}

@media (max-width: 560px) {
  .scrim {
    place-items: end stretch;
    padding: 0;
  }
  .modal {
    width: 100%;
    border-radius: 22px 22px 0 0;
    padding: 26px 22px calc(26px + env(safe-area-inset-bottom));
    animation: slide-up 0.45s var(--ease);
  }
  .scrim.closing .modal {
    animation: slide-down 0.25s var(--ease) forwards;
  }
}

/* --------------------------------------------------------- toast */

.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 120;
  display: grid;
  gap: 8px;
  justify-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.45s var(--ease);
  white-space: nowrap;
}
.toast .icon {
  width: 16px;
  height: 16px;
}
.toast.out {
  animation: fade-out 0.3s var(--ease) forwards;
}

/* ----------------------------------------------------- utilities */

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes fade-out {
  to {
    opacity: 0;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
}
@keyframes sink {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
}
@keyframes slide-up {
  from {
    transform: translateY(100%);
  }
}
@keyframes slide-down {
  to {
    transform: translateY(100%);
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
}

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