/* hadianlabs.com — one stylesheet for every page (PUBLIC_SITE §8).
 *
 * Hadian Labs is the neutral parent: paper, ink and hairlines, the same neutrals as curevise.com.
 * Colour belongs to the products — Curevise's teal appears only inside its own panel. Light only:
 * this site carries no script, so it has no theme switch.
 *
 * Same-origin only: the font and the images are served by this site and nothing else is fetched.
 * No @import, no escape sequence, and no off-origin reference in any position — check_site_egress
 * refuses them, and every page's policy refuses the request. */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  --ground: #f9f9f7;
  --panel: #ffffff;
  --ink: #1a1c1a;
  --ink-2: #65695f;
  --hairline: #ededeb;
  --line: #dededb;
  --bezel: #1a1c1a;

  --curevise: #116576;
  --curevise-soft: #e6eff1;
  --curevise-deep: #062930;

  --wrap: 1120px;
  --gutter: 20px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "calt", "kern";
}

img { max-width: 100%; height: auto; }

a { color: var(--ink); text-underline-offset: 0.2em; }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }

p { margin: 0; }

/* Buttons */

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border-radius: 999px;
  background: var(--ink); color: var(--panel);
  font-weight: 600; font-size: 16px; text-decoration: none;
  transition: background-color 120ms ease;
}
.button:hover { background: color-mix(in srgb, var(--ink) 85%, var(--panel)); }

.text-link { font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Header */

.site-header { border-bottom: 1px solid var(--hairline); }
.site-header .wrap { display: flex; align-items: center; gap: 12px; height: 64px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-weight: 800; font-size: 19px; letter-spacing: -0.02em;
}
.brand svg { width: 28px; height: 28px; display: block; }
.brand .tile { fill: var(--ink); }
.brand .letter { fill: var(--panel); }

.brand { white-space: nowrap; }

.site-nav { display: flex; gap: 14px; margin-left: auto; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.site-nav a:hover { color: var(--ink); }

@media (min-width: 640px) {
  .site-nav { gap: 32px; }
  .site-nav a { font-size: 15px; }
}

/* Home: hero */

.hero { padding: 72px 0 64px; }
.hero h1 {
  font-size: clamp(40px, 7.4vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 800;
  max-width: 13ch;
}
.hero .lead { margin-top: 24px; font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); max-width: 31em; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 36px; }

@media (min-width: 900px) { .hero { padding: 112px 0 96px; } }

/* Home: products */

.section { padding: 64px 0; border-top: 1px solid var(--hairline); }
.section-title { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; margin-bottom: 32px; }

@media (min-width: 900px) { .section { padding: 88px 0; } }

.product {
  display: grid;
  overflow: hidden;
  border-radius: 28px;
  background: var(--curevise-soft);
  color: var(--curevise-deep);
}
.product-copy { padding: 32px 28px 8px; }
.product-name { display: flex; align-items: center; gap: 14px; font-size: 28px; line-height: 1.2; }
.product-name svg { width: 52px; height: 52px; display: block; flex: none; }
.product-name .tile { fill: var(--curevise); }
.product-name .letter { fill: var(--panel); }
.product-copy p { margin-top: 18px; max-width: 30em; font-size: 18px; }
.product-copy .platform { margin-top: 12px; font-size: 15px; opacity: 0.8; }
.product .button { margin-top: 28px; background: var(--curevise); }
.product .button:hover { background: color-mix(in srgb, var(--curevise) 85%, var(--ink)); }

/* The phones never shrink, so each width below is sized to fit its column: two phones on a phone,
 * three from 700 px, beside the copy from 900 px. */
.product-shots {
  display: flex; justify-content: center; align-items: flex-end; gap: 10px;
  padding: 32px 20px 0;
  height: 330px;
  overflow: hidden;
}
.product-shots .phone { width: 130px; flex: none; }
.product-shots .phone:nth-child(2) { width: 152px; }
.product-shots .phone:nth-child(1), .product-shots .phone:nth-child(3) { margin-bottom: -60px; }
.product-shots .phone:nth-child(3) { display: none; }

@media (min-width: 700px) {
  .product-shots { height: 380px; gap: 14px; }
  .product-shots .phone { width: 150px; }
  .product-shots .phone:nth-child(2) { width: 176px; }
  .product-shots .phone:nth-child(3) { display: block; }
}

@media (min-width: 900px) {
  .product { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; }
  .product-copy { padding: 56px 0 56px 56px; }
  .product-shots { height: 400px; padding: 48px 24px 0; gap: 16px; align-self: end; }
  .product-shots .phone { width: 118px; }
  .product-shots .phone:nth-child(2) { width: 146px; }
}

@media (min-width: 1200px) {
  .product-shots { height: 440px; }
  .product-shots .phone { width: 156px; }
  .product-shots .phone:nth-child(2) { width: 190px; }
}

/* Phone frame — the product's own screenshots */

.phone {
  padding: 7px;
  border-radius: 36px;
  background: var(--bezel);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04), 0 24px 48px -28px rgba(6, 41, 48, 0.45);
}
.phone .screen {
  position: relative;
  border-radius: 29px;
  overflow: hidden;
  aspect-ratio: 720 / 1523;
  background: #f9f9f7;
}
.phone .screen img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Two columns: a heading beside its text */

.split { display: grid; gap: 16px 40px; }
.split h2 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; }
.copy { max-width: 36em; }
.copy p + p { margin-top: 16px; }
.copy .text-link { display: inline-block; margin-top: 20px; }

@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); } }

/* Inner pages */

.page-head { padding: 64px 0 48px; }
.page-head h1 { font-size: clamp(36px, 5.6vw, 56px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 800; }
.page-head .lead { margin-top: 18px; font-size: clamp(18px, 2vw, 20px); color: var(--ink-2); max-width: 32em; }

@media (min-width: 900px) { .page-head { padding: 96px 0 64px; } }

.page-section { padding: 48px 0; border-top: 1px solid var(--hairline); }
.page-section h2 { font-size: 22px; line-height: 1.3; }

@media (min-width: 900px) { .page-section { padding: 64px 0; } }

/* Contact */

.contact-grid { display: grid; gap: 16px; }
.contact-card {
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(26, 28, 26, 0.04);
}
.contact-card h2 { font-size: 20px; line-height: 1.3; }
.contact-card p { margin-top: 6px; color: var(--ink-2); }
.contact-card .address { margin-top: 20px; font-size: 18px; font-weight: 600; color: var(--ink); }

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

.facts { margin: 0; max-width: 44em; font-size: 15px; }
.facts div { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--hairline); }
.facts div:first-child { border-top: 0; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; }

@media (min-width: 640px) { .facts div { grid-template-columns: 200px minmax(0, 1fr); gap: 24px; } }

/* Legal pages */

.doc { padding-bottom: 72px; }
.doc > * { max-width: 42em; }
.doc .updated { color: var(--ink-2); font-size: 15px; }
.doc h2 { font-size: 21px; line-height: 1.3; margin-top: 40px; }
.doc p, .doc ul { margin: 12px 0 0; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc a { color: var(--ink); }

/* Footer */

.site-footer { border-top: 1px solid var(--hairline); padding: 56px 0 40px; font-size: 15px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-grid .footer-brand { grid-column: 1 / -1; }
.footer-brand p { margin-top: 12px; color: var(--ink-2); max-width: 22em; }
.site-footer h2 { font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--ink); margin-bottom: 12px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li + li { margin-top: 8px; }
.site-footer ul a { color: var(--ink-2); text-decoration: none; }
.site-footer ul a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--hairline); color: var(--ink-2); font-size: 14px; }

@media (min-width: 760px) {
  .footer-grid { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); }
  .footer-grid .footer-brand { grid-column: auto; }
}
