/* ==========================================================================
   Ventsys Digital Paperwork
   Hand-written replacement for the Divi/WordPress front end.
   Type scale, colours and section rhythm match the original build.
   ========================================================================== */

/* --- Font ---------------------------------------------------------------- */

/* Variable Space Grotesk, real weights 300-700 in one 49 KB file (SIL OFL,
   see fonts/OFL.txt). The old site self-hosted only the Regular cut, so every
   bold on the page was a faint synthetic emboldening; this gives true weights. */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens -------------------------------------------------------------- */

:root {
  --ink: #323232;
  --white: #fff;
  --orange: #ff6849;
  --orange-dark: #ec5030;
  --blue: #5268e1;
  --pink: #ffe1db;
  --lilac: #dce1f9;
  --rule: #ccc;

  --font: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* 1024px content column + gutter, exactly as the old grid */
  --content: 1024px;
  --gutter: 56px;
  --edge: 28px;

  --sec-pad: 51px;
  --sec-pad-tall: 100px;

  --radius: 5px;
}

/* --- Reset --------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  /* keep anchored sections clear of the sticky header */
  scroll-padding-top: 110px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  /* Reading weight. Divi declared 500 here, but its Regular-only font file
     rendered that as 400 — so 400 is what the old site actually looked like,
     and it keeps a clear contrast against the 700 of <strong>. */
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--orange);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

p {
  margin: 0 0 1em;
}

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

ul {
  margin: 0 0 1em;
  padding-left: 1.2em;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 12px;
  color: var(--ink);
  font-weight: 500;
}

h1 {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.4;
}

h2 {
  font-size: 34px;
  line-height: 1.4;
}

h3 {
  font-size: 22px;
  line-height: 1.2;
}

h4 {
  font-size: 20px;
  line-height: 1;
}

button {
  font: inherit;
  color: inherit;
}

/* --- Utilities ----------------------------------------------------------- */

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--white);
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

.text-center {
  text-align: center;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* --- Layout -------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--content) + var(--edge) * 2);
  margin-inline: auto;
  padding-inline: var(--edge);
}

.container--prose {
  max-width: calc(820px + var(--edge) * 2);
}

.sec {
  padding-block: var(--sec-pad);
}

.sec--tall {
  padding-top: var(--sec-pad-tall);
}

.sec--pink {
  background: var(--pink);
}

.sec--lilac {
  background: var(--lilac);
}

.grid {
  display: grid;
  gap: var(--gutter);
}

.grid--2 {
  grid-template-columns: 1fr 1fr;
}

/* 376 / 592 split from the original "more than just an app" row */
.grid--split-a {
  grid-template-columns: 38fr 60fr;
  align-items: center;
  margin-top: 30px;
}

.grid__self-center {
  align-self: center;
}

.media--center {
  display: flex;
  justify-content: center;
}

/* Reading measure, ~75 characters. Note 1ch is 10.25px in Space Grotesk while
   the average character is 8.4px, so the ch figure is lower than the character
   count it produces. Two-column rows are already narrower than this, so the cap
   only bites where a block spans the full content width — most visibly once the
   columns stack below 980px. */
.intro__copy p,
.card__body p,
.demo__steps p,
.demo__optin p,
.sec--pink p,
.sec--industries p,
.price-row p,
#features .container > p {
  max-width: 61ch;
}

/* Section separator: 1px orange line spanning 60% of the content column,
   centred — the divider modules the old build used between demo blocks. */
.rule {
  width: 60%;
  height: 0;
  margin: 27px auto 47px;
  border: 0;
  border-top: 1px solid var(--orange);
}

/* Tilted tablet in "More than just an app" */
.tablet-shot {
  max-width: 300px;
  transform: rotate(-13deg);
}

/* --- Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 103px;
  padding-block: 15px;
}

.site-header__logo img {
  width: 194px;
}

/* Burger at every width — the original site did the same */
.site-nav {
  position: relative;
}

.site-nav__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.site-nav__bars,
.site-nav__bars::before,
.site-nav__bars::after {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav__bars::before,
.site-nav__bars::after {
  content: "";
  position: absolute;
}

.site-nav__bars::before {
  transform: translateY(-8px);
}

.site-nav__bars::after {
  transform: translateY(8px);
}

.site-nav__toggle[aria-expanded="true"] .site-nav__bars {
  background: transparent;
}

.site-nav__toggle[aria-expanded="true"] .site-nav__bars::before {
  transform: rotate(45deg);
}

.site-nav__toggle[aria-expanded="true"] .site-nav__bars::after {
  transform: rotate(-45deg);
}

.site-nav__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 60;
  min-width: 220px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: var(--white);
  border-top: 3px solid var(--orange);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  /* visibility flips instantly on open, after the fade on close */
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}

.site-nav__menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}

.site-nav__menu a {
  display: block;
  padding: 10px 22px;
  color: var(--ink);
  font-size: 16px;
}

.site-nav__menu a:hover,
.site-nav__menu a:focus-visible {
  background: var(--pink);
  text-decoration: none;
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 8px 20px;
  border-radius: var(--radius);
  /* background-color, not the shorthand — the shorthand would wipe out the
     icon that .btn--calendar sets as a background-image. */
  background-color: var(--orange);
  color: var(--white);
  font-size: 18px;
  line-height: 1.5;
  text-align: center;
  transition: background-color 0.15s ease;
}

.btn:hover,
.btn:focus-visible {
  background-color: var(--orange-dark);
  color: var(--white);
  text-decoration: none;
}

.btn--calendar {
  font-size: 22px;
  padding-left: 50px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 16px center;
  background-size: 22px 22px;
}

.btn--wide {
  border: 0;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
}

/* --- Hero ---------------------------------------------------------------- */

.hero__sub {
  margin: 0;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

/* --- Blue statement band ------------------------------------------------- */

.sec--statement {
  padding-block: 20px;
  background: var(--blue);
}

.grid--statement {
  align-items: center;
}

.statement__art {
  position: relative;
  min-height: 200px;
}

/* The report artwork deliberately overhangs the band top and bottom */
.statement__art img {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 350px;
  max-width: 100%;
  z-index: 2;
}

.statement__copy h2 {
  margin: 0;
  color: var(--white);
}

.sec--intro {
  padding-block: 20px;
}

.grid--intro {
  align-items: start;
}

.intro__copy {
  /* clears the overhanging artwork */
  padding-top: 20px;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
}

.store-badges img {
  width: 150px;
}

/* --- Testimonial slider -------------------------------------------------- */

/* Tile carried over from the old build: a 4x4 square in an 8x8 cell at 3%
   black, which reads as a fine checkerboard behind the quotes. */
.sec--feedback {
  background-image: url("data:image/svg+xml,%3Csvg fill='rgba(0,0,0,0.03)' height='8px' width='8px' viewBox='0 0 8 8' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='4' height='4'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 8px 8px;
}

.feedback__title {
  margin-bottom: 28px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
}

.slider {
  position: relative;
  padding: 0 46px;
}

.slider__viewport {
  display: grid;
}

.slide {
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0s;
}

.slide__quote {
  margin: 0 0 18px;
  font-size: 46px;
  font-weight: 300;
  line-height: 1;
  text-align: center;
  text-wrap: balance;
}

.slide__author {
  font-size: 16px;
  font-weight: 400;
  text-align: center;
}

.slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(50, 50, 50, 0.06);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.slider__arrow:hover {
  background: rgba(50, 50, 50, 0.14);
}

.slider__arrow--prev {
  left: 0;
}

.slider__arrow--next {
  right: 0;
}

.slider__dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 26px;
}

.slider__dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(50, 50, 50, 0.25);
  cursor: pointer;
}

.slider__dot.is-active {
  background: var(--orange);
}

/* --- Industries / typewriter -------------------------------------------- */

.sec--industries {
  background-image: url("../img/pipes-colour-light.jpg");
  background-position: center;
  background-size: cover;
}

.industries__lead {
  margin-bottom: 4px;
}

.industries__typed {
  min-height: 1.2em;
  margin-bottom: 20px;
  font-size: 32px;
  line-height: 1;
}

.caret {
  font-weight: 300;
  animation: caret 1s step-end infinite;
}

@keyframes caret {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .caret {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* --- Features ------------------------------------------------------------ */

#features .container > p {
  margin-inline: auto;
}

.features__lists {
  margin-top: 34px;
}

.feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding: 0 0 12px 30px;
  line-height: 1.7;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 16px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 12' fill='none' stroke='%23ff6849' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 6.2 5.6 10.3 14.5 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
}

/* --- Value cards --------------------------------------------------------- */

.cards {
  row-gap: 60px;
}

.card__title {
  margin-bottom: 18px;
  font-size: 22px;
  line-height: 1;
  text-align: center;
}

.card__media {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.card__media img {
  width: 70%;
  min-width: 220px;
}

/* --- Pricing ------------------------------------------------------------- */

.grid--pricing-head {
  align-items: center;
}

/* The pricing block reads as a table: 2px grey rules above "Set up cost" and
   below each of the two priced items, matching the old build. */
.price-row {
  display: grid;
  grid-template-columns: 22fr 78fr;
  gap: var(--gutter);
  padding-block: 26px;
}

.price-row--ruled {
  border-top: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
}

.price-row h3 {
  margin: 0;
}

.price-figure {
  padding: 0 0 26px;
  border-bottom: 2px solid var(--rule);
  text-align: center;
}

.price-figure h4 {
  margin-bottom: 4px;
  color: var(--orange);
}

.price-figure p {
  margin: 0;
}

/* --- Demo / getting started --------------------------------------------- */

.demo__title {
  margin-bottom: 30px;
  line-height: 1;
}

.demo__step {
  font-size: 18px;
  font-weight: 600;
}

.demo__step--lead {
  font-weight: 700;
}

.demo__optin {
  margin-top: 50px;
}

/* --- Signup form --------------------------------------------------------- */

.signup {
  max-width: 420px;
}

.signup__field {
  margin-bottom: 14px;
}

.signup__field label {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
}

.signup input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--white);
  font: inherit;
  /* 16px keeps iOS from zooming the page when the field takes focus. */
  font-size: 16px;
  color: var(--ink);
}

.signup input:focus-visible {
  border-color: var(--orange);
}

.signup__message {
  margin: 14px 0 0;
  font-size: 16px;
  font-weight: 600;
}

.signup__message:empty {
  display: none;
}

.signup__message.is-error {
  color: #c0392b;
}

.signup.is-sending button {
  opacity: 0.6;
  pointer-events: none;
}

/* --- Contact band -------------------------------------------------------- */

.band--contact {
  padding-block: 27px;
  background: var(--orange);
}

.band--contact__text {
  margin: 0;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

.band--contact__text a {
  color: var(--white);
  text-decoration: underline;
}

/* --- Footer -------------------------------------------------------------- */

.site-footer {
  padding-block: var(--sec-pad);
  background: var(--ink);
  color: var(--white);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
  align-items: end;
}

.site-footer p {
  margin: 0 0 4px;
}

.site-footer a {
  color: var(--white);
}

.site-footer__copyright {
  margin-top: 18px;
  font-size: 14px;
}

.site-footer__company {
  font-size: 14px;
}

.site-footer__social {
  margin-top: 16px;
}

.site-footer__social a {
  color: var(--orange);
}

.site-footer__brand {
  display: flex;
  justify-content: flex-end;
}

.site-footer__brand img {
  width: 150px;
}

/* --- Back to top --------------------------------------------------------- */

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--orange);
  color: var(--white);
  font-size: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease, visibility 0s;
}

.back-to-top:hover {
  background-color: var(--orange-dark);
  text-decoration: none;
}

/* --- Long-form pages ---------------------------------------------------- */

.sec--legal h1 {
  margin-bottom: 28px;
  font-size: 34px;
}

.prose {
  /* Long-form legal copy: base size, generous leading, and a measure capped in
     characters rather than pixels so the line length stays readable. */
  font-size: 16px;
  line-height: 1.8;
  max-width: 61ch;
}

.prose h2 {
  margin-top: 40px;
  font-size: 26px;
}

/* Numbered clauses in the terms. These are h2s, so the selector has to outrank
   `.prose h2` above — they are subsections, not full section headings. */
.prose h2.prose__section {
  margin-top: 32px;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 700;
}

.prose h3 {
  margin-top: 34px;
  font-size: 20px;
  font-weight: 600;
}

.prose h4 {
  margin-top: 26px;
  font-size: 18px;
  font-weight: 600;
}

.prose ul,
.prose ol {
  margin-bottom: 1.2em;
  padding-left: 1.4em;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose a {
  text-decoration: underline;
}

.referral__cta {
  margin-top: 36px;
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 980px) {
  :root {
    --gutter: 40px;
    --sec-pad: 40px;
    --sec-pad-tall: 60px;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 28px;
  }

  .hero__sub {
    font-size: 20px;
  }

  .grid--2,
  .grid--split-a,
  .price-row,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  /* stack the statement band: artwork flows normally again */
  .sec--statement {
    padding-block: 40px;
  }

  .statement__art {
    min-height: 0;
  }

  .statement__art img {
    position: static;
    transform: none;
    width: 300px;
    margin-inline: auto;
  }

  .intro__spacer {
    display: none;
  }

  .intro__copy {
    padding-top: 0;
  }

  .slide__quote {
    font-size: 30px;
  }

  .slider {
    padding: 0 40px;
  }

  .industries__typed {
    font-size: 26px;
  }

  .card__media img {
    width: 80%;
  }

  .site-footer__brand {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  :root {
    --edge: 20px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 24px;
  }

  .slide__quote {
    font-size: 24px;
  }

  .btn--calendar {
    font-size: 18px;
  }

  .band--contact__text {
    font-size: 18px;
  }

  .site-header__inner {
    min-height: 80px;
  }

  .site-header__logo img {
    width: 160px;
  }

  /* Rotating widens the visual box beyond the layout box — trim the tablet so
     the tilted corners stay inside the viewport on phones. */
  .tablet-shot {
    max-width: 230px;
  }
}
