/* ==========================================================================
   Exarion AI Limited - landing page styles

   How this file is organised (top to bottom):
     1. Design tokens   - colours, fonts, sizes used everywhere
     2. Base            - resets and page-wide defaults
     3. Shared pieces   - container, headings, buttons, cards, icons
     4. Page sections   - header, hero, about, video, ... footer (in page order)
     5. Animations
     6. Responsive      - wider-screen overrides, smallest to largest

   The page is "mobile first": the rules up to section 5 describe the phone
   layout, and section 6 adds changes as the screen gets wider.
   ========================================================================== */


/* 1. Design tokens
   ------------------------------------------------------------------------ */
:root {
  /* Brand colours (taken from exarion.ai) */
  --carbon: #02040a;            /* near-black page background */
  --signal: #42d9ff;            /* cyan accent */
  --ink: #f8fbff;               /* default text colour, a very slightly blue white */
  --white: #ffffff;

  /* Translucent versions, used for borders and panel fills */
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.25);
  --signal-line: rgba(66, 217, 255, 0.25);
  --signal-fill: rgba(66, 217, 255, 0.1);
  --panel: rgba(255, 255, 255, 0.04);
  --band: rgba(255, 255, 255, 0.03);   /* background of alternating sections */

  --font: "Inter", Arial, sans-serif;
  --radius: 0.5rem;
  --container-width: 80rem;     /* 1280px */

  color-scheme: dark;           /* tells the browser to use dark scrollbars, form controls, etc. */
  background: var(--carbon);
}


/* 2. Base
   ------------------------------------------------------------------------ */

/* Make width/height include padding and border - much easier to reason about. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font);
  line-height: 1.5;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;     /* stops phones enlarging text on rotate */
}

body {
  margin: 0;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Two soft glows near the top of the page, over the dark background. */
  background:
    radial-gradient(circle at 20% 10%, rgba(46, 117, 255, 0.14), transparent 34rem),
    radial-gradient(circle at 80% 8%, rgba(66, 217, 255, 0.1), transparent 30rem),
    var(--carbon);
}

/* Browsers add default margins and font sizes to these; we set our own. */
h1, h2, h3, p, figure {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

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

img,
svg,
iframe {
  display: block;    /* removes the small gap browsers leave under inline images */
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}


/* 3. Shared pieces
   ------------------------------------------------------------------------ */

/* Centres content and keeps it from touching the screen edges. */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Every main section gets the same vertical breathing room. */
.section {
  padding-block: 4rem;
}

/* A full-width band with a slightly lighter background, used on every
   other section so the page reads as alternating stripes. */
.band {
  background: var(--band);
}

/* Small cyan uppercase label above a heading, e.g. "TECHNOLOGY VISUALIZED". */
.eyebrow {
  margin-bottom: 1rem;
  color: var(--signal);
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

/* Heading + intro paragraph that opens most sections. */
.section-intro {
  max-width: 48rem;
}

.section-title {
  color: var(--white);
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 600;
}

.section-lead {
  margin-top: 1.25rem;
  font-size: 1rem;
  line-height: 1.75rem;
}

/* --- Buttons ----------------------------------------------------------- */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;           /* fully rounded "pill" shape */
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  transition: background-color 0.15s, color 0.15s;
}

/* Solid white button, the main call to action. */
.button--primary {
  background: var(--white);
  color: var(--carbon);
}

/* Outlined white button, the secondary action. */
.button--outline {
  border: 1px solid var(--line-strong);
  color: var(--white);
}

/* Outlined cyan button that fills in on hover. */
.button--accent {
  border: 1px solid rgba(66, 217, 255, 0.5);
  color: var(--signal);
}

.button--accent:hover {
  background: var(--signal);
  color: var(--carbon);
}

/* --- Icon tile: the small cyan square that holds an icon on cards ------- */
.icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--signal-line);
  border-radius: 0.25rem;
  background: var(--signal-fill);
  color: var(--signal);           /* the SVG icons draw with "currentColor" */
}

.icon-tile--small {
  width: 2.75rem;
  height: 2.75rem;
}

/* --- Glass panel: frosted, see-through card ------------------------------ */
.glass {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(12px);    /* blurs whatever is behind the panel */
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.glass:hover {
  border-color: rgba(66, 217, 255, 0.24);
  background: rgba(255, 255, 255, 0.055);
}

/* --- Callout box: the cyan-tinted box used by "About" and the closing CTA - */
.callout {
  padding: 2rem;
  border: 1px solid rgba(66, 217, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(66, 217, 255, 0.06);
}

.callout .section-title {
  max-width: 48rem;
}

/* Body paragraphs only - the small .eyebrow label keeps its own styling. */
.callout > p:not(.eyebrow) {
  max-width: 48rem;
  margin-top: 1rem;
  line-height: 1.75rem;
}


/* 4. Page sections (in the order they appear)
   ------------------------------------------------------------------------ */

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: fixed;                /* stays at the top while you scroll */
  inset: 0 0 auto 0;
  z-index: 50;                    /* sits above everything else */
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav__logo img {
  height: 1.25rem;
  width: auto;
}

/* Desktop links and Contact button are hidden on small screens
   (section 6 shows them from 1280px up). */
.nav__links,
.nav__contact {
  display: none;
}

.nav__links {
  align-items: center;
  gap: 1.25rem;
}

.nav__link {
  position: relative;
  padding-block: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  transition: color 0.15s;
}

/* The cyan underline that grows out from the middle on hover.
   It's a pseudo-element: an extra box CSS draws without any HTML for it. */
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.75rem;
  height: 2px;
  border-radius: 999px;
  background: var(--signal);
  transform: scaleX(0);           /* squashed to zero width... */
  transition: transform 0.2s;
}

.nav__link:hover {
  color: var(--white);
}

.nav__link:hover::after {
  transform: scaleX(1);           /* ...and stretched to full width on hover */
}

.nav__contact {
  padding: 0.4rem 1.25rem;
  border: 1px solid rgba(66, 217, 255, 0.4);
  border-radius: 999px;
  color: var(--white);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  transition: background-color 0.15s, color 0.15s;
}

.nav__contact:hover {
  background: var(--signal);
  color: var(--carbon);
}

/* Round hamburger button, only shown below 1280px. */
.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

/* Drop-down list of links for phones/tablets.
   Hidden until js/site.js adds the "is-open" class. */
.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(2, 4, 10, 0.95);
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding-block: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.875rem;
}

.mobile-menu a:last-child {
  border-bottom: 0;
  color: var(--signal);
  font-weight: 600;
}

/* --- Hero (the big first screen) ---------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 92vh;               /* nearly the full screen height */
  padding-top: 4rem;              /* leaves room for the fixed header */
  overflow: hidden;
}

/* Decorative background layers, stacked on top of each other. */
.hero__backdrop,
.hero__grid,
.hero__vignette {
  position: absolute;
  inset: 0;
}

.hero__backdrop {
  overflow: hidden;
}

/* Faint 56px grid made from two repeating 1px lines. */
.hero__grid {
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(130, 210, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 210, 255, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* The large thin circle. Its top-left corner sits at the centre of the hero,
   which is how it looks on exarion.ai too (their animation replaces the
   centring transform), so it peeks in from the lower right. */
.hero__ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34rem;
  height: 34rem;
  border: 1px solid rgba(66, 217, 255, 0.2);
  border-radius: 50%;
  animation: ring-pulse 8s ease-in-out infinite;
}

/* The thin glowing horizontal line near the bottom. */
.hero__beam {
  position: absolute;
  left: 25%;
  bottom: 3rem;
  width: 66.67%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(66, 217, 255, 0.7), transparent);
  animation: beam-drift 7s ease-in-out infinite;
}

/* Darkens the edges so the eye goes to the middle. */
.hero__vignette {
  background: radial-gradient(circle at center, transparent, rgba(2, 4, 10, 0.82) 72%);
}

.hero__content {
  position: relative;             /* lifts the content above the backdrop layers */
  z-index: 10;
  display: grid;
  align-items: center;
  gap: 3rem;
  padding-block: 5rem;
}

.hero__text {
  animation: fade-up 0.7s ease-out both;
}

.hero__text .eyebrow {
  margin-bottom: 1.25rem;
}

.hero__title {
  max-width: 64rem;
  color: var(--white);
  font-size: 3rem;
  line-height: 1.02;
  font-weight: 600;
}

.hero__lead {
  max-width: 42rem;
  margin-top: 1.5rem;
  font-size: 1.125rem;
  line-height: 2rem;
}

.hero__text .button-row {
  margin-top: 2.25rem;
}

.hero__figure {
  overflow: hidden;
  animation: fade-scale 0.8s ease-out 0.12s both;
}

.hero__image-frame {
  position: relative;
  aspect-ratio: 1.08;             /* keeps the box shape while the image loads */
}

.hero__image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;              /* fills the box, cropping instead of stretching */
}

.hero__caption {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* --- About Exarion AI Limited (only on this site) ----------------------- */
.about {
  padding-bottom: 2rem;
}

/* --- Video -------------------------------------------------------------- */
.video {
  padding-bottom: 2rem;
}

.video__frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--carbon);
}

.video__frame iframe {
  width: 100%;
  min-height: 200px;
  aspect-ratio: 16 / 9;
  border: 0;
}

.video__note {
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  line-height: 1.5rem;
}

/* --- IP stack: three product cards -------------------------------------- */
.card-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.stack-card {
  padding: 1.5rem;
}

.stack-card h3 {
  margin-top: 1.5rem;
  color: var(--white);
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
}

.stack-card p {
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.5rem;
}

.stack-card a {
  display: inline-flex;
  margin-top: 1.5rem;
  color: var(--signal);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
}

/* --- "Physical AI Needs More Than Vision" ------------------------------- */
.needs {
  display: grid;
  align-items: center;
  gap: 3rem;
}

.needs__lead {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  line-height: 2rem;
}

.needs__list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.needs__list li {
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(2, 4, 10, 0.6);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
}

/* --- Technology visualized: two image panels ---------------------------- */
.visual-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.visual-panel {
  padding: 1.25rem;
  overflow: hidden;
}

.visual-panel__label {
  color: var(--signal);
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.visual-panel h3 {
  margin-top: 0.75rem;
  color: var(--white);
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
}

.visual-panel__text {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5rem;
}

.visual-panel__media {
  position: relative;
  margin-top: 1.5rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--carbon);
}

.visual-panel__media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Subtle dark fade at the bottom of the sound-tracing image. */
.visual-panel__media--fade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 4, 10, 0.3), transparent);
}

/* Before/after comparison. The source image is ONE file with both halves
   side by side, so each half shows the same image at 200% width and
   pins it to the left (before) or the right (after). */
.compare {
  display: grid;
}

.compare__half {
  position: relative;
  overflow: hidden;
}

.compare__half:first-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.compare__half img {
  position: absolute;
  top: 0;
  width: 200%;
  max-width: none;
  height: 100%;
  object-fit: cover;
}

.compare__half--before img { left: 0; }
.compare__half--after img  { right: 0; }

.compare__badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.25rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-cta {
  margin-top: 2rem;
}

.section-cta .button {
  padding-inline: 1.25rem;
}

/* --- Applications: six small cards -------------------------------------- */
.app-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

.app-card {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(2, 4, 10, 0.55);
}

.app-card .icon-tile {
  margin-bottom: 1.25rem;
}

.app-card h3 {
  color: var(--white);
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 600;
}

.app-card p {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5rem;
}

/* --- Proof points: four numbers ----------------------------------------- */
/* The 1px gap with a light background behind it draws the dividing lines
   between the boxes, so no individual borders are needed. */
.stats {
  display: grid;
  gap: 1px;
  margin-top: 2.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.stat {
  padding: 1.5rem;
  background: rgba(2, 4, 10, 0.9);
}

.stat__value {
  color: var(--white);
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 600;
}

.stat__label {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5rem;
}

.closing {
  margin-top: 3rem;
}

.closing > p:not(.eyebrow) {
  max-width: 42rem;
}

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--carbon);
}

.footer__main {
  display: grid;
  gap: 2.5rem;
  padding-block: 3rem;
}

.footer__logo {
  height: 1.75rem;
  width: auto;
}

.footer__tagline {
  max-width: 28rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.5rem;
}

.footer__contact {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.footer__links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.footer__contact a,
.footer__links a {
  transition: color 0.15s;
}

.footer__contact a:hover,
.footer__links a:hover {
  color: var(--white);
}

.footer__legal {
  padding-block: 1.25rem;
  border-top: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.75rem;
  line-height: 1rem;
}


/* 5. Animations
   ------------------------------------------------------------------------
   exarion.ai animates these with a React library (framer-motion). Plain CSS
   keyframes give the same effect with no JavaScript. */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fade-scale {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: none; }
}

@keyframes ring-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

@keyframes beam-drift {
  0%, 100% { transform: translateX(-8%); }
  50%      { transform: translateX(8%); }
}

/* Respect the "reduce motion" accessibility setting in the OS. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__text,
  .hero__figure,
  .hero__ring,
  .hero__beam { animation: none; }
}


/* 6. Responsive - wider screens
   ------------------------------------------------------------------------ */

/* Large phones / small tablets and up (640px) */
@media (min-width: 640px) {
  .container { padding-inline: 2rem; }

  .section-title          { font-size: 2.25rem; line-height: 2.5rem; }
  .section-lead           { font-size: 1.125rem; }
  .hero__title            { font-size: 3.75rem; line-height: 1; }

  .app-grid,
  .stats                  { grid-template-columns: repeat(2, 1fr); }
  .footer__links          { grid-template-columns: repeat(3, 1fr); }

  /* Before/after sits side by side instead of stacked. */
  .compare                { grid-template-columns: repeat(2, 1fr); }
  .compare__half:first-child {
    border-bottom: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
  }
}

/* Tablets (768px) */
@media (min-width: 768px) {
  .card-grid              { grid-template-columns: repeat(3, 1fr); }
  .footer__main           { grid-template-columns: 1.2fr 1fr; }
}

/* Laptops (1024px) */
@media (min-width: 1024px) {
  .container { padding-inline: 2.5rem; }

  .hero__title            { font-size: 4.5rem; }
  .hero__content          { grid-template-columns: 1.08fr 0.92fr; }
  .needs                  { grid-template-columns: 0.9fr 1.1fr; }
  .visual-grid            { grid-template-columns: repeat(2, 1fr); }
  .app-grid               { grid-template-columns: repeat(3, 1fr); }
  .stats                  { grid-template-columns: repeat(4, 1fr); }

  /* Only the big section headings grow; callout headings stay smaller. */
  .section-intro .section-title { font-size: 3rem; line-height: 1; }
}

/* Desktops (1280px): swap the hamburger for the full navigation bar. */
@media (min-width: 1280px) {
  .nav__links             { display: flex; }
  .nav__contact           { display: block; }
  .menu-button,
  .mobile-menu,
  .mobile-menu.is-open    { display: none; }
}
