/* Phirly Technologies (phirly.in): one stylesheet for every page. */
:root {
  --blue: #0b4fe0;
  --blue-dark: #083cb0;
  --blue-bright: #1f6bff;
  --blue-deep: #0a3fd0;
  --blue-tint: #e6eeff;
  --ink: #0e1730;
  --ink-2: #25304a;
  --muted: #3b4866;
  --muted-2: #4a5878;
  --line: #e3e8f2;
  --line-2: #d5dcea;
  --bg: #f6f8fc;
  --white: #ffffff;
  --navy: #0e1a3a;
  --navy-line: #2a3a66;
  --on-navy: #c9d3ea;
  --on-navy-2: #9db0d8;
  --gold: #e5c46b;
  --radius-lg: 24px;
  --shadow-card: 0 24px 60px rgba(14, 23, 48, 0.12);
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
h1, h2, h3 { font-family: var(--font-head); margin: 0; }
p { margin: 0; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.eyebrow { font-weight: 600; color: var(--blue); font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.h2 { font-weight: 700; font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.02em; line-height: 1.12; margin: 12px 0 14px; }
.lead { font-size: 18px; color: var(--muted); line-height: 1.6; max-width: 640px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--white); padding: 10px 16px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 3px; border-radius: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none; border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
  cursor: pointer; font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: var(--white); box-shadow: 0 8px 20px rgba(11, 79, 224, 0.25); }
.btn-primary:hover { background: var(--blue-dark); color: var(--white); box-shadow: 0 12px 28px rgba(11, 79, 224, 0.32); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { color: var(--ink); box-shadow: 0 8px 20px rgba(14, 23, 48, 0.08); }
.btn-small { min-height: 42px; padding: 0 20px; font-size: 15px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 248, 252, 0.88);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { height: 40px; width: auto; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.brand-name span { font-weight: 500; color: var(--muted-2); }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.nav a:not(.btn) { color: var(--ink-2); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .25s ease, color .2s ease; padding: 4px 0; }
.nav a:not(.btn):hover, .nav a[aria-current="page"]:not(.btn) { color: var(--blue); background-size: 100% 2px; }
@media (max-width: 720px) {
  .nav a:not(.btn) { display: none; }
  .brand-name { font-size: 18px; }
}

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero-glow {
  position: absolute; right: -180px; top: -220px; width: 760px; height: 760px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(31, 107, 255, 0.20), rgba(31, 107, 255, 0) 65%);
  animation: glow 9s ease-in-out infinite; pointer-events: none;
}
.hero .container { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 96px; padding-bottom: 96px; position: relative; }
.hero-copy { flex: 999 1 520px; min-width: 0; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--blue-tint); color: var(--blue); font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 999px; letter-spacing: 0.04em; }
.hero h1 { font-weight: 700; font-size: clamp(40px, 6vw, 68px); line-height: 1.04; letter-spacing: -0.03em; margin: 22px 0; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero .lead { font-size: 19px; max-width: 580px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }

.hero-art { flex: 1 1 380px; min-width: 0; display: flex; justify-content: center; }
.stack { position: relative; width: 380px; max-width: 100%; height: 400px; }
.stack .tile { position: absolute; }
.stack .tile-inner {
  background: var(--white); border-radius: 26px; box-shadow: var(--shadow-card);
  padding: 14px; animation: float 6s ease-in-out infinite;
}
.stack .tile img { border-radius: 16px; width: 100%; }
.tile-azan { right: 0; top: 0; width: 150px; transform: rotate(7deg); }
.tile-azan .tile-inner { animation-delay: -2s; box-shadow: 0 20px 50px rgba(14, 23, 48, 0.10); }
.tile-space { left: 0; top: 30px; width: 160px; transform: rotate(-7deg); }
.tile-space .tile-inner { animation-delay: -4s; }
.tile-phirly { left: 90px; bottom: 0; width: 210px; transform: rotate(-1deg); z-index: 2; }
.tile-phirly .tile-inner { padding: 18px; border-radius: 30px; box-shadow: 0 30px 70px rgba(14, 23, 48, 0.18); animation-duration: 7s; }
.tile-phirly img { aspect-ratio: 1 / 1; object-fit: contain; background: var(--white); }
@media (max-width: 480px) {
  .stack { height: 340px; }
  .tile-azan { width: 120px; } .tile-space { width: 128px; } .tile-phirly { width: 180px; left: 60px; }
}

/* Products */
.products { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.products .lead { margin-bottom: 48px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.product {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px;
  display: flex; flex-direction: column; gap: 18px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.product:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(14, 23, 48, 0.10); }
.product-icon { width: 72px; height: 72px; border-radius: 18px; background: var(--white); }
.product h3 { font-size: 26px; margin-bottom: 6px; }
.product .tag { color: var(--blue); font-weight: 600; }
.product p, .product li { color: var(--muted); line-height: 1.6; }
.product ul { margin: 0; padding-left: 20px; line-height: 1.9; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.chip { background: var(--white); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 500; }
.product-link { font-weight: 600; text-decoration: none; }
.product-link span { display: inline-block; transition: transform .2s ease; }
.product-link:hover span { transform: translateX(4px); }
.product-dark { background: var(--navy); border-color: var(--navy); color: var(--white); }
.product-dark .tag { color: var(--gold); }
.product-dark p, .product-dark li { color: var(--on-navy); }
.product-dark .chip { background: transparent; border-color: #3a4a78; color: var(--white); }
.product-dark .product-link { color: #9db9ff; }
.product-dark .product-link:hover { color: var(--white); }

/* Principles */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 48px; }
.principle { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 28px; transition: transform .25s ease, box-shadow .25s ease; }
.principle:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(14, 23, 48, 0.08); }
.principle svg { width: 40px; height: 40px; }
.principle h3 { font-size: 20px; margin: 16px 0 8px; }
.principle p { color: var(--muted); line-height: 1.6; }

/* About */
.about { background: var(--navy); color: var(--white); }
.about .eyebrow { color: #9db9ff; }
.about .container { display: flex; flex-wrap: wrap; gap: 56px; }
.about-copy { flex: 999 1 520px; min-width: 0; }
.about-copy p { font-size: 18px; color: var(--on-navy); line-height: 1.7; margin-bottom: 16px; }
.facts { flex: 1 1 340px; min-width: 0; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--navy-line); border-radius: var(--radius-lg); padding: 32px; align-self: flex-start; }
.facts h3 { font-size: 20px; margin-bottom: 20px; }
.facts dl { margin: 0; display: grid; gap: 16px; font-size: 15px; }
.facts dt { color: var(--on-navy-2); }
.facts dd { margin: 4px 0 0; font-weight: 500; }

/* Call to action band */
.cta {
  background: linear-gradient(135deg, var(--blue-bright), var(--blue-deep)); color: var(--white);
  border-radius: 32px; padding: 56px 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
  position: relative; overflow: hidden;
}
.cta::after { content: ""; position: absolute; right: -80px; top: -120px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); pointer-events: none; }
.cta-copy { flex: 999 1 420px; min-width: 0; position: relative; }
.cta h2 { font-weight: 700; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.02em; margin-bottom: 10px; }
.cta p { font-size: 18px; color: #dce6ff; line-height: 1.6; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; position: relative; }
.btn-white { background: var(--white); color: #0b3fc0; }
.btn-white:hover { color: #0b3fc0; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18); }
.btn-outline-white { color: var(--white); border-color: rgba(255, 255, 255, 0.55); }
.btn-outline-white:hover { color: var(--white); background: rgba(255, 255, 255, 0.1); }
@media (max-width: 560px) { .cta { padding: 40px 24px; border-radius: 24px; } }

/* Contact page */
.contact .container { display: flex; flex-wrap: wrap; gap: 48px; padding-top: 80px; padding-bottom: 96px; }
.contact-main { flex: 999 1 520px; min-width: 0; }
.contact h1 { font-weight: 700; font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.03em; margin: 12px 0 16px; }
.contact .lead { margin-bottom: 36px; max-width: 560px; }
.form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; font-weight: 500; font-size: 14px; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; font-weight: 400; color: var(--ink);
  padding: 13px 16px; border: 1px solid #cbd3e3; border-radius: 12px; background: #fbfcfe;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(11, 79, 224, 0.12); }
.field textarea { resize: vertical; min-height: 140px; }
.form .btn { justify-self: start; }
.form-note { font-size: 14px; color: var(--muted-2); }
.form-note.is-error { color: #a4302a; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile:empty { display: none; }
.form-done { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 48px 32px; text-align: center; }
.form-done svg { width: 56px; height: 56px; margin: 0 auto 16px; }
.form-done h2 { font-size: 26px; margin-bottom: 8px; }
.form-done p { color: var(--muted); font-size: 17px; }
.form-done:focus { outline: none; }
.contact-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.info { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; gap: 16px; align-items: flex-start; }
.info svg { width: 28px; height: 28px; flex: none; }
.info strong { display: block; margin-bottom: 4px; }
.info-note { border: 1px dashed #cbd3e3; border-radius: 20px; padding: 20px 24px; font-size: 15px; color: var(--muted); line-height: 1.6; }

/* 404 */
.notfound { text-align: center; padding: 120px 0; }
.notfound .code { font-family: var(--font-head); font-weight: 700; font-size: clamp(72px, 14vw, 140px); color: var(--blue); letter-spacing: -0.04em; line-height: 1; }
.notfound h1 { font-size: clamp(26px, 4vw, 36px); margin: 16px 0 12px; }
.notfound p { color: var(--muted); font-size: 18px; margin-bottom: 32px; }
.notfound .hero-actions { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--white); font-size: 14px; color: var(--muted-2); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; padding-top: 40px; padding-bottom: 40px; }
.foot-brand { display: flex; flex-direction: column; gap: 8px; min-width: 240px; }
.foot-brand .brand-name { font-size: 17px; color: var(--ink); }
.foot-cols { display: flex; gap: 48px; flex-wrap: wrap; }
.foot-col { display: flex; flex-direction: column; gap: 8px; }
.foot-col strong { color: var(--ink); }
.foot-col a { text-decoration: none; }
.foot-col a:hover { text-decoration: underline; }

/* Motion: content fades up as it scrolls into view (only when JS is on). */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes glow { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: .75; } }

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