:root {
  --paper: #e9dfc8;
  --ink: #0f5449;
  --ochre: #b68235;
}

* { box-sizing: border-box; }

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
}

.coming-soon {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 250, 231, 0.72), transparent 31%),
    radial-gradient(circle at 82% 77%, rgba(178, 130, 53, 0.12), transparent 35%),
    linear-gradient(115deg, #eee5d1 0%, var(--paper) 52%, #e1d3b8 100%);
}

.coming-soon::before {
  content: '';
  position: absolute;
  inset: clamp(14px, 2.8vw, 32px);
  z-index: -1;
  border: 1px solid rgba(15, 84, 73, 0.32);
  box-shadow:
    inset 0 0 0 3px rgba(233, 223, 200, 0.76),
    inset 0 0 0 4px rgba(182, 130, 53, 0.2);
  pointer-events: none;
}

.paper-grain {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0.28;
  pointer-events: none;
  mix-blend-mode: multiply;
  background-image:
    repeating-radial-gradient(circle at 20% 30%, rgba(58, 46, 27, 0.2) 0 0.45px, transparent 0.7px 3px),
    repeating-linear-gradient(93deg, transparent 0 7px, rgba(105, 79, 40, 0.035) 8px 9px);
  background-size: 9px 11px, 31px 100%;
}

.mark-stage {
  position: relative;
  display: flex;
  width: min(82vw, 470px);
  align-items: center;
  flex-direction: column;
  gap: clamp(48px, 8vh, 78px);
  padding: 7vh 28px;
}

.logo-wrap {
  position: relative;
  width: min(58vw, 270px);
  aspect-ratio: 267.25 / 239.02;
  filter: drop-shadow(0 10px 0 rgba(87, 58, 25, 0.06));
}

.logo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
}

.logo-ghost {
  opacity: 0.2;
  filter: sepia(0.7) saturate(0.25) contrast(0.88);
}

.logo-reveal {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: polygon(0% 100%, 9% 100%, 18% 100%, 29% 100%, 41% 100%, 52% 100%, 63% 100%, 74% 100%, 85% 100%, 93% 100%, 100% 100%, 100% 100%, 0% 100%);
  animation: ink-reveal 5s cubic-bezier(0.12, 0.72, 0.18, 1) forwards;
  will-change: clip-path;
}

.logo-color { filter: saturate(0.92) contrast(1.03); }

.ink-edge {
  position: absolute;
  left: -2%;
  top: 100%;
  width: 104%;
  height: 8px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(15, 84, 73, 0.2) 9%, rgba(15, 84, 73, 0.13) 89%, transparent);
  clip-path: polygon(0 62%, 9% 38%, 17% 70%, 28% 29%, 39% 66%, 50% 22%, 61% 60%, 72% 31%, 84% 72%, 93% 34%, 100% 58%, 100% 100%, 0 100%);
  animation: edge-rise 5s cubic-bezier(0.12, 0.72, 0.18, 1) forwards;
}

.loader {
  position: relative;
  width: min(72vw, 330px);
  padding-bottom: 16px;
}

.loader-value {
  position: absolute;
  top: -2px;
  right: -52px;
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 14px;
  letter-spacing: 0.04em;
  direction: ltr;
  text-shadow: 1px 1px 0 rgba(182, 130, 53, 0.16);
}

.loader-track {
  position: relative;
  height: 14px;
  overflow: hidden;
  border: 1px solid rgba(15, 84, 73, 0.72);
  background: rgba(244, 237, 217, 0.68);
  box-shadow: inset 0 0 0 3px rgba(15, 84, 73, 0.08), 3px 3px 0 rgba(182, 130, 53, 0.14);
}

.loader-fill {
  position: absolute;
  inset: 2px auto 2px 2px;
  width: calc(100% - 4px);
  transform: scaleX(0);
  transform-origin: left center;
  background:
    repeating-linear-gradient(135deg, transparent 0 5px, rgba(255, 245, 214, 0.12) 5px 7px),
    var(--ink);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 34%, calc(100% - 4px) 70%, 100% 100%, 0 100%);
  animation: loader-fill 5s cubic-bezier(0.12, 0.72, 0.18, 1) forwards;
}

.loader-ticks {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  opacity: 0.62;
}

.loader-ticks span {
  width: 1px;
  height: 6px;
  background: var(--ochre);
}

@keyframes ink-reveal {
  0% { clip-path: polygon(0% 100%, 9% 100%, 18% 100%, 29% 100%, 41% 100%, 52% 100%, 63% 100%, 74% 100%, 85% 100%, 93% 100%, 100% 100%, 100% 100%, 0% 100%); }
  100% { clip-path: polygon(0% 40%, 9% 42%, 18% 38.5%, 29% 41%, 41% 37.8%, 52% 43%, 63% 39.5%, 74% 41.5%, 85% 38%, 93% 40.5%, 100% 39%, 100% 100%, 0% 100%); }
}

@keyframes edge-rise {
  0% { top: 100%; opacity: 0; }
  100% { top: 39.5%; opacity: 0.34; }
}

@keyframes loader-fill {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(0.6); }
}

@media (max-width: 540px) {
  .mark-stage { width: 100%; gap: 52px; }
  .logo-wrap { width: min(65vw, 250px); }
  .loader { width: min(68vw, 300px); }
  .loader-value { right: -46px; }
}

@media (prefers-reduced-motion: reduce) {
  .logo-reveal {
    animation: none;
    clip-path: polygon(0% 40%, 9% 42%, 18% 38.5%, 29% 41%, 41% 37.8%, 52% 43%, 63% 39.5%, 74% 41.5%, 85% 38%, 93% 40.5%, 100% 39%, 100% 100%, 0% 100%);
  }
  .ink-edge { top: 39.5%; opacity: 0.34; animation: none; }
  .loader-fill { transform: scaleX(0.6); animation: none; }
}
