:root {
  color-scheme: light;
  --paper: #f4f0e8;
  --paper-deep: #e9e1d5;
  --ink: #171714;
  --blue: #173f4e;
  --gold: #a98c56;
  --line: rgba(23, 23, 20, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.68), transparent 42%),
    linear-gradient(135deg, var(--paper) 0%, #f8f5ef 48%, var(--paper-deep) 140%);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: repeating-linear-gradient(90deg, transparent 0 74px, rgba(23, 23, 20, 0.018) 75px);
  content: "";
  pointer-events: none;
}

.page-frame {
  position: fixed;
  inset: 18px;
  z-index: 10;
  border: 1px solid var(--line);
  pointer-events: none;
}

.coming-soon {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 100svh;
  padding: clamp(30px, 4vw, 64px);
}

.signature-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: clamp(20px, 4vh, 56px) 0;
}

.signature-replay {
  width: min(78vw, 740px);
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.signature-replay:focus-visible {
  outline: 1px solid var(--blue);
  outline-offset: 12px;
}

.signature-writing {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.announcement {
  position: relative;
  width: min(920px, 86vw);
  margin-top: clamp(16px, 2.5vh, 34px);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 900ms ease, transform 900ms ease;
}

body.is-ready .announcement {
  opacity: 1;
  transform: translateY(0);
}

.announcement::before,
.announcement::after {
  position: absolute;
  top: 50%;
  width: clamp(28px, 6vw, 86px);
  height: 1px;
  background: var(--gold);
  content: "";
}

.announcement::before {
  left: 0;
}

.announcement::after {
  right: 0;
}

.announcement h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 6vw, 5.9rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.05em;
  color: var(--blue);
  text-align: center;
}

.announcement-fr {
  margin: 0 0 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.82rem, 1.3vw, 1.02rem);
  font-style: italic;
  letter-spacing: 0.08em;
  text-align: center;
}

.announcement-ar {
  margin: 12px 0 0;
  font-family: Tahoma, "Noto Naskh Arabic", serif;
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  text-align: center;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 30px;
  padding: clamp(20px, 3vw, 38px) clamp(4px, 1vw, 14px) clamp(2px, 1vw, 12px);
  opacity: 0;
  transition: opacity 900ms ease 260ms;
}

body.is-ready .site-footer {
  opacity: 1;
}

.identity p {
  margin: 0 0 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.identity p span {
  margin-left: 0.4em;
  font-family: Tahoma, "Noto Naskh Arabic", serif;
}

.identity a,
.socials a {
  color: inherit;
  text-decoration: none;
}

.identity > a {
  position: relative;
  display: inline-block;
  border-bottom: 1px solid transparent;
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.socials {
  display: flex;
  gap: 26px;
}

.socials a {
  position: relative;
  padding-bottom: 5px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.socials a::after,
.identity > a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 240ms ease;
}

.socials a:hover::after,
.socials a:focus-visible::after,
.identity > a:hover::after,
.identity > a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

@media (max-width: 680px) {
  .page-frame {
    inset: 10px;
  }

  .coming-soon {
    padding: 26px 24px 22px;
  }

  .signature-replay {
    width: min(92vw, 580px);
  }

  .announcement {
    width: 100%;
    margin-top: 20px;
  }

  .announcement::before,
  .announcement::after {
    display: none;
  }

  .announcement h1 {
    font-size: clamp(3.2rem, 16vw, 5.2rem);
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 22px;
    text-align: center;
  }

  .socials {
    justify-content: center;
  }
}

@media (max-height: 680px) and (min-width: 681px) {
  .coming-soon {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .signature-replay {
    width: min(64vw, 570px);
  }

  .announcement h1 {
    font-size: clamp(2.5rem, 8vh, 4.6rem);
  }
}

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