/* Shared by index, funktionen, roadmap and dienstleistungen: brand font, colours, the type scale of geowerkstatt.ch,
   header, footer, the teal title band of the subpages, section titles and the line-art styles.
   Everything that only one page uses stays in that page */

/* NeoGeo is the geowerkstatt brand font (licensed). local() picks up an installed copy, the woff2 files in assets/fonts serve everyone else */
@font-face { font-family: "NeoGeo"; font-weight: 300; font-display: swap; src: local("NeoGeo-Light"), url("assets/fonts/NeoGeo-Light-CdYKDiag.woff2") format("woff2"); }
@font-face { font-family: "NeoGeo"; font-weight: 600; font-display: swap; src: local("NeoGeo-SemiBold"), url("assets/fonts/NeoGeo-SemiBold-GkYq9Nfz.woff2") format("woff2"); }
/* Poppins Medium for buttons, the latin subset from Google Fonts (SIL Open Font License), served from here */
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("assets/fonts/Poppins-Medium-latin.woff2") format("woff2"); }

:root {
  --teal: #124a4f;
  --neon: #00ff97;
  --text: #000;
  --paper: #fff;
  --mist: #f6f8f8;
  --on-teal-muted: rgba(255, 255, 255, 0.74);
  --font: "NeoGeo", "Poppins", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --content-inset: max(var(--gutter), calc((100% - 1200px) / 2));
  --header-h: 76px;
  /* Space below the teal band on every page, and between the sections of the start page. geowerkstatt.ch/produkte
     leaves about 150 px between sections at 1024 and at 1440 wide */
  --section-gap: clamp(112px, 5vw + 80px, 156px);
  /* The geowerkstatt emblem in the teal band, the same size on every page: about 260 px on a laptop, 144 px on phones.
     It sets the height of the band */
  --emblem: clamp(144px, min(18vw, 30vh), 270px);
  /* How wide the subtitle of a teal band may run while the emblem stands beside it: it stops about 40 px before "ein
     Produkt von geowerkstatt". shortcut: worked out from the sizes of the emblem and of that text, check it again when
     they change */
  --subtitle-width: min(66vw - 100px, 16vw + 540px);
  /* Type scale of geowerkstatt.ch, measured from 375 to 1440 px wide: phones get the minimum, from about 800 px the sizes
     grow as 1rem plus a share of the width and stop growing at 1400 px (H1 66, H2 46, H3 36, lead 24, text 19 px).
     Small titles (H4 there) take the text size in SemiBold. Use only these sizes for text */
  --text-small: 1rem;
  --text-body: clamp(1.125rem, 1rem + .25vw, 1.2rem);
  --text-lead: clamp(1.3rem, 1rem + .6vw, 1.525rem);
  --text-h3: clamp(1.73rem, 1rem + 1.44vw, 2.26rem);
  --text-h2: clamp(2.1rem, 1rem + 2.16vw, 2.89rem);
  --text-h1: clamp(2.83rem, 1rem + 3.6vw, 4.15rem);
  /* The neon marker stroke used for highlights on all pages */
  --marker: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 30' preserveAspectRatio='none'%3E%3Cpath d='M3 9C25 4 62 2 98 6L96 25C62 29 27 28 2 26Z' fill='%2300ff97'/%3E%3C/svg%3E");
  /* The drawn neon stroke under a word, the same stroke as under the start page's title. It stretches to the width of
     the word and stays 2 px thick. Neon for teal ground, black for light ground (--drawn-line-black, the same stroke).
     Use them through .drawn-line below */
  --drawn-line-black: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9C60 5 140 3 215 4S286 8 297 6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  --drawn-line: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9C60 5 140 3 215 4S286 8 297 6' fill='none' stroke='%2300ff97' stroke-width='2' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); font-weight: 300; font-size: var(--text-body); line-height: 1.8; color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--neon); outline-offset: 4px; }
h1, h2, h3, h4, p, li, th, td, dt, dd, figcaption { letter-spacing: .05em; }
/* Phones: long German words in titles ("Unterauftragsbearbeiter") are wider than the screen. Such words carry soft
   hyphens (&shy;) in the markup, and titles break only there: automatic hyphenation also cut short words ("wei-ter")
   that fit on the next line. break-word keeps a long word without soft hyphens from being cut off */
@media (max-width: 760px) {
  h1, h2, h3 { overflow-wrap: break-word; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header. shortcut: its markup is still copied into every page, move it to a shared include once the site has a build step */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--header-h); padding: 0 var(--gutter);
  background: var(--teal); color: var(--paper); line-height: 1.8;
}
.wordmark { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 600; letter-spacing: .01em; line-height: 1; color: var(--neon); text-decoration: none; }
/* The menu as on geowerkstatt.ch: text size, Light, all neon. The current page carries the drawn line, the others get
   it on hover */
.site-nav { display: flex; gap: 28px; font-size: var(--text-body); letter-spacing: .05em; }
.site-nav a { color: var(--neon); }
.header-actions { display: flex; gap: 8px; }
.btn { display: inline-flex; align-items: center; padding: 9px 16px; border: 1.5px solid var(--neon); border-radius: 6px; font-family: "Poppins", sans-serif; font-size: 14px; font-weight: 500; text-decoration: none; }
/* Text on neon is always black (corporate design), teal on neon looks blurred */
.btn-primary { background: var(--neon); color: var(--text); }
.btn-primary:hover { background: #5dffbb; }
/* The quiet button on white ground: black text, and the neon border every button has. On hover it fills with a light
   tint of that neon, on white and on teal alike */
.btn-outline { color: var(--text); }
.btn-outline:hover { background: rgba(0, 255, 151, .15); }
.btn-large { padding: 14px 28px; font-size: 16px; }
.site-nav a, .btn { white-space: nowrap; }

/* Hover, the current page and the selected tab are shown with the drawn line instead of a ruled underline: in neon on
   the teal ground (the menu, "geowerkstatt" in the title bands), in black on light ground (every element with the
   class drawn-line inside a link, a summary or a selected tab; neon on white is not a colour pair of the corporate
   design). The space for the line is always kept, so nothing moves when it appears. Links inside running text keep
   their plain underline: they must be recognisable without hovering */
.drawn-line, .site-nav a, .maker strong { padding-bottom: .22em; background: 0 100% / 100% .3em no-repeat; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current], .maker:hover strong { background-image: var(--drawn-line); }
:is(a, summary):hover .drawn-line, [aria-selected="true"] .drawn-line { background-image: var(--drawn-line-black); }

/* The menu button of small screens and the wrapper it opens (.menu holds the menu and the demo button). On wide
   screens the wrapper takes no part in the layout: both stand in the header itself */
.menu { display: contents; }
.menu-button { display: none; }

/* Four menu entries and the demo button need about 900 px. Below 940 px the older layout applies first: the menu in
   its own row, and on phones the then taller header scrolls away. It remains for browsers without popover (before 2024) */
@media (max-width: 940px) {
  .topbar { flex-wrap: wrap; row-gap: 4px; height: auto; padding-top: 12px; padding-bottom: 12px; }
  .site-nav { order: 1; flex-basis: 100%; flex-wrap: wrap; gap: 0 24px; }
}
@media (max-width: 600px) {
  .topbar { position: static; }
}
/* Everywhere else the header below 940 px shows only the name and the menu button and stays in view while scrolling.
   The button opens .menu below the header over the whole page: the entries large at the top, the demo button at the
   bottom, both easy to hit with a thumb. .menu is a popover of the browser, so it needs no script; Escape, the button
   or a tap on the header closes it */
@media (max-width: 940px) {
  @supports selector(:popover-open) {
    :root { --header-h: 64px; }
    .topbar:has(> .menu) { position: sticky; flex-wrap: nowrap; height: var(--header-h); padding-top: 0; padding-bottom: 0; }
    /* 44 px square: the smallest size that is comfortable to tap. The negative margin lines the icon up with the page edge */
    .menu-button { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -8px; padding: 0; border: 0; background: none; color: var(--neon); cursor: pointer; }
    .menu-button svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
    .menu-close, .topbar:has(.menu:popover-open) .menu-open { display: none; }
    .topbar:has(.menu:popover-open) .menu-close { display: block; }
    .menu:not(:popover-open) { display: none; }
    .menu:popover-open {
      display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
      position: fixed; inset: var(--header-h) 0 0; width: auto; height: auto; margin: 0; border: 0;
      padding: 20px var(--gutter) 28px; overflow-y: auto;
      background: var(--teal); color: var(--paper);
    }
    .menu .site-nav { order: 0; flex: none; flex-flow: column; align-items: flex-start; gap: 6px; font-size: var(--text-h3); }
    .menu .site-nav a { padding-top: .3em; }
    .menu .header-actions .btn { flex: 1; justify-content: center; padding: 14px 28px; font-size: 16px; }
    /* The page behind the open menu must not scroll along */
    html:has(.menu:popover-open) { overflow: hidden; }
  }
}

/* Teal title band of the subpages */
.intro {
  --pad-top: clamp(32px, 5vw, 64px);
  position: relative;
  overflow: hidden;
  min-height: calc(var(--pad-top) + 1.4 * var(--text-h1) + var(--emblem));
  padding: var(--pad-top) var(--content-inset) clamp(40px, 6vw, 72px);
  background: var(--teal);
  color: var(--paper);
}
.intro h1 { margin: 0 0 16px; color: var(--neon); font-size: var(--text-h1); font-weight: 600; line-height: 1.23; }
.intro p { max-width: var(--subtitle-width); margin: 0; font-size: var(--text-lead); line-height: 1.8; }
/* The content below the band starts at the same distance on every page, the one of the start page. "main >" lets the
   rule win over the paddings the pages set on their own sections */
main > .intro + * { padding-top: var(--section-gap); }
/* Narrow: the emblem gets its own space below the text, so the text may use the whole width */
@media (max-width: 1000px) {
  .intro { padding-bottom: calc(var(--emblem) + 16px); }
  .intro p { max-width: none; }
}

/* "ein Produkt von geowerkstatt" beside the geowerkstatt emblem, cut by the teal band's right and bottom edge as on
   geowerkstatt.ch. Every band sets --pad-top and is at least --pad-top + 1.4 title lines + --emblem tall, so the neon rays
   never sit behind the neon title */
/* z-index 3 keeps the link above the text block of the start page's band (z-index 2), which reaches over it on wide
   screens and would take the pointer */
.maker { position: absolute; right: 0; bottom: 0; z-index: 3; display: flex; align-items: flex-end; gap: clamp(10px, 1.5vw, 20px); height: var(--emblem); color: var(--paper); text-decoration: none; }
.maker .emblem { height: 100%; width: auto; }
.maker-text { margin-bottom: clamp(30px, 5vh, 72px); font-size: 18px; font-weight: 500; line-height: 1.25; text-align: right; color: var(--on-teal-muted); }
.maker-text strong { display: block; color: var(--paper); font-size: clamp(30px, 2.7vw, 39px); font-weight: 600; letter-spacing: .01em; }
@media (max-width: 760px) {
  .maker-text { margin-bottom: 21px; font-size: 14px; }
  .maker-text strong { font-size: 25px; }
}

/* Section titles as the H2 on geowerkstatt.ch: SemiBold, black, on the left content edge like everything else */
.section-title { margin: 0 0 clamp(32px, 4.5vw, 52px); color: var(--text); font-size: var(--text-h2); font-weight: 600; line-height: 1.3; }

/* Cards: the customers on the start page (.cases) and "Mehr erfahren" on the functions page (.more), which fold open,
   and the bar of the demo on the start page (.demo-bar), which does not */
.cases details, .more, .demo-bar { border-radius: 14px; background: var(--paper); box-shadow: 0 1px 2px rgba(18, 74, 79, .08), 0 10px 24px -14px rgba(18, 74, 79, .45); }
/* Their chevron, drawn from two borders: points down when closed and turns up when open */
:is(.cases details, .more) summary::after { content: ""; flex: none; width: 11px; height: 11px; margin: 0 4px; border-right: 2px solid var(--text); border-bottom: 2px solid var(--text); rotate: 45deg; translate: 0 -3px; transition: rotate .2s, translate .2s; }
:is(.cases details, .more)[open] summary::after { rotate: 225deg; translate: 0 3px; }

.marker { padding: 0 .2em; background: var(--marker) left 70% / 100% 65% no-repeat; }

/* Footer like on geowerkstatt.ch: black with neon text. Logo and contact on the left, a column of links, and the
   swiss made software labels on the right; on phones everything stacks.
   shortcut: its markup is copied into every page like the header */
.site-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: start; gap: 40px clamp(40px, 7vw, 112px); padding: clamp(40px, 5vw, 56px) var(--content-inset) clamp(48px, 6vw, 72px); background: #000; color: var(--neon); }
.footer-links { font-size: var(--text-body); letter-spacing: .05em; line-height: 1.8; }
.footer-links strong { display: block; margin-bottom: 8px; font-weight: 600; }
.footer-links ul { margin: 0; padding: 0; list-style: none; }
.footer-links li + li { margin-top: 8px; }
.footer-labels { display: grid; gap: 28px; padding-top: 4px; }
.footer-labels img { display: block; width: 170px; height: auto; }
@media (max-width: 760px) {
  .site-footer { grid-template-columns: minmax(0, 1fr); }
}
.footer-logo { display: inline-flex; align-items: center; gap: .3em; font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 600; letter-spacing: .01em; line-height: 1; text-decoration: none; }
.footer-logo img { width: auto; height: 1.15em; }
.site-footer address { margin-top: 32px; font-size: var(--text-body); font-style: normal; letter-spacing: .05em; line-height: 1.8; }
.site-footer address strong { display: block; font-weight: 600; }
.site-footer address p { margin: 0 0 16px; }

/* Line-art styling shared by all drawings: --ink for lines, --mask to hide what lies behind, neon for the colour patches */
.ink { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ink.solid { fill: var(--mask); }
.ink.faint { opacity: .5; }
.ink.dashed { stroke-dasharray: 3 6; }
.ink.dotted { stroke-dasharray: 0 8; stroke-width: 2.4; }
.ink.cut { stroke: var(--mask); stroke-width: 2.4; }
.mask { fill: var(--mask); }
.accent { fill: var(--neon); }
