/* ==========================================================================
   cocologics GmbH — corporate site
   Studio/dev aesthetic: Helvetica for the voice, Courier for the machine.
   Privacy-respecting (no external requests, no web fonts), mobile-first.
   Brand green #009C48. A few monospace + ASCII touches — we're devs, after all.
   ========================================================================== */

:root {
  --green:        #009C48;
  --green-deep:   #00813b;
  --green-tint:   #eef6ef;

  --ink:          #23272b;  /* warm near-black, a shade deeper than the wordmark slate */
  --ink-soft:     #565d63;
  --ink-faint:    #8b9198;

  --paper:        #faf9f6;  /* warm off-white, not grey */
  --paper-card:   #ffffff;
  --line:         #e7e6e0;
  --line-strong:  #d8d7d0;

  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Courier New", Courier, ui-monospace, monospace;

  --maxw: 56rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);

  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 25, .04),
            0 12px 30px -18px rgba(20, 40, 28, .22);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1.0625rem, 1.02rem + 0.25vw, 1.125rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  font-variant-ligatures: common-ligatures contextual;
}

a { color: var(--green-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 249, 246, .82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-top: 3px solid var(--green);  /* persistent brand rule at the very top */
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}
.brand img { width: auto; height: 1.78rem; }
.brand { display: inline-flex; align-items: center; }

.nav { display: none; gap: 1.5rem; }
.nav a {
  font-family: var(--mono);
  text-transform: lowercase;
  color: var(--ink-soft);
  font-size: .82rem;
  letter-spacing: .01em;
}
.nav a::before { content: "/"; color: var(--ink-faint); }
.nav a:hover { color: var(--green-deep); text-decoration: none; }
.nav a:hover::before { color: var(--green); }
@media (min-width: 40rem) { .nav { display: inline-flex; } }

/* ---------- section rhythm ---------- */
main section { padding-block: clamp(3.25rem, 8vw, 5.5rem); }
main section + section { border-top: 1px solid var(--line); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 1.1rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.eyebrow .leaf { width: .85rem; height: .85rem; flex: none; }

/* lowercase section headings echo the lowercase wordmark */
h1, h2, h3 { font-weight: 600; color: var(--ink); letter-spacing: -.02em; line-height: 1.13; }

/* ---------- hero / company ---------- */
.hero { padding-block: clamp(4rem, 11vw, 7.5rem) clamp(3rem, 8vw, 5rem); }
.hero h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.5rem, 1.4rem + 5.4vw, 4.5rem);
  letter-spacing: -.035em;
  line-height: 1.02;
  max-width: 16ch;
}
.hero h1 .accent { color: var(--green); }
.hero .lede {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem);
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--ink);
}
.hero .intro {
  margin: 1.5rem 0 0;
  max-width: 62ch;
  color: var(--ink-soft);
  hyphens: auto;
}

/* ---------- section heads (markdown-ish # prefix) ---------- */
.section-head { margin-bottom: clamp(1.75rem, 4vw, 2.5rem); }
.section-head h2 { margin: 0; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); }
.section-head h2::before {
  content: "# ";
  font-family: var(--mono);
  font-weight: 400;
  color: var(--green);
}

/* ---------- products: stacked rows, no boxes, app icon on the right ---------- */
.products { display: flex; flex-direction: column; }
.product {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;     /* mobile: single column, icon stacks on top */
  gap: 1.25rem;
  padding-block: clamp(2rem, 6vw, 3.25rem);
}
@media (min-width: 40rem) {
  .product {
    grid-template-columns: minmax(0, 1fr) auto;   /* icon on the right */
    gap: clamp(1.5rem, 5vw, 3.5rem);
    align-items: center;
  }
}
.product + .product { border-top: 1px solid var(--line); }
.product__body { min-width: 0; }

.product__meta {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .02em;
  color: var(--ink-faint);
  margin-bottom: .9rem;
}
.product__meta .idx { color: var(--green-deep); }
.product__meta .tag { margin-left: auto; }

.product h3 { margin: 0 0 .6rem; font-size: clamp(1.5rem, 1.2rem + 1.1vw, 1.9rem); }
.product--lead h3 { font-size: clamp(1.75rem, 1.3rem + 1.7vw, 2.35rem); }
.product p { margin: 0 0 1.4rem; max-width: 48ch; color: var(--ink-soft); }

.product .go {
  font-family: var(--mono);
  font-size: .9rem;
  color: var(--green-deep);
  white-space: nowrap;
}
.product .go .arr { display: inline-block; transition: transform .25s ease; }
.product:hover .go .arr { transform: translateX(4px); }
.product a.go:hover { text-decoration: none; }
.product a.go:hover .name { text-decoration: underline; text-underline-offset: 3px; }

/* app icon (grayscale by default; colour returns on hover) */
.product__icon {
  order: -1;                 /* mobile: sits above the text */
  width: 66px;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 24%;
  filter: grayscale(1) contrast(1.02);
  opacity: .92;
  transition: filter .3s ease, opacity .3s ease, transform .3s ease;
  user-select: none;
}
@media (min-width: 40rem) {
  .product__icon { order: 0; width: clamp(96px, 12vw, 132px); }   /* back to the right */
}
.product:hover .product__icon { filter: none; opacity: 1; transform: translateY(-2px); }

/* whole row is clickable via stretched link */
.product .stretch::after { content: ""; position: absolute; inset: 0; }

/* ---------- consulting ---------- */
.consulting p { margin: 0; max-width: 56ch; font-size: clamp(1.05rem, 1rem + .4vw, 1.2rem); color: var(--ink-soft); }

/* ---------- footer (contact lives here now) ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: #f5f5f1;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--ink-soft);
  font-size: .92rem;
}
.foot-top {
  display: flex; flex-wrap: wrap; gap: 1.5rem 3rem;
  align-items: flex-start; justify-content: space-between;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}
.foot-label {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .04em;
  color: var(--ink-faint); margin: 0 0 .5rem;
}
.foot-contact address { font-style: normal; line-height: 1.7; font-variant-numeric: tabular-nums; color: var(--ink); }
.foot-contact a { color: var(--green-deep); }
.prompt {
  font-family: var(--mono);
  font-size: .9rem;
  color: var(--ink-soft);
  margin: 0;
  align-self: flex-end;
  white-space: nowrap;
}
.prompt .path { color: var(--green-deep); }
.cursor { background: var(--green); color: var(--green); margin-left: 1px; }
.foot-bottom {
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem;
  align-items: center; justify-content: space-between;
  padding-top: 1.5rem;
  font-family: var(--mono); font-size: .8rem;
}
.foot-bottom nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--green-deep); }

/* ---------- legal pages (impressum / datenschutz) ---------- */
.legal { padding-block: clamp(2.75rem, 7vw, 4.5rem); }
.legal .wrap { max-width: 46rem; }
.legal h1 { font-size: clamp(1.8rem, 1.4rem + 1.8vw, 2.4rem); margin: 0 0 .4rem; }
.legal .lede { color: var(--ink-soft); margin: 0 0 2.5rem; }
.legal h2 {
  font-size: 1.15rem; margin: 2.4rem 0 .6rem;
  padding-top: 1.6rem; border-top: 1px solid var(--line);
}
.legal h2:first-of-type { border-top: 0; padding-top: 0; }
.legal p { margin: 0 0 .9rem; font-variant-numeric: tabular-nums; }
.legal address { font-style: normal; line-height: 1.75; margin: 0 0 .9rem; font-variant-numeric: tabular-nums; }
.legal .muted { color: var(--ink-soft); }
.back {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-bottom: 2rem; font-weight: 600; font-size: .95rem;
}
.back svg { width: .9rem; height: .9rem; }

/* draft / review banner */
.notice {
  display: flex; gap: .9rem;
  padding: 1rem 1.15rem;
  margin: 0 0 2.25rem;
  background: #fff8e8;
  border: 1px solid #f0dca6;
  border-left: 3px solid #d8a93a;
  border-radius: 10px;
  font-size: .94rem;
  color: #5c4a16;
}
.notice strong { color: #4a3a0e; }
.notice .ico { flex: none; width: 1.15rem; height: 1.15rem; margin-top: .15rem; color: #b9871f; }

/* ---------- page-load reveal + terminal cursor ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); animation: rise .7s cubic-bezier(.2,.7,.3,1) forwards; }
  .reveal.d1 { animation-delay: .06s; }
  .reveal.d2 { animation-delay: .14s; }
  .reveal.d3 { animation-delay: .22s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
  .cursor { animation: blink 1.1s steps(1) infinite; }
  @keyframes blink { 50% { opacity: 0; } }
}
