/* Ideomek. Shares its palette and typefaces with jtwastronomy.com:
   near-black ground, one orange, Space Grotesk for headings, Work Sans for text. */

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("/fonts/work-sans-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #0b0d10;
  --slate: #16191e;
  --line: #2a2f37;
  --chalk: #ecedef;
  --text: #b6b8bc;
  --orange: #f47a20;
  --orange-hi: #ff9547;
  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: "Work Sans", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(20px, 4.5vw, 56px);
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  letter-spacing: .015em;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; letter-spacing: inherit; }
h1, h2, h3, p, figure { margin-top: 0; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.06;
  color: var(--chalk);
  overflow-wrap: break-word;
}
h1 { font-size: clamp(2rem, 5.6vw, 4.5rem); margin-bottom: .45em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.9rem); margin-bottom: .6em; }
h3 { font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.15; margin-bottom: .5em; }
p { margin-bottom: 1.1em; }
strong { color: var(--chalk); font-weight: 600; }
.wrap { width: min(100% - 2 * var(--gutter), 1240px); margin-inline: auto; }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.55; max-width: 56ch; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
.skip { position: fixed; left: 12px; top: -90px; z-index: 30; padding: 12px 16px; background: var(--chalk); color: var(--night); border-radius: 0 0 12px 12px; }
.skip:focus { top: 0; }

/* Links and buttons */
.textlink { color: var(--orange); font-weight: 600; }
.textlink:hover, a.inline:hover { text-decoration: underline; text-underline-offset: 5px; }
a.inline { color: var(--chalk); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 28px;
  border: 1px solid var(--orange); border-radius: 12px;
  background: var(--orange); color: var(--night);
  font-weight: 600; font-size: .95rem; letter-spacing: .04em;
  cursor: pointer;
}
.btn:hover { background: var(--orange-hi); border-color: var(--orange-hi); }
button[disabled] { opacity: .6; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin: 0; }
.section-link { margin: 34px 0 0; }

/* Header */
.head { position: sticky; top: 0; z-index: 10; background: rgba(11, 13, 16, .94); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 22px; min-height: 76px; }
.brand { font: 600 1.7rem/1 var(--display); letter-spacing: -.03em; color: var(--chalk); }
.brand span { color: var(--orange); }
.bar nav { display: flex; align-items: center; gap: 4px 24px; margin-left: auto; }
.bar nav a:not(.btn) { font-size: .92rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.bar nav a:not(.btn):hover { color: var(--chalk); }
.bar nav a.current { color: var(--chalk); border-color: var(--orange); }
.bar nav .btn { min-height: 42px; padding: 0 20px; margin-left: 6px; }
.language, .menu {
  min-height: 42px; padding: 0 13px; display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 12px; background: var(--slate); color: var(--chalk);
  font-size: .85rem; font-weight: 600; cursor: pointer;
}
.language:hover, .menu:hover { border-color: var(--text); }
.menu { display: none; }

/* Breadcrumbs */
.crumbs { padding-top: 22px; font-size: .86rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: #6d727a; }
.crumbs a:hover { color: var(--chalk); }
.crumbs [aria-current] { color: var(--chalk); }

/* Home hero: one photograph, full width */
.hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: min(84vh, 780px); }
.hero > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; filter: saturate(.9) contrast(1.08); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(0deg, var(--night) 0%, rgba(11, 13, 16, 0) 30%),
    linear-gradient(90deg, rgba(11, 13, 16, .9) 0%, rgba(11, 13, 16, .62) 42%, rgba(11, 13, 16, .12) 78%);
}
.hero .wrap { padding-block: clamp(120px, 20vh, 220px) clamp(44px, 7vh, 80px); }
.hero h1 { max-width: 15ch; }
.hero .lead { color: var(--chalk); opacity: .86; margin-bottom: 1.6em; }
.kicker { margin: 0 0 20px; color: var(--orange); font-weight: 600; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; }

/* Inner page intro */
.pageintro { padding-block: clamp(34px, 6vw, 70px) clamp(40px, 6vw, 76px); }
.pageintro h1 { max-width: 19ch; }
.pageintro .lead { max-width: 60ch; margin-bottom: 0; }
.pageintro.has-media h1 { font-size: clamp(2rem, 4.4vw, 3.6rem); }
.pageintro.has-media { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.intro-media { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--slate); }
.intro-media img { display: block; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.intro-media.portrait img { aspect-ratio: 4 / 5; }
.intro-media.contain img { object-fit: contain; }

/* Sections */
.section { padding-block: clamp(56px, 8vw, 108px); }
.section.sand, .section.green { background: var(--slate); }
.section:not(.sand):not(.green) + .section:not(.sand):not(.green),
.pageintro + .section:not(.sand):not(.green) { border-top: 1px solid var(--line); }
.section.tight { padding-block: clamp(30px, 4vw, 52px); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 96px); }
.split > h2 { margin-bottom: 0; }
.split > .manufacturing-link { align-self: start; margin-top: 0; }
.sticky { position: sticky; top: 112px; align-self: start; }
.row { padding: 26px 0; border-top: 1px solid var(--line); }
.row:last-child { border-bottom: 1px solid var(--line); }
.row h2, .row h3 { font-size: clamp(1.2rem, 1.7vw, 1.45rem); line-height: 1.2; margin-bottom: .45em; }
.row p { margin: 0; }
.sand .row, .green .row, .sand details, .green details { border-color: #333942; }

/* Statement: the one line set large */
.statement h2 { font-size: clamp(2.1rem, 5vw, 3.85rem); max-width: 19ch; margin-bottom: .5em; }
.statement h2 em { font-style: normal; color: var(--orange); }

/* Story: the picture stays, the steps scroll past */
.story { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 6vw, 96px); margin-top: clamp(24px, 4vw, 56px); }
.story-media { position: sticky; top: 112px; align-self: start; margin: 0; aspect-ratio: 4 / 5; max-height: calc(100vh - 150px); border-radius: var(--radius); overflow: hidden; background: var(--slate); }
.story-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; }
.story-media img.on { opacity: 1; }
.story-step { min-height: 58vh; display: flex; flex-direction: column; justify-content: center; transition: opacity .3s ease; }
.story.live .story-step:not(.on) { opacity: .66; }
.story-step h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.story-step img { display: none; }
.story-step p { max-width: 46ch; }

/* Photo cards */
.photo-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 40px; }
.photo-card { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 4 / 5; padding: 24px; border-radius: var(--radius); overflow: hidden; background: var(--slate); }
.photo-card img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.photo-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(11, 13, 16, .95) 0%, rgba(11, 13, 16, .6) 34%, rgba(11, 13, 16, 0) 62%); }
.photo-card:hover img { transform: scale(1.04); }
.photo-card h2, .photo-card h3 { font-size: clamp(1.2rem, 1.7vw, 1.45rem); line-height: 1.15; margin-bottom: .3em; }
.photo-card p { margin: 0; font-size: .95rem; line-height: 1.45; color: var(--chalk); opacity: .82; }

/* Index: links set as a list, not as boxes */
.index { margin-top: 34px; }
.index-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 32px; align-items: baseline; padding: 24px 0; border-top: 1px solid var(--line); }
.index-row:last-child { border-bottom: 1px solid var(--line); }
.index-row h2, .index-row h3 { font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.15; margin: 0; transition: color .15s ease; }
.index-row:hover h2, .index-row:hover h3 { color: var(--orange); }
.index-row p { grid-column: 1; margin: 0; max-width: 68ch; }
.index-row .tag { grid-row: 1; grid-column: 2; font-size: .86rem; color: #8d9198; white-space: nowrap; }
.sand .index-row, .green .index-row { border-color: #333942; }

/* Key figures on case studies */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 32px; }
.facts div { border-top: 1px solid var(--line); padding-top: 16px; }
.facts strong { display: block; font: 600 clamp(1.3rem, 2.1vw, 1.8rem)/1.15 var(--display); letter-spacing: -.02em; }
.facts span { font-size: .93rem; }

/* Reference quotes */
.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px clamp(24px, 4vw, 56px); margin-top: 40px; }
.quote { margin: 0; padding-top: 22px; border-top: 2px solid var(--orange); }
.quote blockquote { margin: 0; }
.quote blockquote p { font: 500 clamp(1.2rem, 1.7vw, 1.45rem)/1.3 var(--display); letter-spacing: -.01em; color: var(--chalk); margin-bottom: 18px; }
.quote figcaption { font-size: .9rem; }
.section > .wrap > .quote { max-width: 760px; }

/* Lists and tables */
.checks { list-style: none; margin: 0 0 24px; padding: 0; }
.checks li { position: relative; padding: 11px 0 11px 30px; border-top: 1px solid var(--line); }
.checks li:last-child { border-bottom: 1px solid var(--line); }
.checks li::before { content: ""; position: absolute; left: 3px; top: 19px; width: 12px; height: 6px; border-left: 2px solid var(--orange); border-bottom: 2px solid var(--orange); transform: rotate(-45deg); }
.sand .checks li, .green .checks li { border-color: #333942; }
.tablewrap { overflow-x: auto; margin-top: 30px; border-radius: var(--radius); background: var(--night); }
.compare { width: 100%; border-collapse: collapse; min-width: 700px; font-size: .96rem; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.compare thead th { font: 600 1rem/1.2 var(--display); color: var(--chalk); }
.compare tbody th { color: var(--chalk); font-weight: 600; width: 17%; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare td:last-child, .compare thead th:last-child { color: var(--chalk); box-shadow: inset 2px 0 var(--orange); }
.note, #status { font-size: .9rem; }
.tablewrap + .note { margin-top: 16px; }

/* Reading width for prose, articles and FAQ */
.reading { max-width: 760px; }
.reading h2 { margin-top: 1.7em; font-size: clamp(1.45rem, 2.3vw, 2rem); }
.reading > h2:first-child { margin-top: 0; }
.reading p { font-size: 1.09rem; line-height: 1.72; }
.article .row { padding: 34px 0; }
.article .row h2 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); }
.article .row p { font-size: 1.09rem; line-height: 1.72; }
.byline { margin-top: 30px; font-size: .95rem !important; }
details { border-top: 1px solid var(--line); padding: 20px 0; }
details:last-child { border-bottom: 1px solid var(--line); }
summary { font: 500 clamp(1.08rem, 1.5vw, 1.22rem)/1.3 var(--display); color: var(--chalk); cursor: pointer; }
summary::marker { color: var(--orange); }
details p { margin: 14px 0 0; max-width: 70ch; }

/* Photographs */
.gallery-grid { columns: 2; column-gap: 8px; margin-top: 34px; }
.gallery-card { break-inside: avoid; margin: 0 0 8px; }
.gallery-image { display: block; border-radius: var(--radius); overflow: hidden; background: var(--slate); }
.gallery-image img { display: block; width: 100%; height: auto; }
.gallery-card figcaption { padding: 10px 4px 14px; font-size: .9rem; }
.gallery-card figcaption h2 { font-size: 1.1rem; margin-bottom: .2em; }
.gallery-card figcaption p { margin: 0; }
.gallery-grid.single { columns: 1; max-width: 620px; }
.caseimage { border-radius: var(--radius); overflow: hidden; background: #1d2127; text-align: center; }
.caseimage img { max-height: 460px; width: auto; padding: 24px; }
.media-fallback { min-height: 180px; background: repeating-linear-gradient(135deg, transparent 0 22px, rgba(236, 237, 239, .06) 23px 24px); }
.product[hidden] { display: none; }
.video { aspect-ratio: 16 / 9; max-width: 860px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; border-radius: var(--radius); background: var(--slate); }
.video iframe { width: 100%; height: 100%; border: 0; }
.video p { font-size: .9rem; margin: 12px 0 0; }
.portfolio-links { display: flex; flex-wrap: wrap; gap: 10px 28px; padding-bottom: 34px; }
#work, #own, #references, [id^="ref-"] { scroll-margin-top: 110px; }

/* Aside to OlympusWorks */
.manufacturing-link { margin-top: 28px; padding: 18px 22px; border-radius: 12px; background: var(--night); }
.sand .manufacturing-link, .green .manufacturing-link { background: var(--night); }
.section:not(.sand):not(.green) .manufacturing-link { background: var(--slate); }
.manufacturing-link p { margin-bottom: .2em; }

/* Contact form */
form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: clamp(18px, 3vw, 34px); border-radius: var(--radius); background: var(--slate); }
.wide { grid-column: 1 / -1; }
label { font-size: .9rem; font-weight: 600; color: var(--chalk); }
input, textarea { display: block; width: 100%; margin-top: 7px; padding: 12px 14px; border: 1px solid #5d636c; border-radius: 12px; background: var(--night); color: var(--chalk); font-size: 1rem; }
input:focus, textarea:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 1px var(--orange); }
::placeholder { color: #8d9198; opacity: 1; }
textarea { resize: vertical; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#status:not(:empty) { margin-top: 12px; color: var(--chalk); }

/* Closing band and footer */
.closing { padding-block: clamp(52px, 7vw, 92px); background: var(--orange); color: var(--night); }
.closing h2 { color: var(--night); font-size: clamp(2rem, 4.6vw, 3.6rem); max-width: 16ch; margin-bottom: .35em; }
.closing p { max-width: 52ch; font-size: 1.12rem; color: #1d1206; }
.closing .btn { background: var(--night); border-color: var(--night); color: var(--chalk); }
.closing .btn:hover { background: #20242b; }
.closing :focus-visible { outline-color: var(--night); }
footer { padding-block: 56px 44px; background: var(--slate); font-size: .93rem; }
.footergrid { display: grid; grid-template-columns: 1.3fr 1.2fr 1fr 1fr 1.6fr; gap: 36px 30px; }
.footergrid a:not(.brand) { display: block; margin-bottom: 8px; }
.footergrid a:not(.brand):hover { color: var(--chalk); }
.footergrid p { margin: 18px 0 0; }
.foothead { margin: 0 0 14px !important; font: 500 1rem/1.2 var(--display); color: var(--chalk); }

@media (max-width: 1180px) {
  .menu { display: inline-flex; margin-left: auto; }
  .bar nav { display: none; }
  .bar nav.open { position: absolute; inset: 100% 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 0; padding: 18px var(--gutter) 26px; background: var(--slate); border-bottom: 1px solid var(--line); }
  .bar nav.open a:not(.btn) { font-size: 1.05rem; padding: 8px 0; }
  .bar nav.open .btn { margin: 10px 0 0; }
}
@media (max-width: 980px) {
  .photo-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quotes { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footergrid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 780px) {
  .split, .story, .pageintro.has-media { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
  .story-media { display: none; }
  .story-step { min-height: 0; padding-block: 22px; opacity: 1 !important; }
  .story-step img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); margin-bottom: 22px; }
  .hero { min-height: 0; }
  .hero::before { background: linear-gradient(0deg, var(--night) 4%, rgba(11, 13, 16, .82) 46%, rgba(11, 13, 16, .5) 100%); }
  .intro-media img, .intro-media.portrait img { aspect-ratio: 4 / 3; }
  .index-row { grid-template-columns: 1fr; }
  .index-row .tag { grid-row: auto; grid-column: 1; order: -1; }
  form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .photo-cards, .footergrid { grid-template-columns: 1fr; }
  .photo-card { aspect-ratio: 5 / 4; }
  .gallery-grid { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .story-media img, .story-step, .photo-card img, .index-row h2, .index-row h3 { transition: none; }
}
@media print {
  :root { --night: #fff; --slate: #fff; --chalk: #000; --text: #222; --line: #bbb; }
  body { font-size: 11pt; }
  .head, .closing, footer, .menu, .skip, .video, form, .hero > img, .hero::before { display: none !important; }
  .hero { min-height: 0; }
  .section, .pageintro { padding-block: 18pt; }
  a.inline, .textlink { color: #000; text-decoration: underline; }
  details > p { display: block; }
}
