/* FYS Holdings — site styles (v2) */

:root {
  --ink: #142A38;
  --ink-deep: #0E1F2A;
  --ink-soft: #3B5262;
  --warm-white: #F5F3EE;
  --white: #FFFFFF;
  --muted: #5F6E78;
  --line: rgba(20, 42, 56, 0.12);
  --line-strong: rgba(20, 42, 56, 0.3);
  --brand: #00B9F2;
  --accent: #086A9C;
  --accent-hover: #07608F;
  --on-ink-muted: rgba(245, 243, 238, 0.68);
  --on-ink-line: rgba(245, 243, 238, 0.16);

  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --measure: 60ch;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --header-h: 4.5rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--warm-white);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

::selection { background: var(--brand); color: var(--ink); }

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

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 220ms var(--ease), color 160ms ease;
}
a:hover { color: var(--accent-hover); background-size: 0% 1px; background-position: 100% 100%; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

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

.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ink); color: var(--warm-white);
  padding: 0.6rem 1rem; z-index: 100;
}
.skip-link:focus { top: 1rem; }

h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 0;
}

.lead {
  font-size: clamp(1.25rem, 1.9vw, 1.5rem);
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -0.012em;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: start;
}

section { scroll-margin-top: calc(var(--header-h) + 1px); }

/* Header ---------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 243, 238, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); gap: 1.5rem;
}
.brand { background: none; }
.brand img { width: auto; height: 1.9rem; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2.5rem; }
.site-nav a {
  color: var(--ink); font-weight: 500; font-size: 0.95rem;
  background-image: linear-gradient(var(--brand), var(--brand));
  background-size: 0% 2px; background-position: 0 100%;
  padding: 0.35rem 0;
}
.site-nav a:hover, .site-nav a[aria-current="true"] { color: var(--ink); background-size: 100% 2px; }

.nav-toggle {
  display: none; align-items: center; gap: 0.6rem;
  background: none; border: 1px solid var(--line-strong); border-radius: 2px;
  padding: 0.5rem 0.8rem; font: inherit; font-weight: 500; font-size: 0.9rem;
  color: var(--ink); cursor: pointer;
}
.nav-toggle-bars { width: 18px; height: 2px; background: currentColor; position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

/* Button ---------------------------------------------------------- */

.button {
  display: inline-flex; align-items: center;
  font-weight: 500; font-size: 1rem; letter-spacing: -0.005em;
  padding: 1rem 1.75rem; border-radius: 2px;
  background: var(--ink); color: var(--warm-white);
  border: 1px solid var(--ink); cursor: pointer; font-family: inherit;
  background-image: none;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease);
}
.button:hover { background: var(--brand); border-color: var(--brand); color: var(--ink); }
.button:disabled { opacity: 0.6; cursor: default; }

/* Hero ------------------------------------------------------------ */

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex; align-items: center;
  padding-block: clamp(4rem, 10vh, 8rem);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-mark {
  position: absolute; right: -14vw; top: 50%;
  width: clamp(28rem, 54vw, 62rem); transform: translateY(-50%);
  opacity: 0.05; pointer-events: none;
}
.hero-inner { position: relative; }

.hero-heading {
  font-size: clamp(2.5rem, 5.2vw, 4.75rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 0;
}
.hero-heading .line { display: block; overflow: hidden; }
.hero-heading .line > span { display: block; transform: translateY(108%); transition: transform 900ms var(--ease); }
.hero-heading .line:nth-child(2) > span { transition-delay: 70ms; }
.hero-heading .line:nth-child(3) > span { transition-delay: 140ms; }
.hero-heading .line:nth-child(4) > span { transition-delay: 210ms; }
.hero-heading .line:nth-child(5) > span { transition-delay: 280ms; }
.is-ready .hero-heading .line > span { transform: none; }

.hero-foot {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  opacity: 0; transform: translateY(10px);
  transition: opacity 700ms var(--ease) 500ms, transform 700ms var(--ease) 500ms;
}
.is-ready .hero-foot { opacity: 1; transform: none; }
.hero-place { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); margin: 0; }
.hero-lead { margin-top: 1.5rem; }
.hero-actions { margin-top: 2.5rem; }

/* About (vision + role) ------------------------------------------- */

.about {
  background: var(--ink); color: var(--warm-white);
  padding-block: clamp(5rem, 11vw, 9rem);
}
.vision {
  font-size: clamp(1.6rem, 3.1vw, 2.6rem);
  line-height: 1.22;
  letter-spacing: -0.025em;
  font-weight: 500;
  color: var(--white);
  max-width: 26ch;
  margin: 0 0 clamp(4rem, 9vw, 7rem);
}
.about-grid { padding-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--on-ink-line); }
.about h2 { color: var(--white); }
.about .lead { color: var(--white); }
.about p:not(.lead) { color: var(--on-ink-muted); }
.about .section-body > .lead { padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--on-ink-line); }

/* Companies ------------------------------------------------------- */

.companies {
  background: var(--warm-white);
  padding-block: clamp(5rem, 11vw, 9rem);
  border-bottom: 1px solid var(--line);
}
.companies-head .lead { max-width: 34ch; }
.companies-head { margin-bottom: clamp(3.5rem, 8vw, 6.5rem); align-items: start; }

.portfolio {
  width: 100%; border-collapse: collapse;
  font-size: 0.95rem;
}
.portfolio th, .portfolio td {
  text-align: left; vertical-align: top;
  padding: 0.9rem 1.25rem 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.portfolio thead th {
  font-family: var(--mono); font-weight: 400; font-size: 0.78rem; color: var(--muted);
  border-bottom-color: var(--line-strong);
  padding-top: 0;
}
.portfolio tbody th { font-weight: 500; }
.portfolio tbody th a { color: var(--ink); }
.portfolio td:last-child, .portfolio th:last-child { padding-right: 0; }

.company {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: start;
  padding-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}
.company + .company { margin-top: clamp(2.5rem, 5vw, 4rem); }
.company:last-child { padding-bottom: clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--line); }

.company-logo { display: flex; align-items: center; min-height: 3rem; margin-top: 0.15rem; }
.company-logo img { width: auto; }
.logo-avabio { height: 3.4rem; }
.logo-infusivet { height: 2.1rem; }
.company-wordmark {
  font-size: 1.6rem; font-weight: 600; letter-spacing: -0.025em; color: var(--ink);
  padding-bottom: 0.3rem; border-bottom: 3px solid var(--brand);
}
.company-link { margin-top: 1.5rem; }
.company-link a { font-weight: 500; }

.company-headline {
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
  line-height: 1.15; letter-spacing: -0.025em; font-weight: 500;
  margin: 0 0 1.25rem; max-width: 22ch;
}

.spec { margin: 2.25rem 0 0; }
.spec > div {
  display: grid; grid-template-columns: 9rem 1fr; gap: 1rem;
  padding: 0.85rem 0; border-top: 1px solid var(--line);
}
.spec > div:last-child { border-bottom: 1px solid var(--line); }
.spec dt { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); padding-top: 0.2rem; }
.spec dd { margin: 0; font-size: 0.98rem; }

.company-media { margin: 0; }
.company-media img.product { width: 100%; }
.media-placeholder {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  background: var(--white); border: 1px solid var(--line);
  display: flex; align-items: flex-end; padding: 1.25rem;
}
.media-mark {
  position: absolute; left: 50%; top: 50%; width: 120%;
  transform: translate(-50%, -50%); opacity: 0.06; pointer-events: none;
}
.media-note { position: relative; font-family: var(--mono); font-size: 0.8rem; color: var(--muted); margin: 0; }

/* Development ----------------------------------------------------- */

.development {
  background: var(--white);
  padding-block: clamp(5rem, 11vw, 9rem);
  border-bottom: 1px solid var(--line);
}
.development .section-body > .lead { padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.development p:not(.lead) { color: var(--ink-soft); }

.path {
  list-style: none; margin: clamp(3rem, 7vw, 5.5rem) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
}
.path li {
  padding-top: 1.25rem; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 0.5rem;
  position: relative;
}
.path li::before {
  content: ""; position: absolute; left: 0; top: -1px;
  width: 2.5rem; height: 2px; background: var(--brand);
}
.path-num { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }
.path-name { font-size: 1.2rem; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }
.path-desc { font-size: 0.95rem; line-height: 1.5; color: var(--muted); max-width: 24ch; }

/* Contact --------------------------------------------------------- */

.contact { background: var(--white); padding-block: clamp(5rem, 11vw, 9rem); }
.contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.contact-intro .lead { margin-top: 1.75rem; }

.contact-details { margin: 2.25rem 0 0; }
.contact-details > div {
  display: grid; grid-template-columns: 6rem 1fr; gap: 1rem;
  padding: 1rem 0; border-top: 1px solid var(--line);
}
.contact-details > div:last-child { border-bottom: 1px solid var(--line); }
.contact-details dt { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); padding-top: 0.25rem; }
.contact-details dd { margin: 0; font-size: 1.05rem; line-height: 1.5; }
.contact-details dd a { font-weight: 500; }

.contact-form { display: grid; gap: 2rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.9rem; font-weight: 500; color: var(--ink-soft); }
.field .optional { font-weight: 400; color: var(--muted); }

.field input, .field select, .field textarea {
  font: inherit; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--line-strong);
  border-radius: 0; padding: 0.6rem 0; width: 100%; min-height: 2.75rem;
  transition: border-color 160ms ease;
}
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23142A38' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat; background-position: right 0 center; padding-right: 1.5rem;
}
.field textarea { resize: vertical; min-height: 7rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.field [aria-invalid="true"] { border-bottom-color: #B23A2E; }

.hidden-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: 0.5rem; }
.form-status { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
.form-status.is-error { color: #B23A2E; }
.form-success { padding: 1rem 0; }
.form-success h3 { margin: 0 0 0.5rem; font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; }
.form-success p { color: var(--muted); }

/* Footer ---------------------------------------------------------- */

.site-footer {
  background: var(--ink-deep); color: var(--on-ink-muted);
  padding-block: clamp(3.5rem, 7vw, 5.5rem) 2.5rem;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2.3fr));
  gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--on-ink-line);
}
.footer-logo { height: 1.75rem; width: auto; margin-bottom: 1.25rem; }
.footer-brand p { max-width: 28ch; }
.footer-heading { font-size: 0.8rem; font-family: var(--mono); font-weight: 400; color: var(--on-ink-muted); margin: 0 0 1rem; letter-spacing: 0; }
.footer-col a { display: block; width: fit-content; color: var(--warm-white); margin-bottom: 0.5rem; }
.footer-col a:hover { color: var(--brand); }
.footer-col p { color: var(--warm-white); }
.footer-legal { margin: 1.75rem 0 0; font-size: 0.85rem; }

/* Responsive ------------------------------------------------------ */

@media (min-width: 56.01em) {
  .company-headline { margin-top: 0; }
}

@media (max-width: 64em) {
  .hero-heading .line { display: inline; overflow: visible; }
  .hero-heading .line > span { display: inline; transform: none; transition: none; }
  .hero-heading { opacity: 0; transform: translateY(14px); transition: opacity 800ms var(--ease), transform 800ms var(--ease); }
  .is-ready .hero-heading { opacity: 1; transform: none; }
  .hero-mark { right: -30vw; width: 34rem; }
}

@media (max-width: 56em) {
  .section-grid, .company, .contact-grid { grid-template-columns: 1fr; }
  .company-logo { margin-bottom: 0.5rem; }
  .path { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .portfolio { font-size: 0.9rem; }
}

@media (max-width: 44em) {
  :root { --header-h: 4rem; }
  .brand img { height: 1.55rem; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--warm-white); border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0.5rem var(--gutter) 1rem; }
  .site-nav a { display: block; padding: 0.9rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; background-image: none; }
  .site-nav li:last-child a { border-bottom-color: transparent; }
  .hero { min-height: 0; padding-block: 4.5rem 4rem; }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .portfolio thead { position: absolute; left: -9999px; }
  .portfolio tr { display: grid; grid-template-columns: 1fr; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
  .portfolio th, .portfolio td { border: 0; padding: 0.1rem 0; }
  .portfolio td:nth-child(3)::before { content: "Market: "; color: var(--muted); }
  .portfolio td:nth-child(4)::before { content: "Relationship: "; color: var(--muted); }
  .field-row { grid-template-columns: 1fr; }
  .spec > div { grid-template-columns: 7rem 1fr; }
  .path { grid-template-columns: 1fr; gap: 1.25rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .hero-heading .line > span, .hero-heading, .hero-foot { transform: none; opacity: 1; }
}
