/* SUM Competitions, professional consulting site. No green. */
:root {
  --navy: #0b1624;
  --navy-mid: #122033;
  --charcoal: #161c24;
  --gold: #c4a36a;
  --gold-hover: #d4b57a;
  --ivory: #f6f3ed;
  --ivory-alt: #efeae1;
  --ink: #152033;
  --muted: #5b6573;
  --line: rgba(196, 163, 106, 0.4);
  --white: #ffffff;
  --header-h: 4.75rem;
  --font: "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;
  --measure: 42rem;
  --wrap: 68rem;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--gold);
  color: var(--navy);
  padding: 0.5rem 0.9rem;
  z-index: 100;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

/* ----- Logo (Ramesh's artwork) ----- */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
}
.logo--header img {
  height: 52px;
  width: auto;
  display: block;
}
.hero-logo {
  display: flex;
  justify-content: center;
  margin: 0 auto 2rem;
  max-width: min(36rem, 100%);
}
.hero-logo img {
  width: 100%;
  height: auto;
  display: block;
}

/* ----- Header (white, so the original logo sits cleanly) ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  color: var(--ink);
  border-bottom: 1px solid rgba(21, 32, 51, 0.08);
}
.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0.55rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
}
.nav-toggle span {
  display: block;
  width: 1.25rem;
  height: 1.5px;
  background: var(--navy);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4.25px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4.25px) rotate(-45deg);
}

.site-nav {
  display: flex;
  gap: 1.6rem;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  border-bottom-color: var(--gold);
  color: #8a6e3a;
}

/* ----- Hero ----- */
.hero {
  background: var(--navy);
  color: var(--white);
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 1.35rem 4.5rem;
}
.hero-inner { max-width: 40rem; }
.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.55rem, 3.6vw, 2.15rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.hero-lead {
  margin: 0 auto 2rem;
  max-width: 32rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
}

.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.5rem;
  min-height: 2.75rem;
  border-radius: 2px;
}
.btn:hover,
.btn:focus-visible {
  background: var(--gold-hover);
}

/* ----- Sections ----- */
.section {
  padding: 4.5rem 1.35rem;
}
.section--alt { background: var(--ivory-alt); }
.section-inner {
  max-width: var(--wrap);
  margin: 0 auto;
}
.eyebrow {
  margin: 0 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 600;
}
.section--alt .eyebrow,
.section:not(.section--contact):not(.section--alt) .eyebrow {
  color: #8a6e3a;
}
.section h1,
.section h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  max-width: 22ch;
}
.prose {
  max-width: var(--measure);
  font-size: 1.05rem;
  color: var(--ink);
}
.prose p { margin: 0 0 1rem; }
.prose a { color: var(--navy); text-underline-offset: 0.15em; }

/* ----- Service tiles ----- */
.tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
.tile {
  background: var(--white);
  border: 1px solid rgba(21, 32, 51, 0.07);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(21, 32, 51, 0.07);
  padding: 1.15rem 1rem 1.2rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.tile:hover,
.tile:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(21, 32, 51, 0.12);
}
.tile-icon-wrap {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  background: rgba(196, 163, 106, 0.16);
  color: #8a6e3a;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.tile-icon-wrap svg {
  width: 1.25rem;
  height: 1.25rem;
}
.tile h3 {
  margin: 0 0 0.45rem;
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.3;
}
.tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.steps li {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.step-num {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: #8a6e3a;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.steps h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}
.steps p {
  margin: 0;
  color: var(--muted);
}

.section--contact {
  background: var(--navy-mid);
  color: var(--white);
}
.section--contact .eyebrow { color: var(--gold); }
.section--contact h2 { max-width: 18ch; }
.contact-lead {
  max-width: 32rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  margin: 0 0 1.5rem;
}
.contact-email {
  display: inline-block;
  color: var(--white);
  font-size: clamp(1.25rem, 3vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.15rem;
  overflow-wrap: anywhere;
}
.contact-email:hover,
.contact-email:focus-visible { color: var(--gold-hover); }
.contact-address {
  margin: 1.1rem 0 0;
  max-width: 28rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.78);
  padding: 1.5rem 1.35rem;
  font-size: 0.9rem;
}
.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.5rem;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-meta { max-width: 36rem; }
.footer-copy, .footer-address, .footer-links { margin: 0; }
.footer-address {
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.85rem;
  line-height: 1.5;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.35rem;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--gold-hover);
  border-bottom-color: var(--gold);
}

.subpage .site-header { position: sticky; }
.subpage main.section { min-height: calc(100svh - var(--header-h) - 5rem); }

/* ----- Animations ----- */
[data-animate] {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-animate].is-visible {
  opacity: 1;
  transform: none;
}

@media (min-width: 700px) {
  .tile-grid { gap: 1.15rem; }
  .tile { padding: 1.4rem 1.3rem 1.45rem; }
  .tile h3 { font-size: 1.1rem; }
  .tile p { font-size: 0.98rem; }
  .steps { grid-template-columns: 1fr 1fr; gap: 1.75rem 2rem; }
}

@media (min-width: 1024px) {
  .tile-grid { grid-template-columns: repeat(6, 1fr); gap: 1.25rem; }
  .tile { grid-column: span 2; }
  #services .tile:nth-child(4) { grid-column: 2 / span 2; }
  #services .tile:nth-child(5) { grid-column: 4 / span 2; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .section { padding: 5.5rem 2rem; }
  .header-inner, .hero { padding-left: 2rem; padding-right: 2rem; }
}

@media (max-width: 719px) {
  .logo--header img { height: 48px; }
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid rgba(21, 32, 51, 0.08);
    box-shadow: 0 10px 24px rgba(21, 32, 51, 0.08);
    padding: 0.4rem 0 0.8rem;
  }
  .site-header { position: sticky; }
  .site-header:has(.nav-toggle[aria-expanded="true"]) .site-nav,
  .site-nav.is-open { display: flex; }
  .site-nav a {
    padding: 0.85rem 1.35rem;
    border-bottom: 0;
  }
  .site-nav--simple { display: flex; position: static; padding: 0; border: 0; box-shadow: none; }
  .hero { min-height: auto; padding-top: 2.5rem; padding-bottom: 3.25rem; }
}

@media (max-width: 380px) {
  .logo--header img { height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  [data-animate] {
    opacity: 1;
    transform: none;
  }
  .tile:hover,
  .tile:focus-within {
    transform: none;
  }
}


/* ----- Floating WhatsApp + AI chat (do not cover page content) ----- */
body.has-site-widgets {
  padding-bottom: 6.5rem;
}
.site-footer {
  padding-bottom: 2rem;
}

.site-widgets {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  pointer-events: none;
}
.site-widgets > * { pointer-events: auto; }

.wa-float,
.chat-bubble {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(11, 22, 36, 0.2);
}
.wa-float svg,
.chat-bubble svg {
  width: 1.35rem;
  height: 1.35rem;
}
.wa-float {
  background: #fff;
  color: #25D366; /* official WhatsApp green, icon only */
  border: 1px solid rgba(21, 32, 51, 0.1);
  position: relative;
}
.wa-float-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.wa-float:hover,
.wa-float:focus-visible {
  box-shadow: 0 10px 24px rgba(11, 22, 36, 0.26);
}
.chat-bubble {
  background: var(--navy);
  color: var(--white);
}
.chat-bubble:hover,
.chat-bubble:focus-visible {
  background: var(--navy-mid);
}

.chat-greet {
  display: none;
  max-width: 16.5rem;
  background: var(--white);
  color: var(--ink);
  border: 1px solid rgba(21, 32, 51, 0.08);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(11, 22, 36, 0.14);
  padding: 0.75rem 2rem 0.75rem 0.9rem;
  position: relative;
  margin-right: 0.15rem;
}
.chat-greet.is-visible { display: block; }
.chat-greet.is-hidden { display: none !important; }
.chat-greet p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}
.chat-greet-close {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  width: 1.6rem;
  height: 1.6rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.chat-greet-close svg { width: 0.9rem; height: 0.9rem; }

.chat-panel {
  width: 21rem;
  max-width: calc(100vw - 2rem);
  max-height: min(28rem, 70vh);
  background: var(--white);
  color: var(--ink);
  border: 1px solid rgba(21, 32, 51, 0.08);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(11, 22, 36, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  order: -1;
}
.chat-panel[hidden] { display: none !important; }
.chat-head {
  background: var(--navy);
  color: var(--white);
  padding: 0.85rem 2.6rem 0.85rem 1rem;
  position: relative;
}
.chat-head-title {
  margin: 0;
  font-weight: 650;
  font-size: 0.95rem;
}
.chat-head-sub {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
}
.chat-close {
  position: absolute;
  top: 0.55rem;
  right: 0.45rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.chat-close svg { width: 1.05rem; height: 1.05rem; }
.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem 0.85rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 10rem;
  background: var(--ivory);
}
.chat-msg {
  max-width: 90%;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
}
.chat-msg p { margin: 0; overflow-wrap: anywhere; }
.chat-msg--assistant {
  background: var(--white);
  border: 1px solid rgba(21, 32, 51, 0.06);
  align-self: flex-start;
}
.chat-msg--user {
  background: var(--navy);
  color: var(--white);
  align-self: flex-end;
}
.chat-form {
  display: flex;
  gap: 0.45rem;
  padding: 0.65rem 0.7rem 0.75rem;
  border-top: 1px solid rgba(21, 32, 51, 0.08);
  background: var(--white);
}
.chat-input {
  flex: 1;
  resize: none;
  border: 1px solid rgba(21, 32, 51, 0.14);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  font: inherit;
  font-size: 0.9rem;
  min-height: 2.6rem;
  max-height: 6rem;
  color: var(--ink);
  background: var(--white);
}
.chat-input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.chat-send {
  background: var(--gold);
  color: var(--navy);
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  padding: 0 0.9rem;
  cursor: pointer;
}
.chat-send:hover,
.chat-send:focus-visible { background: var(--gold-hover); }
.chat-send:disabled { opacity: 0.6; cursor: default; }

.contact-whatsapp {
  margin: 1.15rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.contact-whatsapp a {
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  font-weight: 500;
}
.contact-whatsapp a:hover,
.contact-whatsapp a:focus-visible { color: var(--gold-hover); }
.wa-inline-icon {
  width: 1.15rem;
  height: 1.15rem;
  color: #25D366;
  flex: 0 0 auto;
}
.wa-inline-icon svg { width: 100%; height: 100%; }

/* Welcome chip hides when the panel is open. WhatsApp stays visible above the panel. */
.site-widgets.is-open .chat-greet { display: none !important; }

@media (max-width: 719px) {
  .wa-float,
  .chat-bubble {
    width: 2.65rem;
    height: 2.65rem;
  }
  .wa-float svg,
  .chat-bubble svg { width: 1.2rem; height: 1.2rem; }
  .site-widgets { right: 0.75rem; bottom: 0.75rem; gap: 0.5rem; }
  .site-widgets.is-open {
    left: 0;
    right: 0;
    bottom: 0;
    align-items: flex-end;
    padding: 0;
    gap: 0.55rem;
  }
  .site-widgets.is-open .chat-bubble { display: none; }
  .site-widgets.is-open .wa-float {
    order: 1;
    margin-right: 0.75rem;
  }
  .site-widgets.is-open .chat-panel {
    order: 2;
    width: 100%;
    max-width: none;
    max-height: min(78vh, 34rem);
    border-radius: 16px 16px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }
  .chat-greet { max-width: min(16.5rem, calc(100vw - 5.5rem)); }
}

@media (prefers-reduced-motion: reduce) {
  .wa-float,
  .chat-bubble,
  .chat-panel { transition: none; }
}

a.tile--link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
a.tile--link .tile-visit {
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #8a6e3a;
}
.tile--soon {
  cursor: default;
}
.tile--soon:hover,
.tile--soon:focus-within {
  transform: none;
  box-shadow: 0 8px 24px rgba(21, 32, 51, 0.07);
}
.tile-soon-label {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a6e3a;
}

/* SUM Book Keeper download page (kept unlinked until launch) */
.app-download .app-lead {
  font-size: 1.08rem;
  max-width: 40rem;
  line-height: 1.55;
}
.app-download .btn-row { margin: 1.25rem 0 2rem; }
.app-download .btn-row .btn { display: inline-flex; }
.app-download h2 {
  margin: 2rem 0 0.8rem;
  font-size: 1.25rem;
}
.feature-list {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  max-width: 40rem;
}
.feature-list li { margin: 0 0 0.45rem; }
.install-steps {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.5rem;
}
.install-steps article {
  background: var(--white);
  border: 1px solid rgba(21, 32, 51, 0.07);
  border-radius: 16px;
  padding: 1rem 1.05rem 1.1rem;
}
.install-steps h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
}
.install-steps p { margin: 0; color: var(--muted); }
@media (min-width: 700px) {
  .install-steps { grid-template-columns: 1fr 1fr 1fr; }
}
