/* ==========================================================================
   Cedar Titans / ProfitMAX Pro Suite — site styles
   ========================================================================== */

:root {
  --teal: #04847e;
  --teal-dark: #06605c;
  --teal-light: #e6f4f3;
  --navy: #1c4454;
  --ink: #25292b;
  --ink-soft: #4f5356;
  --muted: #69727d;
  --line: #e1e6ea;
  --paper: #ffffff;
  --paper-alt: #f1f6fa;
  --amber: #f7b74a;
  --amber-dark: #e09f27;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(28, 68, 84, 0.12);
  --max: 1140px;
  --font: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 900; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.container { width: min(var(--max), 100% - 32px); margin-inline: auto; }

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

.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 60ch; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.btn-primary:hover { background: var(--amber-dark); border-color: var(--amber-dark); color: var(--ink); }
.btn-teal { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn-teal:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: #fff; }
.btn-outline-dark { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn-outline-dark:hover { background: var(--teal-light); color: var(--teal-dark); }

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; color: #fff; font-weight: 900; letter-spacing: 0.04em; }
.brand img { height: 48px; width: auto; }
.brand span { font-size: 1.05rem; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a { color: rgba(255,255,255,0.85); font-weight: 700; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; }
.nav .btn { padding: 0.6rem 1.2rem; font-size: 0.9rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  width: 44px;
  height: 44px;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 24px; height: 2px; background: #fff; position: relative; margin-inline: auto; transition: transform .2s, opacity .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -8px; }
.nav-toggle span::after { top: 8px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink);
    padding: 0.5rem 16px 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav a { padding: 0.9rem 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .nav .btn { margin-top: 0.75rem; justify-content: center; }
  .nav-open .nav { display: flex; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(4,132,126,0.45), transparent 60%),
    linear-gradient(160deg, var(--ink) 0%, var(--navy) 100%);
  color: #fff;
  padding: clamp(3rem, 8vw, 6rem) 0;
  overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero .lead { color: rgba(255,255,255,0.85); margin-bottom: 2rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-art { position: relative; }
.hero-art img { filter: drop-shadow(0 30px 40px rgba(0,0,0,0.45)); }
.hero .eyebrow { color: #8fe0d9; }
.hero-note { margin-top: 1.5rem; font-size: 0.9rem; color: rgba(255,255,255,0.65); }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--paper-alt); }
.section-dark { background: var(--ink); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .lead { color: rgba(255,255,255,0.8); }
.section-teal { background: var(--teal); color: #fff; }
.section-teal h2 { color: #fff; }
.section-head { max-width: 70ch; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Cards */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 1px 2px rgba(28,68,84,0.04);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3, .card h4 { margin-top: 0.75rem; }
.card p:last-child { margin-bottom: 0; }
.card .icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--teal-light); color: var(--teal);
}
.card .icon svg { width: 26px; height: 26px; }

/* Pain points */
.pain { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.pain article { padding: 1.75rem; border-radius: var(--radius); background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); }
.pain h3 { color: var(--amber); font-size: 1.25rem; }
.pain p { color: rgba(255,255,255,0.85); }
.pain p:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .pain { grid-template-columns: 1fr; } }

/* Split / feature rows */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.split.reverse > :first-child { order: 2; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 860px) {
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
}

/* Check list */
.checks { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.checks li { position: relative; padding-left: 2rem; margin-bottom: 0.7rem; }
.checks li::before {
  content: "";
  position: absolute; left: 0; top: 0.3em;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--teal);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='black'/%3E%3Cpath d='M7 12.5l3 3 7-7' stroke='white' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='black'/%3E%3Cpath d='M7 12.5l3 3 7-7' stroke='white' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.section-dark .checks li::before { background: var(--amber); }

/* Industry chips */
.industries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.industry { text-align: center; }
.industry-icon {
  width: 140px; height: 140px; border-radius: 50%;
  margin: 0 auto 1.25rem;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--teal) 0%, var(--teal-dark) 100%);
  border: 4px solid #fff;
  box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.industry-icon svg { width: 76px; height: 76px; }
.industry:hover .industry-icon { transform: translateY(-4px) scale(1.04); }
.industry h3 { font-size: 1.15rem; margin-bottom: 0.25rem; }
.industry p { color: var(--muted); font-size: 0.95rem; margin: 0; }
@media (max-width: 700px) { .industries { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 1.5rem; }
.chip { padding: 0.4rem 0.9rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 0.9rem; color: var(--ink-soft); }

/* Testimonials */
.testimonial {
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 1.75rem 1.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(28,68,84,0.04);
}
.testimonial::before {
  content: "\201C";
  position: absolute;
  top: 0.35rem; right: 1.25rem;
  font-size: 5rem;
  line-height: 1;
  font-weight: 900;
  color: var(--teal-light);
  pointer-events: none;
}
.testimonial .stars { color: var(--amber); letter-spacing: 0.1em; font-size: 1.05rem; }
.testimonial blockquote { margin: 0; flex: 1; font-size: 1.05rem; color: var(--ink); line-height: 1.55; }
.testimonial figcaption { display: flex; flex-direction: column; gap: 0.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.testimonial figcaption strong { color: var(--ink); }
.testimonial figcaption span { color: var(--muted); font-size: 0.92rem; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; text-align: center; }
.stat strong { display: block; font-size: 2.4rem; font-weight: 900; color: var(--amber); line-height: 1; }
.stat span { color: rgba(255,255,255,0.8); }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; } }

/* Integrations */
.logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 3rem; margin-top: 1rem; }
.logos img { height: 64px; width: auto; filter: grayscale(1); opacity: 0.75; transition: filter .2s, opacity .2s; }
.logos img:hover { filter: none; opacity: 1; }
.logos .logo-text { font-size: 1.5rem; font-weight: 900; color: var(--muted); letter-spacing: 0.02em; }

/* Video */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Feature catalogue (features page) */
.feature-group { padding: 2rem 0; border-top: 1px solid var(--line); }
.feature-group:first-of-type { border-top: 0; }
.feature-group-head { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; align-items: start; }
.feature-group-head h2 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.feature-group-head p { color: var(--muted); }
.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.feature-list li { padding: 1rem 1.25rem; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.feature-list li strong { display: block; color: var(--ink); }
.feature-list li span { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 860px) {
  .feature-group-head { grid-template-columns: 1fr; gap: 1rem; }
  .feature-list { grid-template-columns: 1fr; }
}

/* At a glance (home) */
.glance { background: var(--paper-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem 2rem; }
.glance-title { font-size: 1.25rem; margin-bottom: 1.25rem; }
.glance dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem 2rem; margin: 0; }
.glance dl > div { min-width: 0; }
.glance dt { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); margin-bottom: 0.25rem; }
.glance dd { margin: 0; color: var(--ink-soft); font-size: 0.97rem; line-height: 1.45; }
@media (max-width: 960px) { .glance dl { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .glance dl { grid-template-columns: 1fr; } .glance { padding: 1.5rem; } }

/* FAQ (home) */
.faq { max-width: 60rem; margin-inline: auto; display: grid; gap: 0.75rem; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 0 1.25rem; }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; font-weight: 700; font-size: 1.05rem; color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute; right: 0.25rem; top: 50%;
  width: 0.6rem; height: 0.6rem;
  border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: 0 0 1.1rem; color: var(--ink-soft); }

/* CTA band */
.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: 0.5rem; }
.cta-band p { color: rgba(255,255,255,0.85); margin-bottom: 1.5rem; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
fieldset { border: 0; padding: 0; margin: 0 0 1.75rem; }
legend { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.75rem; color: var(--ink); }
.legend-note { font-weight: 400; color: var(--muted); font-size: 0.9rem; }
.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem 1.5rem; }
.options label { display: flex; align-items: flex-start; gap: 0.6rem; cursor: pointer; }
.options input { margin-top: 0.3em; accent-color: var(--teal); width: 18px; height: 18px; }
.options.inline { grid-template-columns: repeat(5, auto); justify-content: start; }
@media (max-width: 600px) { .options, .options.inline { grid-template-columns: 1fr; } }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.field label .req { color: #c0392b; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #c9d1d8;
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-status { margin-top: 1rem; padding: 0.9rem 1rem; border-radius: 8px; display: none; }
.form-status.ok { display: block; background: var(--teal-light); color: var(--teal-dark); }
.form-status.err { display: block; background: #fdecea; color: #a13b2f; }

.contact-layout { align-items: start; grid-template-columns: 1.6fr 1fr; }
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-aside { display: grid; gap: 1rem; align-content: start; }
.contact-aside .card { padding: 1.5rem; }
.contact-aside a { font-weight: 700; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.8); padding: 3.5rem 0 2rem; }
.site-footer h3 { color: #fff; font-size: 1.05rem; margin-bottom: 0.75rem; }
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.5rem; }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.footer-brand img { height: 56px; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; font-size: 0.9rem; color: rgba(255,255,255,0.55); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* Utility */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
