/* =================================================================
   Britelapps — iOS App Studio
   Creative studio site. Self-contained. Light + dark.
   ================================================================= */

:root {
  --blue:   #0071e3;
  --cyan:   #00c6fb;
  --violet: #7b61ff;
  --amber:  #ff9f1c;

  --grad:   linear-gradient(120deg, #0071e3 0%, #00c6fb 48%, #7b61ff 100%);
  --grad-soft: linear-gradient(120deg, rgba(0,113,227,.12), rgba(123,97,255,.12));

  --bg:      #ffffff;
  --bg-soft: #f4f6fb;
  --surface: #ffffff;
  --ink:     #0d1224;
  --ink-soft:#5b6178;
  --line:    #e6e8f0;
  --shadow:  0 24px 60px -20px rgba(13,18,36,.22);
  --shadow-s:0 8px 26px -12px rgba(13,18,36,.20);

  --r:   22px;
  --r-s: 14px;
  --wrap: 1180px;
  --nav: 66px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.22,1,.36,1);
}

[data-theme="dark"] {
  --bg:      #06080f;
  --bg-soft: #0c0f1c;
  --surface: #121626;
  --ink:     #f3f5fb;
  --ink-soft:#9aa1bd;
  --line:    #232842;
  --shadow:  0 24px 60px -18px rgba(0,0,0,.7);
  --shadow-s:0 8px 26px -12px rgba(0,0,0,.6);
  --grad-soft: linear-gradient(120deg, rgba(0,198,251,.10), rgba(123,97,255,.14));
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav) + 14px); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); background: var(--bg); color: var(--ink);
  line-height: 1.62; -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

.skip-link {
  position: absolute; left: 14px; top: -50px; z-index: 300;
  background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 9px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 14px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

/* ---- Shared bits ------------------------------------------------- */
.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.kicker {
  display: inline-flex; font-size: .8rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue);
}
.kicker--light { color: rgba(255,255,255,.85); }
.h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
.lead { color: var(--ink-soft); font-size: 1.06rem; margin-top: 12px; }
.head { max-width: 42rem; margin: 0 auto 56px; text-align: center; }
.head .kicker { margin-bottom: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: .98rem; cursor: pointer;
  padding: 13px 24px; border-radius: 14px; border: 1px solid transparent;
  background: var(--grad); color: #fff; background-size: 160% 160%;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-position .5s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(0,113,227,.55); background-position: 100% 0; }
.btn:active { transform: translateY(0); }
.btn--lg { padding: 16px 30px; font-size: 1.02rem; }
.btn--pill { border-radius: 999px; padding: 10px 20px; font-size: .9rem; }
.btn--full { width: 100%; }
.btn--ghost {
  background: transparent; color: var(--ink); border-color: var(--line);
}
.btn--ghost:hover { box-shadow: none; border-color: var(--blue); color: var(--blue); background: transparent; }

/* ---- Nav --------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent; transition: border-color .3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav); }

.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark { display: flex; }
.brand__name { font-weight: 800; font-size: 1.18rem; letter-spacing: -.02em; }
.brand__name span { color: var(--blue); }

.nav__links { display: flex; gap: 28px; }
.nav__links a { color: var(--ink-soft); font-size: .93rem; font-weight: 600; position: relative; transition: color .2s var(--ease); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px;
  background: var(--grad); border-radius: 2px; transition: right .25s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { right: 0; }

.nav__actions { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink);
  transition: transform .25s var(--ease), border-color .2s var(--ease);
}
.icon-btn:hover { transform: rotate(18deg); border-color: var(--blue); }
.i-moon { display: none; }
[data-theme="dark"] .i-sun { display: none; }
[data-theme="dark"] .i-moon { display: block; }

.burger { display: none; flex-direction: column; gap: 5px; width: 40px; height: 40px;
  background: none; border: none; cursor: pointer; padding: 9px; }
.burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile { display: none; flex-direction: column; padding: 6px 24px 18px; border-bottom: 1px solid var(--line); }
.nav__mobile a { padding: 13px 4px; font-weight: 600; border-bottom: 1px solid var(--line); }
.nav__mobile a:last-child { border-bottom: none; color: var(--blue); }
.nav__mobile.open { display: flex; }

/* ---- Hero -------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: 88px 0 0; }
.hero__blobs { position: absolute; inset: 0; z-index: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.blob--1 { width: 460px; height: 460px; background: var(--blue);   top: -140px; left: -90px; }
.blob--2 { width: 420px; height: 420px; background: var(--violet); top: -90px;  right: -110px; }
.blob--3 { width: 360px; height: 360px; background: var(--cyan);   top: 220px;  left: 40%; opacity: .4; }
[data-theme="dark"] .blob { opacity: .42; }

.hero__inner { position: relative; z-index: 1; text-align: center; padding-bottom: 70px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .85rem; font-weight: 700; letter-spacing: .04em;
  color: var(--blue); background: var(--grad-soft);
  border: 1px solid var(--line); padding: 7px 16px; border-radius: 999px;
}
.hero__title {
  font-size: clamp(2.5rem, 7vw, 4.8rem); font-weight: 800;
  letter-spacing: -.04em; line-height: 1.05; margin-top: 22px;
}
.hero__lead { max-width: 38rem; margin: 18px auto 0; color: var(--ink-soft); font-size: 1.12rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 30px; }

.tiles { display: flex; justify-content: center; gap: 18px; margin-top: 58px; flex-wrap: wrap; }
.tile {
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s);
  will-change: transform;
}
.tile--a { color: var(--blue); }
.tile--b { color: var(--amber); }
.tile--c { color: var(--violet); }
.tile--d { color: #ff5d8f; }
.tile--e { color: var(--cyan); }
.tile--b, .tile--d { transform: translateY(-16px); }

[data-float] { animation: float 6s var(--ease) infinite; }
.tile--b { animation-delay: -1s; }
.tile--c { animation-delay: -2s; }
.tile--d { animation-delay: -3s; }
.tile--e { animation-delay: -4s; }
.blob--2 { animation-delay: -3s; }
.blob--3 { animation-delay: -1.5s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* marquee */
.marquee { margin-top: 4px; padding: 16px 0; border-block: 1px solid var(--line);
  background: var(--bg-soft); overflow: hidden; }
.marquee__track { display: flex; gap: 30px; white-space: nowrap; width: max-content;
  animation: slide 26s linear infinite; }
.marquee__track span { font-weight: 700; font-size: 1.05rem; color: var(--ink-soft); }
.marquee__track span:nth-child(even) { color: var(--blue); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---- Stats ------------------------------------------------------- */
.stats {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 18px;
  margin-top: 70px; margin-bottom: 10px;
}
.stat {
  text-align: center; padding: 26px 14px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
}
.stat strong { display: block; font-size: clamp(2rem,4vw,2.7rem); font-weight: 800;
  letter-spacing: -.03em; }
.stat strong { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--ink-soft); font-size: .9rem; }

/* ---- Sections ---------------------------------------------------- */
.section { padding: 100px 0; }
.section--soft { background: var(--bg-soft); }

/* About */
.about { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.about__left .h2 { margin-top: 14px; }
.about__right p { color: var(--ink-soft); font-size: 1.08rem; margin-bottom: 16px; }
.about__chips { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin-top: 22px; }
.about__chips li {
  font-weight: 600; font-size: .94rem; padding: 9px 16px; border-radius: 999px;
  background: var(--grad-soft); border: 1px solid var(--line);
}

/* Services */
.srv-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.srv-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 34px 30px; overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.srv-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.srv-card__num {
  position: absolute; top: 18px; right: 24px; font-size: 2.6rem; font-weight: 800;
  color: var(--line); letter-spacing: -.04em;
}
.srv-card__icon {
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 17px;
  color: #fff; margin-bottom: 18px;
}
.srv-card__icon--violet { background: linear-gradient(135deg,#7b61ff,#a78bff); }
.srv-card__icon--blue   { background: linear-gradient(135deg,#0071e3,#00c6fb); }
.srv-card__icon--amber  { background: linear-gradient(135deg,#ff9f1c,#ff5d8f); }
.srv-card h3 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.srv-card > p { color: var(--ink-soft); margin-top: 8px; }
.srv-card__list { list-style: none; margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.srv-card__list li {
  position: relative; padding-left: 24px; font-size: .94rem; color: var(--ink-soft);
}
.srv-card__list li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 13px; height: 13px;
  border-radius: 50%; background: var(--grad);
}

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 26px; }
.member {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.member:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.member__photo { position: relative; aspect-ratio: 1/1; overflow: hidden; }
.member__photo img { width: 100%; height: 100%; object-fit: cover; }
.member__photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(13,18,36,.28));
}
.member__body { padding: 24px 26px 28px; }
.member__role {
  display: inline-flex; font-size: .76rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
}
.member__role--violet { color: var(--violet); background: rgba(123,97,255,.13); }
.member__role--blue   { color: var(--blue);   background: rgba(0,113,227,.13); }
.member__role--amber  { color: #e07b00;       background: rgba(255,159,28,.16); }
[data-theme="dark"] .member__role--amber { color: var(--amber); }
.member__body h3 { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; margin-top: 12px; }
.member__body p { color: var(--ink-soft); font-size: .96rem; margin-top: 8px; }
.member__social { display: flex; gap: 10px; margin-top: 18px; }
.member__social a {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--line); color: var(--ink-soft); transition: all .2s var(--ease);
}
.member__social a:hover { color: #fff; background: var(--grad); border-color: transparent; transform: translateY(-3px); }

/* Process */
.proc { display: grid; grid-template-columns: repeat(4,1fr); gap: 22px; list-style: none; position: relative; }
.proc::before {
  content: ""; position: absolute; top: 30px; left: 12%; right: 12%; height: 2px;
  background: repeating-linear-gradient(90deg,var(--line) 0 9px,transparent 9px 18px);
}
.proc__step {
  position: relative; text-align: center; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); padding: 32px 22px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.proc__step:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.proc__num {
  display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 16px;
  border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; font-size: 1.25rem;
  box-shadow: 0 8px 20px -6px rgba(0,113,227,.6);
}
.proc__step h3 { font-size: 1.18rem; font-weight: 800; }
.proc__step p { color: var(--ink-soft); font-size: .94rem; margin-top: 7px; }

/* Work */
.work-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.work-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 30px; overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.work-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.work-card__chip {
  position: absolute; top: 18px; right: 18px; font-size: .72rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px;
  background: var(--grad-soft); color: var(--blue); border: 1px solid var(--line);
}
.work-card__art {
  display: grid; place-items: center; height: 130px; border-radius: var(--r-s);
  color: #fff; margin-bottom: 18px;
}
.work-card__art--violet { background: linear-gradient(135deg,#7b61ff,#a78bff); }
.work-card__art--blue   { background: linear-gradient(135deg,#0071e3,#00c6fb); }
.work-card__art--amber  { background: linear-gradient(135deg,#ff9f1c,#ff5d8f); }
.work-card h3 { font-size: 1.25rem; font-weight: 800; }
.work-card p { color: var(--ink-soft); font-size: .95rem; margin-top: 7px; }

/* CTA / Contact */
.cta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  background: var(--grad); border-radius: 32px; padding: 56px;
  background-size: 160% 160%; color: #fff;
}
.cta__copy .h2 { margin-top: 14px; }
.cta__copy > p { color: rgba(255,255,255,.88); margin-top: 14px; font-size: 1.05rem; }
.contact-line {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 22px;
  font-weight: 700; font-size: 1.05rem; padding: 12px 20px; border-radius: 14px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3);
  transition: background .2s var(--ease);
}
.contact-line:hover { background: rgba(255,255,255,.26); }

.cta__form {
  background: var(--surface); color: var(--ink);
  border-radius: 22px; padding: 32px;
}
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field span { font-size: .85rem; font-weight: 700; }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; resize: vertical;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-soft); opacity: .7; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,113,227,.16);
}
.cta__note { color: var(--ink-soft); font-size: .82rem; margin-top: 10px; text-align: center; }

/* ---- Footer ------------------------------------------------------ */
.footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 64px 0 30px; }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }
.footer__brand p { color: var(--ink-soft); font-size: .94rem; margin-top: 14px; max-width: 22rem; }
.footer__col { display: flex; flex-direction: column; gap: 11px; }
.footer__col h4 { font-size: .92rem; font-weight: 800; }
.footer__col a { color: var(--ink-soft); font-size: .92rem; transition: color .2s var(--ease); }
.footer__col a:hover { color: var(--blue); }
.footer__social { display: flex; gap: 10px; }
.footer__social a {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--line); color: var(--ink-soft); transition: all .2s var(--ease);
}
.footer__social a:hover { color: #fff; background: var(--grad); border-color: transparent; transform: translateY(-3px); }
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line);
  color: var(--ink-soft); font-size: .86rem;
}
.footer__bottom a { color: var(--blue); }

/* ---- Back to top ------------------------------------------------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--grad); color: #fff; border: none; cursor: pointer;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(14px) scale(.8);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.to-top.show { opacity: 1; transform: translateY(0) scale(1); }
.to-top:hover { transform: translateY(-3px) scale(1.06); }

/* ---- Reveal ------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---- Responsive -------------------------------------------------- */
@media (max-width: 960px) {
  .nav__links { display: none; }
  .burger { display: flex; }
  .stats { grid-template-columns: repeat(2,1fr); }
  .about { grid-template-columns: 1fr; gap: 26px; }
  .srv-grid, .team-grid, .work-grid { grid-template-columns: 1fr 1fr; }
  .proc { grid-template-columns: 1fr 1fr; }
  .proc::before { display: none; }
  .cta { grid-template-columns: 1fr; gap: 32px; padding: 40px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .section { padding: 70px 0; }
  .srv-grid, .team-grid, .work-grid, .proc { grid-template-columns: 1fr; }
  .frow { grid-template-columns: 1fr; }
  .cta { padding: 28px; border-radius: 24px; }
  .cta__form { padding: 22px; }
  .footer__inner { grid-template-columns: 1fr; }
  .brand__name { font-size: 1.05rem; }
  .tile { width: 60px; height: 60px; }
}

/* ---- Reduced motion --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  [data-float] { animation: none !important; }
  .marquee__track { animation: none !important; }
}
