/* ===================================================================
   WESTEM CRM — warm, clear, human.
   Light cream canvas, terracotta accent, real product screenshots,
   gentle motion. Built for learning-centre directors, not developers:
   plain hierarchy, big readable type, obvious buttons.
   =================================================================== */

:root {
  --bg:      #fbf8f3;
  --card:    #ffffff;
  --ink:     #221e1a;
  --soft:    #6b635b;
  --accent:  #d9532b;
  --accent-d:#bd431f;
  --pine:    #27453c;
  --pine-d:  #1d352e;
  --line:    rgba(34, 30, 26, 0.1);

  --head: "Bricolage Grotesque", "Inter", sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-sm: 0 2px 10px rgba(34, 30, 26, 0.06);
  --shadow-md: 0 14px 40px rgba(34, 30, 26, 0.1);
  --r-lg: 22px;
  --r-md: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.02rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(217, 83, 43, 0.25); }

.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4.5vw, 2.5rem);
}

.container-narrow { max-width: 50rem; }

a { color: inherit; }

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

section { scroll-margin-top: 5.2rem; }

h2, h3 { font-family: var(--head); letter-spacing: -0.01em; }

/* ============================== buttons ============================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--head);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  transition: transform 300ms var(--ease), box-shadow 300ms var(--ease),
              background 250ms ease, color 250ms ease;
}

.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 20px rgba(217, 83, 43, 0.35);
}

.btn-accent:hover {
  background: var(--accent-d);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(217, 83, 43, 0.45);
}

.btn-light {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
}

.btn-light:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.22); transform: translateY(-2px); }

/* ============================== topbar ============================== */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background 300ms ease, box-shadow 300ms ease;
}

.topbar.scrolled {
  background: rgba(251, 248, 243, 0.94);
  box-shadow: var(--shadow-sm);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.logo {
  font-family: var(--head);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #fff;
  transition: color 300ms ease;
}

.logo span { color: var(--accent); }

.topbar.scrolled .logo { color: var(--ink); }

.topnav {
  display: flex;
  gap: 1.6rem;
  margin-left: auto;
}

.topnav a {
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  transition: color 250ms ease;
}

.topnav a:hover { color: #fff; }

.topbar.scrolled .topnav a { color: var(--soft); }
.topbar.scrolled .topnav a:hover { color: var(--ink); }

.topbar-cta { padding: 0.6rem 1.3rem; font-size: 0.9rem; white-space: nowrap; }

.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  align-items: center;
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 300ms var(--ease), opacity 200ms ease, background 300ms ease;
}

.topbar.scrolled .menu-btn { background: rgba(34, 30, 26, 0.08); }
.topbar.scrolled .menu-btn span { background: var(--ink); }

body.nav-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .menu-btn span:nth-child(2) { opacity: 0; }
body.nav-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================== hero ================================ */

.hero-product {
  position: relative;
  padding: 9.5rem 0 4.5rem;
  overflow: hidden;
  background:
    radial-gradient(46rem 30rem at 110% -10%, rgba(217, 83, 43, 0.07), transparent 65%),
    radial-gradient(40rem 28rem at -15% 25%, rgba(39, 69, 60, 0.07), transparent 60%),
    var(--bg);
}

.hero-product-copy { max-width: 52rem; }

.hero-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

.hero-title {
  font-family: var(--head);
  font-weight: 800;
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.4rem;
}

.hero-sub {
  max-width: 52ch;
  font-size: 1.12rem;
  color: var(--soft);
  margin-bottom: 2.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.4rem;
}

.hero-ticks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.8rem;
  font-size: 0.9rem;
  color: var(--soft);
}

.hero-ticks li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-ticks li::before {
  content: "";
  width: 17px;
  height: 17px;
  flex: none;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E") center / 60% no-repeat,
    var(--accent);
}

/* ============================== sections ============================ */

.section { padding: 6.5rem 0 3rem; }

.section-head { max-width: 44rem; margin-bottom: 3.2rem; }

.section-head h2 {
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.12;
  margin-bottom: 1rem;
}

.section-head em {
  font-style: normal;
  color: var(--accent);
}

.section-head p { color: var(--soft); font-size: 1.05rem; }

/* ============================== cards =============================== */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: transform 350ms var(--ease), box-shadow 350ms var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(217, 83, 43, 0.12);
  color: var(--accent);
  margin-bottom: 1.3rem;
}

.card-icon svg { width: 27px; height: 27px; }

.card h3 {
  font-weight: 700;
  font-size: 1.22rem;
  line-height: 1.3;
  margin-bottom: 0.7rem;
}

.card p { color: var(--soft); font-size: 0.97rem; }

/* ============================== results ============================= */

.section-results { padding-bottom: 5rem; }

.result {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: 3.2rem 0;
}

.result-flip .result-photo { order: 2; }
.result-flip .result-text { order: 1; }

.result-photo {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
}

.result-photo img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  display: block;
  will-change: transform;
}

.result-kind {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.result-big {
  font-family: var(--head);
  font-weight: 800;
  font-size: clamp(4rem, 9vw, 6.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.result-big b {
  font-size: 0.45em;
  font-weight: 700;
  color: var(--accent);
  margin-left: 0.1em;
}

.result-label {
  font-family: var(--head);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0.2rem 0 1.1rem;
}

.result-story {
  color: var(--soft);
  max-width: 50ch;
  margin-bottom: 1.4rem;
}

.result-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.result-tags li {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(39, 69, 60, 0.09);
  color: var(--pine);
}

/* ============================== steps =============================== */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2.1rem 1.8rem;
  box-shadow: var(--shadow-sm);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--pine);
  color: #fff;
  font-family: var(--head);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 1.2rem;
}

.step h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.6rem; }

.step p { color: var(--soft); font-size: 0.96rem; }

/* ============================== promises ============================ */

.promises {
  background: var(--pine);
  color: #fff;
  margin-top: 5rem;
  padding: 4.5rem 0;
}

.promises-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.2rem;
}

.promise h3 {
  font-weight: 700;
  font-size: 1.12rem;
  margin-bottom: 0.5rem;
}

.promise h3::before {
  content: "— ";
  color: #f0a98e;
}

.promise p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
}

/* ============================== faq ================================= */

.faq { display: flex; flex-direction: column; gap: 0.8rem; }

.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--head);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  padding: 1.15rem 1.4rem;
}

.faq-x {
  position: relative;
  width: 22px;
  height: 22px;
  flex: none;
}

.faq-x::before, .faq-x::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--accent);
  translate: -50% -50%;
  transition: rotate 350ms var(--ease);
}

.faq-x::after { rotate: 90deg; }

.faq-item.open .faq-x::after { rotate: 0deg; }

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 450ms var(--ease);
}

.faq-item.open .faq-a { grid-template-rows: 1fr; }

.faq-a-inner { overflow: hidden; }

.faq-a-inner p {
  padding: 0 1.4rem 1.3rem;
  color: var(--soft);
  font-size: 0.97rem;
  max-width: 60ch;
}

/* ============================== contact ============================= */

.contact {
  margin-top: 6rem;
  background:
    radial-gradient(50rem 30rem at 85% 115%, rgba(217, 83, 43, 0.28), transparent 60%),
    radial-gradient(44rem 26rem at 8% -20%, rgba(255, 255, 255, 0.08), transparent 55%),
    linear-gradient(160deg, var(--pine) 0%, var(--pine-d) 100%);
  padding: 7rem 0;
  color: #fff;
  text-align: center;
}

.contact h2 {
  font-weight: 800;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  letter-spacing: -0.015em;
  margin-bottom: 1.1rem;
}

.contact p {
  max-width: 52ch;
  margin: 0 auto 2.4rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.contact-note {
  margin-top: 2.2rem !important;
  margin-bottom: 0 !important;
  font-size: 0.85rem !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

/* ============================== footer ============================== */

.footer { padding: 2.8rem 0; }

.footer-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem 2.5rem;
  flex-wrap: wrap;
}

.logo-footer { color: var(--ink); font-size: 1.1rem; }

.footer-nav { display: flex; gap: 1.4rem; margin-left: auto; }

.footer-nav a {
  font-size: 0.88rem;
  color: var(--soft);
  text-decoration: none;
}

.footer-nav a:hover { color: var(--ink); }

.footer-copy {
  width: 100%;
  font-size: 0.8rem;
  color: var(--soft);
}

.footer-credits {
  width: 100%;
  font-size: 0.72rem;
  color: rgba(107, 99, 91, 0.75);
}

.footer-credits a { color: inherit; }

/* ===================================================================
   Motion — gentle and once. Hidden states only with JS + motion OK,
   so the page is complete without either.
   =================================================================== */

@media (prefers-reduced-motion: no-preference) {

  .js [data-load] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 800ms var(--ease) var(--d, 0ms),
                transform 800ms var(--ease) var(--d, 0ms);
  }

  .js.loaded [data-load] {
    opacity: 1;
    transform: translateY(0);
  }

  .js [data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 750ms var(--ease) var(--d, 0ms),
                transform 750ms var(--ease) var(--d, 0ms);
  }

  .js [data-reveal].shown {
    opacity: 1;
    transform: translateY(0);
  }

  /* promises stagger inside one reveal */
  .js .promises[data-reveal] .promise {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 650ms var(--ease) var(--d, 0ms),
                transform 650ms var(--ease) var(--d, 0ms);
  }

  .js .promises[data-reveal].shown .promise {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================== responsive ========================== */

@media (max-width: 64rem) {
  .cards, .steps { grid-template-columns: 1fr; max-width: 36rem; }
  .promises-grid { grid-template-columns: repeat(2, 1fr); }
  .result,
  .result-flip { grid-template-columns: 1fr; gap: 1.6rem; padding: 2.4rem 0; }
  .result-flip .result-photo { order: 1; }
  .result-flip .result-text { order: 2; }
}

@media (max-width: 72rem) {
  .topnav {
    position: fixed;
    top: 64px;
    left: 1rem;
    right: 1rem;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
    padding: 0.6rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 250ms ease, transform 250ms var(--ease);
  }

  body.nav-open .topnav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .topnav a {
    color: var(--ink) !important;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 1rem;
    white-space: normal;
  }

  .topnav a:hover { background: rgba(34, 30, 26, 0.05); }

  .topbar-cta { display: none; }
  .menu-btn { display: flex; margin-left: 0; }
  .lang-switch,
  .topnav + .lang-switch { margin-left: auto; margin-right: 0.4rem; }
}

@media (max-width: 48rem) {
  .hero-product { padding-top: 7.5rem; }
  .promises-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .section { padding-top: 4.5rem; }
}

/* ===================================================================
   Product-landing components (Westem CRM)
   =================================================================== */

/* --- topbar over a light hero: dark text from the very top --- */

.topbar-solid .logo { color: var(--ink); }
.topbar-solid .topnav a { color: var(--soft); }
.topbar-solid .topnav a:hover { color: var(--ink); }
.topbar-solid .menu-btn { background: rgba(34, 30, 26, 0.07); }
.topbar-solid .menu-btn span { background: var(--ink); }

.logo-tag {
  font-style: normal;
  font-size: 0.58em;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--pine);
  background: rgba(39, 69, 60, 0.1);
  border-radius: 999px;
  padding: 0.18em 0.6em;
  margin-left: 0.5em;
  vertical-align: 0.12em;
}

/* --- language switcher --- */

.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
}

.lang-switch button {
  border: 0;
  background: transparent;
  font-family: var(--head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--soft);
  padding: 0.32rem 0.66rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease;
}

.lang-switch button:hover { color: var(--ink); }

.lang-switch button.active {
  background: var(--pine);
  color: #fff;
}

/* --- outline button for light backgrounds --- */

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid rgba(34, 30, 26, 0.25);
}

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

/* --- browser frame around app screenshots --- */

.frame {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.frame-bar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 1rem;
  background: #f6f1e9;
  border-bottom: 1px solid var(--line);
}

.frame-dots { display: inline-flex; gap: 6px; }

.frame-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e8927c;
}

.frame-dots i:nth-child(2) { background: #e7c46e; }
.frame-dots i:nth-child(3) { background: #9cb89b; }

.frame-url {
  flex: 1;
  max-width: 26rem;
  margin: 0 auto;
  text-align: center;
  font-size: 0.74rem;
  color: var(--soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.16rem 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frame img { display: block; width: 100%; height: auto; }

.hero-frame {
  margin-top: 3.2rem;
  box-shadow: 0 30px 70px rgba(34, 30, 26, 0.16);
}

/* --- product tour --- */

.section-tour .result-photo.frame {
  aspect-ratio: auto;
  border-radius: var(--r-lg);
}

.section-tour .result-photo.frame img {
  height: auto;
  will-change: auto;
}

.tour-h {
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.2;
  margin: 0.1rem 0 0.9rem;
}

/* --- multi-branch band --- */

.branches {
  margin-top: 5.5rem;
  padding: 5.5rem 0;
  background:
    radial-gradient(40rem 26rem at 100% 0%, rgba(217, 83, 43, 0.16), transparent 60%),
    var(--pine);
  color: #fff;
}

.branches-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.branches h2 {
  font-weight: 800;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.branches-copy > p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 50ch;
  margin-bottom: 1.8rem;
}

.branches-list { list-style: none; }

.branches-list li {
  position: relative;
  padding-left: 2rem;
  margin: 0.95rem 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.78);
}

.branches-list strong { color: #fff; font-weight: 600; }

.branches-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E") center / 60% no-repeat,
    var(--accent);
}

.branches-frame {
  border: 0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

/* --- responsive --- */

@media (max-width: 64rem) {
  .cards-6 { grid-template-columns: repeat(2, 1fr); max-width: none; }
  .branches-grid { grid-template-columns: 1fr; }
  .branches-frame { max-width: 34rem; }
}

@media (max-width: 48rem) {
  .cards-6 { grid-template-columns: 1fr; max-width: 36rem; }
  .lang-switch button { padding: 0.3rem 0.5rem; }
  .hero-frame { margin-top: 2.4rem; }
  .frame-url { display: none; }
}

/* brand mark in the wordmark lockup (added with the Westem logo) */
.logo-mark { width: 1.5em; height: 1.5em; vertical-align: -0.34em; margin-right: 0.44em; }
