/* ============================================================
   Thomas Pöcksteiner — Portfolio
   Design system: "Technical Drawing Sheet"
   ============================================================ */

:root {
  --paper:    #EDEEEC;
  --paper-2:  #E4E5E1;
  --ink:      #16181A;
  --ink-soft: #4A4F52;
  --line:     #C6CAC6;
  --line-2:   #D6D9D4;
  --line-3:   #DEE0DC;
  --accent:   #C8501E;
  --accent-d: #A53F16;
  --wood:     #C9A368;
  --on-dark:  #EDEEEC;
  --on-dark-soft: #9AA0A1;
  --ok:       #4C7A3F;

  --display: "Space Grotesk", system-ui, sans-serif;
  --body:    "IBM Plex Sans", system-ui, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, monospace;

  --maxw: 1180px;
  --gutter: clamp(22px, 5vw, 72px);
  --hairline: 1px solid var(--line);
  --ease: cubic-bezier(.22,.61,.36,1);
  --radius: 12px;
  --radius-sm: 7px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* blueprint grid across the whole sheet */
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--line-3) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-3) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, #F3F4F1, var(--paper) 60%);
  background-size: 28px 28px, 28px 28px, 100% 100%;
}

.mono { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Drawing-sheet frame (fixed overlay) ---------- */
.sheet { position: fixed; inset: 12px; z-index: 40; pointer-events: none; border: 1px solid var(--line); }
.sheet__corner { position: absolute; width: 16px; height: 16px; border: 0 solid var(--accent); }
.sheet__corner--tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.sheet__corner--tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.sheet__corner--bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.sheet__corner--br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
/* ruler ticks along each edge */
.sheet__ruler { position: absolute; opacity: .5; }
.sheet__ruler--top, .sheet__ruler--bottom { left: 0; right: 0; height: 7px;
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 40px); }
.sheet__ruler--top { top: 0; } .sheet__ruler--bottom { bottom: 0; transform: scaleY(-1); }
.sheet__ruler--left, .sheet__ruler--right { top: 0; bottom: 0; width: 7px;
  background-image: repeating-linear-gradient(0deg, var(--line) 0 1px, transparent 1px 40px); }
.sheet__ruler--left { left: 0; } .sheet__ruler--right { right: 0; }
.sheet__zone { position: absolute; color: var(--ink-soft); font-size: .62rem; background: var(--paper); padding: 2px 5px; }
.sheet__zone--tl { top: 6px; left: 14px; }
.sheet__zone--br { bottom: 6px; right: 14px; }
.sheet__readout { position: absolute; top: 6px; right: 14px; color: var(--accent); font-size: .62rem;
  background: var(--paper); padding: 2px 5px; font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  .sheet { inset: 6px; }
  .sheet__ruler, .sheet__zone--tl { display: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 13px var(--gutter);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(9px);
  border-bottom: var(--hairline);
}
.wordmark { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.wordmark__mark { color: var(--ink); display: grid; place-items: center; transition: color .25s var(--ease); }
.wordmark:hover .wordmark__mark { color: var(--accent); }
.wordmark__txt { display: flex; flex-direction: column; line-height: 1.1; }
.wordmark__name { font-family: var(--display); font-weight: 600; font-size: 1rem; letter-spacing: -.01em; }
.wordmark__role { color: var(--ink-soft); margin-top: 3px; }

.site-nav { display: flex; gap: 24px; }
.site-nav a { color: var(--ink-soft); transition: color .18s ease; display: inline-flex; gap: 6px; align-items: baseline; }
.site-nav__n { color: var(--accent); font-size: .62rem; opacity: .8; }
.site-nav a:hover { color: var(--ink); }

.lang-toggle { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px;
  background: none; border: var(--hairline); border-radius: var(--radius-sm); cursor: pointer; color: var(--ink-soft); }
.lang-toggle__opt { transition: color .18s ease; }
.lang-toggle__opt.is-active { color: var(--ink); font-weight: 600; }
.lang-toggle__sep { opacity: .4; }

/* ---------- Section scaffolding ---------- */
section { max-width: var(--maxw); margin-inline: auto; padding: clamp(52px, 8vw, 104px) var(--gutter); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 40px; padding-bottom: 14px; border-bottom: var(--hairline); }
.section-eyebrow { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); margin: 0; }
.section-eyebrow__idx { color: var(--accent); border: 1px solid var(--accent); border-radius: 5px;
  padding: 2px 6px; font-size: .68rem; font-weight: 600; }
.section-note { color: var(--ink-soft); margin: 0; opacity: .8; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; padding: 13px 22px; border-radius: var(--radius-sm);
  font-family: var(--body); font-weight: 500; font-size: .95rem; border: 1px solid transparent;
  transition: transform .15s ease, background .18s ease, color .18s ease; }
.btn--solid { background: var(--ink); color: var(--on-dark); }
.btn--solid:hover { background: var(--accent); transform: translateY(-1px); }
.btn--ghost { border-color: var(--line); color: var(--ink-soft); text-transform: uppercase;
  letter-spacing: .06em; font-family: var(--mono); font-size: .74rem; }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--lg { padding: 15px 26px; font-size: 1rem; }

/* ---------- Hero ---------- */
.hero { max-width: var(--maxw); margin-inline: auto; padding: clamp(40px,7vw,84px) var(--gutter) clamp(36px,5vw,64px); }
.hero__frame {
  position: relative; padding: clamp(30px,5vw,62px) clamp(26px,5vw,58px) clamp(64px,7vw,84px);
  border: var(--hairline); border-radius: var(--radius); background:
    linear-gradient(var(--line-2) 1px, transparent 1px) 0 0 / 100% 28px,
    rgba(255,255,255,.35);
  background-blend-mode: multiply, normal;
}
.hero__frame > * { position: relative; z-index: 1; }

/* drawing corner brackets (L-marks, not crosshairs) */
.tick { position: absolute; width: 15px; height: 15px; border: 0 solid var(--accent); pointer-events: none; }
.tick--tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.tick--tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.tick--bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.tick--br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

.hero__eyebrow { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; color: var(--ink-soft); margin: 0 0 24px; }
.hero__eyebrow-idx { color: var(--accent); }
.hero__eyebrow-sep { opacity: .4; }
.hero__rev { opacity: .65; }

.hero__headline { font-family: var(--display); font-weight: 500; font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: .98; letter-spacing: -.03em; margin: 0 0 26px; }
.hero__line { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.hero__line > * { display: block; }
.hero__headline em { font-style: normal; color: var(--accent); }

.hero__sub { max-width: 56ch; font-size: clamp(1.05rem,1.6vw,1.3rem); color: var(--ink-soft); margin: 0 0 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.hero__dim { position: absolute; left: clamp(26px,5vw,58px); right: clamp(26px,5vw,58px);
  bottom: clamp(26px,4vw,40px); display: flex; align-items: center; gap: 10px; color: var(--ink-soft); }
.hero__dim-cap { color: var(--accent); }
.hero__dim-line { flex: 1; height: 1px; background: var(--line); }
.hero__dim-val { white-space: nowrap; }

/* page-load animation */
.hero__line > * { transform: translateY(110%); transition: transform .8s var(--ease); }
.hero__eyebrow, .hero__sub, .hero__actions { opacity: 0; transform: translateY(10px);
  transition: opacity .7s var(--ease), transform .7s var(--ease); }
.hero__dim { opacity: 0; transition: opacity .8s ease .5s; }
.is-loaded .hero__line > * { transform: none; }
.is-loaded .hero__eyebrow { opacity: 1; transform: none; transition-delay: .15s; }
.is-loaded .hero__sub { opacity: 1; transform: none; transition-delay: .35s; }
.is-loaded .hero__actions { opacity: 1; transform: none; transition-delay: .45s; }
.is-loaded .hero__dim { opacity: 1; }
.is-loaded .hero__line:nth-child(2) > * { transition-delay: .08s; }

/* ---------- Capabilities ---------- */
.cap-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: var(--hairline); border-left: var(--hairline); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 720px) { .cap-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .cap-grid { grid-template-columns: 1fr; } }
.cap { display: flex; gap: 14px; padding: 20px 22px; border-right: var(--hairline); border-bottom: var(--hairline);
  transition: background .18s ease; }
.cap:hover { background: rgba(255,255,255,.45); }
.cap__code { color: var(--accent); font-weight: 600; flex-shrink: 0; }
.cap__body { display: flex; flex-direction: column; gap: 3px; }
.cap__name { font-size: 1.02rem; }
.cap__desc { color: var(--ink-soft); opacity: .85; }

/* ---------- Schutzgehäuse (flagship) ---------- */
.site-nav__feat { color: var(--accent); font-weight: 500; }
.site-nav__feat:hover { color: var(--accent-d); }
.section-eyebrow__idx--feat { background: var(--accent); color: #fff; border-color: var(--accent); }

.casemod__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: center; }
.casemod__hero { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; border: var(--hairline);
  border-radius: var(--radius); background: #fff; }
.casemod__hero img { width: 100%; height: 100%; object-fit: cover; }
.casemod__title { font-family: var(--display); font-weight: 500; font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.06; letter-spacing: -.02em; margin: 0 0 18px; }
.casemod__lead { color: var(--ink-soft); font-size: clamp(1.02rem, 1.4vw, 1.15rem); line-height: 1.55;
  margin: 0 0 24px; max-width: 48ch; }
.casemod__mods { list-style: none; margin: 0 0 26px; padding: 0; display: grid;
  grid-template-columns: 1fr 1fr; gap: 9px 20px; }
.casemod__mods li { position: relative; padding-left: 17px; font-size: .92rem; color: var(--ink); }
.casemod__mods li::before { content: ""; position: absolute; left: 0; top: .5em; width: 6px; height: 6px;
  background: var(--accent); border-radius: 1px; }
.casemod__details { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 2vw, 20px);
  margin-top: clamp(20px, 3vw, 32px); }
.casemod__details figure { margin: 0; aspect-ratio: 3 / 2; overflow: hidden; border: var(--hairline);
  border-radius: var(--radius-sm); background: #fff; }
.casemod__details img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) { .casemod__grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .casemod__mods, .casemod__details { grid-template-columns: 1fr; } }

/* ---------- Work / Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 26px); }
@media (max-width: 940px) { .gallery { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .gallery { grid-template-columns: 1fr; } }

.card { display: flex; flex-direction: column; border: var(--hairline); border-radius: var(--radius);
  overflow: hidden; background: rgba(255,255,255,.4);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease); }
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 38px -24px rgba(22,24,26,.5); }

.card__media { position: relative; aspect-ratio: 4/3; overflow: hidden; margin: 14px 14px 0; border: var(--hairline); border-radius: var(--radius-sm); }
.project__media--dark { background: var(--ink); }
.project__media--wood { background: var(--paper-2); }

.ph { position: absolute; inset: 0; display: grid; place-items: center;
  background-image: var(--ph-img, none); background-size: cover; background-position: center;
  transition: transform .6s var(--ease); }
.card:hover .ph { transform: scale(1.04); }
.project__media--dark .ph:not(.ph--loaded) {
  background-image:
    repeating-linear-gradient(0deg, transparent 0 26px, rgba(237,238,236,.05) 26px 27px),
    repeating-linear-gradient(90deg, transparent 0 26px, rgba(237,238,236,.05) 26px 27px); }
.project__media--wood .ph:not(.ph--loaded) {
  background-image:
    repeating-linear-gradient(0deg, transparent 0 26px, rgba(22,24,26,.04) 26px 27px),
    repeating-linear-gradient(90deg, transparent 0 26px, rgba(22,24,26,.04) 26px 27px); }
.ph__label { color: var(--on-dark-soft); background: rgba(22,24,26,.55); padding: 4px 9px; border-radius: 4px; font-size: .58rem; }
.project__media--wood .ph__label { color: var(--ink-soft); background: rgba(237,238,236,.6); }

/* dimension overlay on hover — corner brackets, not a centered crosshair */
.project__overlay { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s ease; }
.card:hover .project__overlay { opacity: 1; }
.ov-cross { position: absolute; width: 20px; height: 20px; border: 0 solid var(--accent); }
.ov-cross--x { top: 11px; left: 11px; border-top-width: 2px; border-left-width: 2px; }
.ov-cross--y { bottom: 11px; right: 11px; border-bottom-width: 2px; border-right-width: 2px; }
.ov-dim { position: absolute; color: #fff; background: var(--accent); font-size: .56rem; padding: 2px 6px; }
.ov-dim--w { left: 11px; bottom: 11px; }
.ov-dim--h { right: 11px; top: 11px; }

.card__body { display: flex; flex-direction: column; gap: 12px; padding: 14px 14px 18px; flex: 1; }
.project__serial { display: flex; align-items: center; gap: 10px; color: var(--accent); margin: 0; }
.dotline { flex: 0 0 24px; height: 1px; background: repeating-linear-gradient(90deg, var(--accent) 0 2px, transparent 2px 5px); }
.card__title { font-family: var(--display); font-weight: 500; font-size: 1.22rem;
  line-height: 1.12; letter-spacing: -.015em; margin: 0; }
.card__desc { margin: 0; color: var(--ink-soft); font-size: .92rem; flex: 1; }

/* datasheet table */
.datasheet { width: 100%; border-collapse: separate; border-spacing: 0; border: var(--hairline);
  border-radius: var(--radius-sm); overflow: hidden; font-size: .72rem; }
.datasheet th, .datasheet td { text-align: left; padding: 8px 11px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.datasheet tr:last-child th, .datasheet tr:last-child td { border-bottom: none; }
.datasheet th { color: var(--ink-soft); font-weight: 500; width: 34%; border-right: 1px solid var(--line-2);
  background: rgba(255,255,255,.35); white-space: nowrap; }
.datasheet td { color: var(--ink); }
.datasheet td.ok { color: var(--ok); }
.datasheet td.ok::before { content: "● "; font-size: .7em; vertical-align: middle; }

/* ---------- Ablauf / Process pipeline ---------- */
.pipeline { list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(5, 1fr); gap: 0; }
.step { position: relative; padding: 26px 20px 26px 0; border-top: 2px solid var(--ink); }
.step::before { content: ""; position: absolute; top: -6px; left: 0; width: 10px; height: 10px;
  border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.step::after { content: ""; position: absolute; top: -1px; left: 10px; right: 0; height: 0; }
.step__n { color: var(--accent); display: block; margin-bottom: 14px; font-weight: 600; font-size: .82rem; }
.step__t { font-family: var(--display); font-weight: 500; font-size: 1.12rem; letter-spacing: -.01em; margin: 0 0 8px; }
.step__d { margin: 0; color: var(--ink-soft); font-size: .92rem; padding-right: 12px; }
@media (max-width: 880px) { .pipeline { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .pipeline { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.about .section-eyebrow { margin-bottom: 28px; }
.about__grid { display: grid; grid-template-columns: minmax(210px, .72fr) 1.28fr;
  gap: clamp(28px, 5vw, 60px); align-items: center; }
.about__portrait { position: relative; margin: 0; aspect-ratio: 4 / 5; overflow: hidden;
  border: var(--hairline); border-radius: var(--radius); background: var(--ink); }
.about__portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.about__caption { position: absolute; left: 12px; bottom: 12px; color: var(--on-dark-soft);
  background: rgba(22,24,26,.6); padding: 5px 10px; border-radius: 5px; letter-spacing: .06em; }
.about__text { font-family: var(--display); font-weight: 400; font-size: clamp(1.35rem,2.6vw,2.05rem);
  line-height: 1.34; letter-spacing: -.015em; max-width: 32ch; margin: 0; }
@media (max-width: 720px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__portrait { max-width: 300px; }
}

/* ---------- Contact — title block ---------- */
.contact .section-eyebrow { margin-bottom: 22px; }
.contact__headline { font-family: var(--display); font-weight: 500; font-size: clamp(2rem,5vw,3.4rem);
  letter-spacing: -.025em; line-height: 1.05; margin: 0 0 36px; max-width: 18ch; }

.titleblock { display: grid; grid-template-columns: 2fr 1fr 1fr; border: 1.5px solid var(--ink);
  border-radius: var(--radius); overflow: hidden; background: rgba(255,255,255,.4); }
.tb-cell { display: flex; flex-direction: column; gap: 7px; padding: 14px 16px;
  border-right: 1px solid var(--line); border-top: 1px solid var(--line); }
.tb-cell:nth-child(-n+3) { border-top: none; }
.titleblock > .tb-cell:nth-child(3n) { border-right: none; }
.tb-key { color: var(--ink-soft); font-size: .62rem; }
.tb-val { color: var(--ink); font-size: .82rem; text-transform: none; letter-spacing: 0; line-height: 1.4; }
.tb-val.ok { color: var(--ok); }
.tb-link { color: var(--accent); }
.tb-link:hover { text-decoration: underline; }
.tb-cell--wide { grid-column: span 1; }
.tb-cell--mail { grid-column: span 1; }
.tb-cell--cta { justify-content: center; align-items: flex-start; }
@media (max-width: 720px) {
  .titleblock { grid-template-columns: 1fr 1fr; }
  .titleblock > .tb-cell { border-right: 1px solid var(--line); border-top: 1px solid var(--line); }
  .titleblock > .tb-cell:nth-child(-n+2) { border-top: none; }
  .titleblock > .tb-cell:nth-child(2n) { border-right: none; }
  .tb-cell--wide, .tb-cell--cta { grid-column: 1 / -1; }
}

/* ---------- Footer ---------- */
.site-footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: var(--maxw); margin-inline: auto; padding: 22px var(--gutter) 38px;
  color: var(--ink-soft); border-top: var(--hairline); }
.site-footer__mid { opacity: .7; }
.site-footer a { color: var(--ink-soft); transition: color .18s ease; }
.site-footer a:hover { color: var(--accent); }

/* ---------- Legal pages (Impressum / Datenschutz) ---------- */
.legal { max-width: 760px; }
.legal__back { color: var(--ink-soft); transition: color .18s ease; }
.legal__back:hover { color: var(--accent); }
.legal h1 { font-family: var(--display); font-weight: 500; font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -.02em; line-height: 1.05; margin: 0 0 8px; }
.legal__sub { color: var(--ink-soft); margin: 0 0 36px; }
.legal h2 { font-family: var(--display); font-weight: 500; font-size: 1.15rem; letter-spacing: -.01em;
  margin: 30px 0 8px; }
.legal p { margin: 0 0 12px; color: var(--ink-soft); max-width: 68ch; }
.legal a { color: var(--accent); }
.legal a:hover { text-decoration: underline; }
.legal address { font-style: normal; color: var(--ink); line-height: 1.7; }
.ph-fill { background: rgba(200,80,30,.12); color: var(--accent-d); padding: 1px 7px;
  border-radius: 5px; font-style: normal; font-family: var(--mono); font-size: .9em; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .site-nav { display: none; }
  .project { grid-template-columns: 1fr; }
  .project--reverse .project__media { order: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__line > *, .hero__eyebrow, .hero__sub, .hero__actions, .hero__dim { opacity: 1; transform: none; }
}
