/* ===========================================================
   Fountain Information Technology Limited — site stylesheet
   =========================================================== */

:root {
  --navy: #0b1f3a;
  --navy-light: #14335c;
  --navy-lighter: #1c4373;
  --teal: #17b8a6;
  --teal-dark: #0f9484;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #1b2430;
  --muted: #5b6a7c;
  --border: #e3e8f0;
  --shadow: 0 10px 30px rgba(11, 31, 58, 0.08);
  --radius: 14px;
  --max-width: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html {
  font-size: 18px;
}

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

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
}

h3 {
  font-size: 1.3rem;
}

h4 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 1.05rem;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--teal-dark);
  margin-bottom: 12px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--teal);
  color: var(--navy);
}

.btn-primary:hover {
  background: var(--teal-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(23, 184, 166, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--surface);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-ghost:hover {
  border-color: var(--surface);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--navy);
  transform: translateY(-2px);
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 249, 252, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--navy);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy-light);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--teal-dark);
  border-color: var(--teal);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
}

/* ---------- Hero ---------- */

.hero {
  background: radial-gradient(circle at 20% 20%, var(--navy-lighter), var(--navy) 60%);
  color: #fff;
  padding: 96px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent 75%);
  pointer-events: none;
}

.hero .container {
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  color: #fff;
}

.hero .eyebrow {
  color: var(--teal);
}

.hero p.lead {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.1rem;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-microcopy {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.hero-content {
  max-width: 760px;
}

.why-panel {
  list-style: none;
  max-width: 860px;
  margin: 0 auto;
  padding: 12px 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.why-panel li {
  display: flex;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

.why-panel li:nth-child(-n + 2) {
  border-top: none;
}

.check {
  color: var(--teal);
  font-weight: 800;
}

/* ---------- Sections ---------- */

section {
  padding: 88px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head.left {
  margin: 0 0 48px;
  text-align: left;
}

.bg-surface {
  background: var(--surface);
}

.bg-navy {
  background: var(--navy);
  color: #fff;
}

.bg-navy p {
  color: rgba(255, 255, 255, 0.72);
}

.bg-navy h2 {
  color: #fff;
}

/* ---------- Cards / Grids ---------- */

.grid {
  display: grid;
  gap: 24px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(11, 31, 58, 0.12);
}

.card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal), var(--navy-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 18px;
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.card p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* ---------- Process / steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 28px 22px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--teal);
  display: block;
  margin-bottom: 12px;
}

/* ---------- Values ---------- */

.value-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.value-item:first-child {
  border-top: none;
}

.value-num {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--teal);
  flex-shrink: 0;
  width: 44px;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-card {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.contact-card:first-child {
  border-top: none;
}

.contact-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(23, 184, 166, 0.12);
  color: var(--teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.contact-card h4 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.contact-card p {
  margin: 0;
  font-size: 0.92rem;
}

form.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--navy-light);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(23, 184, 166, 0.18);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 10px;
}

.form-success {
  display: none;
  background: rgba(23, 184, 166, 0.12);
  border: 1px solid rgba(23, 184, 166, 0.4);
  color: var(--teal-dark);
  padding: 14px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.form-success.show {
  display: block;
}

.form-error {
  display: none;
  background: rgba(217, 78, 78, 0.1);
  border: 1px solid rgba(217, 78, 78, 0.4);
  color: #b83a3a;
  padding: 14px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.form-error.show {
  display: block;
}

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-top: 24px;
}

.map-embed iframe {
  width: 100%;
  height: 260px;
  border: 0;
  display: block;
}

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-lighter) 100%);
  color: #fff;
  border-radius: 20px;
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-band h2 {
  color: #fff;
  margin-bottom: 8px;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.6fr 2.3fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand .brand {
  color: #fff;
  margin-bottom: 14px;
}

.footer-grid h4 {
  color: #fff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-grid ul li {
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.footer-grid ul li a:hover {
  color: var(--teal);
}

.footer-services {
  display: grid;
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  column-gap: 28px;
  white-space: nowrap;
}

/* Keep service cards clear of the sticky header when linked to */
.card[id] {
  scroll-margin-top: 112px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Page hero (inner pages) ---------- */

.page-hero {
  background: linear-gradient(120deg, var(--navy), var(--navy-lighter));
  color: #fff;
  padding: 64px 0;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
}

.breadcrumb {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 14px;
}

.breadcrumb a:hover {
  color: var(--teal);
}

/* ---------- FAQ accordion ---------- */

.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 52px 20px 24px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  position: relative;
  display: block;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--teal-dark);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}

.faq-item p {
  padding: 0 24px 22px;
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- Back to top ---------- */

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, visibility 0.2s;
  z-index: 90;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--teal-dark);
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- 404 page ---------- */

.not-found {
  padding: 120px 0;
  text-align: center;
}

.not-found .code {
  font-size: clamp(3.5rem, 10vw, 6rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.not-found p {
  max-width: 46ch;
  margin: 0 auto 28px;
}

.not-found .btn-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .nav-links,
  .nav-cta .btn-outline {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  body.nav-open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 20px 24px;
    gap: 18px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .grid-3, .grid-4, .grid-2 {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .why-panel {
    grid-template-columns: 1fr;
  }

  .footer-services {
    grid-template-rows: none;
    grid-auto-flow: row;
    white-space: normal;
  }

  .why-panel li:nth-child(2) {
    border-top: 1px solid var(--border);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .cta-band {
    flex-direction: column;
    text-align: center;
    padding: 40px 28px;
  }

  section {
    padding: 60px 0;
  }
}
