/* ==========================================================================
   Compsoft.com — global stylesheet
   Palette and typography sourced from equinox8-website-vs3 design
   ========================================================================== */

/* ---- Fonts ---- */
/* WOFF2 first; the TTF is only fetched by browsers that cannot read WOFF2.
   Plain format('truetype') is used rather than format('truetype-variations'),
   which some engines do not recognise — they would skip the src and drop the
   whole face. The variable axes survive either container. */
@font-face {
  font-family: 'Zalando Sans';
  src: url('../assets/fonts/ZalandoSans-Light.woff2') format('woff2'),
       url('../assets/fonts/ZalandoSans-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Zalando Sans';
  src: url('../assets/fonts/ZalandoSans-RegularVariable.woff2') format('woff2'),
       url('../assets/fonts/ZalandoSans-RegularVariable.ttf') format('truetype');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Zalando Sans';
  src: url('../assets/fonts/ZalandoSans-Bold.woff2') format('woff2'),
       url('../assets/fonts/ZalandoSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Design tokens ---- */
:root {
  --bg: #f6f6f6;
  --navy: #0d114a;
  --navy-soft: #171d5c;
  --blue: #2663ec;
  --blue-dark: #1d51c4;
  --sky: #80a8f8;
  --ink: #1c1d21;
  --ink-soft: #43454d;
  --dark: #252424;
  --card: #ffffff;
  --line: #e3e5ec;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(13, 17, 74, 0.04), 0 8px 24px rgba(13, 17, 74, 0.06);
  --container: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Zalando Sans', 'Segoe UI', system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.6em; font-weight: 400; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

.accent { color: var(--sky); }
.accent-strong { color: var(--blue); }

/* ==========================================================================
   Header / navigation
   ========================================================================== */
.site-header {
  padding: 1.4rem 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand { flex-shrink: 0; }
.brand img { width: 122px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 450;
}
.nav-list a:hover { color: var(--blue); }
.nav-list a[aria-current='page'] { font-weight: 700; }

/* dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > button {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 450;
  color: var(--ink);
  cursor: pointer;
}
.nav-dropdown > button:hover { color: var(--blue); }
.nav-dropdown > button .chevron {
  width: 0.55em;
  height: 0.55em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-15%);
  transition: transform 0.15s ease;
}
.nav-dropdown.open > button .chevron { transform: rotate(225deg) translateY(-15%); }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  translate: -50% 0;
  min-width: 15rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  display: none;
  z-index: 50;
}
.nav-dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  white-space: nowrap;
}
.dropdown-menu a:hover { background: var(--bg); color: var(--blue); }

.phone-pill {
  display: inline-block;
  background: var(--blue);
  color: #fff !important;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  white-space: nowrap;
}
.phone-pill:hover { background: var(--blue-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.4rem;
  cursor: pointer;
}
.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  display: block;
  content: '';
  width: 26px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle .bars { position: relative; }
.nav-toggle .bars::before { position: absolute; top: -8px; }
.nav-toggle .bars::after { position: absolute; top: 8px; }
.nav-open .nav-toggle .bars { transform: rotate(45deg); }
.nav-open .nav-toggle .bars::before { transform: rotate(90deg) translateX(8px); }
.nav-open .nav-toggle .bars::after { opacity: 0; }

/* mid-size desktops: tighten the nav so all items stay on one row */
@media (min-width: 1021px) and (max-width: 1240px) {
  .site-header .container,
  .site-nav,
  .nav-list { gap: 1rem; }
  .nav-list a,
  .nav-dropdown > button { font-size: 0.82rem; }
  .phone-pill { font-size: 0.82rem; padding: 0.45rem 0.9rem; }
}

@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 0.75rem 1.5rem 1.25rem;
    z-index: 40;
  }
  .site-header { position: relative; }
  .nav-open .site-nav { display: flex; }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-list a,
  .nav-dropdown > button {
    display: block;
    width: 100%;
    padding: 0.8rem 0.25rem;
    font-size: 1rem;
    text-align: left;
  }
  .nav-dropdown > button { display: flex; }
  .dropdown-menu {
    position: static;
    translate: none;
    display: none;
    border: 0;
    box-shadow: none;
    background: var(--bg);
    margin: 0 0 0.5rem;
  }
  .phone-pill {
    margin-top: 0.75rem;
    text-align: center;
    padding: 0.75rem 1.15rem;
  }
}

/* ==========================================================================
   Shared components
   ========================================================================== */
main { padding-bottom: 1rem; }

.section { margin-block: clamp(1.5rem, 3.5vw, 2.75rem); }

.panel {
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.panel--navy {
  background: var(--navy);
  color: #fff;
}
.panel--blue {
  background: var(--blue);
  color: #fff;
}
.panel--white {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* Interested? band */
.interested {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  text-align: center;
  padding: clamp(1.75rem, 4vw, 2.5rem) 1.5rem;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
}
.interested strong { color: var(--sky); font-weight: 700; }
.interested a {
  color: #fff;
  text-decoration: none;
}
.interested a:hover { text-decoration: underline; }

/* Footer */
.site-footer {
  padding: 2.5rem 0 3rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
}
.site-footer p { margin-bottom: 0.65rem; }
.site-footer .legal { margin-bottom: 1rem; color: var(--ink); }
.site-footer .legal span { padding-inline: 0.5rem; color: var(--line); }
/* Compsoft asked for this to sit on a single line on desktop; it still wraps
   naturally once the viewport is too narrow to fit it. */
.site-footer .fineprint { font-size: 0.8rem; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--blue); }
.site-footer .footer-brand img { width: 130px; }

/* ==========================================================================
   Home page
   ========================================================================== */
.hero {
  padding: clamp(2rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 0.5em;
}
.hero p {
  font-size: 1.125rem;
  font-weight: 300;
  color: #e8ebfa;
  max-width: 36rem;
}
.hero-photos {
  display: grid;
  gap: 1rem;
  align-content: center;
  width: 100%;
  max-width: 300px;
  justify-self: end;
}
.hero-photos img {
  border-radius: var(--radius-sm);
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.lede { font-size: 1.125rem; }

/* Portfolio cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
  margin-top: 1.5rem;
}
.solution-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.solution-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(13, 17, 74, 0.05), 0 14px 32px rgba(13, 17, 74, 0.1);
}
.solution-card .card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}
.solution-card .card-logo { width: auto; }
.logo-equinox { height: 42px; margin-top: 8px; }
.logo-obelisk { height: 52px; }
.logo-smartt { height: 62px; }
.logo-qsys { height: 54px; }
.solution-card .card-arrow {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--blue);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--blue);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
/* Make the whole card clickable via the arrow link. The description sits
   above this overlay (see .solution-card p) so its text stays selectable. */
.solution-card .card-arrow::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
}
.solution-card:hover .card-arrow {
  background: var(--blue);
  color: #fff;
}
.solution-card .card-arrow svg { width: 20px; height: 20px; }
.solution-card p {
  position: relative;
  z-index: 1;
  font-size: 1.0625rem;
  color: var(--ink);
  max-width: 26rem;
  width: fit-content;
}

/* Security / accreditation band */
.security {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: stretch;
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.security-text {
  font-size: 1.2rem;
  font-weight: 300;
  align-self: center;
  padding: 0.5rem 0 0.5rem clamp(0.25rem, 2vw, 1.5rem);
}
.security-badges {
  background: var(--card);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding: 1.75rem 1.5rem;
  flex-wrap: wrap;
}
.security-badges .iso-badge { width: 210px; }
.security-badges iframe { border: none; height: 132px; width: 132px; }

/* ==========================================================================
   Product pages (Equinox / Obelisk)
   ========================================================================== */
.page-intro { margin-top: clamp(1.5rem, 4vw, 3rem); }
.page-logo { margin-bottom: clamp(1.5rem, 3.5vw, 2.5rem); }
.page-logo img { width: min(320px, 70vw); }
.page-logo .obelisk-mark { width: min(300px, 62vw); }
.page-intro h1 {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  letter-spacing: -0.01em;
  max-width: 22ch;
  margin-bottom: 0;
}
/* Equinox headline runs the full container width (Compsoft request);
   the Obelisk headline keeps the narrower measure from the design. */
.page-intro h1.h1-wide { max-width: none; }

/* split panel: text + image */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}
.split .split-text {
  padding: clamp(1.75rem, 4vw, 3rem);
  align-self: center;
}
.split .split-text p {
  font-size: 1.125rem;
  font-weight: 300;
}
.panel--navy .split-text p { color: #e8ebfa; }
.split .split-media {
  min-height: 280px;
}
.split .split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* feature panel with bullets */
.feature {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(1.5rem, 3.5vw, 3rem);
  padding: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
}
.feature h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
}
.feature-media img {
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 380px;
  margin-inline: auto;
}

.bullets {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
}
.bullets li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.7rem;
}
.bullets li::before {
  content: '';
  position: absolute;
  left: 0.25rem;
  top: 0.68em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

/* Obelisk page */
.statement {
  padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.75rem, 4vw, 3rem);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 300;
  max-width: none;
}
/* 70ch breaks the opening sentence over two lines, matching the design. */
.statement p { max-width: 70ch; margin: 0; }

h2.h-blue {
  color: var(--blue);
  font-size: clamp(1.35rem, 2.4vw, 1.65rem);
  font-weight: 400;
}

.duo {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(1.5rem, 3.5vw, 3rem);
  padding: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
}
.duo .duo-media img {
  border-radius: var(--radius-md);
  width: 100%;
  aspect-ratio: 0.88;
  object-fit: cover;
}

.what {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}
.what .what-media img {
  border-radius: var(--radius-md);
  width: 100%;
  aspect-ratio: 0.87;
  object-fit: cover;
}
.what .bullets li { margin-bottom: 0.45rem; }

.deliver-band {
  background: var(--dark);
  color: #fff;
}
.deliver-band .deliver {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  padding-block: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
.deliver-band h2 { color: var(--sky); }
.deliver-band .deliver-media img {
  border-radius: var(--radius-md);
  width: 100%;
  aspect-ratio: 0.92;
  object-fit: cover;
}
.deliver-band h3 {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--sky);
  margin: 2rem 0 0.5rem;
}

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-card {
  padding: clamp(2rem, 5vw, 3.5rem);
}
.contact-card h1 {
  font-size: clamp(2.3rem, 5vw, 3.3rem);
  margin-bottom: 0.7em;
}
.contact-card dl { margin: 0; }
.contact-card dt {
  color: var(--sky);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  font-weight: 300;
  margin-top: 1.4rem;
}
.contact-card dd {
  margin: 0.15rem 0 0;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 300;
}
.contact-card a { color: #fff; text-decoration: none; }
.contact-card a:hover { text-decoration: underline; }

.form-lede {
  font-size: 1.2rem;
  margin: 2.25rem 0 1rem;
}

.contact-form-panel { padding: clamp(1.75rem, 4vw, 2.75rem); }
.contact-form { display: grid; gap: 1rem; max-width: 62rem; }
.contact-form input,
.contact-form textarea {
  font: inherit;
  color: var(--ink);
  width: 100%;
  border: 1px solid #d6dae4;
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  background: #fff;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #5c606b; }
.contact-form textarea { min-height: 230px; resize: vertical; }
.contact-form button {
  justify-self: start;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--sky);
  background: var(--navy);
  border: 0;
  border-radius: 10px;
  padding: 0.85rem 2.6rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.contact-form button:hover { background: var(--navy-soft); }
.contact-form button[disabled] { opacity: 0.6; cursor: default; }
.contact-form button[disabled]:hover { background: var(--navy); }

.form-note { font-size: 0.9rem; color: var(--ink-soft); }
.form-note--ok { color: #12693f; font-weight: 600; }
.form-note--error { color: #a3202b; font-weight: 600; }
.form-note--error a { color: inherit; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 880px) {
  .hero,
  .security,
  .split,
  .feature,
  .duo,
  .what,
  .deliver-band .deliver {
    grid-template-columns: 1fr;
  }
  .hero-photos {
    grid-template-columns: 1fr 1fr;
    max-width: none;
    justify-self: stretch;
  }
  .split .split-media { min-height: 240px; }
  .split .split-media img { aspect-ratio: 16 / 10; height: auto; }
  .what .what-media { order: -1; }
  .site-footer .container { flex-direction: column; align-items: flex-start; }
  .site-footer .footer-brand { order: -1; }
}

@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
  .security-badges { padding: 1.25rem; }
}

/* ==========================================================================
   Reduced motion
   Honour the visitor's operating-system "reduce motion" setting.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .solution-card:hover { transform: none; }
}
