/* Ocakçı Agency
   Palette: nar (pomegranate), kireç (limewash), pirinç (brass), is (soot), kül (ash).
   Scroll scenes receive progress values from site.js as custom properties
   (--p and named ranges such as --e, --a1). Every var() falls back to the
   finished state, so the page reads correctly without JavaScript. */

:root {
  --nar: #5a1320;
  --nar-deep: #3a0b14;
  --nar-ink: #22060c;
  --kirec: #efeae6;
  --kirec-dim: rgb(239 234 230 / 0.78);
  --kirec-line: rgb(239 234 230 / 0.16);
  --pirinc: #c9a96e;
  --pirinc-ink: #76562a;
  --is: #221a1b;
  --kul: #6c6062;
  --is-line: rgb(34 26 27 / 0.16);

  --serif: "Noto Serif Display", "Didot", "Bodoni 72", "Times New Roman", serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1rem, 4vw, 4rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease: cubic-bezier(0.65, 0, 0.35, 1);

  color-scheme: dark;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--nar);
  color: var(--kirec);
  font: 400 1.0625rem/1.6 var(--sans);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

img {
  height: auto;
}

a {
  color: inherit;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

p,
h1,
h2,
h3,
h4 {
  overflow-wrap: break-word;
}

::selection {
  background: var(--pirinc);
  color: var(--nar-ink);
}

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

.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 {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--kirec);
  color: var(--nar);
  border-radius: 999px;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

.section-title {
  margin: 0;
  font-family: var(--serif);
  font-stretch: 62.5%;
  font-weight: 300;
  font-size: clamp(2.75rem, 1.4rem + 4.6vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: -0.005em;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85em 1.7em;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: 500 0.9375rem/1.2 var(--sans);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.35s var(--ease-out),
    color 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out);
}

.btn:hover {
  background: var(--kirec);
  border-color: var(--kirec);
  color: var(--nar);
}

.btn--small {
  min-height: 2.5rem;
  padding: 0.55em 1.2em;
  font-size: 0.875rem;
}

.btn--light {
  background: var(--kirec);
  border-color: var(--kirec);
  color: var(--nar);
}

.btn--light:hover {
  background: var(--pirinc);
  border-color: var(--pirinc);
  color: var(--nar-ink);
}

/* ---------- Header ---------- */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  padding: 1.25rem var(--gutter);
  transition:
    background-color 0.5s var(--ease-out),
    padding 0.5s var(--ease-out);
}

.header.is-scrolled {
  background: rgb(58 11 20 / 0.94);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  padding-block: 0.8rem;
}

.header__brand {
  justify-self: start;
  display: block;
  padding: 0.35rem 0;
}

.header__logo {
  width: auto;
  height: 1.75rem;
}

@media (max-width: 599px) {
  .header__logo {
    height: 1.5rem;
  }
}

.header__nav ul {
  display: flex;
  gap: clamp(1.25rem, 2.4vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.header__nav a,
.header__lang {
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--kirec-dim);
  transition: color 0.3s;
}

.header__nav a:hover,
.header__lang:hover {
  color: var(--kirec);
  text-decoration: underline;
}

.header__end {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header__menu,
.menu__close {
  min-height: 2.5rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid rgb(239 234 230 / 0.45);
  border-radius: 999px;
  background: none;
  color: inherit;
  font: 500 0.875rem/1 var(--sans);
  cursor: pointer;
}

.header__menu {
  display: none;
}

@media (max-width: 1023px) {
  .header {
    grid-template-columns: 1fr auto;
  }
  .header__nav,
  .header__cta {
    display: none;
  }
  .header__menu {
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 479px) {
  .header__lang {
    display: none;
  }
}

/* ---------- Mobile menu ---------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 1.25rem var(--gutter) 2.5rem;
  background: var(--nar);
  overflow-y: auto;
}

.menu[hidden] {
  display: none;
}

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

.menu__logo {
  width: auto;
  height: 1.5rem;
}

.menu > nav {
  margin: auto 0;
}

.menu__list {
  margin: 0;
  padding: 2rem 0;
  list-style: none;
}

.menu__list a {
  display: block;
  padding: 0.25rem 0;
  font-family: var(--serif);
  font-stretch: 62.5%;
  font-weight: 300;
  font-size: clamp(2.75rem, 12vw, 4.5rem);
  line-height: 1.1;
  text-decoration: none;
}

.menu__lang {
  align-self: flex-start;
  font-size: 1rem;
}

.js .menu:not([hidden]) .menu__list li {
  animation: fade-up 0.7s var(--ease-out) both;
}

.js .menu:not([hidden]) .menu__list li:nth-child(2) { animation-delay: 0.05s; }
.js .menu:not([hidden]) .menu__list li:nth-child(3) { animation-delay: 0.1s; }
.js .menu:not([hidden]) .menu__list li:nth-child(4) { animation-delay: 0.15s; }

/* ---------- Hero: the arch (an ocak niche) opens into the room ---------- */

.hero {
  /* Arch window in its resting state: inset from each edge, round top. */
  --t0: 15vh;
  --r0: 5vw;
  --b0: 7vh;
  --l0: 58vw;
  --rad: 18.5vw;
  /* slides the photo so the candles sit inside the arch, then back as it opens */
  --shift: 28vw;
  --shift-y: 0px;
  position: relative;
  background: var(--nar);
}

.js .hero {
  height: 280vh;
}

.hero__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.hero__media {
  --k: calc(1 - var(--e, 0));
  position: absolute;
  inset: 0;
  clip-path: inset(
    calc(var(--t0) * var(--k)) calc(var(--r0) * var(--k)) calc(var(--b0) * var(--k)) calc(var(--l0) * var(--k))
      round calc(var(--rad) * var(--k)) calc(var(--rad) * var(--k)) 0 0
  );
  background: var(--nar-ink);
}

.hero__img,
.hero__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__img img {
  object-fit: cover;
  object-position: 50% 50%;
  transform: translate3d(calc(var(--shift) * (1 - var(--e, 0))), calc(var(--shift-y) * (1 - var(--e, 0))), 0)
    scale(calc(1.18 - 0.18 * var(--e, 0)));
  transform-origin: 50% 50%;
}

.hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(26 5 9 / 0.82), rgb(26 5 9 / 0.15) 60%, rgb(26 5 9 / 0.3));
  opacity: var(--e, 0);
}

.hero__copy {
  position: absolute;
  left: var(--gutter);
  bottom: 11vh;
  width: min(54vw, 52rem);
  opacity: calc(1 - var(--o, 0));
  transform: translate3d(0, calc(var(--o, 0) * -9vh), 0);
}

.hero__title {
  margin: 0 0 0.5em;
  font-family: var(--serif);
  font-stretch: 62.5%;
  font-weight: 300;
  font-size: min(5.9vw, 11.5vh);
  line-height: 1;
  letter-spacing: -0.01em;
}

.hero__title .line {
  display: block;
  overflow: hidden;
  padding: 0.06em 0 0.1em;
  margin-bottom: -0.1em;
}

.hero__title .line > span {
  display: inline-block;
}

/* Plain statement of what and where, for first-time visitors and search engines */
.hero__kicker {
  display: block;
  margin-bottom: 1.1rem;
  color: var(--pirinc);
  font: 500 clamp(0.875rem, 0.8rem + 0.25vw, 1rem)/1.4 var(--sans);
  font-stretch: normal;
  letter-spacing: 0.01em;
}

.hero__lead {
  max-width: min(33em, calc(var(--l0) - 2 * var(--gutter) - 2vw));
  margin: 0 0 2rem;
  color: var(--kirec-dim);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.hero__after {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 12vh;
  max-width: 13em;
  margin: 0;
  font-family: var(--serif);
  font-stretch: 62.5%;
  font-weight: 300;
  font-size: min(6.4vw, 12vh);
  line-height: 1;
  opacity: var(--x, 0);
  transform: translate3d(0, calc((1 - var(--x, 0)) * 7vh), 0);
}

.hero__scroll {
  position: absolute;
  left: var(--gutter);
  bottom: 3.5vh;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--kirec-dim);
  opacity: calc(1 - var(--o, 0) * 3);
}

.hero__scroll::before {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  animation: scroll-hint 2.6s var(--ease) infinite;
}

/* One orchestrated entrance */
.js .hero__kicker {
  animation: fade-in 1s var(--ease-out) 0.1s both;
}

.js .hero__title .line > span {
  animation: line-up 1.25s var(--ease-out) both;
  animation-delay: 0.25s;
}

.js .hero__title .line + .line > span {
  animation-delay: 0.4s;
}

.js .hero__lead {
  animation: fade-up 1s var(--ease-out) 0.75s both;
}

.js .hero__copy .btn {
  animation: fade-up 1s var(--ease-out) 0.9s both;
}

.js .hero__img {
  animation: arch-in 1.8s var(--ease-out) 0.05s both;
}

.js .header,
.js .hero__scroll span {
  animation: fade-in 1s var(--ease-out) 1s both;
}

@keyframes line-up {
  from { transform: translateY(110%); }
  to { transform: none; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes arch-in {
  from { opacity: 0; transform: translateY(8%) scale(1.06); }
  to { opacity: 1; transform: none; }
}

@keyframes scroll-hint {
  0% { transform: scaleX(0); transform-origin: left; }
  45% { transform: scaleX(1); transform-origin: left; }
  55% { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

@media (max-width: 899px) {
  .hero {
    --t0: 57svh;
    --r0: var(--gutter);
    --b0: 2.5svh;
    --l0: var(--gutter);
    --rad: calc(50vw - var(--gutter));
    --shift: 6vw;
    --shift-y: 30svh;
  }
  .hero__copy {
    top: max(5.5rem, 12svh);
    bottom: auto;
    right: var(--gutter);
    width: auto;
  }
  .hero__title {
    font-size: min(11vw, 7svh);
  }
  .hero__lead {
    max-width: none;
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.5;
  }
  .hero__after {
    font-size: 11vw;
  }
  .hero__scroll {
    display: none;
  }
}

/* Short phones: keep the arch big enough to show the photo */
@media (max-width: 899px) and (max-height: 720px) {
  .hero__lead {
    display: none;
  }
}

/* ---------- Story: the word fills in as you read ---------- */

.story {
  position: relative;
  background: var(--kirec);
  color: var(--is);
}

.js .story {
  height: 250vh;
}

.story__stage {
  position: sticky;
  top: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  grid-template-rows: auto 1fr;
  gap: 2.5rem clamp(2rem, 6vw, 7rem);
  align-content: center;
  padding: 14vh var(--gutter) 8vh;
}

.story__entry {
  grid-column: 1;
  grid-row: 1;
  max-width: 22rem;
}

.story__term {
  margin: 0;
  font-family: var(--serif);
  font-stretch: 62.5%;
  font-weight: 300;
  font-size: clamp(3rem, 2rem + 3vw, 4.75rem);
  line-height: 1;
  color: var(--nar);
}

.story__term dfn {
  font-style: normal;
}

.story__ipa {
  margin: 0.6rem 0 1rem;
  color: var(--kul);
  font-size: 0.9375rem;
}

.story__ipa span {
  margin-left: 0.5rem;
  color: var(--pirinc-ink);
}

.story__def {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--is-line);
  color: var(--is);
  font-size: 1rem;
  line-height: 1.55;
}

.story__photo {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  width: min(100%, 20rem);
  margin: 0;
  aspect-ratio: 4 / 5;
  max-height: 38vh;
  overflow: hidden;
}

.story__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15) translateY(calc((var(--p, 0.5) - 0.5) * -8%));
}

.story__body {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  max-width: 21em;
  margin: 0;
  font-family: var(--serif);
  font-stretch: 75%;
  font-weight: 330;
  font-size: clamp(1.6rem, min(2.75vw, 5.2vh), 3.1rem);
  line-height: 1.2;
  letter-spacing: -0.003em;
}

.story .w {
  opacity: clamp(0.14, calc((var(--w, 1) * (var(--n) + 8) - var(--i)) / 4), 1);
}

@media (max-width: 899px) {
  .story__stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-content: center;
    padding-top: 6.5rem;
  }
  .story__entry,
  .story__body {
    grid-column: 1;
    grid-row: auto;
  }
  .story__photo {
    display: none;
  }
  .story__body {
    font-size: clamp(1.45rem, 6.4vw, 2rem);
  }
}

/* ---------- Services ---------- */

.services {
  position: relative;
  background: var(--kirec);
  color: var(--is);
  padding: 16vh var(--gutter) 18vh;
}

.services__head {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 2rem clamp(2rem, 5vw, 6rem);
  align-items: end;
  margin-bottom: 10vh;
}

.services__intro {
  max-width: 30em;
  margin: 0;
  color: var(--kul);
  font-size: 1.125rem;
}

.services__body {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 6rem);
}

.svc-group + .svc-group {
  margin-top: 12vh;
}

.svc-group__title {
  margin: 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--is-line);
  color: var(--pirinc-ink);
  font: 500 0.9375rem/1.3 var(--sans);
}

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

.svc {
  display: grid;
  align-content: center;
  min-height: 30vh;
  padding: 5vh 0;
  border-bottom: 1px solid var(--is-line);
}

.svc__title {
  margin: 0;
  font-family: var(--serif);
  font-stretch: 70%;
  font-weight: 330;
  font-size: clamp(2rem, 1.1rem + 2.5vw, 3.5rem);
  line-height: 1.02;
  transition: color 0.6s var(--ease-out);
}

.svc__text {
  max-width: 30em;
  margin: 0.9rem 0 0;
  color: var(--kul);
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.6s var(--ease-out);
}

.svc__photo {
  display: none;
}

.services__frame {
  position: relative;
}

.frame {
  position: sticky;
  top: 12vh;
  height: 76vh;
  overflow: hidden;
  background: var(--is);
}

.frame__img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.06);
  transition:
    opacity 0.9s var(--ease-out),
    transform 1.6s var(--ease-out);
}

.frame__img.is-active {
  opacity: 1;
  transform: none;
}

.frame__img picture,
.frame__img img {
  width: 100%;
  height: 100%;
}

.frame__img img {
  object-fit: cover;
}

.frame__caption {
  position: absolute;
  left: 1.25rem;
  bottom: 1rem;
  color: var(--kirec);
  font-size: 0.875rem;
  text-shadow: 0 1px 12px rgb(0 0 0 / 0.5);
}

@media (min-width: 900px) {
  .js .svc__title {
    color: rgb(34 26 27 / 0.3);
  }
  .js .svc__text {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  .js .svc.is-active .svc__title {
    color: var(--is);
  }
  .js .svc.is-active .svc__text {
    opacity: 1;
    transform: none;
  }
  .no-js .frame__img:first-child {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 899px) {
  .services__head,
  .services__body {
    grid-template-columns: 1fr;
  }
  .services__frame {
    display: none;
  }
  .svc {
    min-height: 0;
    padding: 2.5rem 0;
  }
  .svc__photo {
    display: block;
    aspect-ratio: 4 / 3;
    margin-bottom: 1.25rem;
    overflow: hidden;
  }
  .svc__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* ---------- Process: the table is set as you scroll ---------- */

.process {
  position: relative;
  background: var(--nar-deep);
  color: var(--kirec);
}

.js .process {
  height: 640vh;
}

.process__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 4vw, 5rem);
  padding: 13vh var(--gutter) 7vh;
  overflow: hidden;
}

.process__text {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.process__intro {
  max-width: 26em;
  margin: 1.25rem 0 0;
  color: var(--kirec-dim);
}

.steps {
  display: grid;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}

.step__when {
  margin: 0 0 0.5rem;
  color: var(--pirinc);
  font-size: 0.9375rem;
  font-weight: 500;
}

.step__title {
  margin: 0;
  font-family: var(--serif);
  font-stretch: 62.5%;
  font-weight: 300;
  font-size: clamp(2.5rem, min(4.6vw, 8.5vh), 5.25rem);
  line-height: 1;
}

.step__text {
  max-width: 25em;
  margin: 0.9rem 0 0;
  color: var(--kirec-dim);
}

.js .steps .step {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(1.25rem);
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.8s var(--ease-out);
  pointer-events: none;
}

.js .process:not([data-step]) .step[data-i="0"],
.js .process[data-step="0"] .step[data-i="0"],
.js .process[data-step="1"] .step[data-i="1"],
.js .process[data-step="2"] .step[data-i="2"],
.js .process[data-step="3"] .step[data-i="3"],
.js .process[data-step="4"] .step[data-i="4"],
.js .process[data-step="5"] .step[data-i="5"] {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.no-js .step + .step {
  margin-top: 1.5rem;
}

.process__meter {
  display: flex;
  gap: 0.375rem;
  margin-top: 2.25rem;
}

.process__meter span {
  flex: 1;
  height: 2px;
  background: var(--kirec-line);
  transition: background-color 0.5s var(--ease-out);
}

.process__meter span:nth-child(1),
.process[data-step="1"] .process__meter span:nth-child(-n + 2),
.process[data-step="2"] .process__meter span:nth-child(-n + 3),
.process[data-step="3"] .process__meter span:nth-child(-n + 4),
.process[data-step="4"] .process__meter span:nth-child(-n + 5),
.process[data-step="5"] .process__meter span {
  background: var(--pirinc);
}

.no-js .process__meter {
  display: none;
}

.process__figure {
  display: grid;
  place-items: center;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  /* the pulled-back hall dissolves at the edges instead of running into the text */
  --fade: calc(100% - 34% * var(--a6, 0));
  -webkit-mask-image: radial-gradient(closest-side, #000 var(--fade), transparent 100%);
  mask-image: radial-gradient(closest-side, #000 var(--fade), transparent 100%);
}

.table-svg {
  width: 100%;
  height: 100%;
  max-height: 84vh;
  overflow: visible;
}

/* Line drawing: brass, hairline at every zoom level */
.table-svg :is(circle, rect, path) {
  fill: none;
  stroke: var(--pirinc);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

.table-svg .t-soft {
  stroke-opacity: 0.45;
}

.t-world {
  transform: scale(calc(1 - 0.8 * var(--a6, 0)));
  transform-box: fill-box;
  transform-origin: center;
}

.table-svg .t-bounds {
  stroke: none;
}

.table-svg .t-edge {
  stroke-width: 2.6;
  vector-effect: none;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--a1, 1));
}

.table-svg .t-cloth {
  fill: rgb(239 234 230 / 0.045);
  stroke: rgb(201 169 110 / 0.35);
  opacity: var(--a2, 1);
}

.t-chair {
  --o: clamp(0, calc(var(--a1, 1) * 14 - var(--i) - 2), 1);
  opacity: var(--o);
  transform: translateY(calc((1 - var(--o)) * -46px));
}

.t-plate {
  --o: clamp(0, calc(var(--a3, 1) * 14 - var(--i) - 2), 1);
  opacity: var(--o);
  transform: scale(calc(0.82 + 0.18 * var(--o)));
  transform-box: fill-box;
  transform-origin: center;
}

.t-detail {
  --o: clamp(0, calc(var(--a4, 1) * 14 - var(--i) - 2), 1);
  opacity: var(--o);
  transform: translateY(calc((1 - var(--o)) * 18px));
}

.t-bloom {
  --o: clamp(0, calc(var(--a2, 1) * 16 - var(--i) - 3), 1);
  opacity: var(--o);
  transform: scale(var(--o));
  transform-box: fill-box;
  transform-origin: center;
}

.table-svg .t-bloom circle:first-child {
  fill: rgb(201 169 110 / 0.14);
}

.table-svg .t-candle {
  fill: rgb(239 234 230 / 0.06);
  opacity: var(--a2, 1);
}

.table-svg .t-wick {
  fill: #ffd9a0;
  stroke: none;
  opacity: calc(var(--a5, 1) * (1 - 0.6 * var(--a7, 0)));
}

.table-svg :is(.t-glow, .t-light, .h-glow) {
  fill: url(#t-glow);
  stroke: none;
}

.t-glow {
  opacity: calc(var(--a5, 1) * (1 - 0.55 * var(--a7, 0)));
  transform-box: fill-box;
  transform-origin: center;
  animation: flicker 3.2s ease-in-out infinite alternate;
}

.t-candles g:nth-child(2n) .t-glow { animation-duration: 2.6s; animation-delay: -1.1s; }
.t-candles g:nth-child(3n) .t-glow { animation-duration: 3.8s; animation-delay: -0.4s; }

.t-light {
  opacity: calc(var(--a5, 1) * 0.6 * (1 - 0.5 * var(--a7, 0)));
}

.t-emblem-o {
  opacity: clamp(0, calc(1 - var(--a1, 1) * 1.8), 1);
  transform: scale(calc(1 + 0.45 * var(--a1, 1)));
  transform-box: fill-box;
  transform-origin: center;
}

.table-svg .t-emblem-o path {
  fill: var(--kirec);
  stroke: none;
}

.t-emblem-flame {
  transform: scale(calc(1 - 0.8 * var(--a1, 1)));
  transform-box: fill-box;
  transform-origin: 50% 55%;
}

.table-svg .t-emblem-flame :is(path, rect) {
  fill: var(--pirinc);
  stroke: none;
}

.t-hall {
  opacity: var(--a6, 0);
}

.h-table {
  opacity: clamp(0, calc(var(--a6, 0) * 3.4 - var(--d) * 0.5), 1);
}

.table-svg .h-cloth {
  fill: rgb(239 234 230 / 0.05);
}

.table-svg .h-stage {
  fill: rgb(201 169 110 / 0.1);
}

.h-glow {
  opacity: calc(0.45 * var(--a6, 0) * (1 - 0.5 * var(--a7, 0)));
}

@keyframes flicker {
  0% { transform: scale(0.94); }
  35% { transform: scale(1.04); }
  60% { transform: scale(0.98); }
  100% { transform: scale(1.06); }
}

@media (max-width: 899px) {
  .process__stage {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 1rem;
    padding: 5rem var(--gutter) 2rem;
  }
  .process__figure {
    grid-row: 1;
  }
  .process__text {
    grid-row: 2;
  }
  .process .section-title {
    font-size: 1.125rem;
    font-family: var(--sans);
    font-stretch: normal;
    font-weight: 500;
    line-height: 1.3;
    color: var(--pirinc);
  }
  .process__intro {
    display: none;
  }
  .steps {
    margin-top: 0.75rem;
  }
  .step__title {
    font-size: clamp(2.1rem, 9vw, 2.75rem);
  }
  .step__text {
    font-size: 0.9375rem;
    line-height: 1.5;
  }
  .process__meter {
    margin-top: 1.25rem;
  }
  .table-svg {
    max-height: none;
  }
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 3rem clamp(2rem, 6vw, 7rem);
  align-items: start;
  padding: 16vh var(--gutter);
  background: var(--kirec);
  color: var(--is);
  interpolate-size: allow-keywords;
}

.faq__head {
  position: sticky;
  top: 7rem;
}

.faq__intro {
  max-width: 26em;
  margin: 1.5rem 0 0;
  color: var(--kul);
  font-size: 1.125rem;
}

.faq__list {
  border-top: 1px solid var(--is-line);
}

.faq__item {
  border-bottom: 1px solid var(--is-line);
}

.faq__q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 1.6rem 0;
  font-family: var(--serif);
  font-stretch: 75%;
  font-weight: 340;
  font-size: clamp(1.4rem, 1rem + 1.1vw, 2rem);
  line-height: 1.15;
  list-style: none;
  cursor: pointer;
  transition: color 0.3s;
}

.faq__q::-webkit-details-marker {
  display: none;
}

/* A plus that turns into a cross when the answer is open */
.faq__q::after {
  content: "";
  flex: none;
  width: 0.9rem;
  height: 0.9rem;
  background:
    linear-gradient(var(--nar), var(--nar)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--nar), var(--nar)) center / 1.5px 100% no-repeat;
  transition: transform 0.45s var(--ease-out);
}

.faq__item[open] .faq__q::after {
  transform: rotate(45deg);
}

.faq__q:hover {
  color: var(--nar);
}

.faq__q:focus-visible {
  outline: 2px solid var(--nar);
  outline-offset: 4px;
}

.faq__a p {
  max-width: 36em;
  margin: 0;
  padding-bottom: 1.75rem;
  color: var(--kul);
}

@supports selector(::details-content) {
  .faq__item::details-content {
    height: 0;
    overflow: clip;
    transition:
      height 0.5s var(--ease-out),
      content-visibility 0.5s allow-discrete;
  }
  .faq__item[open]::details-content {
    height: auto;
  }
}

@media (max-width: 899px) {
  .faq {
    grid-template-columns: 1fr;
    padding-block: 12vh;
  }
  .faq__head {
    position: static;
  }
}

/* ---------- Ember: the fire catches ---------- */

.ember {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 92vh;
  min-height: 92svh;
  padding: 16vh var(--gutter);
  overflow: hidden;
  isolation: isolate;
  background: var(--nar-ink);
  text-align: center;
}

.ember__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.ember__img,
.ember__img img {
  width: 100%;
  height: 100%;
}

.ember__img img {
  object-fit: cover;
  transform: scale(calc(1.2 - 0.2 * var(--b, 1)));
}

.ember__shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgb(34 6 12 / 0.55), rgb(34 6 12 / 0.92)),
    rgb(20 3 7 / calc(0.85 - 0.75 * var(--b, 1)));
}

.ember__copy {
  max-width: 56rem;
}

.ember__title {
  margin: 0 0 0.3em;
  font-family: var(--serif);
  font-stretch: 62.5%;
  font-weight: 300;
  font-size: clamp(3.25rem, 2rem + 6.5vw, 9.5rem);
  line-height: 0.96;
}

.ember__text {
  max-width: 30em;
  margin: 0 auto 2.25rem;
  color: var(--kirec-dim);
  font-size: 1.125rem;
}

/* ---------- Contact ---------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 3rem clamp(2rem, 6vw, 7rem);
  align-items: center;
  padding: 16vh var(--gutter);
  background: var(--nar);
}

.contact__text {
  max-width: 26em;
  margin: 1.5rem 0 0;
  color: var(--kirec-dim);
  font-size: 1.125rem;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

/* The details are set like a printed card: limewash stock, an inner rule */
.contact__card {
  padding: clamp(1.75rem, 4vw, 3.5rem);
  background: var(--kirec);
  color: var(--is);
  outline: 1px solid rgb(90 19 32 / 0.22);
  outline-offset: -0.75rem;
}

.contact__direct {
  margin: 0;
}

.contact__direct div {
  display: grid;
  gap: 0.3rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--is-line);
}

.contact__direct div:first-child {
  padding-top: 0;
  border-top: 0;
}

.contact__direct div:last-child {
  padding-bottom: 0;
}

.contact__direct dt {
  color: var(--kul);
  font-size: 0.875rem;
  font-weight: 500;
}

.contact__direct dd {
  min-width: 0;
  margin: 0;
  font-family: var(--serif);
  font-stretch: 75%;
  font-weight: 340;
  font-size: clamp(1.6rem, 1.1rem + 1.4vw, 2.5rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.contact__direct a {
  text-decoration: none;
  transition: color 0.3s;
}

.contact__direct a:hover {
  color: var(--nar);
  text-decoration: underline;
}

.contact__direct a:focus-visible {
  outline-color: var(--nar);
}

@media (max-width: 899px) {
  .contact {
    grid-template-columns: 1fr;
    padding-block: 12vh;
  }
}

@media (max-width: 599px) {
  .contact__card {
    outline-offset: -0.5rem;
  }
}

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

.footer {
  padding: 12vh var(--gutter) 2rem;
  background: var(--nar-deep);
  overflow: hidden;
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem 3rem;
}

.footer__tagline {
  margin: 0;
  font-family: var(--serif);
  font-stretch: 75%;
  font-weight: 330;
  font-size: clamp(1.4rem, 1rem + 1vw, 2rem);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__links a,
.footer__bottom a {
  text-decoration: none;
  color: var(--kirec-dim);
}

.footer__links a:hover,
.footer__bottom a:hover {
  color: var(--kirec);
  text-decoration: underline;
}

.footer__mark {
  margin: 12vh 0 7vh;
}

.footer__logo {
  width: 100%;
  height: auto;
  opacity: calc(0.15 + 0.85 * var(--f, 1));
  transform: translate3d(0, calc((1 - var(--f, 1)) * 35%), 0);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--kirec-line);
  color: rgb(239 234 230 / 0.6);
  font-size: 0.875rem;
}

.footer__bottom p {
  margin: 0 auto 0 0;
}

/* ---------- Reduced motion: no pinning, no scrubbing, finished states ---------- */

@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;
  }
  .js .hero,
  .js .story,
  .js .process {
    height: auto;
  }
  .hero__stage,
  .story__stage,
  .process__stage {
    position: relative;
  }
  .process__stage {
    height: auto;
    min-height: 100svh;
  }
  .js .steps .step {
    grid-area: auto;
    opacity: 1;
    transform: none;
  }
  .js .steps .step + .step {
    margin-top: 1.5rem;
  }
  .steps {
    margin-top: 3rem;
  }
  .process__figure {
    position: sticky;
    top: 10vh;
    height: 80vh;
  }
  .process__meter {
    display: none;
  }
}
