/* ============================================================
   Gira / قِرى — bright & playful fairground design system
   Palette: paper #FFF4E4 · ink #2B2543 · coral #FF5D4D
            teal #00A896 · sun #FFC53D · lilac #B79CED
   ============================================================ */

:root {
  --paper: #FFF4E4;
  --paper-deep: #FFE9CC;
  --ink: #2B2543;
  --ink-soft: #5A5478;
  --coral: #FF5D4D;
  --coral-deep: #E8402F;
  --teal: #00A896;
  --teal-deep: #00877A;
  --sun: #FFC53D;
  --lilac: #B79CED;
  --white: #FFFFFF;
  --line: rgba(43, 37, 67, 0.12);
  --shadow-hard: 0 5px 0 rgba(43, 37, 67, 0.14);
  --shadow-soft: 0 10px 30px rgba(43, 37, 67, 0.10);
  --radius: 20px;
  --radius-sm: 14px;
  --font-display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
}

/* Arabic: matching rounded Arabic faces; cursive script needs no tracking
   and a little more line room */
html[lang="ar"] {
  --font-display: "Baloo Bhaijaan 2", "Segoe UI", system-ui, sans-serif;
  --font-body: "Cairo", "Segoe UI", system-ui, sans-serif;
}
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3 { line-height: 1.35; }
html[lang="ar"] .eyebrow { letter-spacing: 0; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.045rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; display: block; }

a { color: var(--teal-deep); }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

/* ---------- type ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  font-weight: 800;
}

h1 { font-size: clamp(2.5rem, 5.2vw, 3.7rem); }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.45rem); margin-bottom: 0.5rem; }
h3 { font-size: 1.22rem; font-weight: 700; }

.section-intro {
  max-width: 560px;
  color: var(--ink-soft);
  margin-bottom: 2.6rem;
}

/* lanyard badge eyebrow — punched hole + pill, clipped like a conference tag */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding-block: 0.28em;
  padding-inline: 0.7em 1em;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow-hard);
}
.eyebrow::before {
  content: "";
  width: 0.62em;
  height: 0.62em;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
}

/* ---------- buttons: candy stickers ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--white);
  background: var(--coral);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.72em 1.5em;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--coral-deep);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--coral-deep); background: #FF6E60; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--coral-deep); }
.btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }

.btn--teal { background: var(--teal); box-shadow: 0 4px 0 var(--teal-deep); }
.btn--teal:hover { background: #0CBBA8; box-shadow: 0 6px 0 var(--teal-deep); }
.btn--teal:active { box-shadow: 0 1px 0 var(--teal-deep); }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  transition: box-shadow 0.2s ease;
}
.nav.is-scrolled { box-shadow: 0 2px 0 var(--line); }

.nav__inner {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  padding: 0.85rem 0;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  margin-inline-end: auto;
}
/* geometric flame mark in front of the wordmark */
.logo__mark {
  width: 0.88em;
  height: 1.02em;
  flex: none;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}
.nav__links a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
}
.nav__links a:not(.btn):hover { color: var(--coral-deep); }
.nav .btn { padding: 0.5em 1.2em; font-size: 0.95rem; }

/* language toggle pill */
.nav__links a.lang-toggle {
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.18em 0.9em;
  font-size: 0.88rem;
  background: var(--white);
  box-shadow: 0 2px 0 rgba(43, 37, 67, 0.2);
}
.nav__links a.lang-toggle:hover { background: var(--sun); color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  padding: 4.2rem 0 5rem;
  background:
    radial-gradient(rgba(43, 37, 67, 0.05) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 10fr) minmax(0, 9fr);
  gap: 3.5rem;
  align-items: center;
}

.hero h1 { margin-bottom: 1.1rem; }
.hero h1 .u-coral { color: var(--coral); }

.hero__sub {
  color: var(--ink-soft);
  font-size: 1.13rem;
  max-width: 34rem;
  margin-bottom: 1.9rem;
}

.hero__art { position: relative; }

/* ---------- signup forms ---------- */

.signup {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.6rem;
  max-width: 34rem;
}

.signup input[type="email"],
.signup input[type="text"] {
  font: inherit;
  padding: 0.72em 1em;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  width: 100%;
}
.signup input::placeholder { color: #9A94B8; }

.signup__note {
  grid-column: 1 / -1;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.form-msg {
  grid-column: 1 / -1;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 0.55em 0.9em;
  display: none;
}
.form-msg.is-ok { display: block; background: #DDF5EC; color: #04654F; }
.form-msg.is-err { display: block; background: #FFE1DD; color: #A82415; }

/* honeypot — hidden from humans, present for bots.
   Clip-based (no offsets): offset-hiding creates horizontal overflow in RTL. */
.hp-field {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- stats strip ---------- */

.stats { padding: 0 0 4.5rem; }

.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.stat {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 1.3rem 1.5rem;
  text-align: center;
}
.stat__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.1;
}
.stat:nth-child(1) .stat__value { color: var(--coral); }
.stat:nth-child(2) .stat__value { color: var(--teal-deep); }
.stat:nth-child(3) .stat__value { color: #C08A00; }
.stat__label { color: var(--ink-soft); font-size: 0.95rem; font-weight: 600; }

/* ---------- generic section rhythm ---------- */

.section { padding: 4.5rem 0; }
.section--tint { background: var(--paper-deep); }

/* ---------- features ---------- */

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.feature {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  padding: 1.6rem 1.5rem;
  transition: transform 0.15s ease;
}
.feature:hover { transform: translateY(-4px); }

.feature__icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  border-radius: 12px;
  margin-bottom: 0.9rem;
}
/* booth colors rotate through the grid */
.feature:nth-child(4n+1) .feature__icon { background: #FFE1DD; }
.feature:nth-child(4n+2) .feature__icon { background: #D9F3EF; }
.feature:nth-child(4n+3) .feature__icon { background: #FFF0CE; }
.feature:nth-child(4n+4) .feature__icon { background: #EDE5FB; }

.feature p { color: var(--ink-soft); font-size: 0.98rem; margin-top: 0.35rem; }

/* ---------- how it works: floor-map route ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  position: relative;
  counter-reset: step;
}
/* the dashed walking route behind the step cards */
.steps::before {
  content: "";
  position: absolute;
  top: 2.4rem;
  left: 12%;
  right: 12%;
  border-top: 3px dashed rgba(43, 37, 67, 0.25);
  z-index: 0;
}

.step { position: relative; z-index: 1; text-align: center; padding: 0 0.8rem; }

.step__pin {
  counter-increment: step;
  width: 4.8rem;
  height: 4.8rem;
  margin: 0 auto 1.1rem;
  display: grid;
  place-items: center;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 50% 50% 50% 12px;   /* map-pin corner */
  transform: rotate(-45deg);
  box-shadow: var(--shadow-hard);
}
.step__pin::after {
  content: counter(step);
  transform: rotate(45deg);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
}
.step:nth-child(1) .step__pin::after { color: var(--coral); }
.step:nth-child(2) .step__pin::after { color: var(--teal-deep); }
.step:nth-child(3) .step__pin::after { color: #C08A00; }

.step p { color: var(--ink-soft); font-size: 0.97rem; margin-top: 0.3rem; }

/* ---------- gallery ---------- */

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.gallery__item {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.gallery__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery__caption { padding: 0.85rem 1.1rem; font-weight: 700; font-size: 0.95rem; }

/* ---------- about ---------- */

.about__card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.2rem;
  align-items: center;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 2.4rem;
  max-width: 46rem;
}

.about__photo {
  width: 9.5rem;
  height: 9.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--sun);
}

.about__role {
  display: inline-block;
  background: var(--sun);
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.15em 0.9em;
  margin: 0.3rem 0 0.8rem;
}

.about__bio { color: var(--ink-soft); }

/* ---------- contact ---------- */

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  max-width: 46rem;
}

.contact__card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  padding: 1.5rem 1.6rem;
}
.contact__card h3 { margin-bottom: 0.6rem; }
.contact__card a { font-weight: 700; }

.socials { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
.socials a { text-decoration: none; }
.socials a:hover { text-decoration: underline; }

/* ---------- footer ---------- */

.footer {
  background: var(--ink);
  color: #CFC9E8;
  padding: 2.6rem 0;
  margin-top: 4rem;
}
.footer .logo { color: var(--white); margin-right: 0; }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  justify-content: space-between;
}
.footer p { font-size: 0.95rem; }

/* ---------- sticky full-width signup bar ---------- */

.ticket {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 60;
  background: var(--white);
  border-top: 3px solid var(--ink);
  box-shadow: 0 -6px 24px rgba(43, 37, 67, 0.18);
  padding: 0.85rem 0;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.ticket.is-visible { transform: translateY(0); }

/* one horizontal row: pitch | form | close */
.ticket__inner {
  width: min(1120px, 94%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1.2rem 1.6rem;
}

.ticket__pitch { flex: 1 1 auto; min-width: 0; }
.ticket h3 { font-size: 1.05rem; }
.ticket p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-top: 0.1rem;
  /* keep the pitch to one line on the bar; the h3 carries the hook */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* form sits inline, sized to content rather than stretching full width */
.ticket .signup {
  grid-template-columns: minmax(9rem, 15rem) minmax(8rem, 12rem) auto;
  gap: 0.6rem;
  max-width: none;
  flex: 0 1 auto;
  margin-inline-start: auto;
}
.ticket .form-msg { margin: 0; }
.ticket .btn { white-space: nowrap; }

.ticket__close {
  flex: none;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.ticket__close:hover { background: var(--sun); }

/* ---------- hero floor-plan animation ---------- */

.floor { width: 100%; height: auto; }

/* wandering guests: multi-waypoint strolls around the floor */
@keyframes stroll-a {
  0%   { transform: translate(0, 0); }
  22%  { transform: translate(150px, -40px); }
  45%  { transform: translate(148px, -42px); } /* pause: met a friend */
  60%  { transform: translate(60px, -110px); }
  80%  { transform: translate(-30px, -40px); }
  100% { transform: translate(0, 0); }
}
@keyframes stroll-b {
  0%   { transform: translate(0, 0); }
  22%  { transform: translate(-140px, -35px); }
  45%  { transform: translate(-142px, -33px); } /* pause: met a friend */
  65%  { transform: translate(-60px, 40px); }
  100% { transform: translate(0, 0); }
}
@keyframes stroll-c {
  0%   { transform: translate(0, 0); }
  30%  { transform: translate(70px, 60px); }
  55%  { transform: translate(-40px, 90px); }
  78%  { transform: translate(-90px, 20px); }
  100% { transform: translate(0, 0); }
}
@keyframes stroll-d {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-50px, -60px); }
  50%  { transform: translate(30px, -95px); }
  75%  { transform: translate(80px, -20px); }
  100% { transform: translate(0, 0); }
}

.guest-a { animation: stroll-a 14s ease-in-out infinite; }
.guest-b { animation: stroll-b 14s ease-in-out infinite; }
.guest-c { animation: stroll-c 17s ease-in-out infinite; }
.guest-d { animation: stroll-d 19s ease-in-out infinite; }

/* the "hello" bubble pops when guests a & b pause next to each other */
@keyframes bubble-pop {
  0%, 24%  { opacity: 0; transform: scale(0.4); }
  30%, 44% { opacity: 1; transform: scale(1); }
  50%, 100% { opacity: 0; transform: scale(0.4); }
}
.meet-bubble {
  animation: bubble-pop 14s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .guest-a, .guest-b, .guest-c, .guest-d { animation: none; }
  .meet-bubble { animation: none; opacity: 1; }
  .ticket { transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 2.4rem; }
  .hero__art { max-width: 30rem; }
  .features__grid, .gallery__grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; gap: 2.2rem; }
  .steps::before {
    left: 50%;
    right: auto;
    top: 3rem;
    bottom: 3rem;
    border-top: none;
    border-left: 3px dashed rgba(43, 37, 67, 0.25);
  }
  .nav__links a:not(.btn):not(.lang-toggle) { display: none; }  /* keep CTA + language toggle on small screens */

  /* tablet: let the form wrap under the pitch so nothing is crushed */
  .ticket__inner { flex-wrap: wrap; }
  .ticket .signup { margin-inline-start: 0; flex-basis: 100%; }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .signup { grid-template-columns: 1fr; }
  .features__grid, .gallery__grid { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: 1fr; gap: 0.9rem; }
  .about__card { grid-template-columns: 1fr; text-align: center; padding: 1.8rem; }
  .about__photo { margin-inline: auto; }
  .contact__grid { grid-template-columns: 1fr; }
  .section { padding: 3.2rem 0; }
  .hero { padding: 2.8rem 0 3.4rem; }
  /* phone: stack the whole bar vertically */
  .ticket { padding: 0.9rem 0 1rem; }
  .ticket__pitch p { white-space: normal; }
  .ticket .signup { grid-template-columns: 1fr; width: 100%; }
  .ticket__close { position: absolute; top: 0.6rem; inset-inline-end: 0.9rem; }
}
