/* =========================================================
   AP Design — platform home page
   One stylesheet, mobile-first, RTL. No framework.
   ========================================================= */

/* ---------- Fonts: Vazirmatn (self-hosted, has چ گ پ ژ ک) ---------- */
/* Ranges copied from @fontsource/vazirmatn (arabic + latin subsets). */
@font-face{font-family:'Vazirmatn';font-style:normal;font-display:swap;font-weight:400;src:url(fonts/vazirmatn-arabic-400-normal.woff2) format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1}
@font-face{font-family:'Vazirmatn';font-style:normal;font-display:swap;font-weight:700;src:url(fonts/vazirmatn-arabic-700-normal.woff2) format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1}
@font-face{font-family:'Vazirmatn';font-style:normal;font-display:swap;font-weight:800;src:url(fonts/vazirmatn-arabic-800-normal.woff2) format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1}
@font-face{font-family:'Vazirmatn';font-style:normal;font-display:swap;font-weight:900;src:url(fonts/vazirmatn-arabic-900-normal.woff2) format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1}
@font-face{font-family:'Vazirmatn';font-style:normal;font-display:swap;font-weight:400;src:url(fonts/vazirmatn-latin-400-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Vazirmatn';font-style:normal;font-display:swap;font-weight:700;src:url(fonts/vazirmatn-latin-700-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Vazirmatn';font-style:normal;font-display:swap;font-weight:800;src:url(fonts/vazirmatn-latin-800-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Vazirmatn';font-style:normal;font-display:swap;font-weight:900;src:url(fonts/vazirmatn-latin-900-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* ---------- Tokens ---------- */
:root{
  --navy:#0B1A2E;
  --navy-2:#102641;
  --teal:#0E5E63;
  --gold:#D4A64A;
  --gold-soft:#F3E6C6;
  --emerald:#167F5B;
  --emerald-ink:#0F5C42;
  --emerald-soft:#E7F3EC;
  --wa:#25D366;
  --bg:#F6F4EF;
  --card:#FFFFFF;
  --ink:#14202E;
  --muted:#3E4652;          /* lightest allowed colour for readable text */
  --line:#E3DED3;
  --on-dark:#FFFFFF;
  --on-dark-2:#DCE4EC;      /* body text on navy (contrast > 11:1) */

  --radius:18px;
  --radius-sm:12px;
  --shadow:0 1px 2px rgba(11,26,46,.06),0 8px 24px rgba(11,26,46,.08);
  --shadow-lg:0 2px 4px rgba(11,26,46,.06),0 18px 44px rgba(11,26,46,.14);
  --gutter:16px;
  --maxw:1040px;
  --font:'Vazirmatn',system-ui,-apple-system,'Segoe UI',Tahoma,Arial,sans-serif;

  /* Faint gold Islamic 8-point-star lattice (used in the hero + share image) */
  --pattern:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='none' stroke='%23D4A64A' stroke-width='1.2'%3E%3Cpath d='M28.6 28.6h30.8v30.8H28.6z'/%3E%3Cpath d='M44 22.2 65.8 44 44 65.8 22.2 44z'/%3E%3Cpath d='M44 0v22.2M44 65.8V88M0 44h22.2M65.8 44H88M0 0l28.6 28.6M88 0 59.4 28.6M0 88l28.6-28.6M88 88 59.4 59.4'/%3E%3Ccircle cx='44' cy='44' r='7'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font);
  font-size:1rem;
  line-height:1.75;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
img,svg{display:block;max-width:100%}
h1,h2,h3,p,ul{margin:0}
ul{padding:0;list-style:none}
a{color:inherit}
button,input,textarea{font:inherit;color:inherit}
:focus-visible{outline:3px solid var(--teal);outline-offset:3px;border-radius:6px}
.on-dark :focus-visible{outline-color:var(--gold)}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.skip{position:absolute;right:12px;top:-60px;z-index:50;background:var(--gold);color:var(--navy);font-weight:700;padding:10px 16px;border-radius:10px;text-decoration:none}
.skip:focus{top:12px}

.wrap{
  width:100%;
  max-width:calc(var(--maxw) + 2 * var(--gutter));
  margin-left:auto;margin-right:auto;
  padding-left:var(--gutter);padding-right:var(--gutter);
  padding-left:max(var(--gutter),env(safe-area-inset-left));
  padding-right:max(var(--gutter),env(safe-area-inset-right));
}
@media (min-width:768px){:root{--gutter:24px}}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  min-height:48px;padding:10px 22px;
  border-radius:14px;border:2px solid transparent;
  font-weight:700;font-size:1.0625rem;line-height:1.3;
  text-decoration:none;cursor:pointer;
  transition:transform .15s ease,box-shadow .15s ease,background-color .15s ease,border-color .15s ease;
  -webkit-tap-highlight-color:transparent;
}
/* Press feedback. Never transform (or filter) a .stretched link: that would make the <a> the
   containing block of its own ::after overlay, shrink it mid-tap and break the whole-card tap. */
.btn:not(.stretched):active{transform:translateY(1px)}
.btn svg{width:22px;height:22px;flex:none}
.btn-gold{background:var(--gold);color:var(--navy);box-shadow:0 6px 18px rgba(212,166,74,.28)}
.btn-gold:hover{background:#E0B65C}
.btn-ghost{background:rgba(255,255,255,.04);color:var(--on-dark);border-color:rgba(255,255,255,.55)}
.btn-ghost:hover{background:rgba(255,255,255,.1);border-color:#fff}
.btn-wa{background:var(--wa);color:var(--ink)}           /* dark text on WhatsApp green: 8.3:1 */
.btn-wa:hover{background:#3BE077}
.btn-app{background:var(--app,var(--emerald));color:#fff} /* white on #167F5B: 5.0:1 */
.btn-app:hover{background:var(--app-dark,var(--emerald-ink))}

/* ---------- Top bar ---------- */
.topbar{background:var(--navy);color:var(--on-dark)}
.topbar__in{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:76px;padding-top:10px;padding-bottom:10px}
.brand{display:inline-flex;align-items:center;gap:10px;text-decoration:none;min-height:44px}
.brand__mono{width:50px;height:50px;flex:none;border-radius:13px;box-shadow:0 4px 14px rgba(0,0,0,.35)}
.brand__word{font-weight:900;font-size:clamp(1.5rem,6.4vw,1.875rem);line-height:1;letter-spacing:.3px;direction:ltr;white-space:nowrap}
.brand__word b{color:var(--gold);font-weight:900}
.topbar .btn-wa{min-height:44px;padding:8px 16px;font-size:1rem;border-radius:12px}
.topbar .btn-wa svg{width:20px;height:20px}

/* ---------- Hero ---------- */
.hero{
  position:relative;isolation:isolate;overflow:hidden;
  color:var(--on-dark);
  background:
    radial-gradient(60% 70% at 15% 85%,rgba(14,94,99,.55),transparent 70%),
    radial-gradient(40% 50% at 90% 0%,rgba(212,166,74,.10),transparent 70%),
    linear-gradient(170deg,var(--navy) 0%,var(--navy-2) 45%,#0D3F4F 80%,var(--teal) 120%);
}
.hero::before{ /* gold geometric pattern, very faint */
  content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;
  background-image:var(--pattern);background-size:88px 88px;background-position:center top;
  opacity:.07;
}
.hero__in{display:flex;flex-direction:column;gap:28px;padding-top:20px;padding-bottom:56px}
.hero__text{display:flex;flex-direction:column;align-items:flex-start;gap:16px}
/* the big «AP Design» wordmark above the slogan — bigger than the h1 on purpose */
.hero-brand{
  direction:ltr;margin:0;
  font-weight:900;font-size:clamp(2.6rem,12vw,4.25rem);line-height:1;letter-spacing:.5px;
  color:#fff;text-shadow:0 4px 22px rgba(0,0,0,.35);
}
.hero-brand b{color:var(--gold);font-weight:900}
.hero h1{font-weight:900;font-size:clamp(1.9rem,8.2vw,3.25rem);line-height:1.3;text-wrap:balance}
.hero h1 .accent{color:var(--gold)}
.lead{color:var(--on-dark-2);font-size:clamp(1.0625rem,4.2vw,1.25rem);line-height:1.85;max-width:34em}
.hero__cta{display:flex;flex-wrap:wrap;gap:12px;margin-top:6px;width:100%}
.hero__cta .btn{flex:1 1 180px}
/* Phones: both hero buttons side by side, so both fit on the first screen (they wrap below ~330px) */
@media (max-width:599.98px){
  .hero__in{gap:22px;padding-top:16px}
  .hero__cta .btn{flex:1 1 140px;padding-left:10px;padding-right:10px;font-size:1rem}
}

/* Hero art — the header picture in a 16:9 frame */
.hero-art{
  order:-1; /* mobile: art first */
  position:relative;width:100%;
  border-radius:20px;overflow:hidden;
  background:#0B1A2E; /* same navy as the picture's corners while it loads */
  border:1px solid rgba(212,166,74,.28);
  box-shadow:0 24px 60px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.08);
}
.hero-art::after{content:"";display:block;padding-top:56.25%} /* 16:9 box that works in every browser */
.hero-art__img{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover}

@media (min-width:900px){
  .hero__in{display:grid;grid-template-columns:1fr 1.08fr;align-items:center;gap:48px;padding-top:48px;padding-bottom:88px}
  .hero-art{order:0}
  .hero__cta .btn{flex:0 0 auto}
  .hero__cta{width:auto}
}

/* ---------- Sections ---------- */
.section{padding-top:56px;padding-bottom:56px}
.section + .section{padding-top:8px}
@media (min-width:900px){.section{padding-top:80px;padding-bottom:80px}.section + .section{padding-top:16px}}
:where(#apps,#why,#custom){scroll-margin-top:12px}
.section__head{margin-bottom:24px}
.section__head h2{font-weight:900;font-size:clamp(1.6rem,6.4vw,2.25rem);line-height:1.35}
.section__head h2::after{content:"";display:block;width:56px;height:4px;margin-top:10px;border-radius:4px;background:var(--gold)}
.section__head p{color:var(--muted);margin-top:10px;font-size:1.0625rem;max-width:40em}

/* ---------- App icons (like a phone's home screen): tap → jumps to the app's card ---------- */
.app-icons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px 8px;margin:0 0 28px;padding:16px 8px;border-radius:20px;background:var(--card);border:1px solid var(--line);box-shadow:var(--shadow)}
@media (min-width:768px){.app-icons{grid-template-columns:repeat(6,minmax(0,1fr));padding:20px 16px}}
.app-icon{position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;min-height:44px;padding:4px 2px;border-radius:14px;text-decoration:none;color:var(--ink)}
.app-icon img{width:64px;height:64px;border-radius:16px;box-shadow:0 6px 16px rgba(11,26,46,.18);background:#fff}
.app-icon span{max-width:100%;font-weight:800;font-size:.9375rem;line-height:1.4;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-icon .free{font-style:normal;position:absolute;top:-6px;left:calc(50% - 42px);padding:1px 7px;border-radius:999px;font-size:.75rem;font-weight:800;line-height:1.6;background:#FBF1DA;color:#6B4E10;border:1px solid #EBD49B;white-space:nowrap}
.app-icon:hover img{transform:translateY(-2px)}
.app-icon img{transition:transform .15s ease}
.app-icon:focus-visible{outline:3px solid var(--teal);outline-offset:2px}
/* the card it jumps to: room above it, and a short glow so the eye finds it */
.app-card{scroll-margin-top:16px}
.app-card:target{animation:app-found 1.8s ease-out 1}
@keyframes app-found{0%,30%{box-shadow:0 0 0 4px var(--app),var(--shadow-lg)}100%{box-shadow:var(--shadow)}}
@media (prefers-reduced-motion:reduce){.app-card:target{animation:none;box-shadow:0 0 0 3px var(--app),var(--shadow)}.app-icon img{transition:none}}

/* ---------- App cards ---------- */
/* 1 app  -> wide horizontal feature card (via :only-child)
   2+ apps -> normal cards: auto-fit gives 1 col on phones, 2 on tablets, up to 3 on desktop,
              and 2 apps share the full row instead of leaving an empty third column.
   No CSS change needed when apps are added. */
.app-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:20px}

.app-card{
  --app:var(--emerald);--app-dark:var(--emerald-ink);--app-soft:var(--emerald-soft);
  position:relative;display:flex;flex-direction:column;
  background:var(--card);border:1px solid var(--line);border-radius:20px;
  box-shadow:var(--shadow);overflow:hidden;
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}
.app-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-lg);border-color:#9BBDA9}
.app-card:focus-within{box-shadow:var(--shadow-lg),0 0 0 3px var(--teal)}
.app-card__head{
  display:flex;align-items:center;gap:16px;padding:20px 20px 18px;
  background:linear-gradient(160deg,var(--app-soft),#fff 85%);
  border-bottom:1px solid var(--line);
}
.app-card__icon{width:76px;height:76px;flex:none;border-radius:20px;box-shadow:0 8px 20px rgba(11,26,46,.16);background:#fff}
.app-card__name{font-weight:900;font-size:1.6rem;line-height:1.3;color:var(--ink)}
.app-card__tag{color:var(--muted);font-weight:700;font-size:1rem;line-height:1.6;margin-top:2px}
.app-card__body{display:flex;flex-direction:column;gap:18px;padding:20px;flex:1}

.checks{display:flex;flex-direction:column;gap:12px}
.checks li{display:flex;gap:12px;align-items:flex-start;font-size:1.0625rem;line-height:1.7}
.checks svg{width:24px;height:24px;flex:none;margin-top:3px;color:var(--app)}

.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:999px;font-weight:700;font-size:.9375rem;line-height:1.5;background:var(--app-soft);color:var(--app-dark);border:1px solid #C9E2D5}
.chip--gold{background:#FBF1DA;color:#6B4E10;border-color:#EBD49B}

.price{font-size:1rem;color:var(--muted);line-height:1.8;padding:12px 14px;border-radius:var(--radius-sm);background:#F8F6F1;border:1px dashed #D9D2C2}
.price strong{color:var(--ink);font-weight:800}
.price .nw{white-space:nowrap}
.app-card .btn-app{margin-top:auto;width:100%;min-height:52px;font-size:1.125rem}
/* Phones/tablets (stacked card): download button right under the chips («10 أيام مجاناً»), price line after it,
   and «شوف التطبيقات» lands with the heading near the top, so the button is visible straight away. */
@media (max-width:767.98px){
  .app-card .price{order:1}
  #apps{scroll-margin-top:-28px}
}

/* Whole card tappable: the one real link stretches over the card (no nested anchors). */
.stretched::after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;border-radius:20px}
.app-card .btn-app:active{background:var(--app-dark);box-shadow:inset 0 2px 8px rgba(0,0,0,.28)} /* press feedback without transform */

/* Per-app tints derived from --app. Inside @supports because a color-mix() that contains var()
   would wipe the plain fallback on older Android WebViews (Chromium < 111). */
@supports (color:color-mix(in srgb,red 50%,blue)){
  .app-card:hover{border-color:color-mix(in srgb,var(--app) 35%,var(--line))}
  .chip{border-color:color-mix(in srgb,var(--app) 22%,transparent)}
  .chip--gold{border-color:#EBD49B}
}

/* Single app: wide horizontal feature card */
@media (min-width:768px){
  .app-card:only-child{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)}
  .app-card:only-child .app-card__head{
    flex-direction:column;align-items:flex-start;justify-content:center;gap:18px;
    padding:40px 36px;border-bottom:0;border-inline-end:1px solid var(--line);
    background:linear-gradient(170deg,var(--app-soft),#fff 90%);
  }
  .app-card:only-child .app-card__icon{width:112px;height:112px;border-radius:28px}
  .app-card:only-child .app-card__name{font-size:2.25rem}
  .app-card:only-child .app-card__tag{font-size:1.1875rem}
  .app-card:only-child .app-card__body{padding:36px}
  .app-card:only-child .btn-app{width:auto;align-self:flex-start;padding-inline:32px}
}
@supports (color:color-mix(in srgb,red 50%,blue)){
  @media (min-width:768px){
    .app-card:only-child .app-card__head{
      background:
        radial-gradient(80% 70% at 100% 0%,color-mix(in srgb,var(--app) 16%,transparent),transparent 70%),
        linear-gradient(170deg,var(--app-soft),#fff 90%);
    }
  }
}

/* ---------- Why ---------- */
.why-grid{display:grid;grid-template-columns:1fr;gap:14px}
.why{display:flex;gap:16px;align-items:flex-start;background:var(--card);border:1px solid var(--line);border-radius:18px;padding:18px;box-shadow:0 1px 2px rgba(11,26,46,.04)}
.why__icon{width:48px;height:48px;flex:none;display:grid;place-items:center;border-radius:14px;background:#E3F0F0;color:var(--teal)}
.why__icon svg{width:26px;height:26px}
.why h3{font-weight:800;font-size:1.125rem;line-height:1.5}
.why p{color:var(--muted);font-size:1rem;line-height:1.75;margin-top:2px}
@media (min-width:640px){.why-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* 2 per row: centre a lonely last card (4-column track, each card spans 2) */
@media (min-width:640px) and (max-width:999.98px){
  .why-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .why{grid-column:span 2}
  .why:last-child:nth-child(odd){grid-column:2/span 2}
}
@media (min-width:1000px){
  .why-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:18px}
  .why{grid-column:span 2;flex-direction:column;gap:12px;padding:22px}
  .why:nth-child(4){grid-column:2/span 2}
}

/* ---------- Custom app request ---------- */
.custom{
  background:var(--card);border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow);
  padding:24px 18px;display:grid;gap:28px;position:relative;overflow:hidden;
}
.custom::before{content:"";position:absolute;top:0;right:0;left:0;height:6px;background:linear-gradient(90deg,var(--gold),var(--teal),var(--navy))}
.custom__intro h2{font-weight:900;font-size:clamp(1.6rem,6.4vw,2.25rem);line-height:1.35}
.custom__intro h2::after{content:"";display:block;width:56px;height:4px;margin-top:10px;border-radius:4px;background:var(--gold)}
.custom__intro p{color:var(--muted);font-size:1.0625rem;margin-top:12px}
.examples{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}
/* Examples are inspiration only (not clickable): flat tags, no border, normal weight, so they do not read as buttons */
.examples li{display:inline-flex;align-items:center;gap:7px;padding:4px 12px;border-radius:8px;background:#F1EEE6;color:var(--navy-2);font-weight:400;font-size:.9375rem;line-height:1.6;cursor:default}
.examples li::before{content:"";width:6px;height:6px;flex:none;border-radius:50%;background:var(--gold)}

.form{display:flex;flex-direction:column;gap:16px;background:#FAF8F3;border:1px solid var(--line);border-radius:18px;padding:18px}
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-weight:800;font-size:1rem}
.field input,.field textarea{
  width:100%;min-height:50px;padding:12px 14px;
  background:#fff;border:1.5px solid #8A8475;border-radius:12px; /* >= 3:1 against white and the form panel */
  font-size:1.0625rem;line-height:1.6;
  transition:border-color .15s ease,box-shadow .15s ease;
}
.field textarea{min-height:128px;resize:vertical}
.field input::placeholder,.field textarea::placeholder{color:var(--muted);opacity:1} /* never paler than --muted */
.field input:focus,.field textarea:focus{outline:none;border-color:var(--teal);box-shadow:0 0 0 3px rgba(14,94,99,.55)}
.field [aria-invalid="true"],
.field [aria-invalid="true"]:focus{border-color:#B42318;box-shadow:0 0 0 3px rgba(180,35,24,.3)}
.field-error{color:#B42318;font-weight:700;font-size:.9375rem;line-height:1.6}
.field-error:empty{margin-top:-6px} /* stays in the a11y tree (live region) but takes no space */
.form .btn-wa{width:100%;min-height:54px;font-size:1.125rem}
.form__note{color:var(--muted);font-size:.9375rem;text-align:center;line-height:1.6;text-wrap:balance}

/* Phones: no panel-inside-a-card, so the inputs get the full width */
@media (max-width:599.98px){
  .form{padding:0;border:0;border-radius:0;background:none}
}
@media (min-width:900px){
  .custom{grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:44px;padding:44px}
  .custom__intro{align-self:center}
  .form{padding:24px}
}

/* ---------- Contact strip + footer ---------- */
.contact{background:var(--navy);color:var(--on-dark);position:relative;overflow:hidden;isolation:isolate}
.contact::before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;background-image:var(--pattern);background-size:88px 88px;opacity:.06}
.contact__in{display:flex;flex-direction:column;align-items:flex-start;gap:16px;padding-top:36px;padding-bottom:36px}
.contact__text{font-weight:800;font-size:clamp(1.25rem,5vw,1.6rem);line-height:1.5}
.contact .btn-wa{width:100%}
@media (min-width:640px){
  .contact__in{flex-direction:row;align-items:center;justify-content:space-between}
  .contact .btn-wa{width:auto;padding-inline:28px}
}
.footer{background:#081322;color:#C9D3DE;font-size:.9375rem}
.footer__in{padding-top:20px;padding-bottom:20px;padding-bottom:calc(20px + env(safe-area-inset-bottom));text-align:center}
.footer bdi{font-weight:700;color:#fff}

/* ---------- 404 ---------- */
.nf{min-height:70vh;display:grid;place-items:center;text-align:center;padding-top:64px;padding-bottom:64px}
.nf h1{font-weight:900;font-size:clamp(1.6rem,6vw,2.4rem);line-height:1.4}
.nf p{color:var(--muted);margin:10px 0 24px}
.nf__cta{display:flex;flex-wrap:wrap;justify-content:center;gap:12px}
