/* ==========================================================================
   Gymer landing
   Colors: Gymer design tokens (dark handoff, lime/500 #8DD72C, neutral scale), whole page dark. Type: IRANSansX (licensed, Farsi digits), titles Bold, text Regular.
   ========================================================================== */
/* IRANSansX by Moslem Ebrahimi (fontiran.com), Commercial/Proprietary Software.
   This set of fonts are used in this project under the license: (5M296WHP) */
@font-face {
  font-family: 'IRANSansX';
  src: url('assets/IRANSansX-VariableFaNum.woff2') format('woff2');
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  --lime: #8dd72c; /* lime/500 */
  --lime-hover: #9fe04a; /* lime/400 */
  --lime-soft: #b8e875; /* lime/300 */
  --lime-ink: #9fe04a; /* lime/400, text/brand */
  --ink: #111416; /* neutral/950, text/on-brand */
  --night: #111416; /* bg/primary */
  --night-2: #1c2123; /* bg/secondary */
  --night-3: #2c3235; /* bg/tertiary */
  --paper: #f7f8f8; /* neutral/50 */
  --muted: #969da1; /* text/secondary */
  --line: #42494d; /* border/subtle */
  --on-night: #f7f8f8; /* text/primary */
  --on-night-muted: #969da1; /* text/secondary */
  --night-line: rgba(255, 255, 255, 0.1);

  --display: 'IRANSansX', Tahoma, sans-serif;
  --text: 'IRANSansX', Tahoma, system-ui, sans-serif;

  --gutter: 16px;
  --section-y: clamp(72px, 7vw + 24px, 136px);
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 640px) {
  :root {
    --gutter: 28px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--on-night);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

ol {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  text-wrap: balance;
}

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
  border-radius: 6px;
}

.icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--inline {
  width: 18px;
  height: 18px;
  vertical-align: -3px;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: 760px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -64px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  color: var(--on-night);
}

.logo__svg {
  display: block;
  height: 36px;
  width: auto;
  aspect-ratio: var(--logo-ratio, 3.2);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 24px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.15s var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn--sm {
  min-height: 44px;
  padding: 8px 16px;
  font-size: 0.925rem;
}

.btn--lg {
  min-height: 56px;
  padding: 14px 28px;
  font-size: 1.05rem;
}

.btn--block {
  width: 100%;
}

.btn--primary {
  background: var(--lime);
  color: var(--ink);
}

.btn--primary:hover {
  background: var(--lime-hover);
}

.btn--ghost {
  color: var(--on-night);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn--outline-light {
  color: var(--on-night);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn--outline-light:hover {
  border-color: var(--lime);
  color: var(--lime-soft);
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  color: var(--on-night);
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.header.is-scrolled,
.header.is-open {
  background: rgba(17, 20, 22, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--night-line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.nav {
  display: none;
  gap: 28px;
}

.nav a {
  padding-block: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--on-night-muted);
  transition: color 0.2s;
}

.nav a:hover,
.nav a.is-active {
  color: var(--on-night);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--night-line);
  border-radius: 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

/* Three bars that morph into an X while the menu is open (state from aria-expanded). */
.burger {
  position: relative;
  display: block;
  width: 20px;
  height: 14px;
}

.burger i {
  position: absolute;
  inset-inline: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform 0.3s var(--ease),
    opacity 0.2s var(--ease),
    top 0.3s var(--ease);
}

.burger i:nth-child(1) { top: 0; }
.burger i:nth-child(2) { top: 6px; }
.burger i:nth-child(3) { top: 12px; }

.menu-toggle[aria-expanded='true'] .burger i:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded='true'] .burger i:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-toggle[aria-expanded='true'] .burger i:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

.mobile-menu {
  border-top: 1px solid var(--night-line);
  padding-block: 8px 20px;
}

.mobile-menu nav {
  display: grid;
}

.mobile-menu a:not(.btn) {
  padding: 14px 4px;
  font-weight: 600;
  border-bottom: 1px solid var(--night-line);
}

.mobile-menu .btn {
  margin-top: 16px;
}

.hide-sm {
  display: none;
}

@media (min-width: 640px) {
  .hide-sm {
    display: inline-flex;
  }
}

@media (min-width: 1024px) {
  .nav {
    display: flex;
  }

  .menu-toggle,
  .mobile-menu {
    display: none !important;
  }
}

/* ---------- Shared bits ---------- */
.kicker {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--lime);
}

.kicker--dark {
  color: var(--lime-ink);
}

.ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 479px) {
  .ctas .btn {
    flex: 1 1 100%;
  }
}

.phone {
  width: min(320px, 80vw);
  padding: 8px;
  border-radius: 44px;
  background: #000;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 30px 60px -20px rgba(0, 0, 0, 0.45);
}

.phone img {
  width: 100%;
  border-radius: 36px;
}

.phone--sm {
  width: min(290px, 76vw);
}

/* ---------- Hero ---------- */
.hero {
  background: var(--night);
  color: var(--on-night);
  padding-top: calc(var(--header-h) + 36px);
}

.hero__inner {
  display: grid;
  gap: 48px;
}

.hero__title {
  margin-top: 14px;
  font-size: clamp(2.25rem, 0.6rem + 3.4vw, 3.15rem);
  line-height: 1.5;
}

.hl {
  color: var(--lime);
}

.hero__lead {
  max-width: 600px;
  text-wrap: pretty;
  margin-top: 18px;
  font-size: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  color: var(--on-night-muted);
}

.hero .ctas {
  margin-top: 32px;
}


.hero {
  padding-bottom: clamp(56px, 6vw, 96px);
}

.hero__visual {
  /* phone width; on desktop it is also capped by the viewport height so the whole phone (+ slider
     bars) fits above the fold on short laptop screens (≈ 13-inch: 1280×680 usable) */
  --phone-w: min(320px, 80vw);
  display: flex;
  justify-content: center;
}

.hero__visual .phone {
  width: var(--phone-w);
}

@media (min-width: 1024px) {
  .hero {
    display: flex;
    align-items: center;
    min-height: min(100svh, 980px);
    padding-block: calc(var(--header-h) + 24px) 32px;
  }

  .hero__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: clamp(40px, 4vw, 56px);
  }

  .hero__visual {
    --phone-w: clamp(210px, min(24vw, calc((100svh - 210px) * 0.45)), 320px);
    justify-content: flex-end;
  }
}

/* ---------- Hero phone slider ---------- */
.slider {
  display: grid;
  justify-items: center;
}

.phone__viewport {
  overflow: hidden;
  border-radius: 36px;
  /* keep the rounded clip on Safari while children are transformed */
  isolation: isolate;
}

.phone__track {
  display: flex;
  transition: transform 0.8s var(--ease-out);
  touch-action: pan-y;
}

.phone .phone__track img {
  flex: 0 0 100%;
  width: 100%;
  border-radius: 0;
  transition:
    transform 0.8s var(--ease-out),
    opacity 0.8s var(--ease-out),
    filter 0.8s var(--ease-out);
  user-select: none;
  -webkit-user-drag: none;
}

/* depth effect: screens that are not current sit slightly back */
.phone .phone__track img:not(.is-current) {
  transform: scale(0.9);
  opacity: 0.35;
  filter: blur(1px);
}

.slider__bars {
  display: flex;
  gap: 6px;
  width: calc(var(--phone-w) - 40px);
  margin-top: 18px;
}

.slider__bar {
  position: relative;
  flex: 1;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.slider__bar::before,
.slider__bar::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  border-radius: 4px;
}

.slider__bar::before {
  background: rgba(255, 255, 255, 0.16);
}

.slider__bar::after {
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: right;
}

.slider__bar.is-done::after {
  transform: none;
  opacity: 0.45;
}

.slider__bar.is-current::after {
  transform: none;
}

.slider.is-playing .slider__bar.is-current::after {
  animation: bar-fill var(--slide-ms, 4000ms) linear both;
}

.slider.is-paused .slider__bar.is-current::after {
  animation-play-state: paused;
}

.slider__bar:focus-visible {
  outline-offset: 0;
}

@keyframes bar-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.slider__caption {
  margin-top: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--on-night-muted);
  transition: opacity 0.3s var(--ease-out);
}

.slider__caption.is-swapping {
  opacity: 0;
}

/* ---------- Sections ---------- */
.section {
  padding-block: var(--section-y);
}

.section__head {
  max-width: 640px;
  margin-bottom: clamp(40px, 5vw, 72px);
}

.section__head h2 {
  margin-top: 8px;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem);
  line-height: 1.4;
}

/* ---------- Feature rows ---------- */
.rows {
  display: grid;
  gap: clamp(64px, 8vw, 112px);
}

.row {
  display: grid;
  gap: 32px;
  justify-items: center;
}

.row__text {
  max-width: 460px;
  justify-self: stretch;
}

.row__num {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--night-3);
  color: var(--lime);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1;
}

.row h3 {
  font-weight: 700;
  margin-top: 18px;
  font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem);
  line-height: 1.4;
}

.row p {
  margin-top: 10px;
  font-size: 1.075rem;
  color: var(--muted);
}

@media (min-width: 860px) {
  .row {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
  }

  .row__text {
    justify-self: start;
  }

  .row:nth-child(even) .row__text {
    order: 2;
  }
}

/* ---------- The trainee's PDF ---------- */
.pdf {
  padding-block: var(--section-y);
  background: var(--night);
  color: var(--on-night);
}

.pdf__grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.pdf__text {
  max-width: 560px;
}

.pdf__text h2 {
  margin-top: 8px;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem);
  line-height: 1.4;
}

.pdf__lead {
  margin-top: 12px;
  font-size: 1.075rem;
  color: var(--on-night-muted);
}

.pdf__points {
  display: grid;
  gap: 12px;
  margin: 24px 0 32px;
  padding: 0;
  list-style: none;
}

.pdf__points li {
  position: relative;
  padding-inline-start: 22px;
  line-height: 1.8;
}

.pdf__points li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0.8em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
}

/* Page one behind a day page, as the trainee scrolls them */
.pdf__pages {
  position: relative;
  width: min(100%, 480px);
  aspect-ratio: 1 / 1.08;
  margin: 0 auto;
}

.pdf__page {
  position: absolute;
  width: 68%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.7);
}

.pdf__page--back {
  top: 0;
  right: 0;
  opacity: 0.9;
}

.pdf__page--front {
  bottom: 0;
  left: 0;
}

@media (min-width: 860px) {
  .pdf__grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}

/* ---------- Download ---------- */
.download {
  padding-bottom: var(--section-y);
}

.download__card {
  display: grid;
  gap: 40px;
  padding: clamp(28px, 5vw, 64px);
  border-radius: clamp(24px, 3vw, 36px);
  background: var(--night-2);
  color: var(--on-night);
}

.download__head {
  max-width: 620px;
}

.download__head h2 {
  margin-top: 8px;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem);
  line-height: 1.4;
}

.download__head p:last-child {
  margin-top: 12px;
  color: var(--on-night-muted);
  font-size: 1.05rem;
}

.platforms {
  display: grid;
  gap: 28px;
}

.platform__title {
  margin-bottom: 12px;
  font-family: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--on-night-muted);
}

.stores {
  display: grid;
  gap: 10px;
}

@media (min-width: 520px) {
  .stores--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.store {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 72px;
  padding: 12px 18px;
  border: 1px solid var(--night-line);
  border-radius: 16px;
  background: var(--night-3);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.store:hover {
  border-color: var(--lime);
  background: var(--night-3);
}

.store small {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--on-night-muted);
}

.store strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.4;
  white-space: nowrap;
}

.store--primary {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}

.store--primary small {
  color: #193308;
}

.store--primary:hover {
  background: var(--lime-hover);
  border-color: var(--lime-hover);
}

.qr {
  display: none;
}

@media (min-width: 1024px) {
  .platforms {
    grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr) auto;
    align-items: end;
    gap: 24px;
  }

  .qr:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 14px;
  }
}

.qr__code {
  width: 104px;
  height: 104px;
  flex: none;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
}

.qr__code svg {
  display: block;
  width: 100%;
  height: 100%;
}

.qr p {
  max-width: 170px;
}

.qr strong {
  display: block;
}

.qr small {
  display: block;
  margin-top: 2px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--on-night-muted);
}

.ios {
  padding-top: 28px;
  border-top: 1px solid var(--night-line);
}

.ios__title {
  font-weight: 700;
}

.ios__steps {
  list-style: persian;
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-inline-start: 1.4em;
  color: var(--on-night-muted);
}

.ios__steps li::marker {
  color: var(--lime);
  font-weight: 700;
}

/* ---------- FAQ ---------- */
.section--faq {
  padding-top: 0;
}

.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding-block: 18px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary .icon {
  color: var(--muted);
  transition: transform 0.25s var(--ease);
}

.faq details[open] summary .icon {
  transform: rotate(180deg);
}

.faq__a {
  display: grid;
  gap: 12px;
  padding-bottom: 24px;
  color: var(--muted);
  text-wrap: pretty;
}

/* ---------- Contact ---------- */
.section--contact {
  padding-top: 0;
}

/* One panel: the dark side says how to reach us and holds the number, the form sits beside it */
.contact {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: clamp(20px, 2.5vw, 28px);
  background: var(--night-2);
}

.contact__aside {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 4vw, 48px);
  background: var(--night);
  color: var(--on-night);
}

.about__text {
  margin-top: 12px;
  font-size: 1.075rem;
  line-height: 1.9;
  text-wrap: pretty;
}

/* Where we are: map on top, Sharif's mark and the address under it; the whole card opens the map */
.place {
  position: relative;
  display: block;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid var(--night-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--on-night);
}

.place__map {
  position: relative;
  display: block;
  aspect-ratio: 20 / 9;
  overflow: hidden;
}

.place__map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.place:hover .place__map img {
  transform: scale(1.03);
}

.place__credit {
  position: absolute;
  bottom: 4px;
  left: 6px;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.625rem;
  line-height: 1.5;
  color: #2c3235;
}

.place__info {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

/* Sharif University and its science and technology park, side by side */
.place__logos {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
}

.place__logo {
  flex: none;
  width: 48px;
  height: 48px;
  color: var(--on-night);
}

.place__logo--park {
  width: 52px;
  height: auto;
}

.place__text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.place__text strong {
  font-weight: 700;
  line-height: 1.6;
}

.place__text span {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--on-night-muted);
}

.place__cta {
  flex: none;
  padding: 6px 14px;
  border: 1px solid var(--night-line);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.place:hover .place__cta {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--ink);
}

/* on phones the address needs the full width: the button moves onto the map's corner */
@media (max-width: 559px) {
  .place__cta {
    position: absolute;
    top: 10px;
    left: 10px;
    border-color: transparent;
    background: var(--night);
    color: var(--on-night);
  }
}

/* Phone number and social links share the last row of the dark side */
.reach {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--night-line);
}

.call {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--on-night);
}

.call__text {
  display: grid;
}

.call small {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--on-night-muted);
}

.call strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
  line-height: 1.4;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}

.call:hover strong {
  color: var(--lime);
}

.call__icon {
  flex: none;
  width: 48px;
  height: 48px;
  padding: 13px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
}

.socials {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--night-line);
  border-radius: 50%;
  color: var(--on-night);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.socials a:hover {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--ink);
}

.socials svg {
  width: 20px;
  height: 20px;
}

.contact__card {
  padding: clamp(24px, 4vw, 48px);
}

.form {
  display: grid;
  gap: 20px;
}

.form[hidden] {
  display: none;
}

.form__title {
  font-size: 1.25rem;
  line-height: 1.4;
}

.form__row {
  display: grid;
  gap: 20px;
}

@media (min-width: 560px) {
  .form__row {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: grid;
  gap: 8px;
  align-content: start;
}

.field label {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid #747c81; /* border/default */
  border-radius: 12px;
  background: var(--night-3);
  color: var(--on-night);
  font: inherit;
  line-height: 1.6;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field input:hover,
.field textarea:hover {
  border-color: #969da1; /* border/strong */
}

.field input[dir='ltr'] {
  text-align: right;
}

.field textarea {
  min-height: 148px;
  resize: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #969da1;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--lime-ink);
  box-shadow: 0 0 0 3px rgba(141, 215, 44, 0.3);
}

.field [aria-invalid='true'] {
  border-color: #f97066; /* border/danger */
}

.field [aria-invalid='true']:focus {
  border-color: #f97066;
  box-shadow: 0 0 0 3px rgba(249, 112, 102, 0.24);
}

.field__error {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #f97066; /* text/danger */
}

/* honeypot: off-screen for people, still in the form for bots */
.form__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.form__alert {
  padding: 12px 16px;
  border-radius: 12px;
  background: #55160c; /* bg/danger-subtle */
  color: #f97066;
  font-size: 0.95rem;
  line-height: 1.7;
}

.form__submit {
  width: 100%;
  margin-top: 4px;
}

.form__submit:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.form__done {
  padding-block: 8px;
  border-inline-start: 4px solid var(--lime);
  padding-inline-start: 16px;
}

.form__done:focus {
  outline: none;
}

.form__done strong {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.5;
}

.form__done p {
  margin-top: 4px;
  color: var(--muted);
}

@media (min-width: 900px) {
  .contact {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  /* the message box takes the spare height, so the send button sits level with the phone row */
  .contact__card,
  .form {
    display: flex;
    flex-direction: column;
  }

  .form {
    flex: 1;
  }

  .form > .field:has(textarea) {
    display: flex;
    flex: 1;
    flex-direction: column;
  }

  .form textarea {
    flex: 1;
  }

  /* phone and socials sit at the bottom of the dark side, level with the send button */
  .reach {
    margin-top: auto;
  }

  .place {
    margin-bottom: 28px;
  }
}

/* ---------- Final CTA ---------- */
.final {
  padding-block: var(--section-y);
  background: var(--night);
  color: var(--on-night);
}

.final__inner {
  display: grid;
  justify-items: center;
  gap: 28px;
  text-align: center;
}

.final h2 {
  max-width: 720px;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
  line-height: 1.45;
}

.final .ctas {
  justify-content: center;
}

/* ---------- Footer ---------- */
.footer {
  padding-block: 44px 24px;
  background: var(--night);
  color: var(--on-night-muted);
  border-top: 1px solid var(--night-line);
}

.footer__inner {
  display: grid;
  gap: 24px;
}

.footer__brand p {
  margin-top: 10px;
  max-width: 340px;
  font-size: 0.95rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer__links a {
  padding-block: 8px;
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--lime);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--night-line);
}

.footer__trust:empty {
  display: none;
}

@media (min-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

/* ---------- Mobile sticky CTA ---------- */
.sticky-cta {
  position: fixed;
  inset: auto 0 0;
  z-index: 40;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: rgba(17, 20, 22, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.3s var(--ease);
}

.sticky-cta.is-visible {
  transform: none;
}

@media (min-width: 768px) {
  .sticky-cta {
    display: none;
  }
}

/* ---------- Motion ----------
   Hero: plays once on load (html.is-loaded is set by main.js after fonts are ready), in the order
   given by --i. Below the fold: .reveal elements animate as they scroll into view (.is-visible). */
:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --enter-step: 90ms;
}

.line {
  display: block;
  overflow: hidden;
  /* room for Persian ascenders/descenders so the mask doesn't clip them */
  padding-block: 0.08em 0.22em;
  margin-block: -0.08em -0.22em;
}

.line__in {
  display: block;
}

.js [data-enter] {
  opacity: 0;
}

.js .line__in {
  transform: translateY(110%);
}

.js.is-loaded [data-enter] {
  animation: enter-up 0.9s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * var(--enter-step) + 60ms);
}

.js.is-loaded [data-enter='rise'] {
  animation: enter-rise 1.2s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * var(--enter-step) + 60ms);
}

.js.is-loaded .line__in {
  animation: line-up 1s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * var(--enter-step) + 60ms);
}

@keyframes enter-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes enter-rise {
  from {
    opacity: 0;
    transform: translateY(64px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes line-up {
  from {
    transform: translateY(110%);
  }
  to {
    transform: none;
  }
}

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0ms);
}

/* phones rise a little further and settle from a slight scale */
.js .phone.reveal {
  transform: translateY(56px) scale(0.95);
  transition-duration: 1s, 1.2s;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation: none !important;
  }

  .js [data-enter],
  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .js .line__in {
    transform: none;
  }
}
