/* =========================================================
   Rey Ali Web Design — styles
   Change the colours below to restyle the whole site.
   ========================================================= */
:root {
  --primary: #1E2A5E;       /* navy: buttons, logo badge, links */
  --primary-hover: #16204A;
  --accent: #6D5DF6;        /* violet: icons, shapes, highlights */
  --accent-text: #5646E0;   /* slightly deeper violet for small text, so it stays readable */
  --accent-soft: #EEEBFF;   /* tag / icon backgrounds */
  --accent-tint: #F3F1FF;
  --whatsapp: #25D366;
  --ink: #141A33;           /* main text + headings */
  --text: #141A33;
  --muted: #5B6280;         /* secondary text */
  --line: #E4E8F3;
  --bg: #F5F7FC;
  --surface: #FFFFFF;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(20, 26, 51, .04), 0 2px 8px rgba(20, 26, 51, .04);
  --shadow: 0 1px 2px rgba(20, 26, 51, .05), 0 12px 32px rgba(30, 42, 94, .08);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 64px;
}

*, *::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;
  padding-top: var(--header-h); /* room for the fixed header */
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 6.5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 4.2vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }

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

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: .6rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .75rem 1.4rem;
  border: 1.5px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-lg { min-height: 56px; padding: 1rem 1.75rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn .icon { width: 22px; height: 22px; fill: currentColor; flex-shrink: 0; }

.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(30, 42, 94, .22); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 10px 24px rgba(30, 42, 94, .28); }

.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); }

/* ---------- Header (fixed) ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }

.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-weight: 800; }
.logo-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--primary); color: #fff; font-size: .9rem; letter-spacing: .02em;
  box-shadow: inset 0 -3px 0 var(--accent);
}
.logo-text { font-size: 1.05rem; letter-spacing: -.01em; }
.logo-text span { color: var(--muted); font-weight: 600; }

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

.site-nav {
  position: absolute; top: var(--header-h); left: 0; right: 0;
  display: none; flex-direction: column;
  padding: 4px 20px 20px;
  background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
.site-nav.open { display: flex; }
.site-nav a {
  padding: 14px 4px; border-bottom: 1px solid var(--line);
  color: var(--ink); font-weight: 600; text-decoration: none;
}
.site-nav a.nav-cta { border-bottom: 0; margin-top: 14px; text-align: center; background: var(--primary); color: #fff; border-radius: 999px; }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static; display: flex; flex-direction: row; align-items: center; gap: 2px;
    padding: 0; background: none; border: 0; box-shadow: none;
  }
  .site-nav a { padding: 8px 14px; border: 0; border-radius: 999px; font-size: .95rem; }
  .site-nav a:hover { background: var(--bg); color: var(--primary); }
  .site-nav a.nav-cta { margin: 0 0 0 10px; padding: 9px 20px; }
  .site-nav a.nav-cta:hover { background: var(--primary-hover); color: #fff; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 40px 0 48px;
  background:
    radial-gradient(640px 360px at 95% 0%, rgba(109, 93, 246, .14), transparent 70%),
    radial-gradient(520px 340px at -5% 100%, rgba(30, 42, 94, .07), transparent 70%),
    var(--bg);
}
.hero-inner > * { max-width: 800px; }
.hello {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 6px 16px 6px 6px; margin-bottom: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.hello-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.hello p { margin: 0; font-weight: 700; color: var(--ink); font-size: .98rem; line-height: 1.3; }
.hello p span { color: var(--muted); font-weight: 500; }
.hero h1 { margin-bottom: .4em; }
.highlight {
  color: var(--accent);
  background: linear-gradient(transparent 70%, var(--accent-soft) 70%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero-sub { font-size: clamp(1.05rem, 2.3vw, 1.2rem); color: var(--muted); max-width: 620px; margin-bottom: 1.75rem; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; }
.hero-actions .btn { width: 100%; }

.trust {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  list-style: none; padding: 0; margin: 1.5rem 0 0;
  font-size: .93rem; font-weight: 600; color: var(--muted);
}
.trust li { display: flex; align-items: center; gap: 8px; }
.trust li::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236D5DF6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat;
}

@media (max-width: 380px) { .hello p span { display: none; } }

@media (min-width: 600px) {
  .hero { padding: 64px 0 64px; }
  .hero-actions { flex-direction: row; }
  .hero-actions .btn { width: auto; }
}

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 28px; }
.section-head h2 { margin-bottom: .3em; }
.section-head p:last-child { color: var(--muted); font-size: 1.05rem; margin: 0; }

@media (min-width: 860px) {
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
}

/* ---------- Service cards ---------- */
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); gap: 18px; } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.section-alt .card { background: var(--bg); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #D5D0FD; }
.card p { margin: 0; font-size: .98rem; color: var(--muted); }
.card-icon {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px;
  border-radius: 12px; background: var(--accent-soft);
}
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Work grid ---------- */
.work-grid { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 760px) { .work-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; align-items: center; } }

.work-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  color: inherit; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.work-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #D5D0FD; }

/* Browser-window frame around the preview */
.browser { padding: 14px 14px 0; background: linear-gradient(160deg, var(--accent-soft), #E3E8F7); }
.browser-bar {
  display: flex; align-items: center; gap: 12px;
  height: 32px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 10px 10px 0 0;
}
.dots { display: flex; gap: 6px; flex-shrink: 0; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: #D7DBE8; }
.dots i:nth-child(1) { background: #FF6159; }
.dots i:nth-child(2) { background: #FFBD2E; }
.dots i:nth-child(3) { background: #28C941; }
.browser-url {
  flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: .72rem; color: var(--muted); background: var(--bg); border-radius: 6px; padding: 3px 10px; text-align: center;
}
.browser-view {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0b0b0d;
  border: 1px solid var(--line); border-bottom: 0;
}
.browser-view img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
/* Live preview: a real 1280px-wide page, scaled down by JS to fit the frame */
.browser-view iframe {
  position: absolute; top: 0; left: 0;
  width: 1280px; height: 800px; border: 0;
  transform-origin: 0 0; transform: scale(var(--scale, .4));
  pointer-events: none;
  opacity: 0; transition: opacity .4s ease;
}
.browser-view iframe.loaded { opacity: 1; }

.work-body { padding: 22px 22px 24px; display: flex; flex-direction: column; }
.work-body h3 { margin-bottom: .15em; font-size: 1.25rem; }
.work-meta { color: var(--muted); font-size: .88rem; font-weight: 600; margin-bottom: .8em; }
.work-body > p:not(.work-meta) { font-size: .98rem; color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 18px; }
.tags li { font-size: .78rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); }

.work-btn { align-self: flex-start; }
.work-card:hover .work-btn { background: var(--primary-hover); }

/* "Your business could be next" */
.work-next {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  padding: 28px 26px;
  background: var(--accent-tint);
  border: 2px dashed #C9C1FB; border-radius: var(--radius);
}
.work-next-title { font-size: 1.3rem; font-weight: 800; color: var(--ink); margin: 0 0 .25em; letter-spacing: -.01em; }
.work-next p:not(.work-next-title) { color: var(--muted); margin-bottom: 1.1rem; }

/* ---------- Steps ---------- */
.steps { display: grid; gap: 14px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.step { padding: 24px 22px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.step p { margin: 0; font-size: .98rem; color: var(--muted); }
.step-num {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: 1.05rem;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ---------- About ---------- */
.about { display: grid; gap: 36px; align-items: center; }
@media (min-width: 860px) { .about { grid-template-columns: 5fr 7fr; gap: 56px; } }

.about-photo { position: relative; isolation: isolate; width: min(calc(100% - 14px), 400px); margin: 0 14px 14px 0; }
@media (max-width: 859px) { .about-photo { width: min(calc(100% - 14px), 320px); } }
/* violet accent shape behind the photo */
.about-photo::before {
  content: ""; position: absolute; z-index: -1;
  inset: 18px -14px -14px 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--accent), #9C8FFF);
}
.about-photo::after {
  content: ""; position: absolute; z-index: -1;
  top: -12px; left: -12px; width: 72px; height: 72px;
  background: radial-gradient(var(--accent) 1.6px, transparent 1.8px) 0 0 / 12px 12px;
  opacity: .45;
}
.about-photo img {
  width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center top;
  border-radius: 20px; box-shadow: 0 16px 40px rgba(30, 42, 94, .18);
}

.about-text > p:not(.eyebrow) { color: var(--muted); }
.about-facts { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 8px; }
.about-facts li { display: flex; gap: 12px; padding: 11px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: .98rem; color: var(--muted); }
.about-facts strong { flex: 0 0 110px; color: var(--ink); }

/* ---------- Contact ---------- */
.contact { display: grid; gap: 32px; }
@media (min-width: 860px) { .contact { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; } }

.contact-info > p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.4rem; }
.contact-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; }
.contact-list li { display: flex; flex-direction: column; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list a { font-weight: 700; font-size: 1.08rem; text-decoration: none; word-break: break-word; }
.contact-list a:hover { text-decoration: underline; }
.contact-list li > span:not(.contact-label) { font-weight: 700; color: var(--ink); font-size: 1.08rem; }
.contact-label { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.contact-form {
  background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 24px 20px;
}
@media (min-width: 600px) { .contact-form { padding: 32px; } }
.contact-form h3 { font-size: 1.3rem; margin-bottom: 1rem; }

.field { margin-bottom: 14px; }
.field-row { display: grid; gap: 0 14px; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--ink); font-size: .93rem; }
.optional { color: var(--muted); font-weight: 500; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px;
  font: inherit; font-size: 16px; /* 16px stops iPhone zooming in */
  color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(109, 93, 246, .16); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-status { margin: 12px 0 0; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.success { color: #0f7a3d; background: #E8F7EE; padding: 12px 14px; border-radius: 12px; }
.form-status.error { color: #b42318; background: #FDECEA; padding: 12px 14px; border-radius: 12px; }

/* ---------- Footer ---------- */
.site-footer { padding: 32px 0 96px; background: var(--ink); color: #C7CCE0; font-size: .93rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-inner p { margin: 0 0 .4em; }
.site-footer strong { color: #fff; }
.copyright { color: #9AA1BF; font-size: .85rem; margin-top: .8em !important; }
@media (min-width: 860px) { .site-footer { padding-bottom: 32px; } }

/* ---------- Floating WhatsApp (stays WhatsApp green) ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: var(--whatsapp); box-shadow: 0 8px 24px rgba(20, 26, 51, .25);
  opacity: 0; transform: translateY(20px) scale(.9); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
.wa-float.visible { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

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