/* ==========================================================================
   Pocket Munshi — Coming Soon
   Static recreation of the Claude Design prototype.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reset
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
  background: #EFE6D0;
}

/* --------------------------------------------------------------------------
   2. Fonts / Variables
   -------------------------------------------------------------------------- */
:root {
  /* Ink-blue accent used for the stamp, kicker, scribble and margin lines. */
  --accent: #1c4f8a;

  /* Palette */
  --color-page-bg: #F4ECD8;
  --color-text: #2A2622;
  --color-muted: #8a7f70;
  --color-muted-2: #7a6f60;
  --color-rule: rgba(70, 90, 140, .09);
}

/* --------------------------------------------------------------------------
   3. Page / Background
   -------------------------------------------------------------------------- */
.page {
  --accent: #1c4f8a;
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: 'Zilla Slab', serif;
  color: var(--color-text);
  padding: clamp(26px, 4.5vw, 60px) clamp(30px, 6.5vw, 104px) clamp(30px, 4vw, 54px);
  background-color: var(--color-page-bg);

  /* Ruled-ledger lines + two soft radial washes, stacked. */
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 45px,
      var(--color-rule) 45px,
      var(--color-rule) 46px
    ),
    radial-gradient(130% 120% at 82% -10%, rgba(255, 255, 255, .6), transparent 55%),
    radial-gradient(120% 120% at 10% 110%, rgba(150, 120, 70, .12), transparent 50%);
}

/* Red/accent margin lines, like a school-ledger page. */
.margin-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: clamp(20px, 4.5vw, 74px);
  width: 2px;
  background: color-mix(in srgb, var(--accent) 55%, transparent);
}

.margin-line--thin {
  left: clamp(25px, 4.5vw, 79px);
  width: 1px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
  animation: riseUp .7s ease both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand__logo {
  width: 42px;
  height: 42px;
  border: 2.5px solid var(--color-text);
  display: grid;
  place-items: center;
  font-family: 'Noto Nastaliq Urdu', serif;
  font-size: 22px;
  line-height: 1;
  padding-bottom: 6px;
}

.brand__name {
  font-weight: 700;
  font-size: clamp(19px, 2.2vw, 23px);
  letter-spacing: .01em;
}

.eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
  padding: clamp(30px, 6vh, 80px) 0;
}

.nastaliq {
  font-family: 'Noto Nastaliq Urdu', serif;
  font-size: clamp(38px, 5.5vw, 60px);
  color: color-mix(in srgb, var(--accent) 88%, transparent);
  line-height: 1.7;
  margin: 0 0 clamp(14px, 2vw, 26px);
  animation: riseUp .8s .15s ease both;
}

.hero__kicker {
  font-family: 'Space Mono', monospace;
  font-size: clamp(13px, 1.5vw, 18px);
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
  animation: riseUp .7s .25s ease both;
}

.hero__title {
  margin: clamp(12px, 1.6vw, 18px) 0 0;
  font-size: clamp(52px, 10.5vw, 138px);
  line-height: .94;
  font-weight: 700;
  letter-spacing: -.02em;
  max-width: 16ch;
  text-wrap: balance;
  animation: riseUp .85s .35s ease both;
}

.scribble {
  font-family: 'Caveat', cursive;
  color: #1c4f8a;
  font-size: clamp(34px, 4.5vw, 54px);
  transform: rotate(-6deg);
  transform-origin: left center;
  margin-top: clamp(20px, 3vw, 34px);
  animation: scribble .6s 1.15s ease both;
}

/* --------------------------------------------------------------------------
   6. Stamp
   -------------------------------------------------------------------------- */
.stamp {
  position: absolute;
  top: clamp(28px, 6vh, 68px);
  right: 0;
  transform: rotate(-8deg);
  transform-origin: center;
  animation: stampIn 1s .75s cubic-bezier(.2, .9, .3, 1.3) both;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.stamp__inner {
  border: 5px double var(--accent);
  color: var(--accent);
  padding: clamp(10px, 1.4vw, 16px) clamp(16px, 2vw, 28px);
  text-align: center;
  opacity: .9;
}

.stamp__text {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: clamp(20px, 3vw, 34px);
  letter-spacing: .1em;
}

.stamp__sub {
  font-family: 'Zilla Slab', serif;
  font-size: clamp(12px, 1.2vw, 16px);
  letter-spacing: .35em;
  margin-top: 5px;
}

/* --------------------------------------------------------------------------
   7. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1.5px solid rgba(42, 38, 34, .25);
  padding-top: clamp(16px, 2vw, 22px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
  animation: riseUp .7s .5s ease both;
}

.site-footer__message {
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 500;
  max-width: 60ch;
  line-height: 1.4;
  margin: 0;
}

.site-footer__muted {
  color: var(--color-muted-2);
}

.site-footer__status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--color-muted);
  white-space: nowrap;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotpulse 2.4s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   8. Animations
   -------------------------------------------------------------------------- */
@keyframes stampIn {
  0% { transform: rotate(-8deg) scale(2.3); opacity: 0; }
  58% { transform: rotate(-8deg) scale(.93); opacity: 1; }
  74% { transform: rotate(-8deg) scale(1.04); }
  100% { transform: rotate(-8deg) scale(1); opacity: 1; }
}

@keyframes riseUp {
  from { transform: translateY(26px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes scribble {
  from { transform: rotate(-6deg) scale(.55); opacity: 0; }
  to { transform: rotate(-6deg) scale(1); opacity: .95; }
}

@keyframes dotpulse {
  0%, 100% { opacity: .35; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.35); }
}

/* --------------------------------------------------------------------------
   9. Responsive
   -------------------------------------------------------------------------- */

/* On narrow screens the rotated stamp can overlap the giant headline.
   Pull it back into normal flow, shrink it and center it above the title
   instead of pinning it absolutely to the top-right corner. */
@media (max-width: 640px) {
  .hero {
    padding-top: clamp(96px, 22vh, 130px);
  }

  .stamp {
    position: static;
    display: flex;
    justify-content: center;
    transform: none;
    margin: 0 0 20px;
    mix-blend-mode: normal;
  }

  .stamp__inner {
    transform: rotate(-8deg);
    padding: 8px 16px;
  }

  .stamp__text {
    font-size: 18px;
  }

  .stamp__sub {
    font-size: 10px;
    letter-spacing: .28em;
  }
}

@media (max-width: 400px) {
  .hero__title {
    max-width: 100%;
  }
}

/* --------------------------------------------------------------------------
   10. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .site-header,
  .nastaliq,
  .hero__kicker,
  .hero__title,
  .scribble,
  .stamp,
  .site-footer,
  .status-dot {
    animation: none !important;
  }

  /* Ensure elements land at their final, visible state rather than
     freezing at the animation's 0% (invisible/offset) frame. */
  .site-header,
  .nastaliq,
  .hero__kicker,
  .hero__title,
  .site-footer {
    opacity: 1;
    transform: none;
  }

  .scribble {
    opacity: .95;
    transform: rotate(-6deg) scale(1);
  }

  .stamp {
    opacity: 1;
    transform: rotate(-8deg) scale(1);
  }

  @media (max-width: 640px) {
    .stamp {
      transform: none;
    }
  }

  .status-dot {
    opacity: 1;
    transform: scale(1);
  }
}
