:root {
  --ink: #071215;
  --ink-soft: #263238;
  --muted: #64716e;
  --line: rgba(7, 18, 21, .12);
  --paper: #f7faf6;
  --paper-strong: #ffffff;
  --cyan: #39f6d0;
  --green: #b8ff65;
  --amber: #ffb74a;
  --blue: #6aa8ff;
  --shadow: 0 24px 80px rgba(7, 18, 21, .16);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: .75rem;
  z-index: 20;
  padding: .6rem .8rem;
  background: var(--paper-strong);
  border-radius: .5rem;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.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;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  color: #fff;
  transition: background .2s ease, box-shadow .2s ease, color .2s ease;
}

.site-header.is-scrolled,
.site-header.solid {
  background: rgba(247, 250, 246, .88);
  color: var(--ink);
  box-shadow: 0 12px 40px rgba(7, 18, 21, .08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: .55rem;
  background: rgba(255, 255, 255, .12);
}

.site-header.is-scrolled .brand-mark,
.site-header.solid .brand-mark {
  border-color: rgba(7, 18, 21, .14);
  background: var(--ink);
  color: #fff;
}

.brand-text {
  font-size: 1rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: .3rem;
}

.site-nav a {
  padding: .55rem .85rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: .95rem;
  color: currentColor;
  opacity: .86;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255, 255, 255, .14);
  opacity: 1;
}

.site-header.is-scrolled .site-nav a:hover,
.site-header.solid .site-nav a:hover,
.site-header.is-scrolled .site-nav a:focus-visible,
.site-header.solid .site-nav a:focus-visible {
  background: rgba(7, 18, 21, .07);
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: .7rem;
  background: rgba(255, 255, 255, .12);
  color: currentColor;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 1.1rem;
  height: 2px;
  margin: .25rem auto;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 8rem clamp(1rem, 5vw, 4rem) 4rem;
  color: #fff;
}

.hero-media {
  position: absolute;
  inset: 0;
  background-image: url("/assets/images/phinow-hero.png");
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 9, 11, .9) 0%, rgba(3, 9, 11, .68) 42%, rgba(3, 9, 11, .18) 100%),
    linear-gradient(0deg, rgba(3, 9, 11, .86) 0%, rgba(3, 9, 11, 0) 48%);
}

.hero-content {
  position: relative;
  width: min(780px, 100%);
  min-width: 0;
}

.eyebrow {
  margin: 0 0 .9rem;
  color: var(--cyan);
  font-weight: 800;
  text-transform: uppercase;
  font-size: .78rem;
}

.eyebrow.dark {
  color: #0b8270;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(3.6rem, 12vw, 8.8rem);
  line-height: .88;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
}

.hero-copy {
  max-width: min(620px, 100%);
  margin: 1.4rem 0 0;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, .82);
}

.hero-actions,
.privacy-actions,
.support-links {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  align-items: center;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: .85rem 1.15rem;
  border: 1px solid transparent;
  border-radius: .8rem;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: var(--cyan);
  color: #03100f;
}

.button.secondary {
  border-color: rgba(255, 255, 255, .38);
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.button.light {
  background: #fff;
  color: var(--ink);
}

.text-link {
  color: #fff;
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: .25rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
  max-width: 820px;
  margin: 3.5rem 0 0;
}

.hero-stats div {
  min-height: 8.3rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: .65rem;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(18px);
}

.hero-stats dt {
  font-size: 1.7rem;
  font-weight: 900;
}

.hero-stats dd {
  margin: .4rem 0 0;
  color: rgba(255, 255, 255, .76);
}

.intro-band,
.workflow-section,
.tech-section,
.support-section {
  padding: clamp(4rem, 9vw, 8rem) clamp(1rem, 5vw, 4rem);
}

.section-grid,
.dashboard-section,
.privacy-band,
.site-footer {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.section-copy p,
.dashboard-copy p,
.support-panel p {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.05rem;
}

.feature-list,
.tech-grid,
.workflow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.feature-list article,
.tech-item,
.step {
  min-height: 14rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--paper-strong);
  box-shadow: 0 14px 40px rgba(7, 18, 21, .05);
}

.feature-list p,
.tech-item p,
.step p {
  margin-bottom: 0;
  color: var(--muted);
}

.icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  margin-bottom: 1.2rem;
  border-radius: .7rem;
  background: var(--ink);
  color: var(--green);
  font-size: 1.3rem;
  font-weight: 900;
}

.section-heading {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto 2rem;
}

.workflow {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.step span {
  display: block;
  margin-bottom: 3rem;
  color: #0b8270;
  font-weight: 900;
}

.dashboard-section {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(320px, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(4rem, 9vw, 8rem) 0;
}

.mockup {
  padding: 1rem;
  border-radius: .9rem;
  background: #0a1518;
  color: #fff;
  box-shadow: var(--shadow);
}

.mockup-top,
.reading-row,
.sensor-chips {
  display: flex;
  gap: .75rem;
  align-items: center;
}

.mockup-top {
  justify-content: space-between;
  padding: .6rem .6rem 1rem;
}

.mockup-top span {
  width: .8rem;
  height: .8rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 .35rem rgba(184, 255, 101, .12);
}

.mockup-top em {
  padding: .35rem .6rem;
  border-radius: 999px;
  background: rgba(57, 246, 208, .12);
  color: var(--cyan);
  font-style: normal;
  font-size: .82rem;
}

.reading-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.reading-row div {
  padding: 1rem;
  border-radius: .7rem;
  background: rgba(255, 255, 255, .07);
}

.reading-row small,
.reading-row span {
  display: block;
  color: rgba(255, 255, 255, .6);
}

.reading-row strong {
  display: block;
  font-size: 2.3rem;
  line-height: 1;
}

.chart {
  overflow: hidden;
  border-radius: .75rem;
  background: #0e2024;
}

.grid {
  fill: none;
  stroke: rgba(255, 255, 255, .1);
  stroke-width: 1;
}

.area {
  fill: url(#chartFill);
}

.line {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
}

.line-a {
  stroke: var(--cyan);
}

.line-b {
  stroke: var(--amber);
  opacity: .9;
}

.sensor-chips {
  flex-wrap: wrap;
  padding: 1rem .4rem .3rem;
}

.sensor-chips span {
  padding: .5rem .7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  color: rgba(255, 255, 255, .78);
  font-size: .88rem;
}

.tech-section {
  background: #edf5ef;
}

.tech-grid {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tech-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tech-item {
  background: rgba(255, 255, 255, .72);
}

.privacy-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: .9rem;
  background: var(--ink);
  color: #fff;
}

.privacy-copy p {
  max-width: 720px;
  color: rgba(255, 255, 255, .76);
}

.support-panel {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: .9rem;
  background: var(--paper-strong);
}

.support-links a {
  font-weight: 800;
  color: #0b8270;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 0 3rem;
  color: var(--ink-soft);
}

.site-footer p {
  margin: .25rem 0 0;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer a {
  color: inherit;
  font-weight: 700;
}

.legal-page {
  background: #fff;
}

.legal-main {
  padding: 8rem 1rem 4rem;
}

.legal-content {
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
}

.legal-content h1 {
  color: var(--ink);
  max-width: 100%;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

.legal-content h2 {
  margin-top: 2.4rem;
  font-size: 1.45rem;
  line-height: 1.2;
}

.legal-content p,
.legal-content address {
  color: var(--ink-soft);
  font-style: normal;
  overflow-wrap: break-word;
}

.legal-note {
  padding: 1rem;
  border-left: .35rem solid var(--amber);
  background: #fff7e8;
}

.legal-nav {
  color: var(--ink);
}

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease, transform .7s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .section-grid,
  .dashboard-section,
  .privacy-band {
    grid-template-columns: 1fr;
  }

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

  .tech-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .privacy-actions {
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: .8rem 1rem;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: 4.4rem 1rem auto;
    display: none;
    padding: .7rem;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: .9rem;
    background: rgba(7, 18, 21, .96);
    color: #fff;
    box-shadow: var(--shadow);
  }

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

  .site-nav a {
    padding: .9rem 1rem;
    border-radius: .5rem;
  }

  .legal-nav {
    position: static;
    display: flex;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    flex: 0 1 auto;
    gap: .15rem;
    font-size: .9rem;
    color: var(--ink);
  }

  .legal-nav a {
    padding: .5rem .35rem;
  }

  .hero {
    min-height: 90vh;
    padding-top: 6rem;
  }

  .legal-content h1 {
    font-size: clamp(2.15rem, 11vw, 3.05rem);
  }

  .legal-page .site-header {
    flex-wrap: wrap;
    row-gap: .35rem;
  }

  .legal-page .legal-main {
    padding-top: 9.2rem;
  }

  .legal-page .legal-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .legal-main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .legal-content {
    max-width: calc(100vw - 4rem);
  }

  .legal-content > * {
    max-width: 100%;
  }

  .legal-content p,
  .legal-content address,
  .legal-content a {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
  }

  h1 {
    font-size: 3.05rem;
    line-height: .95;
  }

  .hero-content {
    width: min(100%, 342px);
  }

  .hero-copy {
    font-size: 1.05rem;
    max-width: 342px;
  }

  .hero-stats {
    max-width: 342px;
  }

  .hero-media {
    background-position: 62% center;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(3, 9, 11, .94) 0%, rgba(3, 9, 11, .78) 62%, rgba(3, 9, 11, .28) 100%),
      linear-gradient(0deg, rgba(3, 9, 11, .9) 0%, rgba(3, 9, 11, 0) 58%);
  }

  .hero-stats,
  .feature-list,
  .workflow,
  .tech-grid,
  .tech-grid.compact,
  .reading-row {
    grid-template-columns: 1fr;
  }

  .hero-stats div,
  .feature-list article,
  .tech-item,
  .step {
    min-height: auto;
  }

  .site-footer {
    display: grid;
  }
}
