/* ============================================================
   Rhapsoidus Technology — styles
   Clean, professional corporate theme (light)
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-alt: #f4f7f9;
  --surface: #ffffff;
  --line: #dfe6ec;
  --text: #2a3742;
  --text-dim: #5b6770;
  --navy: #002e5d;
  --navy-deep: #012142;
  --blue: #0066b2;
  --blue-dark: #00518f;
  --sky: #009dd9;
  --rds: #0066b2;
  --bid: #009dd9;
  --storee: #00838f;
  --font-display: "Montserrat", "Inter", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --container: 1160px;
  --radius: 8px;
  --shadow: 0 10px 30px rgba(2, 32, 71, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--navy);
}

h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h2 em, h1 em { font-style: normal; color: var(--blue); }

a { color: inherit; text-decoration: none; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1.1rem;
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.7rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.btn--primary {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 102, 178, 0.22);
}
.btn--primary:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 102, 178, 0.28);
}
.btn--ghost {
  border: 1.5px solid var(--blue);
  color: var(--blue);
}
.btn--ghost:hover {
  background: rgba(0, 102, 178, 0.06);
  transform: translateY(-2px);
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: #ffffff;
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 2px 14px rgba(2, 32, 71, 0.06);
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__logo { display: flex; align-items: center; gap: 6px; }
.nav__logo-img { height: 30px; width: auto; display: block; flex-shrink: 0; }
.nav__wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.nav__wordmark em {
  font-style: normal;
  font-weight: 500;
  color: var(--blue);
  margin-left: 0.35em;
  font-size: 0.92em;
}
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s ease;
}
.nav__links a:hover { color: var(--blue); }
.nav__links a.nav__cta {
  color: #ffffff;
  background: var(--blue);
  border: 1px solid var(--blue);
  padding: 0.5rem 1.1rem;
  border-radius: 4px;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.nav__links a.nav__cta:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #ffffff; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav__toggle span {
  width: 24px; height: 2px;
  background: var(--navy);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding-top: 90px;
  background:
    linear-gradient(100deg, rgba(0, 22, 44, 0.9) 0%, rgba(0, 34, 66, 0.72) 45%, rgba(0, 46, 93, 0.3) 100%),
    url("assets/about-operations.jpg") center / cover no-repeat;
}
.hero .eyebrow { color: #6ec4ec; }
/* margin-block auto centers the content in the space above the ticker,
   which margin-top auto-free space then pins to the hero's bottom edge */
.hero__content { position: relative; z-index: 2; padding-top: 4vh; padding-bottom: 8vh; margin-block: auto; }
.hero__title {
  font-size: clamp(2.4rem, 5.6vw, 4.3rem);
  max-width: 16ch;
  margin-bottom: 1.6rem;
  color: #ffffff;
}
.hero__title em { color: #6ec4ec; }
.hero__sub {
  max-width: 56ch;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.08rem;
  margin-bottom: 2.4rem;
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero .btn--ghost {
  border-color: rgba(255, 255, 255, 0.75);
  color: #ffffff;
}
.hero .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
}

/* staggered hero entrance */
.hero .reveal:nth-child(1) { transition-delay: 0.05s; }
.hero .reveal:nth-child(2) { transition-delay: 0.15s; }
.hero .reveal:nth-child(3) { transition-delay: 0.28s; }
.hero .reveal:nth-child(4) { transition-delay: 0.4s; }

/* ticker */
.hero__ticker {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 14px 0;
  background: var(--bg-alt);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.hero__ticker-track {
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  animation: ticker 36s linear infinite;
  font-weight: 500;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.hero__ticker-track i { color: var(--blue); font-style: normal; font-size: 0.6rem; }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__ticker-track { animation: none; }
}

/* ============================================================
   Sections
   ============================================================ */
.section { padding: 120px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section__head { margin-bottom: 64px; max-width: 720px; }
.section__sub { color: var(--text-dim); margin-top: 1.1rem; max-width: 58ch; }

/* ---------- About ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 72px;
  align-items: start;
}
.about__lede p {
  font-size: 1.13rem;
  color: var(--text-dim);
}
.about__lede p + p { margin-top: 1.4rem; }
.about__lede p:first-child { color: var(--text); }
.about__facts { list-style: none; display: grid; gap: 14px; }
.about__facts li {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(2, 32, 71, 0.04);
}
.about__fact-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.4rem;
  color: var(--blue);
  line-height: 1;
  min-width: 44px;
}
.about__fact-label { font-size: 0.92rem; color: var(--text-dim); }

/* ---------- Products ---------- */
.products {
  display: grid;
  gap: 22px;
}
.products--duo { grid-template-columns: repeat(2, 1fr); }
.products__group + .products__group { margin-top: 72px; }
.group__head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 26px;
}
.group__label {
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.group__head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.product {
  --accent: var(--blue);
  display: block;
  position: relative;
  padding: 34px 30px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}
.product[data-accent="rds"] { --accent: var(--rds); --logo-h: 56px; }
.product[data-accent="bid"] { --accent: var(--bid); --logo-h: 44px; }
.product[data-accent="storee"] { --accent: var(--storee); --logo-h: 29px; }
.product::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent);
}
.product:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: 0 18px 44px rgba(2, 32, 71, 0.12);
}
.product:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.product__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.6rem;
}

/* ---------- Product illustrations (inline SVG) ---------- */
.product__art {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.3rem;
}
.product__art svg {
  display: block;
  width: 100%;
  height: auto;
}
.product__art .dim {
  stroke: rgba(42, 55, 66, 0.5);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.product__art .faint {
  stroke: rgba(42, 55, 66, 0.18);
  stroke-width: 1.2;
  stroke-linecap: round;
}
.product__art .accent {
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.product__art .spark { fill: var(--accent); }
.product__art .dimfill { fill: rgba(42, 55, 66, 0.5); }
.product__art .hl {
  fill: color-mix(in srgb, var(--accent) 12%, transparent);
  stroke: color-mix(in srgb, var(--accent) 45%, transparent);
  stroke-width: 1;
}
.product__art .node {
  fill: var(--accent);
  animation: nodepulse 2.6s ease-in-out infinite;
}
.product__art .flow {
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 3 7;
  opacity: 0.85;
  animation: flowdash 1.8s linear infinite;
}
@keyframes flowdash { to { stroke-dashoffset: -20; } }
@keyframes nodepulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  .product__art .flow,
  .product__art .node { animation: none; }
}
.product__index {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--accent);
}
.product__tag {
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 12px;
  background: var(--bg-alt);
}
.product__name {
  font-size: 1.7rem;
  margin-bottom: 0.9rem;
  color: var(--navy);
}
/* logo lockup stands in for the name text; height is tuned per product because
   the lockups differ in proportion and content — RDS carries a mark and two
   sub-lines, NexBid and Storee are wordmarks, so equal heights read unequal */
.product__name--logo {
  font-size: 0;
  line-height: 0;
  margin-bottom: 1.1rem;
}
.product__logo {
  display: block;
  width: auto;
  height: var(--logo-h, 30px);
  max-width: 100%;
}
.product__desc {
  font-size: 0.95rem;
  color: var(--text-dim);
  margin-bottom: 1.6rem;
}
.product__points {
  list-style: none;
  display: grid;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 1.3rem;
}
.product__points li {
  font-size: 0.86rem;
  color: var(--text-dim);
  padding-left: 20px;
  position: relative;
}
.product__points li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 0.1em;
  font-size: 0.55rem;
  color: var(--accent);
}
.products .product:nth-child(2) { transition-delay: 0.1s; }

/* wide horizontal variant (Storee) — art beside content */
.product--wide {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 44px;
  align-items: center;
  padding: 38px 40px;
}
.product--wide .product__art {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* ---------- Approach ---------- */
.approach {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(2, 32, 71, 0.04);
}
.approach__item {
  padding: 42px 40px;
  border-bottom: 1px solid var(--line);
}
.approach__item:nth-child(odd) { border-right: 1px solid var(--line); }
.approach__item:nth-last-child(-n + 2) { border-bottom: none; }
.approach__num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--blue);
  display: block;
  margin-bottom: 1.1rem;
  text-transform: uppercase;
}
.approach__item h3 { font-size: 1.25rem; margin-bottom: 0.7rem; }
.approach__item p { font-size: 0.95rem; color: var(--text-dim); }

/* ---------- The Name ---------- */
.name {
  padding: 140px 0;
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
  text-align: center;
}
.name__inner { max-width: 760px; }
.name__greek {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  color: var(--blue);
  margin-bottom: 1.4rem;
  font-weight: 500;
}
.name__quote p {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  line-height: 1.45;
  color: var(--navy);
}
.name__quote em { color: var(--blue); font-style: italic; }
.name__body {
  margin-top: 2rem;
  color: var(--text-dim);
  max-width: 54ch;
  margin-inline: auto;
}
.name__weave {
  width: 220px;
  max-width: 60%;
  margin: 2.6rem auto 0;
  display: block;
}

/* ---------- Contact ---------- */
.contact {
  position: relative;
  overflow: hidden;
}
.section--alt.contact {
  background: var(--navy);
  border-block: none;
}
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/contact-kl.jpg") center / cover no-repeat;
  opacity: 0.18;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 75%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 75%, transparent);
  pointer-events: none;
}
.contact__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: center;
}
.contact h2 { color: #ffffff; }
.contact h2 em { color: var(--sky); }
.contact .eyebrow { color: var(--sky); }
.contact .section__sub { color: rgba(255, 255, 255, 0.75); }
.contact .btn--primary {
  background: #ffffff;
  color: var(--navy);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.contact .btn--primary:hover {
  background: #eaf3fa;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.26);
}
.contact__actions { justify-self: end; text-align: right; }
.contact__note {
  margin-top: 1.1rem;
  font-weight: 500;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.75);
  padding: 64px 0 32px;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.footer .nav__wordmark { color: #ffffff; }
.footer .nav__wordmark em { color: var(--sky); }
.footer .nav__logo-img { height: 34px; }
.footer__brand p {
  margin-top: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  max-width: 34ch;
}
.footer__cols { display: flex; gap: 72px; }
.footer__cols h4 {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 1rem;
  font-weight: 600;
}
.footer__cols a {
  display: block;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  padding: 4px 0;
  transition: color 0.2s ease;
}
.footer__cols a:hover { color: #ffffff; }
.footer__legal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .products--duo { grid-template-columns: 1fr; }
  .product--wide { grid-template-columns: 1fr; gap: 8px; padding: 34px 30px 30px; }
  .about__grid { grid-template-columns: 1fr; gap: 48px; }
  .contact__inner { grid-template-columns: 1fr; }
  .contact__actions { justify-self: start; text-align: left; }
}

@media (max-width: 720px) {
  .section { padding: 84px 0; }
  .approach { grid-template-columns: 1fr; }
  .approach__item:nth-child(odd) { border-right: none; }
  .approach__item:nth-last-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .approach__item:last-child { border-bottom: none; }

  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 30px rgba(2, 32, 71, 0.1);
    padding: 18px 28px 26px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  .nav__links a { padding: 10px 0; font-size: 1.05rem; }
  .nav__links a.nav__cta { margin-top: 10px; padding: 0.6rem 1.2rem; }
  .nav.menu-open .nav__links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav.menu-open .nav__toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav.menu-open .nav__toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
}
