/* OSTRA Medical — site styles
   Colours and type follow OSTRA Brand Guidelines V2.0. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"),
       url("../assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metric-matched fallback so text does not jump while Inter loads */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
  size-adjust: 107.12%;
}

:root {
  --ocean: #145580;
  --ocean-deep: #0e4466;
  --blue: #00a6e8;
  --white: #ffffff;
  --cool: #f7f9fa;
  --graphite: #43515b;
  --rule: #dce4ea;
  --rule-soft: #e3eaef;
  --rule-cool: #d6dfe6;
  --on-ocean: rgba(255, 255, 255, 0.88);
  --on-ocean-muted: rgba(255, 255, 255, 0.78);
  --rule-on-ocean: rgba(255, 255, 255, 0.22);

  --font: "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --margin: clamp(24px, 5.56vw, 80px);
  --gutter: 24px;
  --header-h: 104px;
  --section-y: clamp(96px, 11.1vw, 160px);

  --fs-statement: clamp(52px, 7.2vw, 104px);
  --fs-display: clamp(32px, 3.34vw, 48px);
  --fs-heading: 24px;
  --fs-body: clamp(16px, 1.25vw, 18px);
  --fs-small: 15px;
  --fs-label: 13px;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--graphite);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-feature-settings: "kern" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }
::selection { background: rgba(0, 166, 232, 0.18); }

a { color: var(--ocean); }
a:hover { color: var(--ocean-deep); }
a:focus-visible {
  outline: 2px solid var(--ocean);
  outline-offset: 4px;
  border-radius: 4px;
}
.section--ocean a:focus-visible { outline-color: var(--white); }

/* Skip link — visible only on keyboard focus */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ocean);
  color: var(--white);
  font-size: var(--fs-small);
  text-decoration: none;
}
.skip-link:focus { top: 16px; color: var(--white); }

/* Layout */
.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--margin);
  padding-right: var(--margin);
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}
.rail { grid-column: 1 / span 3; }
.content { grid-column: 4 / span 9; }
.full { grid-column: 1 / -1; }

.section { scroll-margin-top: var(--header-h); }
.section__inner {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.section__head {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  row-gap: 40px;
}
.section--cool { background: var(--cool); }
.section--cool .section__head { border-top-color: var(--rule-cool); }
.section--ocean { background: var(--ocean); color: var(--white); }
.section--ocean .section__head { border-top-color: var(--rule-on-ocean); }

/* Type */
.label {
  font-size: var(--fs-label);
  line-height: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ocean);
}
.section--ocean .label { color: var(--on-ocean-muted); }

.statement {
  font-weight: 300;
  font-size: var(--fs-statement);
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ocean);
}
.display {
  font-weight: 300;
  font-size: var(--fs-display);
  line-height: 1.12;
  letter-spacing: -0.022em;
  color: var(--ocean);
  text-wrap: balance;
}
.body-text {
  max-width: 28em;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--graphite);
  text-wrap: pretty;
}
.section--ocean .statement { color: var(--white); }
.section--ocean .body-text { color: var(--on-ocean); }

.text-link {
  color: var(--ocean);
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: rgba(20, 85, 128, 0.35);
  transition: text-decoration-color 0.2s ease;
}
.text-link:hover { color: var(--ocean); text-decoration-color: var(--ocean); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 56px;
  padding: 0 30px 0 32px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.005em;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.btn svg { transition: transform 0.2s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn--ocean { background: var(--ocean); color: var(--white); }
.btn--ocean:hover { background: var(--ocean-deep); color: var(--white); }
.btn--light { background: var(--white); color: var(--ocean); }
.btn--light:hover { background: #eaf1f5; color: var(--ocean); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--rule-soft);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: 32px;
  min-height: var(--header-h);
}
.brand { display: block; padding: 10px 0; }
.brand img { width: 180px; height: auto; }
.site-nav { display: flex; align-items: center; column-gap: 40px; }
.site-nav a {
  display: block;
  padding: 13px 0;
  font-size: var(--fs-small);
  line-height: 18px;
  letter-spacing: 0.005em;
  color: var(--graphite);
  text-decoration: none;
  background-image: linear-gradient(var(--ocean), var(--ocean));
  background-repeat: no-repeat;
  background-size: 0 1px;
  background-position: 0 calc(100% - 10px);
  transition: color 0.2s ease, background-size 0.25s ease;
}
.site-nav a:hover { color: var(--ocean); background-size: 100% 1px; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--white);
}
.hero__arc-box {
  position: absolute;
  inset: 0;
  max-width: 1440px;
  margin: 0 auto;
  pointer-events: none;
}
.hero__arc {
  position: absolute;
  left: 86.1%;
  top: calc(min(100vw, 1440px) * -0.09);
  width: 88.9%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--blue);
  border-radius: 50%;
}
.hero__inner {
  position: relative;
  padding-top: clamp(72px, 10vw, 144px);
  padding-bottom: clamp(104px, 12.5vw, 180px);
}
.hero__title { grid-column: 1 / span 11; }
.hero__copy {
  grid-column: 7 / span 4;
  margin-top: clamp(48px, 6.1vw, 88px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}
.hero__copy .body-text { max-width: 25em; }

/* About */
.about .section__inner { padding-top: clamp(40px, 5.56vw, 80px); }
.about .display { max-width: 14em; }
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
  row-gap: 24px;
  margin-top: clamp(48px, 5.56vw, 80px);
}

/* Products */
.products__intro { margin-top: 24px; max-width: 30em; }
.categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 56px;
  margin-top: clamp(64px, 7.8vw, 112px);
}
.category {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  padding-top: 24px;
  border-top: 1px solid var(--ocean);
}
.category__index {
  font-size: var(--fs-label);
  line-height: 20px;
  letter-spacing: 0.08em;
  color: var(--ocean);
  font-variant-numeric: tabular-nums;
}
.category__title {
  margin-top: 96px;
  font-weight: 400;
  font-size: var(--fs-heading);
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: var(--ocean);
}
.category__desc {
  margin-top: 16px;
  max-width: 21em;
  font-size: 16px;
  line-height: 1.6;
  color: var(--graphite);
}
.category__status {
  margin-top: auto;
  padding-top: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ocean);
}
.category__status::before {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: var(--blue);
}
.products__closing { margin-top: clamp(64px, 6.7vw, 96px); max-width: none; }

/* Contact */
.contact .section__inner { padding-bottom: clamp(104px, 12.5vw, 180px); }
.contact .split { margin-top: clamp(48px, 6.1vw, 88px); row-gap: 40px; }
.contact .body-text { max-width: 24em; }
.contact__details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.contact__person {
  font-size: var(--fs-label);
  line-height: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-ocean-muted);
}
.contact__email {
  font-weight: 300;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--white);
  overflow-wrap: anywhere;
}
.contact__email a {
  display: inline-block;
  padding: 8px 0;
  color: var(--white);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  transition: text-decoration-color 0.2s ease;
}
.contact__email a:hover { color: var(--white); text-decoration-color: var(--white); }
.contact__location {
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--on-ocean-muted);
}
.contact__button { margin-top: 28px; }

/* Footer */
.site-footer { background: var(--white); }
.site-footer--ruled { border-top: 1px solid var(--rule-soft); }
.site-footer__inner { padding-top: 72px; padding-bottom: 40px; }
.site-footer__top { align-items: center; row-gap: 20px; }
.site-footer__brand { justify-self: start; display: block; }
.site-footer__brand img { width: 180px; height: auto; }
.site-footer__descriptor {
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--graphite);
}
.site-footer__bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 32px;
  font-size: var(--fs-label);
  line-height: 20px;
  color: var(--graphite);
}
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-footer__bottom .text-link {
  display: inline-block;
  padding: 12px 0;
  text-underline-offset: 5px;
}

/* Privacy and 404 */
.page-intro .section__inner {
  padding-top: clamp(72px, 10vw, 144px);
  padding-bottom: clamp(120px, 15.3vw, 220px);
}
.page-intro .section__head { margin-top: clamp(64px, 7.8vw, 112px); }
.page-intro__note {
  max-width: 22em;
  font-weight: 300;
  font-size: clamp(22px, 2.23vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ocean);
  text-wrap: balance;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  margin-top: -12px;
  font-size: var(--fs-small);
  line-height: 20px;
  color: var(--ocean);
  text-decoration: none;
}
.back-link svg { transition: transform 0.2s ease; }
.back-link:hover svg { transform: translateX(-3px); }

/* Privacy policy */
.policy .section__inner { padding-bottom: var(--section-y); }
.policy__section {
  margin-top: clamp(56px, 6.1vw, 88px);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  row-gap: 20px;
}
.policy__title {
  font-weight: 400;
  font-size: var(--fs-heading);
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: var(--ocean);
  text-wrap: balance;
}
.policy__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 36em;
}
.policy__body p {
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--graphite);
  text-wrap: pretty;
}
.policy__body .policy__contact { color: var(--ocean); }
.policy__contact .text-link { display: inline-block; padding: 12px 0; margin: -12px 0; }

/* Responsive */
@media (max-width: 1279px) {
  .hero__arc { left: 90%; }
}

@media (max-width: 1023px) {
  .hero__copy { grid-column: 5 / span 6; }
  .hero__arc { left: 92%; }
  .split { column-gap: 32px; }
}

@media (max-width: 899px) {
  .categories { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }
  .category { min-height: 0; }
  .category__title { margin-top: 40px; }
  .category__status { padding-top: 32px; }
}

@media (max-width: 767px) {
  :root { --header-h: 0px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .rail, .content, .hero__title, .hero__copy { grid-column: 1 / -1; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .hero__arc-box { display: none; }
  .site-header { position: static; }
  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 0;
    padding-top: 20px;
  }
  .site-nav { column-gap: 28px; margin-top: 6px; }
  .contact__email { font-size: 22px; }
  .site-footer__inner { padding-top: 64px; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; margin-top: 56px; }
}

@media (max-width: 359px) {
  :root { --fs-statement: 44px; }
  .site-nav { column-gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

@media print {
  .site-header { position: static; }
  .hero__arc-box, .skip-link { display: none; }
  .section--ocean { background: none; color: var(--graphite); }
  .section--ocean .statement, .section--ocean .body-text, .contact__email, .contact__email a { color: var(--ocean); }
}
