@font-face {
  font-family: "PeydaDara";
  src: url("../fonts/peyda-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/*
 * Gramophone is proprietary software supplied by the DARA owner for this
 * project. Its use is restricted to the First Circle registration title.
 */
@font-face {
  font-family: "DARA Gramophone";
  src: url("../fonts/gramophone-clean.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DARA Vazirmatn";
  src: url("../fonts/vazirmatn-arabic-400-700.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200F, U+FB50-FDFF, U+FE70-FEFC;
}

@font-face {
  font-family: "DARA Noto Naskh";
  src: url("../fonts/noto-naskh-arabic-400-700.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200F, U+FB50-FDFF, U+FE70-FEFC;
}

:root {
  color-scheme: light dark;
  --bone: #eee8df;
  --paper: #f8f1e8;
  --ink: #100f0d;
  --muted: #776f65;
  --dark: #080706;
  --dark-2: #11100e;
  --gold: #b79a68;
  --danger: #e5a7a0;
  --focus: #d8bd8b;
  --page-pad: 22px;
  --ease: cubic-bezier(.22, .8, .26, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--dark);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bone);
  color: var(--ink);
  font-family: "PeydaDara", Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

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

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: fixed;
  inset: 12px 12px auto auto;
  z-index: 1000;
  padding: 10px 14px;
  transform: translateY(-150%);
  background: var(--paper);
  color: var(--dark);
  text-decoration: none;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.serif {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 400;
  letter-spacing: -.045em;
}

.micro {
  font-family: Inter, Arial, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  height: 76px;
  align-items: flex-start;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 20px) var(--page-pad) 0;
  color: var(--paper);
  direction: ltr;
  mix-blend-mode: difference;
  pointer-events: none;
}

.logo {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: .52em;
  line-height: 1;
  text-indent: .52em;
}

.chapter {
  opacity: .72;
}

section {
  position: relative;
}

.hero,
.artifact,
.book {
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.hero {
  height: 100svh;
  min-height: 720px;
  background: var(--dark);
  color: var(--paper);
}

.section-media {
  position: absolute;
  inset: 0;
  z-index: -4;
  overflow: hidden;
  background: var(--dark);
}

.section-media picture,
.section-media img {
  display: block;
  width: 100%;
  height: 100%;
}

.section-media img {
  object-fit: cover;
}

.hero-media {
  inset: -16%;
  filter: saturate(.78) contrast(1.16) brightness(.86);
}

.hero-media img {
  object-position: 66% 38%;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 70% 36%, rgba(255, 255, 255, .06) 0 10%, rgba(0, 0, 0, .08) 28%, rgba(0, 0, 0, .60) 78%),
    linear-gradient(180deg, rgba(0, 0, 0, .12), rgba(0, 0, 0, .04) 36%, rgba(0, 0, 0, .82)),
    linear-gradient(90deg, rgba(0, 0, 0, .68), rgba(0, 0, 0, .05) 70%);
  content: "";
}

.hero-copy {
  position: absolute;
  right: auto;
  bottom: 40px;
  left: var(--page-pad);
  width: calc(100% - (var(--page-pad) * 2));
  max-width: 560px;
  direction: rtl;
  text-align: right;
}

.hero-kicker {
  margin-bottom: 14px;
  direction: ltr;
  color: rgba(248, 241, 232, .68);
  letter-spacing: .34em;
  opacity: .48;
  text-align: left;
}

.hero h1 {
  margin: 0;
}

.hero-persian {
  max-width: 520px;
  font-size: clamp(36px, 9.15vw, 92px);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: 1.13;
  transform: translateX(2px);
}

.hero-shortcut {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  margin-top: 26px;
  padding-block: 7px;
  border-bottom: 1px solid rgba(248, 241, 232, .36);
  color: rgba(248, 241, 232, .82);
  font-size: 13px;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease;
}

.hero-shortcut:hover {
  border-color: var(--paper);
  color: var(--paper);
}

.scroll {
  margin-top: 24px;
  direction: ltr;
  color: rgba(248, 241, 232, .44);
  text-align: left;
}

.silence {
  display: grid;
  min-height: 96svh;
  place-items: center;
  overflow: hidden;
  padding: 92px var(--page-pad);
  background: var(--bone);
  text-align: center;
}

.silence::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(30deg, transparent 44%, var(--ink) 45%, transparent 46%),
    linear-gradient(150deg, transparent 44%, var(--ink) 45%, transparent 46%);
  background-size: 104px 104px;
  content: "";
  opacity: .035;
  transform: scale(1.15);
}

.silence h2 {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0;
  font-size: clamp(52px, 11vw, 128px);
  line-height: .88;
}

.artifact {
  background: var(--dark);
  color: var(--paper);
}

.artifact-media {
  inset: -14%;
  filter: saturate(.78) contrast(1.12) brightness(.86);
}

.artifact-media img {
  object-position: 51% 45%;
}

.artifact::before,
.book::before {
  position: absolute;
  inset: 0;
  z-index: -3;
  content: "";
}

.artifact::before {
  background:
    radial-gradient(circle at 54% 35%, rgba(255, 255, 255, .06), transparent 30%),
    linear-gradient(180deg, rgba(0, 0, 0, .10), rgba(0, 0, 0, .18) 42%, rgba(0, 0, 0, .84)),
    linear-gradient(90deg, rgba(0, 0, 0, .76), rgba(0, 0, 0, .08) 68%);
}

.artifact-copy,
.book-copy {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--page-pad) 48px;
}

.artifact-copy .num,
.book-copy .num {
  margin-bottom: 18px;
  color: rgba(248, 241, 232, .56);
}

.artifact-copy h2 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(44px, 10.5vw, 112px);
  font-weight: 400;
  line-height: .86;
}

.book {
  background: var(--dark-2);
  color: var(--paper);
}

.book-media {
  inset: -9%;
  filter: saturate(.78) contrast(1.10) brightness(.82);
}

.book-media img {
  object-position: 47% 42%;
}

.book::before {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .10), rgba(0, 0, 0, .22) 48%, rgba(0, 0, 0, .86)),
    linear-gradient(90deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .06) 68%);
}

.book h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(50px, 12vw, 126px);
  line-height: .84;
}

.book p {
  max-width: 360px;
  margin: 20px 0 0;
  color: rgba(248, 241, 232, .72);
  font-size: 13px;
  line-height: 1.75;
}

.note,
.name {
  display: grid;
  min-height: 88svh;
  place-items: center;
  padding: 94px var(--page-pad);
  text-align: center;
}

.note {
  background:
    radial-gradient(circle at 50% 50%, rgba(183, 154, 104, .10), transparent 34%),
    var(--paper);
}

.note blockquote {
  max-width: 920px;
  margin: 0;
  font-size: clamp(42px, 9.8vw, 110px);
  line-height: .88;
}

.name {
  background: var(--bone);
}

.name h2 {
  margin: 0;
  font-size: clamp(72px, 18vw, 186px);
  line-height: .70;
}

.name p {
  margin: 38px 0 0;
  color: var(--muted);
}

.access {
  display: grid;
  z-index: 101;
  min-height: 100svh;
  align-items: center;
  padding: clamp(48px, 6vh, 68px) var(--page-pad) max(48px, env(safe-area-inset-bottom));
  background: #090807;
  color: var(--paper);
  scroll-margin-top: 0;
}

.access,
.access input,
.access button {
  font-family: "DARA Vazirmatn", "PeydaDara", Tahoma, sans-serif;
}

.access-inner {
  width: min(1320px, 100%);
  margin: 0 auto;
}

.registration-panel,
.member-result {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.registration-panel {
  position: relative;
  display: grid;
  height: min(760px, calc(100svh - 96px));
  min-height: 700px;
  max-height: 1200px;
  overflow: hidden;
  grid-template-columns: minmax(0, 44%) minmax(0, 56%);
  direction: ltr;
  isolation: isolate;
  opacity: 1;
  transform: translateY(0);
  transition:
    max-height 320ms var(--ease),
    opacity 280ms ease,
    transform 320ms var(--ease),
    visibility 0s linear;
}

.registration-panel::after,
.member-result::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      to bottom,
      rgba(8, 7, 6, .025) 0%,
      rgba(8, 7, 6, .065) 100%
    ),
    linear-gradient(
      to left,
      rgba(8, 7, 6, .56) 0%,
      rgba(8, 7, 6, .36) 36%,
      rgba(8, 7, 6, .13) 66%,
      rgba(8, 7, 6, .01) 100%
    );
  content: "";
  pointer-events: none;
}

.doorway-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
  pointer-events: none;
}

.doorway-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  object-fit: cover;
  object-position: 50% 50%;
}

.registration-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  grid-column: 2;
  padding: clamp(42px, 3.5vw, 54px);
  direction: rtl;
}

.access-heading {
  max-width: 630px;
}

.eyebrow,
.result-kicker {
  margin: 0 0 18px;
  color: rgba(248, 241, 232, .52);
  font-size: 12px;
  font-weight: 450;
  letter-spacing: .06em;
}

.access h2 {
  margin: 0;
  font-family: "DARA Gramophone", "DARA Vazirmatn", "PeydaDara", Tahoma, sans-serif;
  font-size: clamp(50px, 4.4vw, 64px);
  font-synthesis: none;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.12;
}

.access-intro {
  max-width: 560px;
  margin: 20px 0 0;
  color: rgba(248, 241, 232, .66);
  font-size: 14px;
  line-height: 1.9;
}

.registration-form {
  margin-top: 32px;
  max-height: 720px;
  opacity: 1;
  transform: translateY(0);
  transition:
    max-height 320ms var(--ease),
    opacity 240ms ease,
    transform 320ms var(--ease),
    visibility 0s linear;
}

.field {
  margin-bottom: 20px;
}

.field-label {
  display: block;
  margin-bottom: 9px;
  color: rgba(248, 241, 232, .74);
  font-size: 13px;
  font-weight: 450;
  letter-spacing: .035em;
}

input {
  width: 100%;
  min-height: 60px;
  padding: 10px 18px;
  appearance: none;
  border: 1px solid rgba(248, 241, 232, .20);
  border-radius: 7px;
  outline: 0;
  background: rgba(255, 255, 255, .012);
  color: var(--paper);
  caret-color: var(--gold);
  font-size: 18px;
  transition: border-color 180ms ease, background-color 180ms ease;
}

input::placeholder {
  color: rgba(248, 241, 232, .28);
}

input:hover {
  border-color: rgba(248, 241, 232, .36);
}

input:focus {
  border-color: var(--focus);
  background: rgba(255, 255, 255, .025);
}

input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-hint,
.field-error,
.privacy-note,
.form-error {
  margin: 6px 0 0;
  font-size: 11.5px;
  line-height: 1.7;
}

.field-hint {
  color: rgba(248, 241, 232, .48);
}

.field-error,
.form-error {
  min-height: 1.75em;
  color: var(--danger);
  font-size: 12px;
}

.field-error:empty,
.form-error:empty {
  min-height: 0;
}

.privacy-note {
  max-width: 570px;
  margin-top: 2px;
  color: rgba(248, 241, 232, .60);
  line-height: 1.85;
}

.submit-button {
  width: 100%;
  min-height: 66px;
  margin-top: 18px;
  padding: 16px 24px;
  border: 1px solid #d9bd8b;
  border-radius: 7px;
  background: #d9bd8b;
  color: #17130e;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .025em;
  transition: background-color 240ms ease, border-color 240ms ease, color 240ms ease, opacity 180ms ease;
}

.submit-button:hover:not(:disabled) {
  border-color: var(--paper);
  background: var(--paper);
  color: #17130e;
}

.submit-button:disabled {
  cursor: wait;
  opacity: .58;
}

.member-result {
  position: relative;
  height: 680px;
  min-height: 680px;
  overflow: hidden;
  padding: clamp(72px, 9vh, 100px) clamp(32px, 8vw, 110px) clamp(58px, 8vh, 86px);
  text-align: center;
  isolation: isolate;
  opacity: 0;
  transform: translateY(10px);
}

.member-result::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("../images/review/first-circle-doorway-mobile.jpg") 50% 50% / cover no-repeat;
  content: "";
  pointer-events: none;
}

.member-result > * {
  position: relative;
  z-index: 2;
}

.member-result:focus-visible {
  outline: 0;
}

.member-result:focus-visible .result-kicker {
  text-decoration: underline;
  text-decoration-color: rgba(216, 189, 139, .62);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.member-result[hidden] {
  display: none;
}

.member-result h3 {
  max-width: 820px;
  margin: 54px auto 0;
  min-height: 2.6em;
  color: var(--paper);
  font-family: "DARA Vazirmatn", "PeydaDara", Tahoma, sans-serif;
  font-size: clamp(42px, 5vw, 66px);
  font-weight: 400;
  line-height: 1.3;
}

.result-kicker {
  text-align: right;
}

.member-number-label {
  margin: 34px 0 0;
  color: rgba(248, 241, 232, .58);
  font-size: 13px;
  font-weight: 450;
  letter-spacing: .055em;
}

.member-number {
  position: relative;
  margin: 10px 0 0;
  padding-bottom: 52px;
  color: #e1c18b;
  direction: ltr;
  font-family: "DARA Noto Naskh", "PeydaDara", Tahoma, sans-serif;
  font-size: clamp(92px, 11vw, 142px);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: .015em;
  line-height: .94;
  text-align: center;
  unicode-bidi: isolate;
  white-space: nowrap;
}

.member-number::before,
.member-number::after {
  position: absolute;
  content: "";
}

.member-number::after {
  right: 50%;
  bottom: 22px;
  width: min(520px, 72%);
  height: 1px;
  transform: translateX(50%);
  background: rgba(216, 189, 139, .64);
}

.member-number::before {
  z-index: 1;
  right: 50%;
  bottom: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transform: translateX(50%);
  background: #ecd5ad;
}

.result-next {
  max-width: 680px;
  margin: 10px auto 0;
  color: rgba(248, 241, 232, .62);
  font-size: 14px;
  line-height: 1.9;
}

.registration-shell.is-complete .registration-panel {
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  border-width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  visibility: hidden;
}

.registration-shell.is-complete .member-result {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 320ms ease 60ms, transform 320ms var(--ease) 60ms;
}

.noscript-note {
  margin: 18px 0 0;
  padding: 14px;
  border: 1px solid rgba(248, 241, 232, .22);
  color: rgba(248, 241, 232, .72);
}

footer {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 32px var(--page-pad);
  border-top: 1px solid rgba(248, 241, 232, .08);
  background: var(--dark);
  color: rgba(248, 241, 232, .56);
}

@media (min-width: 760px) {
  :root {
    --page-pad: 48px;
  }

  .hero-copy {
    bottom: 58px;
    max-width: 620px;
  }

  .hero-persian {
    max-width: 620px;
    font-size: clamp(54px, 8.4vw, 118px);
    transform: translateX(10px);
  }

  .artifact-copy,
  .book-copy {
    padding-bottom: 72px;
  }

  .silence,
  .note,
  .name {
    min-height: 100svh;
  }

  footer {
    flex-direction: row;
    justify-content: space-between;
    padding-block: 36px;
  }
}

@media (min-width: 900px) {
  .doorway-media img,
  .member-result::after {
    right: 0;
    left: auto;
    width: 112%;
  }

  .doorway-media img {
    object-position: 50% 18%;
  }

  .member-result::after {
    background-position: 50% 18%;
  }
}

@media (max-width: 899px) {
  .registration-panel {
    display: block;
    height: auto;
    min-height: 0;
  }

  .registration-panel::after,
  .member-result::before {
    background:
      linear-gradient(
        to bottom,
        rgba(8, 7, 6, .025) 0%,
        rgba(8, 7, 6, .075) 100%
      ),
      linear-gradient(
        to left,
        rgba(8, 7, 6, .62) 0%,
        rgba(8, 7, 6, .42) 38%,
        rgba(8, 7, 6, .16) 68%,
        rgba(8, 7, 6, .01) 100%
      );
  }

  .doorway-media img {
    object-position: 77% 50%;
  }

  .registration-content {
    position: relative;
    z-index: 2;
    width: 66%;
    margin-left: auto;
    padding: clamp(34px, 7vw, 56px);
  }

  .member-result {
    height: auto;
    min-height: 620px;
    padding-left: calc(34% + clamp(32px, 8vw, 110px));
  }

  .member-result::after {
    background: url("../images/review/first-circle-doorway-portrait.jpg") 77% 50% / cover no-repeat;
  }
}

@media (max-width: 520px) {
  .hero-media {
    inset: -21%;
  }

  .hero-media img {
    object-position: 68% 40%;
  }

  .hero-persian {
    max-width: 330px;
    font-size: clamp(34px, 9.6vw, 52px);
    line-height: 1.16;
  }

  .artifact-media {
    inset: -18%;
  }

  .artifact-media img {
    object-position: 49% 44%;
  }

  .book-media {
    inset: -10%;
  }

  .book-media img {
    object-position: 45% 42%;
  }

  .access {
    align-items: start;
    padding-top: 20px;
    padding-bottom: max(36px, env(safe-area-inset-bottom));
  }

  .registration-content {
    padding: 26px 20px 24px;
  }

  .access h2 {
    font-size: clamp(40px, 11vw, 47px);
    line-height: 1.18;
  }

  .access-intro {
    margin: 16px 0 0;
    font-size: 13px;
    line-height: 1.9;
  }

  .registration-form {
    margin-top: 22px;
  }

  .field {
    margin-bottom: 16px;
  }

  input {
    min-height: 56px;
    padding: 9px 14px;
    font-size: 17px;
  }

  .privacy-note {
    max-width: 330px;
  }

  .member-result {
    height: auto;
    min-height: 660px;
    padding: 46px 22px 40px;
    padding-left: calc(34% + 20px);
  }

  .member-result h3 {
    margin-top: 42px;
    min-height: 2.6em;
    font-size: clamp(29px, 8.4vw, 36px);
    line-height: 1.35;
  }

  .member-number-label {
    margin-top: 20px;
  }

  .member-number {
    padding-bottom: 46px;
    font-size: clamp(78px, 25vw, 104px);
  }

  .member-number::after {
    width: min(250px, 82%);
  }

  .result-next {
    margin-top: 6px;
    font-size: 13px;
  }

  .submit-button {
    min-height: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
