/* frontlinesoftware.ca: the company's one page. Plain CSS, no build step; the wordmark's two fonts are our own (fonts/). */

:root {
  color-scheme: light dark;
  --paper: #fafaf9; --text: #141414; --secondary: #6e6e6a; --hairline: #e6e5e1; --accent: #a8432a;
  --serif: "Iowan Old Style", Charter, "Bitstream Charter", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --width: 60rem; --gutter: 1.5rem;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #121212; --text: #f2f2f0; --secondary: #9a9a95; --hairline: #2a2a28; --accent: #e08a72; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.7; color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--text); color: var(--paper); }
img { display: block; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--hairline); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-color .2s ease, color .2s ease; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible { outline: 1px solid var(--text); outline-offset: 4px; border-radius: 2px; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

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

/* Header */
.site-header .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 2rem; font-size: .875rem; }
/* The wordmark: FrontLine in Schibsted Grotesk, SOFTWARE in small spaced Manrope capitals, after the mark: an F of three lines (fonts/, cut to
   these letters; SIL Open Font License, beside them). */
@font-face { font-family: "FrontLine Wordmark"; src: url("/fonts/schibsted-grotesk-700-wordmark.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "FrontLine Kind"; src: url("/fonts/manrope-600-wordmark.woff2") format("woff2"); font-weight: 600; font-display: swap; }
/* The logo in golden proportions, all from FrontLine's capital height C (.703em in Schibsted Grotesk) and φ = 1.618:
   the mark's lines stand exactly C tall; the mark sits C/φ² from FrontLine, SOFTWARE C/φ after it; SOFTWARE's capitals
   are C/φ^1.5 tall, spaced 1/φ² em apart. The mark's own drawing has margins inside its 32-unit box (6.4 above and below
   its lines, 4.4 either side), which the sizes and offsets below take out. */
.brand { display: inline-flex; align-items: baseline; font-size: 1.3125rem; color: var(--text); text-decoration: none; line-height: 1; }
.brand__mark { flex: none; width: 1.172em; height: 1.172em; margin-left: -.161em; margin-right: .1075em; position: relative; top: .2344em; }
.brand__name { font-family: "FrontLine Wordmark", var(--sans); font-weight: 700; font-size: 1em; letter-spacing: .01em; margin-right: .4345em; }
.brand__kind { font-family: "FrontLine Kind", var(--sans); font-weight: 600; font-size: .4745em; letter-spacing: .382em; text-transform: uppercase; color: var(--secondary); position: relative; top: -.1958em; } /* centered on FrontLine's last letter, the e (.264em up) */
.menu { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; }
.menu a { color: var(--secondary); text-decoration: none; }
.menu a:hover { color: var(--text); }
@media (max-width: 36rem) { .menu { gap: .25rem 1.25rem; font-size: .8125rem; } }

/* The statement */
.hero { padding-block: clamp(5rem, 16vw, 11rem) clamp(4rem, 10vw, 7rem); }
.hero h1 { font-family: var(--serif); font-size: clamp(2.25rem, 6.2vw, 4.25rem); line-height: 1.08; letter-spacing: -0.02em; max-width: 14em; }
.hero p { margin-top: 2rem; max-width: 34rem; font-size: 1.125rem; color: var(--secondary); }

/* Rows: a small label on the left, the content on the right, a hairline above */
.row { display: grid; grid-template-columns: 1fr; gap: 1rem; padding-block: clamp(3rem, 7vw, 4.5rem); border-top: 1px solid var(--hairline); }
@media (min-width: 48rem) { .row { grid-template-columns: 13rem 1fr; gap: 2rem; } }
.label { font-family: var(--sans); font-size: .8125rem; color: var(--secondary); letter-spacing: .02em; }
@media (min-width: 48rem) { .label { padding-top: .45rem; } }
.content { display: flex; flex-direction: column; gap: 2.5rem; max-width: 38rem; }
.content h2, .content h3 { font-family: var(--serif); }
.content h3 { font-size: 1.25rem; margin-bottom: .375rem; }

.product { display: flex; flex-direction: column; gap: 1.25rem; }
.product h3 { display: flex; align-items: center; gap: .75rem; font-size: 1.75rem; }
.product h3 img { width: 32px; height: 32px; }
.more { font-size: .9375rem; }

.person { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
/* The photos are backgrounds, not <img>s, so a link preview (LinkedIn's picks a person's photo over og:image) can only
   show og.png. They're decoration: the name follows each one. */
.person__photo { display: block; width: 4rem; height: 4rem; border-radius: 50%; background: center / cover no-repeat; filter: grayscale(1); }
.person__photo--gary { background-image: url("/images/gary-oberholzer.webp"); }
.person__photo--serge { background-image: url("/images/serge-belov.webp"); }
.person__role { font-size: .875rem; color: var(--secondary); margin-bottom: .75rem; }
.person h3 { margin-bottom: 0; }
.person .more { display: inline-block; margin-top: .75rem; }

.contacts { display: grid; grid-template-columns: 1fr; gap: .25rem 2rem; margin: 0; }
@media (min-width: 36rem) { .contacts { grid-template-columns: 11rem 1fr; } }
.contacts dt { color: var(--secondary); font-size: .9375rem; }
.contacts dd { margin: 0 0 .75rem; }
.contact__lead { font-family: var(--serif); font-size: clamp(1.5rem, 3.5vw, 2rem); line-height: 1.3; }

/* Footer */
.site-footer { font-size: .8125rem; color: var(--secondary); }
.site-footer .wrap > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; padding-block: 2rem 3rem; border-top: 1px solid var(--hairline); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }

/* A quiet arrival */
@media (prefers-reduced-motion: no-preference) {
  main > * { animation: arrive .8s cubic-bezier(.2, .7, .2, 1) both; }
  main > :nth-child(2) { animation-delay: .08s; }
  main > :nth-child(n+3) { animation-delay: .16s; }
  @keyframes arrive { from { opacity: 0; transform: translateY(8px); } }
}

/* The hero's ribbons (company/hero.py): four drapes of folded cloth, high on the left and falling to the right on a
   slanted band, fading out before the statement. They move with SMIL, so the page still runs no scripts; visitors who
   ask for less motion get the still copy. */
html, body { overflow-x: clip; }
.hero { position: relative; isolation: isolate; }
.ribbons-band { position: absolute; z-index: -1; top: -5rem; right: calc(50% - 50vw); width: 100vw; height: calc(100% + 5rem); pointer-events: none;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 62%);
  mask-image: linear-gradient(100deg, transparent 18%, rgb(0 0 0 / .35) 42%, #000 68%), linear-gradient(180deg, transparent 0, #000 7rem);
  mask-composite: intersect; }
.ribbons { position: absolute; inset: 0; width: 100%; height: 100%; }
.ribbon__fold { stroke: none; }
.ribbon__edge { fill: none; stroke-width: 1; stroke-opacity: .7; stroke-linecap: round; vector-effect: non-scaling-stroke; } /* 1 screen pixel however wide the window */
@media (prefers-color-scheme: dark) { .brand__mark { filter: invert(1); } } /* the mark is a black PNG (mark.png), a picture LinkedIn's message previews can use */
/* A soft glow under each ribbon, in its own colors; stronger on dark, where light glows. The line itself stays sharp. */
.ribbon:nth-of-type(1) { filter: drop-shadow(0 0 3px rgb(6 182 212 / .35)); }
.ribbon:nth-of-type(2) { filter: drop-shadow(0 0 3px rgb(139 92 246 / .35)); }
.ribbon:nth-of-type(3) { filter: drop-shadow(0 0 3px rgb(249 115 22 / .35)); }
.ribbon:nth-of-type(4) { filter: drop-shadow(0 0 3px rgb(236 72 153 / .35)); }
@media (prefers-color-scheme: dark) {
  .ribbon:nth-of-type(1) { filter: drop-shadow(0 0 6px rgb(34 211 238 / .7)); }
  .ribbon:nth-of-type(2) { filter: drop-shadow(0 0 6px rgb(168 85 247 / .7)); }
  .ribbon:nth-of-type(3) { filter: drop-shadow(0 0 6px rgb(249 115 22 / .7)); }
  .ribbon:nth-of-type(4) { filter: drop-shadow(0 0 6px rgb(236 72 153 / .7)); }
}
.ribbons--still { display: none; }
@media (prefers-reduced-motion: reduce) { .ribbons--moving { display: none; } .ribbons--still { display: block; } }
@media (max-width: 48rem) {
  .hero { padding-top: 13rem; }
  .ribbons-band { top: -2rem; height: 17rem; clip-path: none; mask-image: linear-gradient(180deg, transparent 0, #000 25%, #000 60%, transparent 100%); mask-composite: add; }
}
