/* smtz.de — no external resources, no scripts */

/* Self-hosted, SIL Open Font License 1.1. The licence text sits next to the
   files in assets/fonts, which is all the OFL asks of a site that serves
   them. No credit on the page, no external request. */

@font-face {
  font-family: "Space Grotesk Variable";
  src: url("assets/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Variable";
  src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:        #0b0d10;
  --surface:   #13171d;
  --line:      rgba(255, 255, 255, .09);
  --line-soft: rgba(255, 255, 255, .05);
  --text:      #e9ecf1;
  --text-soft: #c7cdd7;
  --muted:     #929aa7;
  --accent:    #6f9fd8;
  --accent-dim: rgba(111, 159, 216, .34);

  --font: "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: "Space Grotesk Variable", var(--font);

  --shell: 1080px;
  --gutter: clamp(20px, 5vw, 40px);
  --rhythm: clamp(72px, 11vw, 132px);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* column layout so the footer sits at the bottom even on a short page */
body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(16px, .55vw + 15px, 18px);
  line-height: 1.65;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

::selection {
  background: var(--accent-dim);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 3px;
}

/* --- scroll progress ------------------------------------------------- */

/* Driven by a scroll timeline, so no JavaScript. Without support it stays
   at scaleX(0) and is simply invisible. */
.progress {
  position: fixed;
  z-index: 200;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  pointer-events: none;
}

@keyframes progress {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .progress {
      animation: progress linear;
      animation-timeline: scroll(root block);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress { display: none; }
}

/* --- film grain overlay, generated in CSS, no image file ------------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .028;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- hero ------------------------------------------------------------ */

/* a fine grid, masked so it dissolves before it reaches any edge */
.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 44%,
    #000 0%, rgba(0, 0, 0, .35) 45%, transparent 78%);
  mask-image: radial-gradient(ellipse 62% 58% at 50% 44%,
    #000 0%, rgba(0, 0, 0, .35) 45%, transparent 78%);
}

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(86svh, 820px);
  padding: clamp(56px, 10vh, 104px) var(--gutter) clamp(48px, 8vh, 88px);
  text-align: center;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}

.hero__glow {
  position: absolute;
  z-index: -1;
  top: 42%;
  left: 50%;
  width: min(160vw, 1500px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 50% 50%,
      rgba(111, 159, 216, .16) 0%,
      rgba(111, 159, 216, .06) 28%,
      rgba(111, 159, 216, 0) 62%);
}

.hero__inner {
  display: grid;
  justify-items: center;
  gap: clamp(20px, 3vw, 32px);
}

.logo {
  width: clamp(190px, 37vw, 476px);
  height: auto;
  color: var(--text);
  filter: drop-shadow(0 14px 44px rgba(111, 159, 216, .22));
}

.hero__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 6.2vw, 3.9rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.022em;
}

.hero__role {
  position: relative;
  margin: 0;
  padding-top: clamp(18px, 3vw, 26px);
  font-family: var(--font-display);
  font-size: clamp(.82rem, 1.7vw, .95rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .3em;
  text-indent: .3em;
  color: var(--muted);
}

.hero__role::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 56px;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg,
    transparent, var(--accent-dim) 30%, var(--accent-dim) 70%, transparent);
}

/* --- entrance -------------------------------------------------------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero::before,
  .hero__glow { animation: fade 1.8s var(--ease) backwards; }

  .logo,
  .hero__name,
  .hero__role { animation: rise .9s var(--ease) backwards; }

  .logo       { animation-delay: .06s; }
  .hero__name { animation-delay: .24s; }
  .hero__role { animation-delay: .40s; }
}

/* Scroll reveal with no JavaScript. Where view() timelines are missing
   the rule never applies and every section is simply there. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    main .section > *:not(.label) {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 8% cover 24%;
    }
  }
}

/* --- sections -------------------------------------------------------- */

.section {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: var(--rhythm) var(--gutter) 0;
}

main {
  flex: 1 0 auto;
  counter-reset: section;
}

.section:last-child { padding-bottom: var(--rhythm); }

.label {
  counter-increment: section;
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 clamp(26px, 4vw, 40px);
  padding-block: 15px;
  background: var(--bg);
  font-family: var(--font-display);
  font-size: .76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .26em;
  color: var(--accent);
}

.label::before {
  content: counter(section, decimal-leading-zero);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* a small fact at the far end of the label line; order moves it past
   the ::after rule, which would otherwise sit to its right */
.label__meta {
  order: 2;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: .18em;
  color: var(--muted);
}

/* on phones the letter-spacing of the desktop label would push the
   longer label onto a second line next to its meta fact */
@media (max-width: 479px) {
  .label { gap: 12px; letter-spacing: .15em; }
  .label__meta { letter-spacing: .06em; }
}

.label::after {
  order: 1;
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

/* --- competence fields ---------------------------------------------- */

.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 559px) {
  .fields { grid-template-columns: 1fr; }
}

@media (min-width: 900px) {
  .fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.field {
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .018);
  transition: transform .45s var(--ease),
              border-color .45s var(--ease),
              background-color .45s var(--ease);
}

.field:hover {
  transform: translateY(-4px);
  border-color: var(--accent-dim);
  background-color: rgba(111, 159, 216, .04);
}

.field__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--text);
}

.field__text {
  margin: .55em 0 1.3em;
  font-size: .94rem;
  line-height: 1.6;
  color: var(--muted);
}

/* margin-top: auto pins the tools line to the bottom, so the lines of a
   row stay level however long each description runs */
.field__tools {
  margin: auto 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: .8rem;
  letter-spacing: .02em;
  color: var(--accent);
}

/* --- games ----------------------------------------------------------- */

.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 268px), 1fr));
  gap: clamp(22px, 3.6vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.game { min-width: 0; }

.game__frame {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
  transition: transform .45s var(--ease),
              border-color .45s var(--ease),
              box-shadow .45s var(--ease);
}

.game__frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 748 / 896;
  object-fit: cover;
  /* at rest the covers defer to the page, on attention they burn */
  filter: saturate(.72) brightness(.86);
  transition: filter .5s var(--ease);
}

.game:hover .game__frame img,
.game:focus-within .game__frame img { filter: none; }

/* thin inner highlight so the frame reads as an object, not a cut-out */
.game__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
}

/* only a linked cover lifts; an unlinked one would promise a click that
   does not exist */
.game:hover a.game__frame,
.game:focus-within a.game__frame {
  transform: translateY(-6px);
  border-color: var(--accent-dim);
  box-shadow: 0 26px 60px rgba(0, 0, 0, .58),
              0 0 0 1px var(--accent-dim),
              0 14px 46px rgba(111, 159, 216, .2);
}

/* --- footer --------------------------------------------------------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 32px;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(28px, 5vw, 40px) var(--gutter) clamp(40px, 7vw, 64px);
  border-top: 1px solid var(--line-soft);
  font-size: .82rem;
  color: var(--muted);
}

.footer__mark { margin: 0; }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
}

.footer__links a {
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}

.footer__links a:hover,
.footer__links a[aria-current="page"] {
  color: var(--text);
  border-color: var(--accent-dim);
}

/* --- legal pages ----------------------------------------------------- */

.topbar {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(20px, 4vw, 32px) var(--gutter);
  border-bottom: 1px solid var(--line-soft);
}

.topbar__home {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text);
  text-decoration: none;
}

.topbar__home img {
  width: 34px;
  height: 34px;
}

.topbar__home span { transition: color .3s var(--ease); }
.topbar__home:hover span { color: var(--accent); }

.legal {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter) var(--rhythm);
}

.legal__title {
  margin: 0 0 clamp(30px, 5vw, 48px);
  hyphens: manual;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
}

.legal__body {
  max-width: 68ch;
  color: var(--muted);
  overflow-wrap: break-word;
  hyphens: auto;
}

.legal__body h2,
.legal__body h3,
.legal__body h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.legal__body h2 {
  margin: 2.6em 0 .7em;
  font-size: clamp(1.2rem, 2.4vw, 1.4rem);
  letter-spacing: -.012em;
}

.legal__body h3 {
  margin: 2em 0 .5em;
  font-size: 1.06rem;
  letter-spacing: -.005em;
}

.legal__body h4 {
  margin: 1.5em 0 .4em;
  font-family: var(--font);
  font-size: .96rem;
  color: var(--text-soft);
}

.legal__body > :first-child { margin-top: 0; }

.legal__body p { margin: 0 0 1em; }

.legal__body ul {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.legal__body li { margin-bottom: .5em; }
.legal__body li::marker { color: var(--accent); }

.legal__body a {
  color: var(--text);
  text-decoration-color: var(--accent-dim);
  text-underline-offset: 3px;
  transition: text-decoration-color .3s var(--ease);
}

.legal__body a:hover { text-decoration-color: var(--accent); }

/* --- motion preferences ---------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .game:hover a.game__frame,
  .game:focus-within a.game__frame,
  .field:hover { transform: none; }
}

/* --- print ------------------------------------------------------------ */

@media print {
  .grain, .progress, .hero__glow { display: none; }
  body { background: #fff; color: #000; }
}
