/* ==========================================================================
   TornadoFX Software – site styles
   Palette and type taken from the original Elementor build:
   black #000, dark #333, light #F4F4F4, text #333 / #777, white
   ========================================================================== */

:root {
  --black: #000000;
  --dark: #333333;
  --light: #f4f4f4;
  --text: #333333;
  --muted: #777777;
  --white: #ffffff;
  --accent: #c8d400;              /* lime from the TornadoFX logo ring */
  --font: "Open Sans", "Segoe UI", Arial, Helvetica, sans-serif;
  --shape-h: 80px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--light);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.3; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 1150px; }
.container--quote { max-width: 955px; }

/* --------------------------------------------------------------------------
   Sections + shape dividers
   -------------------------------------------------------------------------- */
.section { position: relative; padding: 50px 0 40px; }
.section--light { background: var(--light); color: var(--text); }
.section--dark { background: var(--dark); color: var(--white); }
.section--about { padding: 80px 0 80px; }
.section--quote {
  padding: 200px 0;
  color: var(--white);
  background: #040404 url("../img/quote-bg.jpg") center center / cover no-repeat;
  background-attachment: fixed;
  text-align: center;
}
.section--projects, .section--clients { padding: 90px 0; }
/* keep content clear of the tilt dividers */
.section:has(> .shape--top)    { padding-top:    calc(var(--shape-h) + 20px); }
.section:has(> .shape--bottom) { padding-bottom: calc(var(--shape-h) + 20px); }
.section--quote:has(> .shape--top)    { padding-top:    calc(var(--shape-h) + 130px); }
.section--quote:has(> .shape--bottom) { padding-bottom: calc(var(--shape-h) + 130px); }

.shape {
  position: absolute; left: 0; width: 100%; height: var(--shape-h);
  line-height: 0; overflow: hidden; pointer-events: none;
}
.shape svg { display: block; width: calc(100% + 1.3px); height: 100%; }
.shape--top { top: -1px; }
.shape--bottom { bottom: -1px; transform: rotate(180deg); }
.shape--black svg path { fill: var(--black); }
.shape--light svg path { fill: var(--light); }

/* --------------------------------------------------------------------------
   Hero – full-width 16:9 slider, push-left transition
   (ratio 16/9, 600ms transition, ~2.6s interval)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--light);
  padding: 0;
  container-type: inline-size;
}
.hero > .shape--bottom { z-index: 5; }
.hero__frame {
  position: relative;
  width: 100%;
  /* 16:9 plus the divider height, so the tilt eats extra image instead of the picture's bottom row */
  height: calc(100cqw * 9 / 16 + var(--shape-h));
  overflow: hidden;
  background: var(--black); /* band under the 16:9 picture; the tilt cuts this, not the image */
}
.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute; inset: 0;
  overflow: hidden;
  transform: translateX(100%);
  visibility: hidden;
}
.hero__slide.is-prev-dir { transform: translateX(-100%); }
.hero__slide.is-active { transform: translateX(0); visibility: visible; z-index: 2; }
.hero__slide.is-leaving { transform: translateX(-100%); visibility: visible; z-index: 1; }
.hero__slide.is-prev-dir.is-leaving { transform: translateX(100%); }
.hero__slide.is-animating { transition: transform var(--slide-ms, 600ms) var(--ease); }
.hero__img {
  position: absolute; inset: 0;
  background: left top / 100% auto no-repeat;
}
/* like the original slider's "gradient" option: picture fades to black into the band below,
   so the tilt cuts a seamless dark area instead of a hard image edge */
.hero__slide::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0)   calc(100% - var(--shape-h) - 220px),
    rgba(0,0,0,.55) calc(100% - var(--shape-h) - 90px),
    #000            calc(100% - var(--shape-h))
  );
}
.hero__logo {
  /* left edge aligned with the teal accent bar baked into the slides (x = 69/1920) */
  position: absolute; top: 15px; left: 3.59%; z-index: 10;
  width: 100px;
}
.hero__logo img { width: 100px; height: auto; }

.hero__arrow {
  position: absolute; top: calc(50% - var(--shape-h) / 2); z-index: 10;
  width: 64px; height: 110px; transform: translateY(-50%);
  display: grid; place-items: center;
  background: transparent; border: 0; color: rgba(255,255,255,.75);
  font-size: 40px; opacity: 0;
  transition: opacity .3s, color .2s;
}
.hero__arrow--prev { left: 0; }
.hero__arrow--next { right: 0; }
.hero__frame.show-ctrl .hero__arrow, .hero__arrow:focus-visible { opacity: 1; }
.hero__arrow:hover { color: var(--white); }

/* bottom-right controls: pause/play + "5 / 6" counter, visible on hover or while paused */
.hero__ctrl {
  position: absolute; right: 28px; bottom: calc(var(--shape-h) + 18px); z-index: 10;
  display: flex; align-items: center; gap: 34px;
  color: var(--white); opacity: 0;
  transition: opacity .3s;
}
.hero__frame.show-ctrl .hero__ctrl, .hero__frame.is-paused .hero__ctrl, .hero__ctrl:focus-within { opacity: 1; }
.hero__pause {
  width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.85); background: rgba(0,0,0,.25);
  color: var(--white); font-size: 14px; display: grid; place-items: center;
  transition: background .2s;
}
.hero__pause:hover { background: rgba(255,255,255,.2); }
.hero__counter {
  position: relative; width: 50px; height: 50px;
  font-size: 20px; font-weight: 600; line-height: 1;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.hero__counter-cur { position: absolute; left: 0; top: 0; }
.hero__counter-total { position: absolute; right: 0; bottom: 0; }
.hero__counter-slash {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 1px;
  background: rgba(255,255,255,.9);
  transform: translate(-50%, -50%) rotate(-55deg);
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about__title {
  text-align: center; color: var(--text);
  font-size: 50px; font-weight: 700; letter-spacing: -1.5px; line-height: 1.3;
  margin-bottom: 5px;
}
.about__tagline {
  margin: 0; text-align: center; color: var(--muted);
  font-size: 25px; font-weight: 700; letter-spacing: 6.5px; text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Quote
   -------------------------------------------------------------------------- */
.quote { margin: 0; }
.quote__text {
  margin: 0; font-size: 41px; font-weight: 300; line-height: 1.3; letter-spacing: -1px;
  text-shadow: 0 2px 20px rgba(0,0,0,.5);
}
.quote__author {
  margin-top: 30px; font-size: 13px; font-weight: 300;
  letter-spacing: 3.2px; text-transform: uppercase; opacity: .8;
}

/* --------------------------------------------------------------------------
   Section headings
   -------------------------------------------------------------------------- */
.section__lead {
  text-align: center;
  font-size: 38px; font-weight: 300; font-style: italic;
  letter-spacing: -1.5px; line-height: 1.3; text-transform: capitalize;
  margin-bottom: 28px;
}
.section__lead b { font-weight: 300; }
.section__title {
  text-align: center; color: var(--text);
  font-size: 30px; font-weight: 400; text-transform: uppercase;
  letter-spacing: 10px; line-height: 1.2; padding: 20px;
}
.section__title--light { color: var(--light); }

/* --------------------------------------------------------------------------
   Icon boxes
   -------------------------------------------------------------------------- */
.boxes { display: grid; gap: 20px 30px; max-width: 940px; margin: 0 auto; justify-content: space-between; }
.boxes--2 { grid-template-columns: repeat(2, auto); }
.boxes--3 { grid-template-columns: repeat(3, auto); }
.box {
  display: flex; align-items: center; gap: 15px;
  padding: 10px 0;
}
.box h3 { font-size: 18px; font-weight: 400; }
.box__icon {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 58px; height: 58px; border-radius: 50%;
  border: 3px solid var(--dark);        /* ring keeps its colour on hover; only the fill swaps */
  font-size: 20px; line-height: 1;
  color: var(--dark); background: var(--light);
  transition: background .3s, color .3s;
}
.box__icon svg { width: 24px; height: 24px; }
.box__icon--color svg { width: 28px; height: 28px; }
.section--dark .box__icon { color: var(--light); background: transparent; border-color: var(--light); }
.section--dark .box h3 { color: var(--white); }
.box:hover .box__icon { background: var(--dark); color: var(--light); }
.section--dark .box:hover .box__icon { background: var(--light); color: var(--dark); }
.box:hover .box__icon--color { background: var(--light); }

/* --------------------------------------------------------------------------
   Clients marquee (replaces Elementor image carousel, 1s autoplay)
   -------------------------------------------------------------------------- */
.marquee { overflow: hidden; margin-top: 0; padding: 10px 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.marquee__track {
  display: flex; align-items: center; gap: 70px; width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track img { height: 50px; width: auto; flex: 0 0 auto; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   Footer + to-top
   -------------------------------------------------------------------------- */
.footer { background: var(--dark); color: rgba(255,255,255,.75); padding: 28px 0; font-size: 13px; }
.footer__inner { display: flex; align-items: center; gap: 14px; }
.footer__logo {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 56px; height: 56px; border-radius: 50%;
  background: #e4e8df;                 /* soft grey-green, sits between the lime ring and the page light grey */
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.footer__logo img { width: 48px; height: 48px; }
.footer p { margin: 0; letter-spacing: .04em; }

.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  width: 42px; height: 42px; display: grid; place-items: center;
  background: var(--dark); color: var(--white); border-radius: 4px; font-size: 20px;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s, transform .3s, visibility .3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--black); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .about__title { font-size: 40px; }
  .quote__text { font-size: 36px; }
  .section__lead { font-size: 32px; }
  .boxes--3 { grid-template-columns: repeat(2, auto); }
  .section--quote { background-attachment: scroll; }
}
@media (max-width: 767px) {
  :root { --shape-h: 40px; }
  .section { padding: 40px 0; }
  .section--about { padding: 70px 0 40px; }
  .section--quote { padding: 80px 30px 100px; }
  .section:has(> .shape--top)    { padding-top:    calc(var(--shape-h) + 12px); }
  .section:has(> .shape--bottom) { padding-bottom: calc(var(--shape-h) + 12px); }
  .section--quote:has(> .shape--top)    { padding-top:    calc(var(--shape-h) + 60px); }
  .section--quote:has(> .shape--bottom) { padding-bottom: calc(var(--shape-h) + 60px); }
  .section--projects, .section--clients { padding: 60px 0; }
  .about__title { font-size: 24px; }
  .about__tagline { font-size: 16px; letter-spacing: 4px; }
  .quote__text { font-size: 27px; letter-spacing: 0; }
  .quote__author { letter-spacing: 2px; }
  .section__lead { font-size: 26px; letter-spacing: -.5px; }
  .section__title { font-size: 22px; letter-spacing: 8px; }
  .boxes--2, .boxes--3 { grid-template-columns: 1fr; gap: 12px; justify-content: stretch; }
  .box { flex-direction: column; text-align: center; gap: 10px; }
  .hero__arrow { display: none; }
  .hero__ctrl { right: 10px; bottom: 34px; gap: 18px; transform: scale(.7); transform-origin: bottom right; }
  .hero__logo, .hero__logo img { width: 40px; }
  .hero__logo { top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  .hero__slide, .box__icon { transition: none; }
}
