/* Innorise — site styles
   One stylesheet for every page. No framework.
   Palette comes from the logo: brand cyan and the amber paper plane,
   set against a deep navy ink. */

:root {
  --paper: #ffffff;
  --mist: #eef4f6;
  --ink: #0e2a43;
  --ink-soft: #4b6075;
  --line: #d3dfe5;
  --cyan: #00b8d0;
  --cyan-deep: #00778a;
  --amber: #f8b008;
  --amber-deep: #d99300;
  --error: #b42318;
  --success: #0f7a4b;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --section: clamp(72px, 10vw, 136px);
  --header-h: 72px;
  --radius: 16px;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  font-stretch: 100%;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote, address {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

address {
  font-style: normal;
}

a {
  color: var(--cyan-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--ink);
}

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

h1, h2, h3 {
  font-weight: 680;
  font-stretch: 116%;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 1.35rem + 2.4vw, 3.25rem);
}

h3 {
  font-size: 1.3125rem;
  font-weight: 640;
  font-stretch: 108%;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p {
  text-wrap: pretty;
}

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

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.5em;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-stretch: 104%;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button:hover {
  border-color: var(--cyan-deep);
  background: var(--cyan-deep);
  color: #fff;
}

.button-quiet {
  background: transparent;
  color: var(--ink);
}

.button-quiet:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.button-small {
  min-height: 40px;
  padding: 0 1.15em;
  font-size: 0.9375rem;
}

.button[disabled] {
  opacity: 0.6;
  cursor: progress;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

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

.brand {
  flex: none;
  border-radius: 6px;
}

.brand img {
  width: auto;
  height: 40px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav ul {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav ul a {
  display: block;
  padding-block: 8px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav ul a:hover,
.site-nav ul a[aria-current="page"] {
  color: var(--cyan-deep);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.nav-toggle-bars {
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 4px var(--gutter) 28px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 48px -24px rgba(14, 42, 67, 0.25);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav ul a {
    padding-block: 14px;
    border-bottom: 1px solid var(--line);
    font-size: 1.125rem;
  }

  .site-nav .button {
    margin-top: 24px;
    min-height: 48px;
    font-size: 1rem;
  }
}

/* ---------- Hero (home) ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 9vw, 128px) clamp(150px, 16vw, 230px);
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-title {
  max-width: 15ch;
  /* Scales with the viewport so the widest line never reaches the plane. */
  font-size: clamp(2.75rem, 5.6vw, 6.25rem);
  font-weight: 720;
  font-stretch: 122%;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.hero-lede {
  max-width: 34rem;
  margin-top: 32px;
  color: var(--ink-soft);
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-ledger {
  max-width: 30rem;
  margin-top: 48px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.hero-ledger strong {
  color: var(--ink);
  font-weight: 650;
}

/* The flight path: the logo's paper plane, rising across the page. */
.hero-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-flight {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  clip-path: inset(0 100% 0 0);
  animation: flight-reveal 1.5s cubic-bezier(0.55, 0, 0.25, 1) 0.25s forwards;
}

.hero-flight path {
  fill: none;
  stroke: var(--amber);
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.hero-flight .hero-flight-trail {
  stroke: var(--cyan);
  stroke-width: 1;
  stroke-dasharray: 2 8;
  opacity: 0.7;
}

/* Sits on the end of the path at (88.5%, 18%). */
.hero-plane {
  position: absolute;
  top: 18%;
  left: 88.5%;
  width: clamp(40px, 5vw, 72px);
  height: auto;
  opacity: 0;
  transform: translate(-28%, -62%);
  animation: plane-arrive 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 1.45s forwards;
}

@keyframes flight-reveal {
  to { clip-path: inset(0 0 0 0); }
}

@keyframes plane-arrive {
  from {
    opacity: 0;
    transform: translate(-90%, 10%);
  }
  to {
    opacity: 1;
    transform: translate(-28%, -62%);
  }
}

/* On narrow screens the path stays in the band below the text. */
@media (max-width: 900px) {
  .hero-art {
    top: auto;
    height: clamp(120px, 18vw, 160px);
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: var(--section);
}

.section-mist {
  background: var(--mist);
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section-head p {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 1.1875rem;
}

/* Services */

.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px clamp(28px, 4vw, 48px);
}

.service {
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.service img {
  width: auto;
  height: 44px;
  margin-bottom: 22px;
}

.service h3 {
  margin-bottom: 10px;
}

.service p {
  color: var(--ink-soft);
}

@media (max-width: 960px) {
  .services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .services {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Why Innorise */

.why {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
}

.why .section-head {
  position: sticky;
  top: calc(var(--header-h) + 48px);
  margin-bottom: 0;
}

.reasons {
  display: grid;
  gap: 40px;
}

.reason {
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.reason:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.reason h3 {
  margin-bottom: 12px;
}

.reason p {
  max-width: 62ch;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .why {
    grid-template-columns: 1fr;
  }

  .why .section-head {
    position: static;
  }
}

/* Made in Armenia */

.armenia {
  padding-block: var(--section);
  background: var(--ink);
  color: #c4d3de;
}

.armenia-inner {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 40px clamp(40px, 7vw, 112px);
  align-items: end;
}

.armenia h2 {
  grid-column: 1 / -1;
  max-width: 20ch;
  color: #fff;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.75rem);
}

.armenia p {
  max-width: 60ch;
  font-size: 1.125rem;
}

.armenia a {
  justify-self: start;
  color: #fff;
  font-weight: 600;
}

.armenia a:hover {
  color: var(--cyan);
}

@media (max-width: 800px) {
  .armenia-inner {
    grid-template-columns: 1fr;
  }
}

/* Case studies */

.cases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.case {
  --case-bg: var(--ink);
  --case-fg: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 400px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--radius);
  background: var(--case-bg);
  color: var(--case-fg);
  text-decoration: none;
}

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

.case-logo {
  width: auto;
  height: 52px;
  max-width: 220px;
  object-fit: contain;
  object-position: left center;
}

.case-summary {
  max-width: 24ch;
  margin-top: auto;
  padding-top: 48px;
  font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.625rem);
  font-weight: 560;
  font-stretch: 108%;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.case-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  margin-top: 28px;
  font-size: 0.9375rem;
}

.case-facts dt {
  opacity: 0.75;
}

.case-facts dd {
  font-weight: 600;
}

.case-more {
  margin-top: 28px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: transparent;
  text-underline-offset: 0.25em;
  transition: text-decoration-color 0.15s ease;
}

.case:hover .case-more,
.case:focus-visible .case-more {
  text-decoration-color: currentColor;
}

.case-trymeet { --case-bg: #4b5167; }
.case-yapapp { --case-bg: #2f6cc6; }
.case-vone { --case-bg: #e9eef1; --case-fg: var(--ink); }
.case-kitkeys { --case-bg: #343740; }

@media (max-width: 760px) {
  .cases {
    grid-template-columns: 1fr;
  }

  .case {
    min-height: 340px;
  }
}

/* Client logos */

.logos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.logos li {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  padding: 12px 20px;
  background: var(--paper);
}

.logos img {
  width: var(--w, 160px);
  max-width: 80%;
  height: auto;
  max-height: 84px;
  object-fit: contain;
  filter: grayscale(1) contrast(1.15);
  mix-blend-mode: multiply;
}

@media (max-width: 760px) {
  .logos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Contact */

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px clamp(40px, 7vw, 112px);
}

.contact-intro p {
  max-width: 34ch;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 1.1875rem;
}

.contact-form {
  display: grid;
  gap: 22px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #b4c6d1;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.15s ease;
}

.field textarea {
  min-height: 168px;
  resize: vertical;
}

.field input:hover,
.field textarea:hover {
  border-color: var(--ink-soft);
}

.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--ink);
  outline-offset: 1px;
}

.field [aria-invalid="true"] {
  border-color: var(--error);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.form-status {
  font-size: 0.9375rem;
  font-weight: 500;
}

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

@media (max-width: 860px) {
  .contact-inner {
    grid-template-columns: 1fr;
  }
}

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

.site-footer {
  padding-top: clamp(56px, 7vw, 88px);
  background: var(--ink);
  color: #b9c9d6;
  font-size: 0.9375rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr);
  gap: 40px;
}

.footer-brand img {
  width: auto;
  height: 48px;
  margin-bottom: 20px;
}

.footer-brand p {
  max-width: 42ch;
}

.footer-heading {
  margin-bottom: 12px;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: 0;
}

.site-footer ul {
  display: grid;
  gap: 6px;
}

.site-footer a {
  color: #fff;
}

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

.footer-base {
  margin-top: clamp(48px, 6vw, 72px);
}

.footer-base p {
  padding-block: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.875rem;
}

@media (max-width: 860px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* ---------- Case study pages ---------- */

.case-hero {
  --case-bg: var(--ink);
  --case-fg: #fff;
  overflow: hidden;
  background: var(--case-bg);
  color: var(--case-fg);
}

.case-hero.case-trymeet { --case-bg: #4b5167; }
.case-hero.case-yapapp { --case-bg: #2f6cc6; }
.case-hero.case-vone { --case-bg: #e9eef1; --case-fg: var(--ink); }
.case-hero.case-kitkeys { --case-bg: #343740; }

.case-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 32px clamp(32px, 5vw, 72px);
  min-height: clamp(420px, 44vw, 560px);
  padding-top: clamp(48px, 6vw, 72px);
}

.case-hero-text {
  padding-bottom: clamp(48px, 6vw, 72px);
}

.case-hero-logo {
  display: inline-block;
  border-radius: 6px;
}

.case-hero-logo img {
  width: auto;
  height: 60px;
  max-width: 240px;
  object-fit: contain;
  object-position: left center;
}

.case-hero h1 {
  max-width: 14ch;
  margin-top: 32px;
  font-size: clamp(2.25rem, 1.4rem + 3vw, 4rem);
  font-stretch: 120%;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.store-link {
  border-color: currentColor;
  background: transparent;
  color: inherit;
}

.store-link:hover {
  border-color: var(--case-fg);
  background: var(--case-fg);
  color: var(--case-bg);
}

.store-note {
  margin-top: 32px;
  font-weight: 500;
}

.case-hero-art {
  align-self: end;
  justify-self: end;
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  object-position: right bottom;
}

.case-hero-art.is-centered {
  align-self: center;
  padding-bottom: 40px;
}

@media (max-width: 860px) {
  .case-hero-inner {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .case-hero-text {
    padding-bottom: 0;
  }

  .case-hero-art,
  .case-hero-art.is-centered {
    justify-self: center;
    max-height: 320px;
    object-position: center bottom;
    padding-bottom: 0;
  }
}

.case-overview {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 48px clamp(40px, 7vw, 112px);
  align-items: start;
}

.case-overview h2 {
  margin-bottom: 28px;
}

.case-copy p,
.case-copy li {
  max-width: 64ch;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

.case-copy p + p,
.case-copy p + ul {
  margin-top: 18px;
}

.case-copy ul {
  display: grid;
  gap: 8px;
  padding-left: 1.2em;
}

.case-copy li::marker {
  color: var(--cyan-deep);
}

.case-meta {
  display: grid;
  gap: 24px;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius);
  background: var(--mist);
}

.case-meta dt {
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.case-meta dd {
  font-size: 1.0625rem;
  font-weight: 600;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tech-list li {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.875rem;
  font-weight: 500;
}

@media (max-width: 860px) {
  .case-overview {
    grid-template-columns: 1fr;
  }
}

.testimonial blockquote p {
  max-width: 46ch;
  font-size: clamp(1.3125rem, 1.05rem + 1.1vw, 1.875rem);
  font-weight: 450;
  font-stretch: 104%;
  line-height: 1.42;
  letter-spacing: -0.01em;
  text-indent: -0.45em;
}

.testimonial figcaption {
  margin-top: 32px;
  color: var(--ink-soft);
}

.testimonial figcaption strong {
  display: block;
  color: var(--ink);
  font-weight: 650;
}

.next-case a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.next-case-label {
  color: var(--ink-soft);
  font-weight: 500;
}

.next-case-name {
  font-size: clamp(2rem, 1.3rem + 3vw, 4rem);
  font-weight: 700;
  font-stretch: 120%;
  line-height: 1;
  letter-spacing: -0.03em;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: transparent;
  text-underline-offset: 0.12em;
  transition: text-decoration-color 0.15s ease;
}

.next-case a:hover .next-case-name {
  text-decoration-color: var(--amber);
}

/* ---------- Motion preferences ---------- */

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .hero-flight {
    clip-path: none;
    animation: none;
  }

  .hero-plane {
    opacity: 1;
    animation: none;
  }
}
