/* ============================================================
   BUX SOFTWARE — site.css
   One non-scrollable "card" layout for every page. A rounded card
   fills the viewport: the cover shows a magenta→white gradient with
   the founder cutout; inner pages split into a magenta title panel
   (left) and a white content panel (right). Brand: #d02dff + #ffffff.
   ============================================================ */

:root {
  --magenta: #d02dff;
  --magenta-deep: #b81fe6;
  --magenta-darker: #9b13c7;
  --white: #ffffff;
  --ink: #161020;          /* near-black headline */
  --ink-soft: #2c2438;     /* secondary text */
  --muted: #6b6478;        /* tertiary text on white */
  --line: #ece6f2;         /* hairlines on white */
  --page-bg: #eef1f5;      /* light canvas behind the card */
  --gold: #ffb300;
  --radius: 30px;
  --display: "Baloo 2", system-ui, sans-serif;
  --font: "Poppins", system-ui, -apple-system, sans-serif;
}

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

html, body { height: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--page-bg);
  overflow: hidden;                 /* the whole point: non-scrollable */
  display: grid;
  place-items: center;
  padding: clamp(12px, 2.4vw, 30px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

::selection { background: var(--magenta); color: #fff; }
:focus-visible { outline: 2px solid var(--magenta); outline-offset: 3px; border-radius: 10px; }

/* ============ Card shell (shared by all pages) ============ */

.card {
  position: relative;
  width: min(1200px, 100%);
  height: min(820px, calc(100vh - clamp(24px, 4.8vw, 60px)));
  height: min(820px, calc(100dvh - clamp(24px, 4.8vw, 60px)));
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  background: var(--white);
  box-shadow:
    0 30px 80px rgba(120, 12, 150, 0.20),
    0 4px 18px rgba(0, 0, 0, 0.06);
}

/* the scrollable content region — keeps the card pinned while content scrolls */
.card-body { position: absolute; inset: 0; z-index: 1; }

/* ---- Brand (top-left) ---- */
.card-brand {
  position: absolute;
  top: clamp(18px, 2.4vw, 30px);
  left: clamp(20px, 2.6vw, 38px);
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0.2px;
  color: #fff;
  text-shadow: 0 1px 10px rgba(90, 0, 120, 0.25);
}
.card-brand .brand-mark { border-radius: 9px; box-shadow: 0 4px 14px rgba(60, 0, 80, 0.30); }
.card-brand em { font-style: normal; font-weight: 500; opacity: 0.85; }

/* ---- Page navigation (bottom-right, shared) ---- */
.card-nav {
  position: absolute;
  right: clamp(18px, 2.6vw, 40px);
  bottom: clamp(18px, 2.6vw, 36px);
  z-index: 7;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  max-width: min(560px, 66%);
}
.card-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1;
  color: var(--magenta-deep);
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid rgba(208, 45, 255, 0.32);
  padding: 10px 17px;
  border-radius: 100px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(208, 45, 255, 0.14);
  transition: transform 0.18s ease, background 0.2s ease, color 0.2s ease,
              box-shadow 0.22s ease, border-color 0.2s ease;
}
.card-nav a .arrow { font-size: 1.02em; transition: transform 0.2s ease; }
.card-nav a:hover, .card-nav a:focus-visible {
  background: var(--magenta);
  color: #fff;
  border-color: var(--magenta);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(208, 45, 255, 0.42);
}
.card-nav a:hover .arrow, .card-nav a:focus-visible .arrow { transform: translateX(3px); }
.card-nav a:active { transform: translateY(0) scale(0.98); }
/* current page */
.card-nav a.active {
  background: linear-gradient(100deg, var(--magenta), var(--magenta-darker));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(208, 45, 255, 0.40);
  cursor: default;
}
.card-nav a.active:hover { transform: none; }
.card-nav a.active .arrow { display: none; }

/* ============ COVER (home) ============ */

.card.cover {
  background: linear-gradient(105deg,
      #d02dff 0%, #d62fff 30%, #e87bff 46%, #f8d9ff 58%, #ffffff 70%, #ffffff 100%);
}
.card.cover::before {
  content: "";
  position: absolute;
  top: -20%; left: -12%;
  width: 60%; height: 90%;
  background: radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.35), transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.cover-photo {
  position: absolute;
  left: clamp(-12px, 0.5vw, 18px);
  bottom: 0;
  height: 98%;
  width: auto;
  max-width: 52%;
  object-fit: contain;
  object-position: bottom left;
  z-index: 2;
  filter: drop-shadow(0 20px 34px rgba(70, 0, 95, 0.30));
}
.card.no-photo .cover-photo { display: none; }

.cover-copy {
  position: absolute;
  top: 0; right: 0;
  width: 53%;
  height: 100%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(56px, 5vw, 80px) clamp(26px, 4vw, 66px) clamp(86px, 9vw, 128px);
}
.card.no-photo .cover-copy { width: 100%; }
.cover-copy h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.95rem, 4.3vw, 4rem);
  line-height: 1.03;
  letter-spacing: -0.5px;
}
.cover-copy h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.8vw, 2.35rem);
  line-height: 1.12;
  margin-top: clamp(14px, 2vw, 26px);
}
.cover-copy .tagline {
  font-weight: 500;
  font-size: clamp(0.84rem, 1.2vw, 1.06rem);
  color: var(--ink-soft);
  margin-top: clamp(12px, 1.6vw, 22px);
}

/* ============ Inner page split ============ */

.card.page .card-body { display: grid; grid-template-columns: 39% 61%; }

.page-left {
  position: relative;
  background: linear-gradient(160deg, #d02dff 0%, #c01ff0 46%, #a614cf 100%);
  color: #fff;
  padding: clamp(60px, 7vw, 96px) clamp(28px, 3.4vw, 52px) clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.page-left::after {
  content: "";
  position: absolute;
  right: -30%; top: -20%;
  width: 80%; height: 70%;
  background: radial-gradient(circle at 60% 40%, rgba(255, 255, 255, 0.22), transparent 62%);
  pointer-events: none;
}
.page-index {
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 14px;
}
.page-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -0.5px;
}
.page-sub {
  font-weight: 400;
  font-size: clamp(0.95rem, 1.4vw, 1.12rem);
  line-height: 1.5;
  margin-top: 16px;
  opacity: 0.92;
  max-width: 30ch;
}

.page-right {
  position: relative;
  background: var(--white);
  padding: clamp(40px, 4vw, 60px) clamp(28px, 3.4vw, 56px) clamp(78px, 8vw, 104px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

/* portrait on the magenta panel (founder / fallback) */
.page-portrait {
  position: relative;
  margin-bottom: 22px;
  width: clamp(120px, 12vw, 168px);
  aspect-ratio: 1;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 40px rgba(60, 0, 80, 0.35);
}
.page-portrait .fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 3.4rem;
  color: #fff;
}
.page-portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-left .left-contact { margin-top: 22px; display: grid; gap: 8px; font-size: 0.95rem; }
.page-left .left-contact a { font-weight: 600; }
.page-left .left-contact a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

.wcard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 20px 18px;
  box-shadow: 0 10px 26px rgba(120, 12, 150, 0.06);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.wcard-metric {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--magenta-deep);
}
.wcard-mlabel { font-size: 0.78rem; color: var(--muted); margin: 6px 0 12px; }
.wcard-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.18;
  color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wcard-blurb {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wcard-tag {
  margin-top: auto;
  padding-top: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--magenta-deep);
}

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

.rcard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 20px 18px;
  box-shadow: 0 10px 26px rgba(120, 12, 150, 0.06);
  display: flex;
  flex-direction: column;
}
.rcard-stars { color: var(--gold); letter-spacing: 2px; font-size: 0.9rem; margin-bottom: 10px; }
.rcard-quote {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.rcard-cap { display: flex; align-items: center; gap: 11px; margin-top: 16px; font-size: 0.8rem; color: var(--muted); line-height: 1.35; }
.rcard-cap strong { display: block; color: var(--ink); font-size: 0.86rem; }
.rcard-avatar {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--magenta), var(--magenta-darker));
  color: #fff; font-weight: 700; font-size: 0.8rem;
}

/* ============ Carousel ============ */

.carousel { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.carousel-viewport { overflow: hidden; flex: 1; min-height: 0; display: flex; align-items: center; }
.carousel-track { display: flex; width: 100%; transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(var(--per, 2), minmax(0, 1fr));
  gap: 14px;
  align-content: center;
}
.carousel-controls { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.carousel-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(208, 45, 255, 0.32);
  background: #fff;
  color: var(--magenta-deep);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.carousel-btn:hover:not(:disabled) { background: var(--magenta); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(208, 45, 255, 0.35); }
.carousel-btn:disabled { opacity: 0.35; cursor: default; }
.carousel-dots { display: flex; gap: 7px; }
.carousel-dots button {
  width: 8px; height: 8px;
  padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(208, 45, 255, 0.25);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel-dots button.active { background: var(--magenta); transform: scale(1.25); }
.carousel-empty { color: var(--muted); font-size: 0.95rem; padding: 24px 0; }

/* ============ Founder page (right) ============ */

.founder-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  line-height: 1.05;
  color: var(--ink);
}
.founder-role { color: var(--magenta-deep); font-weight: 600; font-size: 0.98rem; margin-top: 6px; }
.founder-bio {
  color: var(--ink-soft);
  font-size: clamp(0.92rem, 1.3vw, 1.04rem);
  line-height: 1.6;
  margin-top: 18px;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.founder-quote {
  margin-top: 20px;
  padding-left: 18px;
  border-left: 3px solid var(--magenta);
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.4;
  color: var(--ink);
}
.founder-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.88rem;
  color: var(--magenta-deep);
  border: 1.5px solid rgba(208, 45, 255, 0.3);
  background: #fff;
  padding: 9px 16px;
  border-radius: 100px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.18s ease;
}
.chip:hover { background: var(--magenta); color: #fff; transform: translateY(-2px); }

/* ============ Contact page (right) ============ */

.contact-head h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  line-height: 1.06;
  color: var(--ink);
}
.contact-head .accent {
  background: linear-gradient(100deg, var(--magenta), var(--magenta-darker));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.contact-head p { color: var(--muted); margin-top: 10px; font-size: 0.96rem; line-height: 1.55; max-width: 46ch; }

.contact-form { display: grid; gap: 13px; margin-top: 20px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 0.96rem;
  color: var(--ink);
  background: #faf7fe;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: #a79fb4; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(208, 45, 255, 0.16);
}
.form-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn-submit {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-weight: 700; font-size: 0.96rem;
  color: #fff; cursor: pointer;
  background: linear-gradient(100deg, var(--magenta), var(--magenta-darker));
  border: 0; border-radius: 100px;
  padding: 13px 26px;
  box-shadow: 0 8px 22px rgba(208, 45, 255, 0.4);
  transition: transform 0.18s ease, box-shadow 0.22s ease;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(208, 45, 255, 0.52); }
.btn-submit:disabled { opacity: 0.6; cursor: default; transform: none; }
.form-status { font-size: 0.88rem; font-weight: 500; color: var(--muted); }
.form-status.ok { color: #1ba672; }
.form-status.err { color: #e0356b; }

/* ============ Responsive: stack & allow scroll on small screens ============ */

@media (max-width: 880px) {
  /* The card stays pinned to the viewport; the content inside it scrolls. */
  body { overflow: hidden; }

  .card-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: clamp(80px, 20vw, 108px);   /* room for the pinned nav */
  }

  /* brand → a legible chip floating over whatever scrolls beneath it */
  .card-brand {
    background: rgba(18, 9, 28, 0.52);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    padding: 7px 15px 7px 11px;
    border-radius: 100px;
    box-shadow: 0 6px 18px rgba(40, 0, 60, 0.3);
  }

  /* nav stays pinned bottom-centre, above the scrolling content */
  .card-nav {
    right: 50%;
    transform: translateX(50%);
    max-width: none;
    justify-content: center;
    bottom: clamp(12px, 3.5vw, 20px);
  }

  /* ----- cover ----- */
  .card.cover {
    background: linear-gradient(172deg, #d02dff 0%, #df5cff 26%, #f3b6ff 50%, #ffffff 74%, #ffffff 100%);
  }
  .card.cover::before { width: 90%; height: 50%; }
  .card.cover .card-body { display: flex; flex-direction: column; align-items: center; }
  .cover-copy {
    position: static; order: 1; width: 100%; height: auto;
    padding: clamp(78px, 18vw, 120px) clamp(20px, 6vw, 40px) 0;
  }
  .cover-photo {
    position: static; order: 2; height: auto; width: auto;
    max-height: 40vh; max-width: min(330px, 78%);
    margin: clamp(10px, 3vw, 18px) auto 0; align-self: center;
  }

  /* ----- inner pages ----- */
  .card.page .card-body { display: flex; flex-direction: column; }
  .page-left { padding: clamp(74px, 17vw, 104px) clamp(22px, 6vw, 38px) clamp(24px, 6vw, 34px); }
  .page-right { padding: clamp(24px, 6vw, 36px) clamp(22px, 6vw, 38px) 0; justify-content: flex-start; }

  /* carousels become simple vertical stacks (the card-body scrolls) */
  .carousel { flex: none; }
  .carousel-viewport { overflow: visible; display: block; }
  .carousel-track { transform: none !important; flex-direction: column; }
  .carousel-slide { flex: none; width: 100%; grid-template-columns: 1fr; margin-bottom: 14px; }
  .carousel-controls { display: none; }
}

@media (max-width: 420px) {
  .card-nav { gap: 7px; }
  .card-nav a { font-size: 0.82rem; padding: 9px 13px; }
}

/* ============ Reduced motion ============ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .carousel-track { transition: none; }
}
