/* ==========================================================================
   Ultyron site styles
   Sections: fonts, tokens, base, type, header, buttons, hero, sections,
   path, product, services, about, contact, footer, 404, motion, print.
   ========================================================================== */

/* ---------- Fonts: Sora (SIL OFL 1.1), self-hosted variable font ---------- */
@font-face {
  font-family: "Sora";
  src: url("assets/fonts/sora-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}
/* Metric-matched fallback so text does not reflow when Sora arrives. */
@font-face {
  font-family: "Sora Fallback";
  src: local("Segoe UI"), local("Helvetica Neue"), local("Arial");
  size-adjust: 113.7%;
}

/* ---------- Tokens: change colors here ---------- */
:root {
  --paper: #F4F5F3;        /* page background */
  --paper-2: #EAEDE8;      /* contact band and footer */
  --ink: #1B2230;          /* body text */
  --ink-2: #505967;        /* secondary text, eyebrows */
  --line: #D3D8D2;         /* rules and borders */
  --line-strong: #AEB6AF;  /* quiet underlines */

  --navy: #0B1F3A;         /* Ultyron Navy: buttons, mark, product band */
  --navy-3: #1F4A85;       /* primary button hover */
  --teal: #12B5A5;         /* Ultyron Teal: shapes and large elements, and text on navy only */
  --focus: #0A6F66;        /* focus ring on light backgrounds (teal is too light there) */
  --on-navy-muted: #B4BFCF;
  --on-navy-line: #3B5478;

  --font: "Sora", "Sora Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --container: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(3.5rem, 7vw, 6rem);
  --radius-s: 8px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4.5rem;
}

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

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

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

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-s);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Type scale ---------- */
h1 {
  font-size: clamp(2.25rem, 1.15rem + 3.8vw, 4.5rem);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.9rem, 1.1rem + 3vw, 3.1rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h3 {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.lede {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 34em;
  text-wrap: pretty;
}
.eyebrow {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-2);
}
.label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--teal);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; border-radius: 4px; }
.brand-logo { height: 28px; width: auto; }

/* Without JavaScript the navigation renders in flow below the logo. boot.js adds
   nav-ready before first paint, which switches to the collapsed menu. */
html:not(.nav-ready) .brand { min-height: var(--header-h); }
.site-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  padding-bottom: 1rem;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink-2);
  border-radius: var(--radius-s);
  padding: 0.45rem 0.9rem;
  font-weight: 500;
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--ink); }
.nav-ready .nav-toggle { display: block; }
.nav-ready .header-inner { flex-wrap: nowrap; }
.nav-ready .site-nav { display: none; }
.nav-ready .site-nav.is-open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  position: absolute;
  top: 100%;
  left: calc(-1 * var(--gutter));
  right: calc(-1 * var(--gutter));
  width: auto;
  padding: 0.5rem var(--gutter) 1.5rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 32px -16px rgba(11, 31, 58, 0.35);
}
.nav-list a {
  display: block;
  padding: 0.7rem 0;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.nav-cta { align-self: flex-start; margin-top: 0.5rem; }
@media (max-width: 799px) {
  html:not(.nav-ready) .site-header { position: static; }
}

@media (min-width: 800px) {
  .brand-logo { height: 32px; }
  html:not(.nav-ready) .brand { min-height: 0; }
  .nav-toggle, .nav-ready .nav-toggle { display: none; }
  .header-inner { flex-wrap: nowrap; }
  .site-nav, .nav-ready .site-nav {
    display: flex;
    flex-direction: row;
    width: auto;
    padding-bottom: 0;
    align-items: center;
    gap: 2.25rem;
  }
  .nav-list { display: flex; gap: 1.75rem; }
  .nav-list a {
    padding: 0.25rem 0;
    border-bottom: 0;
    font-size: 0.975rem;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.45em;
    transition: text-decoration-color 0.2s;
  }
  .nav-list a:hover { text-decoration-color: var(--teal); }
  .nav-cta { align-self: auto; margin-top: 0; }
}

/* ---------- Buttons and text links ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-s);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.button-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.button-primary:hover { background: var(--navy-3); border-color: var(--navy-3); }
.button-on-dark { background: var(--teal); border-color: var(--teal); color: var(--navy); }
.button-on-dark:hover { background: #fff; border-color: #fff; }
.nav-cta { padding: 0.6rem 1.05rem; font-size: 0.95rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}
.text-link {
  display: inline-block;
  padding-block: 0.5rem;
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  transition: text-decoration-color 0.2s;
}
.text-link:hover { text-decoration-color: currentColor; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  gap: 1.5rem;
  align-items: start;
  padding-block: clamp(2rem, 5vw, 4rem) clamp(2.5rem, 6vw, 5rem);
}
.hero-copy { display: grid; gap: 1.25rem; justify-items: start; }
.hero-copy h1 { max-width: 19ch; }
.hero-copy .lede { max-width: 37em; }
.hero-copy .actions { margin-top: 0.5rem; }
.hero-proof {
  margin-top: 0.25rem;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 44em;
  text-wrap: pretty;
}
.hero-proof a {
  color: var(--navy);
  font-weight: 500;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}
.hero-proof a:hover { text-decoration-color: currentColor; }

/* The visual is a small glyph above the copy on phones and a full composition beside it from 800px. */
.hero-visual { order: -1; width: clamp(88px, 24vw, 132px); }
.hero-visual svg { width: 100%; height: auto; overflow: visible; }
.hv-ring { fill: none; stroke: var(--navy); stroke-width: 52; }
.hv-core { fill: var(--teal); }

@media (min-width: 800px) {
  .hero {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 3rem;
  }
  .hero-visual { order: 0; width: 100%; max-width: 420px; justify-self: end; margin-top: 2.6rem; }
}
@media (max-width: 599px) {
  .hero .actions, .contact .actions { width: 100%; }
  .hero .button-primary, .contact .button-primary { width: 100%; }
  .hero .actions { gap: 0.5rem 1.5rem; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section-head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-head h2 { max-width: 16em; }
.section-intro { color: var(--ink-2); max-width: 60ch; text-wrap: pretty; }

/* ---------- A clear path ---------- */
.workflows { border-top: 1px solid var(--line); }
.workflow-grid { display: grid; gap: 2rem; }
.workflow {
  display: grid;
  align-content: start;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--navy);
}
.workflow-sector { color: var(--navy); font-size: 0.9rem; font-weight: 600; }
.workflow h3 { font-size: 1.45rem; max-width: 22ch; }
.workflow p:not(.workflow-sector) { color: var(--ink-2); text-wrap: pretty; }
.workflow-example { font-size: 0.95rem; }
.workflow-invitation {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.95rem;
  max-width: 60ch;
}
.workflow-invitation a { color: var(--navy); font-weight: 500; text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
@media (min-width: 900px) {
  .workflow-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
}

/* ---------- Product (BidForgeAI) ---------- */
.product { background: var(--navy); color: #fff; }
.product-inner {
  display: grid;
  gap: 3rem;
  align-items: center;
  padding-block: var(--section);
}
.product-copy { display: grid; gap: 1.25rem; justify-items: start; }
.product-name {
  font-size: clamp(2.4rem, 1.4rem + 4.2vw, 4.2rem);
  letter-spacing: -0.03em;
  line-height: 1;
}
.product-desc {
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  line-height: 1.45;
  color: var(--on-navy-muted);
  max-width: 32ch;
  text-wrap: pretty;
}
.product-summary { color: var(--on-navy-muted); max-width: 55ch; line-height: 1.65; text-wrap: pretty; }
.product-copy .button { margin-top: 0.5rem; }
.product-visual { width: 100%; min-width: 0; }
.product-visual img {
  width: 100%;
  height: auto;
  border: 1px solid var(--on-navy-line);
  border-radius: 12px;
  background: #091320;
}
.product-visual figcaption { margin-top: 0.8rem; color: var(--on-navy-muted); font-size: 0.9rem; line-height: 1.6; }
.product-visual figcaption a { color: #fff; text-decoration-color: var(--teal); text-underline-offset: 0.25em; }
.product-features { display: grid; gap: 2rem; }
.product-features li {
  display: grid;
  align-content: start;
  gap: 1rem;
  border-top: 1px solid var(--on-navy-line);
  padding-top: 1.5rem;
}
.product-step { color: var(--teal); font-size: 0.9rem; font-weight: 500; }
.product-features h3 { font-size: 1.25rem; }
.product-features p { color: var(--on-navy-muted); text-wrap: pretty; }
.product :focus-visible { outline-color: var(--teal); }

@media (min-width: 900px) {
  .product-inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; }
  .product-visual { justify-self: end; }
  .product-features { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; margin-top: 1rem; }
}

/* ---------- Services ---------- */
.service-list { border-bottom: 1px solid var(--line); }
.service-row {
  display: grid;
  gap: 0.75rem 3rem;
  padding-block: 2rem;
  border-top: 1px solid var(--line);
}
.service-head { display: flex; align-items: flex-start; gap: 1rem; }
.service-head .mark {
  flex: none;
  margin-top: 0.3rem;
  color: var(--teal);
  transition: transform 0.3s var(--ease-out);
}
.service-row:hover .mark { transform: translateY(-2px); }
.service-title { font-size: 1.5rem; }
.service-body { display: grid; gap: 0.5rem; }
.service-lead { font-size: 1.15rem; font-weight: 500; line-height: 1.4; text-wrap: pretty; }
.service-detail { color: var(--ink-2); max-width: 54ch; text-wrap: pretty; }

@media (min-width: 900px) {
  .service-row {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    padding-block: 2.75rem;
    align-items: start;
  }
  .service-title { font-size: clamp(1.4rem, 1rem + 0.8vw, 1.7rem); }
}

/* ---------- About ---------- */
.about { padding-top: 0; }
.about-inner { display: grid; gap: 1.25rem; }
.about-intro { display: grid; align-content: start; gap: 1rem; }
.about-intro h2 { max-width: 15ch; }
.about-body { display: grid; gap: 1.25rem; justify-items: start; }
.about-text {
  font-size: clamp(1.3rem, 1rem + 1.3vw, 1.85rem);
  line-height: 1.4;
  letter-spacing: -0.012em;
  max-width: 36ch;
  text-wrap: pretty;
  margin-bottom: 0.5rem;
}
.about-more {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 58ch;
  text-wrap: pretty;
}
@media (min-width: 900px) {
  .about-inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; }
}

/* ---------- Contact ---------- */
.contact-band { background: var(--paper-2); }
.contact { padding-block: var(--section); }
.contact-copy {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 1.25rem;
  max-width: 44em;
}
.contact h2 { max-width: 18ch; }
.contact .actions { margin-top: 0.5rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--ink-2);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 2rem;
  padding-block: 1rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.75rem; padding-block: 0.75rem; }
.footer-brand span:first-of-type { color: var(--ink); font-weight: 500; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.footer-links a { display: inline-block; padding-block: 0.75rem; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-decoration-color: var(--teal); text-underline-offset: 0.3em; }

/* ---------- 404 page ---------- */
.not-found {
  display: grid;
  justify-items: start;
  gap: 1.25rem;
  max-width: 40em;
  padding-block: clamp(3rem, 8vw, 6rem);
}

/* ---------- Motion ---------- */
/* Hero: the two inner layers settle into the outer one on load. Hover lifts them slightly. */
.hero-visual .lift { transition: transform 0.5s var(--ease-out); }
.hero-visual:hover .layer-2 .lift { transform: translateY(-8px); }
.hero-visual:hover .layer-3 .lift { transform: translateY(-18px); }

@keyframes settle {
  from { transform: translateY(-72px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* Scroll reveal. script.js adds reveal-ready only after marking the blocks already
   on screen as visible, so nothing that is in view ever paints hidden. */
.reveal-ready .reveal { opacity: 0; transform: translateY(14px); }
.reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .js .hero-visual .layer-2 { animation: settle 0.9s var(--ease-out) 0.2s both; }
  .js .hero-visual .layer-3 { animation: settle 1s var(--ease-out) 0.5s both; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal-ready .reveal { opacity: 1; transform: none; }
  .hero-visual:hover .layer-2 .lift,
  .hero-visual:hover .layer-3 .lift { transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header { position: static; }
  .skip-link, .nav-toggle, .site-nav { display: none !important; }
  .reveal-ready .reveal { opacity: 1 !important; transform: none !important; }
  .product { background: none; color: var(--ink); }
  .product-desc, .product-summary, .product-features p, .product-visual figcaption, .product-step { color: var(--ink-2); }
  .label, .product-visual figcaption a { color: var(--ink); }
  .product-visual img { background: none; border-color: var(--line); }
  .button-on-dark, .button-primary { background: none; border-color: var(--ink); color: var(--ink); }
  .contact-band, .site-footer { background: none; }
}
