/* =========================================================
   Gulf Web for Software Solutions — styles
   Brand colors live here; change them to match your logo.
   ========================================================= */
:root {
  --navy: #0a1a3f;
  --navy-2: #10306e;
  --brand: #1c8bee;
  --brand-dark: #1045cc;
  --slate: #7b90af;
  --brand-strong: #1045cc;

  --bg: #ffffff;
  --bg-alt: #f3f7fa;
  --surface: #ffffff;
  --text: #13253a;
  --muted: #5b6b7d;
  --border: #dfe7ee;
  --shadow: 0 10px 30px -12px rgba(10, 26, 63, 0.18);

  --radius: 16px;
  --container: 1140px;
  --header-h: 72px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #060f26;
    --brand-strong: #ffffff;
    --slate: #9fb2cc;
    --bg-alt: #0a1a3f;
    --surface: #0e2350;
    --text: #e6eef6;
    --muted: #9fb2c5;
    --border: #1c3468;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

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

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 8px;
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .78rem;
  font-weight: 700; color: var(--brand); margin-bottom: .75rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  background: var(--brand); color: #fff; font-weight: 600; text-decoration: none;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { background: var(--brand-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-small { padding: .5rem 1.1rem; font-size: .92rem; }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.45); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: #eef4f8; }
.btn-whatsapp { background: #25d366; color: #06301a; }
.btn-whatsapp:hover { background: #1fbe5b; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s;
}
.site-header.scrolled { box-shadow: 0 6px 24px -16px rgba(10,26,63,.45); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; min-width: 0; }
/* Logo mark — adjust height to resize */
.brand-logo { height: 46px; width: auto; flex-shrink: 0; }
/* Wordmark, styled after the logo (Poppins): bold "Gulf" + regular "Web" */
.brand-text { display: flex; flex-direction: column; line-height: 1.05; font-family: "Poppins", var(--font); }
.bt-name { font-size: 1.35rem; font-weight: 400; color: var(--brand); white-space: nowrap; }
.bt-name b { font-weight: 700; color: var(--brand-strong); }
.brand-text small { font-size: .6rem; font-weight: 400; letter-spacing: .32em; text-transform: uppercase; color: var(--slate); margin-top: 4px; white-space: nowrap; }

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a:not(.btn) { text-decoration: none; font-weight: 500; color: var(--muted); transition: color .2s; }
.site-nav a:not(.btn):hover { color: var(--text); }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 10px; border: 0; background: transparent;
  cursor: pointer; flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .2s; }
.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); }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: .5rem 16px 1.25rem; box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--border); }
  .site-nav .btn { margin-top: 1rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(28,139,238,.35), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(111,185,255,.12), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
}
.hero-inner { padding-top: clamp(4rem, 12vw, 8rem); padding-bottom: clamp(6rem, 14vw, 10rem); max-width: 900px; margin-left: auto; margin-right: auto; text-align: center; }
.hero .eyebrow { color: #8fc7ff; }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.8rem); font-weight: 800; }
.hero .accent { color: #6fb9ff; }
.hero .lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: #c7d6e4; max-width: 640px; margin: 0 auto 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 70px; }
.hero-wave svg { width: 100%; height: 100%; fill: var(--bg); }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 6.5rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section-head p:last-child { color: var(--muted); }

.grid { display: grid; gap: 1.5rem; }
.services-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.projects-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
@media (max-width: 360px) {
  .services-grid, .projects-grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem; transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.card h3 { font-size: 1.2rem; }
.card p { color: var(--muted); }

/* Services */
.service .icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.1rem;
  background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand);
}
.service .icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service p { margin: 0; }

/* Projects */
.project { display: flex; flex-direction: column; }
.project-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; gap: 1rem; }
.project-mark {
  width: 60px; height: 60px; border-radius: 16px; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--navy-2));
}
/* Logo box sizes itself to the logo's shape: square logos stay square, wide ones get wider */
.project-mark.has-logo { width: auto; min-width: 60px; max-width: 180px; padding: 7px; border: 1px solid var(--border); }
.project-mark img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.project-mark.has-logo img { min-width: 44px; }
.project h3 { font-size: 1.3rem; margin-bottom: .25rem; }
.project .tagline { font-weight: 500; color: var(--brand); font-size: .95rem; margin-bottom: .85rem; }
.project .desc { flex-grow: 1; margin-bottom: 1.5rem; line-height: 1.7; }

/* Card footer: links only, separated by a hairline */
.project-foot {
  margin-top: auto; padding-top: 1.25rem; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem;
}
.project-link {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; /* same height as store buttons, so card dividers line up */
  font-weight: 600; font-size: .95rem; color: var(--text); text-decoration: none;
}
.project-link .i-arrow { width: 16px; height: 16px; fill: none; stroke: var(--brand); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.project-link:hover { color: var(--brand); }
.project-link:hover .i-arrow { transform: translate(2px, -2px); }

.store-links { display: flex; gap: .5rem; }
.store-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); text-decoration: none;
  transition: border-color .2s, background .2s, color .2s;
}
.store-btn-text { width: auto; padding: 0 .75rem; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.store-btn .i-store { width: 17px; height: 17px; }
.store-btn:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }

/* Status: small dot + label */
.status {
  display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap;
  font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: .35rem .75rem; border-radius: 999px; border: 1px solid var(--border); color: var(--muted);
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-live::before { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.status-dev::before  { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.18); }
.status-soon::before { background: var(--slate); }

.project-more { border-style: dashed; justify-content: center; text-align: center; align-items: center; }
.project-more .project-mark { background: transparent; border: 2px dashed var(--border); color: var(--muted); margin-bottom: 1.25rem; }
.project-more:hover { transform: none; box-shadow: none; }
.project-more .desc { flex-grow: 0; margin-bottom: 0; }

/* About */
.about { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 900px) { .about { grid-template-columns: 1.1fr 1fr; gap: 4rem; } }
.about-text h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.about-text p { color: var(--muted); font-size: 1.05rem; }
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.values li {
  padding: 1.1rem 1.25rem 1.1rem 3.25rem; position: relative;
  background: var(--bg-alt); border-radius: 12px; border: 1px solid var(--border);
}
.values li::before {
  content: ""; position: absolute; left: 1.15rem; top: 1.3rem; width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.values strong { display: block; }
.values span { color: var(--muted); font-size: .95rem; }

/* Contact */
.contact {
  color: #fff; text-align: center;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(28,139,238,.35), transparent 70%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
}
.contact h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.contact p { color: #c7d6e4; font-size: 1.1rem; margin-bottom: 2rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.contact-actions .btn { min-width: 200px; overflow-wrap: anywhere; }

/* Footer */
.site-footer { background: var(--bg); color: var(--muted); padding: 2.5rem 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.footer-brand { display: flex; align-items: center; gap: .6rem; }
.footer-brand .brand-logo { height: 42px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer-nav a { text-decoration: none; color: var(--muted); }
.footer-nav a:hover { color: var(--text); }
.footer-legal {
  width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem;
  padding-top: 1.25rem; border-top: 1px solid var(--border);
}
.copyright, .cr-number { margin: 0; font-size: .85rem; color: var(--muted); }
.cr-number { letter-spacing: .02em; }

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn { transition: none; }
}

/* 404 page */
.notfound-page { color: #fff; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); }
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 2rem 16px; }
.notfound h1 { font-size: clamp(4rem, 15vw, 8rem); margin: 0; }
.notfound p { color: #c7d6e4; margin-bottom: 2rem; }
