/* A still nav bar, a compact menu, and a full-range responsive pass. */

/* ===== Page-level guards ===== */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body { overflow-x: clip; }
main { overflow-x: clip; }
img, svg, video, canvas { max-width: 100%; }
:is(p, h1, h2, h3, h4, li, summary, strong, span) { overflow-wrap: anywhere; }
.mono, .channel-value { overflow-wrap: anywhere; }

/* ===== Nav: fixed and motionless ===== */
.nav-header .nav-inner {
  position: relative;
  /* No tilt, no magnetic drift, no scroll-linked scaling. */
  transform: none !important;
  rotate: none !important;
  scale: none !important;
  translate: none !important;
  transition: none;
}
.nav-header .nav-inner::after { content: none !important; }
.nav-header .nav-cta {
  transform: none !important;
  transition: background .2s, box-shadow .2s;
}
.nav-header .nav-cta:hover { box-shadow: 0 12px 28px -10px #b3830099; }

.nav-end {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.nav-toggle {
  display: none;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: #fff9e4;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.05rem;
  height: 2px;
  margin-inline: auto;
  border-radius: 2px;
  background: currentColor;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: '';
  position: relative;
}
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 3px; }

/* Links inline on wide viewports, collapsed into a panel below. */
@media (min-width: 880px) {
  .nav-links {
    display: flex;
    gap: clamp(.85rem, 1.6vw, 1.75rem);
    font-size: clamp(.8rem, .74rem + .22vw, .9rem);
  }
}
@media (max-width: 879px) {
  .nav-toggle { display: none; }
  .nav-header .nav-links { display: none; }
}
@media (max-width: 560px) {
  .nav-header { padding: .7rem; }
  .nav-inner { padding: .5rem .55rem .5rem .75rem; }
  .nav-cta { padding: .45rem .85rem; font-size: .8rem; }
  .nav-logo .brand-mark { height: 1.5rem; }
  .nav-logo .nav-wordmark { font-size: 1rem; }
}

/* ===== Section rhythm =====
   One spacing scale for the whole page: every section contributes half the gap
   above and half below, so the distance between any two sections is identical. */
:root { --section-space: clamp(3.5rem, 8vw, 7rem); }

/* `[class]` lifts specificity above the per-section `padding` shorthands. */
main > section[class] {
  padding-block: calc(var(--section-space) / 2);
  padding-inline: clamp(.9rem, 3.5vw, 1.5rem);
}
main > section.hero-section { padding-block-start: calc(var(--section-space) / 2 + 4.5rem); }
main > section.radar-break { padding-block: calc(var(--section-space) / 4); }

/* Blocks inside a section share the same scale. */
.copy-section .section-header { margin-block-end: calc(var(--section-space) / 2); }
.copy-heading { margin-block: 0 calc(var(--section-space) / 3); }
.founders-block { margin-block-start: calc(var(--section-space) / 2); }
.origin-story p { margin-inline: auto; }

section[id] { scroll-margin-top: clamp(5.5rem, 14vw, 7.5rem); }
/* Landing on a grid needs room for the whole grid, not just its first row. */
#team, #founders { scroll-margin-top: clamp(4.5rem, 12vw, 6.5rem); }

/* ===== Hero ===== */
.hero-card .hero-headline {
  font-size: clamp(1.4rem, 5.6vw, 2.9rem);
}
@media (max-width: 760px) {
  .hero-headline > span { white-space: normal; }
  .hero-card .hero-sub { font-size: clamp(.98rem, 3.6vw, 1.2rem); }
  .hero-section { padding-block-start: clamp(5.5rem, 22vw, 9rem); }
}

/* ===== Editorial blocks ===== */
@media (max-width: 860px) {
  .geometry-layout { grid-template-columns: 1fr; gap: 1.75rem; }
  .geometry-art { min-height: 11rem; width: min(100%, 22rem); margin-inline: auto; }
}
@media (max-width: 520px) {
  .geometry-art { display: none; }
  .geometry-copy { border-inline-start-width: 2px; }
  .meaning-text { font-size: clamp(1.5rem, 7.5vw, 2.2rem); }
}

/* ===== Product and pipeline cards ===== */
@media (max-width: 1023px) {
  .pipeline-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .pipeline-card { padding: 1.25rem 1rem; }
  #product .pipeline-card .copy-list,
  #pipeline .pipeline-card .copy-list { font-size: .92rem; }
  .shenas-screen { padding: .3rem; }
}

/* ===== Team and partners ===== */
@media (max-width: 560px) {
  .copy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .copy-grid > .profile { padding: 1rem .6rem; }
  .profile .profile-photo { width: min(100%, 5.5rem); }
  .profile strong { font-size: .92rem; }
  .profile span { font-size: .78rem; }
}
@media (max-width: 360px) {
  .copy-grid { grid-template-columns: 1fr; }
}
.partner-group > .partner-card { flex: 0 0 clamp(9rem, 54vw, 22rem); }

/* ===== Radar ===== */
main > .radar-break { max-width: 86rem; margin-inline: auto; }
.radar-container { max-width: min(100%, 26rem); margin-inline: auto; }
.radar-svg { width: 100%; height: auto; }

/* ===== Contact ===== */
@media (max-width: 760px) {
  .contact-card { padding: 1.4rem 1.1rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .channels-grid { grid-template-columns: 1fr; }
  .channel-value { font-size: .8rem; }
  .contact-headline { font-size: clamp(1.5rem, 7vw, 2.1rem); }
}

/* ===== Footer: plain text links, no glass pills ===== */
.site-footer .copy-footer-links a {
  padding: .15rem .1rem;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--text-dim);
}
.site-footer .copy-footer-links a:hover,
.site-footer .copy-footer-links a:focus-visible {
  background: none;
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: .25em;
}
.site-footer .copy-footer-links { gap: clamp(.6rem, 1.5vw, 1.1rem); }
.site-footer .footer-logo {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
.site-footer {
  display: grid;
  /* Equal side columns keep the tagline optically centred on the page. */
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 1.5rem;
  row-gap: 1rem;
  margin-top: 3rem;
  padding: 1.75rem 0 1.25rem;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
  box-shadow: none;
  text-align: start;
}
.site-footer .footer-logo { grid-column: 1; justify-self: start; }
.site-footer .footer-tagline {
  grid-column: 2;
  justify-self: center;
  margin: 0;
  font-size: .85rem;
  color: var(--text-dim);
}
.site-footer .copy-footer-links { grid-column: 3; justify-self: end; margin: 0; }
/* Copyright always sits last, on its own full-width line. */
.site-footer .footer-copy {
  grid-column: 1 / -1;
  order: 99;
  width: auto;
  margin: .5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  text-align: center;
}
@media (max-width: 760px) {
  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    row-gap: .85rem;
  }
  .site-footer > * { grid-column: 1 !important; justify-self: center !important; }
  .site-footer .copy-footer-links { justify-content: center; }
}

@media (max-width: 560px) {
  .site-footer { gap: .5rem; padding-block: .9rem; }
  .site-footer .footer-tagline { font-size: .74rem; }
  .site-footer .copy-footer-links a { font-size: .7rem; padding: .2rem .45rem; }
  .site-footer .footer-copy { font-size: .64rem; }
}

/* ===== A section you land on finishes its reveal ===== */
.landed,
.landed .scroll-enter {
  --entry-opacity: 1 !important;
  --entry-offset: 0px !important;
  --entry-x: 0px !important;
  --entry-rotate: 0deg !important;
  --entry-blur: 0px !important;
  --entry-scale: 1 !important;
  --scroll-reveal: 1 !important;
  --exit-fade: 1 !important;
  --exit-shift: 0px !important;
  transition: opacity .45s ease, translate .45s ease, scale .45s ease, filter .45s ease;
}

/* The footer is the last thing on the page — it must never stay blurred or
   half-faded, since there is no scroll left to finish its reveal. */
.site-footer {
  --entry-blur: 0px !important;
  --entry-opacity: 1 !important;
  --entry-scale: 1 !important;
  filter: none !important;
  opacity: 1 !important;
}

/* ===== Motion budget on small / touch devices ===== */
@media (max-width: 700px) {
  .scroll-enter { filter: none; }
  .hero-card { filter: none; }
  .grain, #ai-canvas { display: none; }
}
@media (hover: none) {
  .tilt-glass { transform: none !important; }
  .tilt-glass::after { opacity: 0 !important; }
}

/* Comfortable tap targets everywhere. */
@media (pointer: coarse) {
  .nav-links a,
  .future-details summary,
  .shenas-preview summary,
  .partner-carousel button,
  .copy-footer-links a { min-height: 44px; display: flex; align-items: center; justify-content: center; }
}
