/* Presentation Cartography site styles. Colours follow the old WordPress theme. */

@font-face {
  font-family: "Exo 2";
  src: url("/fonts/exo2.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --accent: #ec8e29;
  --accent-dark: #c96f10;
  --black: #000;
  --bg-dark: #302f2f;
  --bg-darker: #1d1c1c;
  --text-light: #f2f2f2;
  --text-muted: #b8b8b8;
  --text-body: #383838;
  --bg-page: #fff;
  --error: #ff7a63;
  --wrap: 1180px;
  --header-h: 76px;
}

/* ALTCHA widget, matched to the dark contact panel. Set on the element, not
   :root: altcha.css loads later and defines its defaults on :root. */
altcha-widget {
  --altcha-color-base: transparent;
  --altcha-color-base-content: var(--text-light);
  --altcha-color-primary: var(--accent);
  --altcha-border-color: rgba(255, 255, 255, 0.25);
  --altcha-max-width: 100%;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-body);
  font-family: "Exo 2", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

img,
video {
  max-width: 100%;
  height: auto;
}

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

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

/* Anchored sections shouldn't land under the sticky header */
section[id] {
  scroll-margin-top: var(--header-h);
}

/* --- Wordmark (header logo and hero "by" line) -------------------------------- */
.wordmark {
  color: #fff;
  letter-spacing: 0.01em;
}

.wm-bold {
  font-weight: 600;
}

/* 300, not lighter: thinner strokes are under a pixel at header size and
   render blotchy on 1x screens (the font is unhinted) */
.wm-light {
  font-weight: 300;
}

/* --- Header ----------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--black);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  column-gap: 24px;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  text-decoration: none;
}

.logo img {
  width: 44px;
  height: 44px;
}

/* Two-line wordmark, as in the original logo */
.logo .wordmark {
  display: grid;
  font-size: 23px;
  line-height: 1.02;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: 8px;
}

.main-nav a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--text-light);
  font-size: 18px;
  font-style: italic;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.2s;
}

/* Orange bar along the bottom edge of the header under the current section */
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current] {
  color: var(--accent);
}

.main-nav a[aria-current]::after {
  transform: scaleX(1);
}

/* --- Hero ------------------------------------------------------------------- */
.hero {
  position: relative;
  /* Short banner like the original (~27% of the width), and never more than 40%
     of the window height, so the suite below is visible without scrolling */
  height: clamp(220px, min(27vw, 40vh), 360px);
  overflow: hidden;
  background: #000 url("/assets/hero-poster.jpg") center / cover;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dot-matrix screen over the video (the original slider's dotted overlay),
   plus a vignette that fades into the section below */
.hero::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: url("/assets/dots.svg") 0 0 / 3px 3px;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.45) 100%),
    linear-gradient(to bottom, transparent 70%, var(--bg-dark) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 16px 24px;
  animation: rise 1s ease-out both;
}

.hero-vc {
  width: min(300px, 70%);
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.5));
}

.hero-by {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #fff;
  font-size: clamp(18px, 2.4vw, 26px);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.hero-by img {
  width: 1.5em;
  height: 1.5em;
}

/* Bouncing chevron inviting a scroll */
.scroll-cue {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 22px;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border-right: 2px solid rgba(255, 255, 255, 0.8);
  border-bottom: 2px solid rgba(255, 255, 255, 0.8);
  transform: rotate(45deg);
  animation: nudge 2.2s ease-in-out infinite;
}

.scroll-cue:hover,
.scroll-cue:focus-visible {
  border-color: var(--accent);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes nudge {
  0%, 100% {
    transform: translateY(0) rotate(45deg);
    opacity: 0.6;
  }
  50% {
    transform: translateY(8px) rotate(45deg);
    opacity: 1;
  }
}

/* --- Shared section headings -------------------------------------------------- */
.slogan,
.section-title {
  margin: 0 0 16px;
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Short orange rule under each heading */
.slogan::after,
.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin: 20px auto 0;
  background: var(--accent);
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
}

.pitch {
  max-width: 760px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 19px;
  font-weight: 300;
}

/* --- Visual Cortex suite ---------------------------------------------------- */
/* Faint topographic contour rings: a nod to cartography, no image needed */
.suite {
  padding: 48px 0 88px;
  text-align: center;
  color: var(--text-light);
  background:
    repeating-radial-gradient(circle at 12% 18%, transparent 0 34px, rgba(255, 255, 255, 0.035) 34px 35px),
    repeating-radial-gradient(circle at 88% 78%, transparent 0 46px, rgba(255, 255, 255, 0.03) 46px 47px),
    var(--bg-dark);
}

.slogan {
  font-size: clamp(32px, 6vw, 64px);
}

.highlight {
  color: var(--accent);
  font-weight: 600;
}

.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-top: 56px;
  text-align: left;
}

.feature {
  flex: 0 1 360px;
  padding: 28px 28px 24px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 3px solid transparent;
  border-radius: 4px;
  backdrop-filter: blur(2px);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.feature:hover {
  transform: translateY(-4px);
  border-top-color: var(--accent);
  background: rgba(0, 0, 0, 0.32);
}

/* Product name: the app icon stands in for the first letter, the rest is text
   sitting on the icon's baseline (as in the old logo images) */
.product {
  display: flex;
  /* An image's baseline is its bottom edge, so the text baseline (the last
     line's, for Resource / Converter) sits exactly on the icon's bottom */
  align-items: last baseline;
  gap: 3px;
  margin: 0;
  color: #fff;
  font-size: 34px;
  font-weight: 400;
  line-height: 0.8;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Icons are trimmed to the glyph, so a fixed height lines every letter up
   with the text whatever its width (the M is wide and short) */
.product img {
  width: auto;
  height: 48px;
}

.product-light {
  font-weight: 300;
}

/* Two-line name (Resource / Converter) filling the icon's height */
.product-stack {
  display: grid;
  font-size: 27px;
  line-height: 1;
}

.feature p {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-weight: 300;
}

/* --- Showreel --------------------------------------------------------------- */
.showreel {
  padding: 72px 0 88px;
  text-align: center;
  color: var(--text-light);
  background: linear-gradient(to bottom, var(--bg-darker), #000);
}

.video-frame {
  position: relative;
  max-width: 980px;
  margin: 40px auto 0;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 64px rgba(0, 0, 0, 0.7);
}

.video-frame iframe,
.video-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-play {
  padding: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

.video-play img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease, filter 0.6s ease;
  filter: brightness(0.8);
}

.video-play:hover img,
.video-play:focus-visible img {
  transform: scale(1.03);
  filter: brightness(0.95);
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 88px;
  height: 88px;
  margin: -44px 0 0 -44px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 10px rgba(236, 142, 41, 0.25), 0 6px 28px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.play-icon::after {
  content: "";
  position: absolute;
  top: 28px;
  left: 35px;
  border-style: solid;
  border-width: 16px 0 16px 26px;
  border-color: transparent transparent transparent #fff;
}

.video-play:hover .play-icon,
.video-play:focus-visible .play-icon {
  transform: scale(1.08);
  box-shadow: 0 0 0 16px rgba(236, 142, 41, 0.18), 0 6px 28px rgba(0, 0, 0, 0.5);
}

.video-note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  color: var(--text-light);
  font-size: 14px;
  text-align: center;
  text-shadow: 0 1px 3px #000;
}

/* --- Contact ---------------------------------------------------------------- */
.contact {
  padding: 72px 0 88px;
  text-align: center;
  color: var(--text-light);
  background:
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.75)),
    url("/assets/contact-bkgd.jpg") center / cover;
}

.contact-form {
  display: grid;
  gap: 18px;
  max-width: 720px;
  margin: 40px auto 0;
  padding: 32px;
  text-align: left;
  background: rgba(20, 20, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-size: 15px;
  color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-light);
  font: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.5);
}

/* Honeypot: off-screen rather than display:none, which some bots detect */
.contact-form .hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.form-actions altcha-widget {
  flex: 1 1 260px;
}

.button {
  padding: 12px 40px;
  border: 0;
  border-radius: 3px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.button:hover,
.button:focus-visible {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.form-status {
  margin: 0;
  min-height: 1.6em;
}

.form-status.error {
  color: var(--error);
}

.form-status a {
  color: var(--accent);
}

/* --- Text pages (privacy policy, 404) ---------------------------------------- */
.page {
  padding: 56px 0 72px;
}

.prose {
  max-width: 820px;
}

.prose h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prose h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 16px;
  background: var(--accent);
}

.prose h2 {
  margin-top: 2em;
  font-size: 22px;
  font-weight: 600;
}

/* --- Footer ----------------------------------------------------------------- */
.site-footer {
  background: var(--black);
  color: var(--text-muted);
  font-size: 15px;
  border-top: 2px solid var(--accent);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.footer-inner nav {
  display: flex;
  gap: 24px;
}

.footer-inner a {
  color: var(--text-light);
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--accent);
}

.footer-inner p {
  margin: 0;
}

/* --- Phones ----------------------------------------------------------------- */
@media (max-width: 640px) {
  :root {
    --header-h: 104px;
  }

  .header-inner {
    justify-content: center;
  }

  .main-nav a {
    padding: 10px 10px 12px;
    font-size: 16px;
  }

  .feature {
    padding: 22px 20px 18px;
  }

  .contact-form {
    padding: 20px;
  }

  .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-video {
    display: none;
  }

  .hero-content,
  .scroll-cue {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
