/* =========================================================
   MIFTAH · مفتاح للصيانة العامة
   Identity: "Key Tag" — brass, ink, paper, teal.
   ========================================================= */

:root {
  --ink: #141414;
  --ink-2: #2A2A2A;
  --paper: #F4EEE2;
  --paper-2: #EAE2D1;
  --brass: #F5B301;
  --teal: #0E6E6B;
  --coral: #FF5B3A;
  --muted: #4A4740;
  --wa: #1FA855;

  --bw: 3px;
  --sh: 6px;
  --r: 18px;
  --r-lg: 28px;

  --f-display: "Lalezar", "Readex Pro", system-ui, sans-serif;
  --f-body: "Readex Pro", "Segoe UI", Tahoma, system-ui, sans-serif;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

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

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

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  font: 600 17px/1 var(--f-body);
  text-decoration: none; cursor: pointer;
  border: var(--bw) solid var(--ink); border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn .ic { width: 22px; height: 22px; }

.btn--wa { background: var(--wa); color: #fff; }
.btn--wa .ic { color: #fff; }
.btn--paper { background: var(--paper); color: var(--ink); }
.btn--ink { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--brass); }
.btn--ink:hover { box-shadow: 1px 1px 0 var(--brass); }
.btn--sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn--block { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 12px; z-index: 50;
  padding-inline: 12px;
}
.nav__inner {
  width: min(1180px, 100%); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 10px;
  background: rgba(244, 238, 226, .92);
  backdrop-filter: blur(10px);
  border: var(--bw) solid var(--ink); border-radius: 22px;
  box-shadow: 4px 4px 0 var(--ink);
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 46px; height: 46px; transition: transform .4s var(--ease); }
.brand:hover .brand__mark { transform: rotate(-12deg); }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--f-display); font-size: 30px; line-height: 1.05; }
.brand__sub { font-size: 12px; font-weight: 500; color: var(--teal); letter-spacing: .5px; }

.nav__links { display: flex; gap: 4px; }
.nav__links a {
  text-decoration: none; font-weight: 500; font-size: 15px;
  padding: 8px 14px; border-radius: 999px;
  transition: background-color .18s;
}
.nav__links a:hover { background: var(--brass); }
.nav__mobile-cta { display: none; }

.nav__actions { display: flex; align-items: center; gap: 8px; }
.nav__toggle {
  display: none; width: 44px; height: 44px; place-items: center;
  border: var(--bw) solid var(--ink); border-radius: 12px; background: var(--brass);
  cursor: pointer; color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin-top: -84px; padding-top: 120px;
  background:
    linear-gradient(var(--paper-2) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--paper-2) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--paper);
  overflow: hidden;
}
.hero__grid {
  display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 24px;
  padding-block: 40px 56px;
}

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; font-size: 14px; font-weight: 600;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px;
}
.chip .ic { width: 16px; height: 16px; color: var(--coral); }

.hero__title {
  margin-top: 20px;
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(46px, 7.2vw, 96px); line-height: 1.12;
}
.hero__accent { display: block; }
.hero__accent mark {
  background: none; color: inherit; position: relative; z-index: 0; white-space: nowrap;
  padding-inline: 6px;
}
.hero__accent mark::before {
  content: ""; position: absolute; inset: 52% -4px 6% -4px; z-index: -1;
  background: var(--brass); border-radius: 8px; transform: rotate(-1.5deg);
}
.hero__lead {
  margin-top: 20px; max-width: 56ch; text-wrap: pretty;
  font-size: clamp(17px, 1.6vw, 19px); color: var(--muted);
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero__notes { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; font-size: 15px; font-weight: 500; }
.hero__notes li { display: inline-flex; align-items: center; gap: 6px; }
.hero__notes .ic { width: 18px; height: 18px; color: var(--teal); }

.hero__art { position: relative; justify-self: center; width: min(440px, 100%); }
.ring { width: 100%; height: auto; overflow: visible; }
.tagtxt { font-family: var(--f-display); font-size: 26px; }
.tagic { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.sticker {
  position: absolute; inset-inline-start: 0; bottom: 18%;
  width: 104px; height: 104px; display: grid; place-items: center; text-align: center;
  font-family: var(--f-display); font-size: 19px; line-height: 1.15;
  background: var(--coral); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: 50%;
  transform: rotate(-12deg);
  box-shadow: 4px 4px 0 var(--ink);
}

/* tape measure ticker */
.tape {
  position: relative;
  background: var(--brass);
  border-block: var(--bw) solid var(--ink);
  overflow: hidden;
  transform: rotate(-1deg) scale(1.02);
  margin-bottom: 12px;
}
.tape::before {
  /* tick marks like a measuring tape */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 12px;
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 10px),
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 50px);
  background-size: auto 7px, auto 12px; background-repeat: repeat-x;
  opacity: .8;
}
.tape__track {
  display: flex; width: max-content; gap: 0;
  padding: 20px 0 12px;
  animation: tape 40s linear infinite;
}
.tape__track span {
  font-family: var(--f-display); font-size: 24px; white-space: nowrap;
  padding-inline: 22px; position: relative;
}
.tape__track span::after {
  content: ""; position: absolute; inset-inline-end: -5px; top: 50%;
  width: 10px; height: 10px; border-radius: 50%; background: var(--ink);
  transform: translateY(-50%);
}
@keyframes tape { to { transform: translateX(50%); } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 10vw, 120px); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--teal { background: var(--teal); color: var(--paper); }

.head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 48px; max-width: 760px; }
.head__num {
  flex: none; font-family: var(--f-display); font-size: 22px; line-height: 1;
  padding: 10px 12px 6px; border: var(--bw) solid currentColor; border-radius: 12px;
  margin-top: 8px;
}
.head h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(36px, 5vw, 60px); }
.head p { margin-top: 12px; font-size: 18px; color: var(--muted); max-width: 60ch; }
.head--light p { color: rgba(244, 238, 226, .82); }
.u {
  background: linear-gradient(transparent 62%, var(--brass) 62%, var(--brass) 90%, transparent 90%);
  padding-inline: 4px;
}
.section--ink .u, .section--teal .u { background: none; color: var(--brass); }

/* ---------- Service key tags ---------- */
.tags {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 22px;
}
.tag {
  position: relative;
  padding: 58px 22px 26px;
  background: var(--c, var(--brass));
  border: var(--bw) solid var(--ink);
  border-radius: var(--r);
  /* chamfered top like a key tag */
  clip-path: polygon(22% 0, 78% 0, 100% 14%, 100% 100%, 0 100%, 0 14%);
  transition: transform .35s var(--ease);
  transform-origin: 50% 0;
  cursor: default;
}
.tag::before {
  /* drawn border on the chamfered edges (clip-path cuts the real border) */
  content: ""; position: absolute; inset: -3px; pointer-events: none;
  background:
    linear-gradient(to bottom left, transparent calc(50% - 2px), var(--ink) calc(50% - 2px), var(--ink) calc(50% + 2px), transparent calc(50% + 2px)) 100% 0 / 22.5% 14.5% no-repeat,
    linear-gradient(to bottom right, transparent calc(50% - 2px), var(--ink) calc(50% - 2px), var(--ink) calc(50% + 2px), transparent calc(50% + 2px)) 0 0 / 22.5% 14.5% no-repeat;
}
.tag:hover { transform: rotate(-2.5deg); }
.tag:nth-child(even):hover { transform: rotate(2.5deg); }
.tag__hole {
  position: absolute; top: 18px; inset-inline-start: 50%; translate: 50% 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--paper); border: var(--bw) solid var(--ink);
}
.tag__ic {
  width: 44px; height: 44px; padding: 9px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 12px;
  fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.tag h3 { margin-top: 16px; font-family: var(--f-display); font-weight: 400; font-size: 26px; }
.tag p { margin-top: 6px; font-size: 15.5px; line-height: 1.7; color: var(--ink-2); }

/* ---------- Steps ---------- */
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  counter-reset: s; position: relative;
}
.steps::before {
  content: ""; position: absolute; top: 46px; inset-inline: 10% 10%;
  border-top: 3px dashed rgba(244, 238, 226, .35);
}
.step {
  position: relative;
  padding: 28px 26px 30px;
  background: var(--ink-2);
  border: 2px solid rgba(244, 238, 226, .18); border-radius: var(--r-lg);
}
.step__n {
  display: grid; place-items: center;
  width: 64px; height: 64px; margin-bottom: 18px;
  font-family: var(--f-display); font-size: 34px; line-height: 1; padding-top: 6px;
  background: var(--brass); color: var(--ink);
  border: var(--bw) solid var(--paper); border-radius: 50%;
}
.step:nth-child(2) .step__n { background: var(--coral); }
.step:nth-child(3) .step__n { background: #7FC8C3; }
.step h3 { font-family: var(--f-display); font-weight: 400; font-size: 32px; }
.step p { margin-top: 8px; color: rgba(244, 238, 226, .82); }

/* ---------- Why / receipt ---------- */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.receipt {
  position: relative;
  background: #FFFDF8;
  border: var(--bw) solid var(--ink);
  padding: 30px 30px 26px;
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(1.2deg);
  /* zigzag bottom edge */
  --z: 14px;
  mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--z)) 100%;
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--z)) 100%;
  padding-bottom: 44px;
}
.receipt__head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--f-display); font-size: 28px;
  padding-bottom: 14px; border-bottom: 3px dashed var(--ink);
}
.receipt__no { font-family: var(--f-body); font-size: 14px; color: var(--muted); letter-spacing: 1px; }
.receipt ul { display: grid; gap: 4px; padding-block: 10px; }
.receipt li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed rgba(20, 20, 20, .25); }
.receipt li .ic { width: 26px; height: 26px; color: var(--teal); margin-top: 4px; }
.receipt strong { display: block; font-size: 18px; }
.receipt li span { display: block; color: var(--muted); font-size: 15.5px; }
.receipt__foot {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 12px; border-top: 3px double var(--ink); margin-top: 6px;
  font-weight: 600;
}
.receipt__foot strong { font-family: var(--f-display); font-weight: 400; font-size: 30px; color: var(--coral); }

/* ---------- Area ---------- */
.area { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: center; }
.areas { display: flex; flex-wrap: wrap; gap: 10px; }
.areas li {
  padding: 8px 18px; font-weight: 500;
  border: 2px solid var(--paper); border-radius: 999px;
}
.areas li:last-child { border-style: dashed; opacity: .85; }
.map svg { width: 100%; max-width: 320px; margin-inline: auto; }
.maptxt { font-family: var(--f-display); font-size: 28px; }
.map circle:nth-of-type(3) { animation: pulse 2.6s var(--ease) infinite; transform-origin: 150px 150px; }
@keyframes pulse { 50% { transform: scale(1.25); opacity: .6; } }

/* ---------- Request ---------- */
.request { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.contact-cards { display: grid; gap: 14px; max-width: 380px; }
.ccard {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; text-decoration: none;
  background: #FFFDF8; border: var(--bw) solid var(--ink); border-radius: var(--r);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.ccard:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.ccard .ic { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--brass); color: var(--ink); }
.ccard--wa .ic { background: var(--wa); color: #fff; }
.ccard small { display: block; color: var(--muted); font-size: 13px; }
.ccard strong { font-size: 20px; letter-spacing: .5px; }

.form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  padding: 30px;
  background: var(--brass);
  border: var(--bw) solid var(--ink); border-radius: var(--r-lg);
  box-shadow: 8px 8px 0 var(--ink);
}
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 15px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: 400 16px/1.5 var(--f-body); color: var(--ink);
  background: var(--paper); border: 2px solid var(--ink); border-radius: 12px;
  transition: box-shadow .18s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; box-shadow: 0 0 0 4px var(--ink);
}
.field input::placeholder, .field textarea::placeholder { color: #7A756B; }
.err { display: none; color: #8A1C07; font-weight: 600; font-size: 14px; }
.field.is-invalid .err { display: block; }
.field.is-invalid input { border-color: #8A1C07; }
.form .btn { grid-column: 1 / -1; margin-top: 4px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--paper); padding-top: 64px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.brand--light .brand__sub { color: var(--brass); }
.footer__brand p { margin-top: 14px; font-family: var(--f-display); font-size: 28px; color: var(--brass); }
.footer h4 { font-size: 15px; font-weight: 600; color: rgba(244, 238, 226, .65); margin-bottom: 14px; }
.footer__list { display: grid; gap: 10px; }
.footer__list li { display: flex; align-items: center; gap: 10px; }
.footer__list .ic { color: var(--brass); }
.footer__list a { text-decoration: none; }
.footer__list a:hover { color: var(--brass); }
.socials { display: flex; gap: 10px; }
.social {
  display: grid; place-items: center; width: 48px; height: 48px;
  border: 2px solid var(--paper); border-radius: 14px;
  transition: background-color .18s, color .18s;
}
.social:hover { background: var(--brass); color: var(--ink); border-color: var(--brass); }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-block: 20px; border-top: 1px solid rgba(244, 238, 226, .15);
  font-size: 14px; color: rgba(244, 238, 226, .65);
}
.footer__bottom a { text-decoration: none; }
.footer__bottom a:hover { color: var(--brass); }

/* ---------- Floating WhatsApp ---------- */
.fab {
  position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 40;
  display: grid; place-items: center; width: 60px; height: 60px;
  background: var(--wa); color: #fff;
  border: var(--bw) solid var(--ink); border-radius: 50%;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.fab .ic { width: 30px; height: 30px; }
.fab:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; translate: 0 24px; transition: opacity .6s var(--ease), translate .6s var(--ease), transform .35s var(--ease); }
.reveal.is-in { opacity: 1; translate: 0 0; }
.no-js .reveal { opacity: 1; translate: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .tags { grid-template-columns: repeat(2, 1fr); }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { width: min(380px, 90%); }
  .why, .request { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav__toggle { display: grid; }
  .nav__links {
    position: absolute; top: calc(100% + 8px); inset-inline: 12px;
    flex-direction: column; gap: 2px; padding: 10px;
    background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 18px;
    box-shadow: 4px 4px 0 var(--ink);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 12px 14px; font-size: 17px; }
  .nav__mobile-cta { display: block; background: var(--brass); text-align: center; font-weight: 700; margin-top: 4px; }
  .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .area { grid-template-columns: 1fr; }
  .map { display: none; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav__actions .btn--sm span { display: none; }
  .nav__actions .btn--sm { width: 44px; padding: 0; }
  .brand__mark { width: 40px; height: 40px; }
  .brand__name { font-size: 26px; }
  .tags { grid-template-columns: 1fr; }
  .head { flex-direction: column; gap: 10px; }
  .head__num { margin-top: 0; }
  .form { grid-template-columns: 1fr; padding: 22px; }
  .hero__ctas .btn { flex: 1 1 100%; }
  .sticker { width: 84px; height: 84px; font-size: 16px; }
  .receipt { transform: none; padding-inline: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; translate: none; }
}
