/* =========================================================
   SGA — Somsons General Accountancy
   Stylesheet
   ========================================================= */

/* ---------- Reset & tokens ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #0a0a0a;
  --white: #fafafa;
  --grey: #f2f2f0;
  --mid: #6b6b6b;
  --accent: #1a6b4a;
  --accent2: #0f4a34;
  --accent-light: #e8f4ef;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-pill: 100px;
  --shadow-hover: 0 12px 32px rgba(26, 107, 74, 0.25);
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

img, svg { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: none; }
a { color: inherit; }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: var(--black);
  color: var(--white);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-size: 14px;
  text-decoration: none;
  transition: top var(--transition);
}
.skip-link:focus { top: 8px; }

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

/* ---------- Custom cursor ---------- */
.cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
}
.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(26, 107, 74, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: all 0.12s ease;
}
body:has(a:hover, button:hover) .cursor { width: 16px; height: 16px; background: var(--accent2); }
body:has(a:hover, button:hover) .cursor-ring { width: 52px; height: 52px; border-color: rgba(26, 107, 74, 0.25); }

/* ---------- Scroll progress ---------- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #2da876);
  z-index: 200;
  transition: width 0.1s linear;
}

/* ---------- Navigation ---------- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  height: 64px;
  background: rgba(250, 250, 250, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s;
}
nav.scrolled { box-shadow: 0 4px 32px rgba(0, 0, 0, 0.06); }

.nav-logo {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--black);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }

.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--mid);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav-links a:hover { color: var(--black); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  background: var(--black) !important;
  color: var(--white) !important;
  padding: 9px 22px;
  border-radius: var(--radius-pill);
  font-size: 13px !important;
  font-weight: 500 !important;
  transition: background var(--transition), transform 0.15s !important;
  display: inline-block;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--accent) !important; transform: translateY(-1px) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 32px;
  height: 24px;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.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); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 64px 5vw 80px;
  position: relative;
  overflow: hidden;
  background: var(--grey);
}

.hero-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(26, 107, 74, 0.13) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(26, 107, 74, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 90% 80%, rgba(15, 74, 52, 0.06) 0%, transparent 50%);
  animation: meshFloat 8s ease-in-out infinite alternate;
}
@keyframes meshFloat {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.04) translate(-12px, 8px); }
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: orbDrift 12s ease-in-out infinite alternate;
}
.orb1 { width: 400px; height: 400px; right: -100px; top: -80px; background: rgba(26, 107, 74, 0.12); animation-delay: 0s; }
.orb2 { width: 260px; height: 260px; right: 30%; bottom: 10%; background: rgba(26, 107, 74, 0.08); animation-delay: -4s; }
@keyframes orbDrift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(20px, -30px) scale(1.1); }
}

.hero-inner { position: relative; z-index: 1; max-width: 900px; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp 0.7s 0.1s ease forwards;
}
.hero-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(52px, 7.5vw, 100px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s ease forwards;
}
.hero h1 i {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent) 0%, #2da876 50%, var(--accent) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

.hero-sub {
  font-size: 18px;
  font-weight: 300;
  color: var(--mid);
  max-width: 460px;
  line-height: 1.75;
  margin-bottom: 44px;
  opacity: 0;
  animation: fadeUp 0.8s 0.35s ease forwards;
}

.hero-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s 0.45s ease forwards;
}

.btn-primary {
  display: inline-block;
  background: var(--black);
  color: var(--white);
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-primary span { position: relative; z-index: 1; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-primary:hover::before { opacity: 1; }

.btn-ghost {
  color: var(--mid);
  font-size: 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition), gap var(--transition);
}
.btn-ghost:hover { color: var(--black); gap: 12px; }

.hero-stats {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  padding-top: 56px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: 56px;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s ease forwards;
}
.hero-stats > div { display: flex; flex-direction: column-reverse; }
.stat-val {
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1;
  margin-bottom: 4px;
  background: linear-gradient(135deg, var(--black) 50%, rgba(0, 0, 0, 0.5));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 13px; color: var(--mid); }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---------- Section shared ---------- */
section { padding: 100px 5vw; }

.label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.label::before {
  content: '';
  width: 20px;
  height: 1.5px;
  background: var(--accent);
}

h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
h2 i {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent), #2da876);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Services ---------- */
.services { background: var(--white); }

.services-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 56px;
  gap: 32px;
  flex-wrap: wrap;
}
.services-intro {
  font-size: 16px;
  color: var(--mid);
  max-width: 300px;
  line-height: 1.7;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: rgba(0, 0, 0, 0.06);
}

.svc {
  background: var(--white);
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
  transition: background 0.25s;
}
.svc::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #2da876);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.svc:hover { background: #fdfdfb; }
.svc:hover::before { transform: scaleX(1); }

.svc-num {
  font-family: var(--serif);
  font-size: 13px;
  color: rgba(0, 0, 0, 0.2);
  margin-bottom: 24px;
  transition: color 0.25s;
}
.svc:hover .svc-num { color: var(--accent); }

.svc h3 {
  font-family: var(--serif);
  font-size: 21px;
  margin-bottom: 10px;
  line-height: 1.2;
  transition: transform 0.25s;
}
.svc:hover h3 { transform: translateX(4px); }
.svc p { font-size: 14px; color: var(--mid); line-height: 1.75; }

/* ---------- About ---------- */
.about {
  background: var(--black);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.about::before {
  content: 'SGA';
  position: absolute;
  right: -40px;
  bottom: -60px;
  font-family: var(--serif);
  font-size: 260px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.02);
  line-height: 1;
  pointer-events: none;
  letter-spacing: -0.05em;
}
.about .label { color: #6ee7b7; }
.about .label::before { background: #6ee7b7; }
.about h2 { color: var(--white); }
.about h2 i {
  background: linear-gradient(135deg, #6ee7b7, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.about-body {
  font-size: 17px;
  color: rgba(250, 250, 250, 0.5);
  line-height: 1.85;
  margin: 20px 0 36px;
}

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.45);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.pill:hover { border-color: rgba(110, 231, 183, 0.4); color: #6ee7b7; background: rgba(110, 231, 183, 0.06); }

.quote-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin-bottom: 12px;
  transition: border-color 0.3s, background 0.3s;
}
.quote-card:hover { border-color: rgba(110, 231, 183, 0.2); background: rgba(255, 255, 255, 0.05); }
.quote-card blockquote {
  font-family: var(--serif);
  font-size: 19px;
  font-style: italic;
  color: var(--white);
  line-height: 1.6;
  margin-bottom: 20px;
}
.quote-author { font-size: 13px; color: rgba(255, 255, 255, 0.35); }
.quote-author strong { color: rgba(255, 255, 255, 0.65); display: block; margin-bottom: 2px; }

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.metric {
  background: rgba(255, 255, 255, 0.02);
  padding: 24px;
  display: flex;
  flex-direction: column-reverse;
  transition: background var(--transition);
}
.metric:hover { background: rgba(255, 255, 255, 0.05); }
.metric-val {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
}
.metric-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Process ---------- */
.process { background: var(--grey); position: relative; overflow: hidden; }
.process-head { margin-bottom: 64px; }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
  counter-reset: step;
}
.steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: calc(12.5% + 16px);
  right: calc(12.5% + 16px);
  height: 1px;
  background: linear-gradient(90deg, var(--accent), rgba(26, 107, 74, 0.1));
  pointer-events: none;
}
.step { position: relative; }
.step-n {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.step-n-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--black);
  flex-shrink: 0;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
  position: relative;
  z-index: 1;
}
.step:hover .step-n-dot { background: var(--accent); border-color: var(--accent); color: var(--white); }
.step h3 {
  font-family: var(--serif);
  font-size: 20px;
  margin-bottom: 8px;
  line-height: 1.2;
}
.step p { font-size: 14px; color: var(--mid); line-height: 1.7; }

/* ---------- Contact ---------- */
.contact {
  background: var(--white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact-intro {
  font-size: 16px;
  color: var(--mid);
  line-height: 1.75;
  margin: 16px 0 36px;
}

.contact-links { display: flex; flex-direction: column; gap: 10px; }
.c-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  text-decoration: none;
  color: var(--black);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.25s, background 0.25s, transform var(--transition);
}
.c-link:hover { border-color: var(--accent); background: var(--accent-light); transform: translateX(4px); }
.c-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--grey);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: background 0.25s;
}
.c-link:hover .c-icon { background: rgba(26, 107, 74, 0.12); }
.c-meta { font-size: 11px; color: var(--mid); font-weight: 400; display: block; margin-top: 1px; }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--mid);
  margin-bottom: 7px;
  letter-spacing: 0.04em;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 15px;
  background: var(--white);
  color: var(--black);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 107, 74, 0.1);
}
.form-group input[aria-invalid="true"],
.form-group textarea[aria-invalid="true"] {
  border-color: #c1272d;
}
.form-group textarea { min-height: 110px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn-submit {
  width: 100%;
  border: none;
  border-radius: var(--radius-pill);
  padding: 15px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: var(--black);
  color: var(--white);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  margin-top: 4px;
}
.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-submit span { position: relative; z-index: 1; }
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(26, 107, 74, 0.22); }
.btn-submit:hover::before { opacity: 1; }

.form-status {
  margin-top: 14px;
  font-size: 13px;
  color: var(--accent);
  min-height: 1em;
}
.form-status.error { color: #c1272d; }

/* ---------- Footer ---------- */
footer {
  background: var(--grey);
  padding: 40px 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}
.footer-brand { font-family: var(--serif); font-size: 17px; }
.footer-brand span { color: var(--accent); }
.footer-note { font-size: 12px; color: var(--mid); margin-top: 3px; }

.footer-right { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-right a {
  font-size: 13px;
  color: var(--mid);
  text-decoration: none;
  position: relative;
  padding-bottom: 1px;
  transition: color var(--transition);
}
.footer-right a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s;
}
.footer-right a:hover { color: var(--black); }
.footer-right a:hover::after { width: 100%; }

/* ---------- Keyframes ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    padding: 12px 5vw 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transform: translateY(-110%);
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links li { padding: 14px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.05); }
  .nav-links li:last-child { border-bottom: none; padding-top: 18px; }
  .about, .contact { grid-template-columns: 1fr; gap: 56px; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps::before { display: none; }
  footer { flex-direction: column; align-items: flex-start; }
  body { cursor: auto; }
  button { cursor: pointer; }
  .cursor, .cursor-ring { display: none; }
}

@media (max-width: 600px) {
  .services-grid, .steps, .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
  section { padding: 72px 5vw; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-mesh, .orb { animation: none; }
}

/* ---------- Print ---------- */
@media print {
  nav, .progress-bar, .cursor, .cursor-ring, .orb, .hero-mesh, .btn-primary, .btn-ghost, .btn-submit { display: none !important; }
  body { cursor: auto; background: white; color: black; }
  section { padding: 20px 0; page-break-inside: avoid; }
  .about { background: white; color: black; }
  .about h2, .about-body, .quote-card blockquote { color: black; }
}
