/* ==========================================================================
   VERTASSIT — minimal single-page experience
   Two states on one page: VERT ROOM (light) / VERT LOBBY (dark)
   ========================================================================== */

/* ---------- Fonts ---------------------------------------------------- */

@font-face {
  font-family: 'N27';
  src: url('fonts/N27-Thin.otf') format('opentype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'N27';
  src: url('fonts/N27-ExtraLight.otf') format('opentype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'N27';
  src: url('fonts/N27-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'N27';
  src: url('fonts/N27-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'N27';
  src: url('fonts/N27-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'N27';
  src: url('fonts/N27-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

:root {
  /* brand constants */
  --ink: #0F0E0E;
  --paper: #F0F0F0;
  --green: #0B6E4F;
  --green-lift: #4FAD78;

  /* rhythm */
  --gutter: clamp(1.25rem, 4.4vw, 4.5rem);
  --maxw: 100rem;
  --radius-lg: clamp(1rem, 2vw, 1.75rem);
  --radius-md: 0.875rem;
  --tile: clamp(2.1rem, 2.7vw, 2.6rem);
  --section-gap: clamp(5rem, 12vw, 11rem);

  /* ─── Product-image SIZE knob ──────────────────────────────────────────
     Controls how big the hero (vertim1) and outro (vertim2) shots render.
     1 ≈ the original size. Change ONLY this number: bigger number = bigger
     image, smaller number = smaller image (e.g. 1.6 is smaller than 1.8). */
  --media-scale: 1.65;

  /* ─── Hero-image VERTICAL knob (landscape only) ─────────────────────────
     How far the hero image drops down over the VERTASSIT wordmark, given as
     a share of the screen HEIGHT (svh) so it scales across devices — a phone
     and a large monitor keep the same look. Raise it to push the image LOWER
     (more of the device over the word); lower it to lift the image up. The
     wordmark itself does not move.
     (Why svh and not %? A margin percentage is measured against WIDTH, not
     height, so it wouldn't track the image's vertical size.) */
  --hero-overlap: 20svh;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --state-speed: 620ms;
}

/* ROOM-only palette (VERT ROOM). The LOBBY (dark) palette is omitted in this
   build — it ships with the upcoming LOBBY product. */
html[data-state='room'] {
  --bg: var(--paper);
  --fg: var(--ink);
  --fg-soft: rgba(15, 14, 14, 0.62);
  --fg-faint: rgba(15, 14, 14, 0.14);
  --chip: var(--ink);
  --chip-fg: var(--paper);
  --card: #FFFFFF;
  --card-line: rgba(15, 14, 14, 0.06);
  --media: #BFBFBF;
  --icon-invert: 0;
  --green-text: var(--green);
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* the demo sphere's ripple rings can reach the viewport edge — clip them
     at the root so they never spawn a horizontal scrollbar */
  overflow-x: hidden;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--fg);
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition:
    background-color var(--state-speed) var(--ease-inout),
    color var(--state-speed) var(--ease-inout);
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

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

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

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--green-text);
  outline-offset: 4px;
  border-radius: 4px;
}

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

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ==========================================================================
   Intro — a vertical line that opens into the V
   ========================================================================== */

.intro {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: var(--ink);
  transition: opacity 800ms var(--ease);
}

.intro[hidden] {
  display: none;
}

/* Resolve into focus: the V eases in from soft and oversized to sharp and
   settled, holds, then the whole overlay dissolves in place. No mechanical
   line-draw or geometry morph — just light coming into focus. */
.intro.is-done {
  opacity: 0;
  pointer-events: none;
}

.intro-stage {
  width: clamp(8rem, 15vw, 13rem);
  aspect-ratio: 1 / 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition:
    transform 820ms var(--ease),
    filter 820ms var(--ease);
  will-change: transform, filter, opacity;
}

.intro.is-done .intro-stage {
  transform: translateY(-0.5rem) scale(1.07);
  filter: blur(5px);
}

.intro-mark {
  width: 100%;
  height: 100%;
  background: #FFFFFF;
  clip-path: polygon(
    20.7% 20%,
    0.8% 43.6%,
    17.3% 80%,
    72.1% 80%,
    99.2% 20%,
    68.8% 20%,
    44.7% 77.1%
  );
  animation: intro-focus 1150ms var(--ease) forwards;
}

@keyframes intro-focus {
  0% {
    opacity: 0;
    transform: scale(1.16);
    filter: blur(20px);
  }
  55% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(0.8rem, 1.5vw, 1.3rem) var(--gutter) 0;
  /* the bar itself must never swallow clicks meant for the page */
  pointer-events: none;
}

.nav > * {
  pointer-events: auto;
}

/* --- brand mark --- */

.nav-chip {
  display: grid;
  place-items: center;
  width: var(--tile);
  height: var(--tile);
  background: var(--chip);
  border-radius: 30%;
  transition:
    background-color var(--state-speed) var(--ease-inout),
    transform 420ms var(--ease);
}

.nav-chip svg {
  fill: var(--chip-fg);
  transition: fill var(--state-speed) var(--ease-inout);
}

.nav-chip .mark-full {
  width: 50%;
  height: auto;
}

.nav-logo:hover .nav-chip,
.nav-logo:focus-visible .nav-chip {
  transform: scale(1.06);
}

/* --- contact button --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition:
    transform 420ms var(--ease),
    background-color var(--state-speed) var(--ease-inout),
    color var(--state-speed) var(--ease-inout),
    box-shadow 420ms var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-contact {
  height: var(--tile);
  padding-inline: clamp(1rem, 1.7vw, 1.6rem);
  font-size: clamp(0.72rem, 0.88vw, 0.9rem);
  background: var(--chip);
  color: var(--chip-fg);
  border-radius: calc(var(--tile) * 0.3);
}

.btn-contact:hover {
  box-shadow: 0 0.75rem 1.75rem rgba(0, 0, 0, 0.16);
}

/* Animated demo sphere — the site's original demo button. A green gradient
   orb with expanding ripple rings, a soft sheen and a centred DEMO label.
   Green matched to the redesign's brand tone. */
.demo-sphere {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: clamp(4.75rem, 7vw, 6.25rem);
  aspect-ratio: 1;
  border-radius: 50%;
  text-decoration: none;
  transform: scale(1);
  transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.demo-sphere:hover {
  transform: scale(0.9);
}

.demo-sphere__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(11, 110, 79, 0.45);
  transform: scale(1);
  animation: demo-ripple 5.2s ease-out infinite;
  pointer-events: none;
  transition: opacity 500ms ease;
}

.demo-sphere__ring:nth-of-type(2) {
  animation-delay: 1.73s;
}

.demo-sphere__ring:nth-of-type(3) {
  animation-delay: 3.46s;
}

@keyframes demo-ripple {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.demo-sphere:hover .demo-sphere__ring {
  animation-play-state: paused;
  opacity: 0;
}

.demo-sphere__orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #0A5A41, var(--green-lift), #0A5A41);
  background-size: 300% 300%;
  animation: demo-orb 4s ease infinite;
}

@keyframes demo-orb {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.demo-sphere:hover .demo-sphere__orb {
  animation-play-state: paused;
}

.demo-sphere__orb-hover {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #0A5A41;
  opacity: 0;
  transition: opacity 500ms ease;
  pointer-events: none;
}

.demo-sphere:hover .demo-sphere__orb-hover {
  opacity: 1;
}

.demo-sphere__sheen {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.05) 45%, transparent 70%);
  pointer-events: none;
}

.demo-sphere__label {
  position: relative;
  z-index: 2;
  color: #FFFFFF;
  font-weight: 200; /* N27 Extralight */
  font-size: clamp(0.64rem, 0.88vw, 0.85rem);
  letter-spacing: 0.2em;
  /* nudge for the wider tracking so it stays optically centred */
  text-indent: 0.2em;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(4.5rem, 9vw, 7rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

/* --- the swapping product shot --- */

.hero-stage {
  position: relative;
  /* matches vertim1's ratio. Size scales with --media-scale; the 92% term is
     a hard ceiling so it can never overflow the column width. */
  width: min(calc(42rem * var(--media-scale)), 92%, calc(58svh * var(--media-scale)));
  margin-inline: auto;
  aspect-ratio: 794 / 722;
  /* lets the pointer parallax trail the cursor instead of snapping to it */
  transition: transform 600ms var(--ease);
}

/* The product shot carries its own light backdrop, so it floats on the ROOM
   page and reads as a clean rounded card on the LOBBY black. */
.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-lg);
}

/* --- wordmark row --- */

.hero-word {
  position: relative;
  z-index: 1; /* keep the lockup above the image when they overlap */
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 3rem);
  margin-top: clamp(0.5rem, 1.5vw, 1.5rem);
}

/* On landscape the hero shot can be taller than the viewport, so anchor the
   image + wordmark to the bottom. The wordmark's position is then FIXED — it
   no longer moves when --media-scale changes; only the image resizes, growing
   upward — and the wordmark tucks slightly under the image's lower edge.
   (Portrait/mobile has room and keeps the normal centred flow.) */
@media (min-aspect-ratio: 1/1) {
  .hero {
    height: 100svh;
    min-height: 0;
    justify-content: flex-end;
    /* raise this to push the image (and lockup) further up the screen */
    padding-bottom: clamp(3rem, 8svh, 6rem);
  }

  .hero-word {
    /* fixed (not svh/scale-based) so the wordmark stays put at any image size;
       --hero-overlap (in :root) sets how far the image drops over it */
    margin-top: calc(-1 * var(--hero-overlap));
  }
}

.wordmark {
  font-weight: 700;
  /* sized so the lockup fills ~3/4 of the content width, as in the comps */
  font-size: clamp(3rem, 11.8vw, 12.5rem);
  line-height: 0.9;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.wordmark span {
  display: inline-block;
}

.wordmark .is-vert {
  color: var(--green-text);
  transition: color var(--state-speed) var(--ease-inout);
}

.hero-word .demo-sphere {
  margin-bottom: clamp(0.25rem, 1vw, 0.9rem);
}

/* ==========================================================================
   Showreel
   ========================================================================== */

.showreel {
  margin-top: clamp(1rem, 4vw, 3rem);
}

.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  background: var(--media);
  transition: background-color var(--state-speed) var(--ease-inout);
}

.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   Benefits
   ========================================================================== */

.benefits {
  margin-top: var(--section-gap);
}

.section-title {
  font-weight: 200; /* N27 Extralight */
  font-size: clamp(1.5rem, 3.2vw, 2.75rem);
  letter-spacing: 0.22em;
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.4vw, 1.5rem);
}

.benefit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.9rem, 1.6vw, 1.4rem);
  aspect-ratio: 1 / 1;
  padding: clamp(0.75rem, 1.5vw, 1.25rem);
  text-align: center;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius-md);
  /* Vertassit-green shadow (#0B6E4F) — raise/lower the last alpha value to
     make the green glow stronger or softer */
  box-shadow: 0 0.7rem 1.8rem rgba(11, 110, 79, 0.28);
  transition:
    background-color var(--state-speed) var(--ease-inout),
    border-color var(--state-speed) var(--ease-inout),
    transform 480ms var(--ease),
    box-shadow 480ms var(--ease);
}

.benefit:hover {
  transform: translateY(-6px);
  box-shadow: 0 1.35rem 2.75rem rgba(11, 110, 79, 0.44);
}

.benefit img {
  width: clamp(1.75rem, 3vw, 2.75rem);
  height: auto;
  filter: invert(var(--icon-invert));
  transition: filter var(--state-speed) var(--ease-inout);
}

.benefit h3 {
  font-weight: 500;
  font-size: clamp(0.56rem, 0.78vw, 0.8rem);
  letter-spacing: 0.13em;
  line-height: 1.4;
}

/* ==========================================================================
   Conclusion / contact
   ========================================================================== */

.outro {
  margin-top: var(--section-gap);
  display: grid;
  /* image column sizes to the shot; text takes the rest */
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.outro h2,
.contact h2 {
  font-weight: 700;
  font-size: clamp(1.25rem, 2.5vw, 2.25rem);
  letter-spacing: 0.01em;
}

.outro-copy {
  margin-top: clamp(1.25rem, 2.4vw, 2rem);
  max-width: 42ch;
  color: var(--fg-soft);
  font-size: clamp(0.9rem, 1.15vw, 1.15rem);
  line-height: 1.7;
  transition: color var(--state-speed) var(--ease-inout);
}

.outro-note {
  margin-top: clamp(1.25rem, 2.4vw, 2rem);
  color: var(--fg-soft);
  font-size: clamp(0.8rem, 0.98vw, 1rem);
}

/* Contact is now its own section (Ambient → Benefits → Contact) */
.contact {
  margin-top: var(--section-gap);
}

.outro-mail {
  display: inline-block;
  margin-top: clamp(0.6rem, 1.2vw, 1rem);
  font-size: clamp(1rem, 1.6vw, 1.5rem);
  font-weight: 200; /* N27 Extralight */
  letter-spacing: 0.01em;
  background-image: linear-gradient(var(--green-text), var(--green-text));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 460ms var(--ease);
}

.outro-mail:hover {
  background-size: 100% 1px;
}

.socials {
  display: flex;
  gap: clamp(0.75rem, 1.4vw, 1.1rem);
  margin-top: clamp(1.25rem, 2.4vw, 1.75rem);
}

.socials a {
  display: grid;
  place-items: center;
  width: clamp(2rem, 2.6vw, 2.4rem);
  height: clamp(2rem, 2.6vw, 2.4rem);
  border: 1px solid var(--fg-faint);
  border-radius: 50%;
  transition:
    border-color 380ms var(--ease),
    transform 380ms var(--ease);
}

.socials a:hover {
  transform: translateY(-3px);
  border-color: var(--green-text);
}

.socials img {
  width: 52%;
  height: auto;
  filter: invert(var(--icon-invert));
  transition: filter var(--state-speed) var(--ease-inout);
}

.outro-shot {
  /* scales with --media-scale; 46vw keeps it from crowding the text */
  width: min(calc(22rem * var(--media-scale)), 46vw);
  aspect-ratio: 1520 / 722;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.outro-shot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  margin-top: var(--section-gap);
  padding-block: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--fg-faint);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem clamp(1rem, 3vw, 2.5rem);
  transition: border-color var(--state-speed) var(--ease-inout);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 2.4vw, 2.25rem);
}

.footer a,
.footer p {
  font-weight: 200; /* N27 Extralight */
  font-size: clamp(0.7rem, 0.85vw, 0.85rem);
  letter-spacing: 0.14em;
  color: var(--fg-soft);
  transition: color 320ms var(--ease);
}

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

/* ==========================================================================
   Entrance — the page settles in as the intro clears
   ========================================================================== */

.nav,
.hero-stage,
.hero-word {
  opacity: 0;
}

.nav {
  transition: opacity 900ms var(--ease) 260ms;
}

/* keep the short transform transition — the pointer parallax rides on it */
.hero-stage {
  transition:
    opacity 900ms var(--ease) 120ms,
    transform 600ms var(--ease);
}

.hero-word {
  transform: translateY(1.5rem);
  transition:
    opacity 900ms var(--ease) 200ms,
    transform 900ms var(--ease) 200ms;
}

html.is-ready .nav,
html.is-ready .hero-stage,
html.is-ready .hero-word {
  opacity: 1;
}

html.is-ready .hero-word {
  transform: none;
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(2rem);
  transition:
    opacity 900ms var(--ease),
    transform 900ms var(--ease);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 60rem) {
  .benefits-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .outro {
    grid-template-columns: minmax(0, 1fr);
  }

  .outro-shot {
    order: -1;
    width: 100%;
  }
}

@media (max-width: 46rem) {
  .hero-stage {
    width: min(calc(26rem * var(--media-scale)), 90%, calc(48svh * var(--media-scale)));
  }

  .hero-word {
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(1rem, 4vw, 1.75rem);
  }

  .wordmark {
    font-size: clamp(2.75rem, 14vw, 5rem);
  }

  .hero-word .demo-sphere {
    margin-bottom: 0;
  }

  .benefits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   Reduced motion — keep the state change, drop the theatre
   ========================================================================== */

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

  .intro-mark,
  .demo-sphere__orb,
  .demo-sphere__ring {
    animation: none;
  }

  /* show the V immediately, no blur focus-in */
  .intro-mark {
    opacity: 1;
    filter: none;
    transform: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-word {
    transform: none;
  }

  .intro-stage,
  .hero-media,
  .btn,
  .benefit,
  .nav-item {
    transition-duration: 1ms;
  }
}
