/* ══════════════════════════════════════════════════════════════════
   Kurrasi — coming soon landing page (Arabic, RTL)
   Neubrutalism: warm paper, hard 2px ink borders, solid offset shadows
   ══════════════════════════════════════════════════════════════════ */

:root {
  --paper: #fdf9ef;
  --paper-card: #fffef9;
  --paper-deep: #f4ecdd;
  --ink: #2a2522;
  --ink-soft: #6b635b;

  --coral: #e76f51;
  --coral-dark: #d65a3d;
  --highlight: #ffd45a;
  --highlight-soft: #ffe9a8;
  --teal: #2a9d8f;

  --radius-chip: 0.5rem;

  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-offset: 4px 4px 0 var(--ink);
  --shadow-offset-sm: 2px 2px 0 var(--ink);

  --font-arabic: 'Rubik', 'Segoe UI', Tahoma, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { height: 100%; }

body {
  font-family: var(--font-arabic);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

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

/* ═══════════════════ Hero ═══════════════════ */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 3rem 1rem 0;
  overflow: hidden;
}

/* faint ruled-paper lines */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(transparent 95%, rgba(42, 37, 34, 0.05) 95%);
  background-size: 100% 2.2rem;
  pointer-events: none;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.6rem;
  position: relative;
}

/* The real logo PNG (K tile + baked-in wordmark) — no shadow: the
   neubrutalist hard drop-shadow drew a duplicate ghost silhouette. */
.logo {
  width: clamp(170px, 38vw, 260px);
  height: auto;
  animation: float 5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.soon {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--highlight);
  border: 2px solid var(--ink); border-radius: var(--radius-chip);
  padding: 0.45rem 1.4rem;
  font-size: clamp(1.15rem, 3.5vw, 1.45rem);
  font-weight: 700;
  box-shadow: var(--shadow-offset-sm);
  transform: rotate(-1.5deg);
}
html[dir="rtl"] .soon { transform: rotate(1.5deg); }

.soon .dot {
  width: 0.6rem; height: 0.6rem; border-radius: 50%;
  background: var(--coral); border: 2px solid var(--ink);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.7); opacity: 0.55; }
}

.lead {
  color: var(--ink);
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  max-width: 32rem;
  font-weight: 600;
}

.hints {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  max-width: 40rem;
}
.hints li {
  border: 2px solid var(--ink); border-radius: var(--radius-chip);
  background: var(--paper-card);
  box-shadow: var(--shadow-offset-sm);
  padding: 0.4rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.hints li:nth-child(2) { background: var(--highlight-soft); }
.hints li:nth-child(3) { background: var(--paper-deep); }

/* ═══════════════════ Email capture ═══════════════════ */

.subscribe {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  width: min(27rem, 100%);
  margin-top: 1.4rem;
  padding: 1.6rem 1.5rem 1.2rem;
  background: var(--paper-card);
  border: 2px solid var(--ink);
  border-radius: 0.875rem;
  box-shadow: var(--shadow-offset);
}

.sub-heading {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 700;
  font-size: 1.1rem;
}
.sub-heading-icon {
  width: 1.3em; height: 1.3em;
  fill: none; stroke: var(--coral); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* In RTL, the button sits at the row start (right); the input fills the rest */
.sub-row {
  display: flex;
  width: 100%;
  gap: 0.7rem;
}

.sub-input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-arabic);
  font-size: 1rem;
  padding: 0.8rem 1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-chip);
  background: var(--paper);
  color: var(--ink);
  outline: none;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.sub-input::placeholder { color: var(--ink-soft); }
.sub-input:hover { background: var(--paper-card); }
.sub-input:focus {
  background: var(--paper-card);
  box-shadow: 3px 3px 0 var(--coral);
  border-color: var(--coral);
}
.sub-input:focus-visible { outline: none; }

.sub-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-arabic);
  font-weight: 700; font-size: 1rem;
  padding: 0.8rem 1.4rem;
  background: var(--coral); color: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--radius-chip);
  box-shadow: var(--shadow-offset-sm);
  transition: transform 0.14s var(--ease-spring), box-shadow 0.14s var(--ease-spring), background 0.14s;
}
.sub-btn:hover { background: var(--coral-dark); transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.sub-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }

.sub-btn-arrow {
  width: 1.15em; height: 1.15em;
  fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.18s var(--ease-spring);
}
.sub-btn:hover .sub-btn-arrow { transform: translateX(-4px); }
html[dir="ltr"] .sub-btn:hover .sub-btn-arrow { transform: translateX(4px); }

/* loading state: label fades, spinner appears in its place */
.sub-btn-spinner {
  display: none;
  width: 1.15em; height: 1.15em;
  fill: none; stroke: currentColor; stroke-width: 2.5;
  stroke-linecap: round;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sub-btn.loading .sub-btn-label,
.sub-btn.loading .sub-btn-arrow { display: none; }
.sub-btn.loading .sub-btn-spinner { display: block; animation: spin 0.7s linear infinite; }
.sub-btn.loading { pointer-events: none; opacity: 0.9; }

.sub-trap {
  position: absolute;
  inset-inline-start: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sub-status {
  min-height: 1.6em;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  transition: opacity 0.2s;
}
.sub-status.ok { color: var(--teal); }
.sub-status.err { color: #c1121f; }

@media (max-width: 480px) {
  .subscribe { padding: 1.4rem 1.1rem 1rem; }
  .sub-row { flex-direction: column; gap: 0.8rem; }
  .sub-btn { width: 100%; }
}

/* ═══════════════════ Footer ═══════════════════ */

.site-footer {
  text-align: center;
  padding: 2.5rem 1.4rem 1.4rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* ═══════════════════ Reveal ═══════════════════ */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s var(--ease-out-soft), transform 0.55s var(--ease-out-soft); }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: 0.1s; } .d2 { transition-delay: 0.2s; } .d3 { transition-delay: 0.3s; } .d4 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
