/* savaskoc.de — the home screen
   World: iOS lock screen → springboard. One wallpaper hue in two panes.
   Type: SF on Apple platforms (the home screen's own face), Geist elsewhere. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/Geist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/Geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --wall-lock: #04362A;
  --wall-home: #114434;
  --seam: #0E4031;
  --white: #ffffff;
  --white-80: color-mix(in srgb, #fff 80%, var(--wall-home));
  --white-62: color-mix(in srgb, #fff 62%, var(--wall-home));
  --ink: #1c1c1e;
  --ink-2: #4a4a4f;
  --sheet: #f2f3f1;
  --sheet-line: #d3d8d4;
  --pill: #dcdedc;
  --dock-fill: rgba(255, 255, 255, 0.24);
  --menu-fill: rgba(255, 255, 255, 0.84);
  --dot-off: #789689;

  --font: -apple-system, BlinkMacSystemFont, "Geist", system-ui, "Segoe UI", Roboto, sans-serif;

  --icon: clamp(84px, 12vw, 144px);
  --pad: clamp(24px, 4.4vw, 64px);
  --dock-h: 64px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--wall-home);
}
body {
  margin: 0;
  overflow-x: clip;
  background: var(--wall-home);
  color: var(--white);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "tnum" 0;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p, h1, h2, dl, dd { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: rgba(255, 255, 255, 0.85); color: var(--wall-home); }
.sheet ::selection { background: var(--wall-home); color: #fff; }
:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 6px; }
.sheet :focus-visible { outline-color: var(--wall-home); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; top: -100px; left: 16px; z-index: 50;
  padding: 10px 14px; border-radius: 999px;
  background: #fff; color: var(--ink); font-weight: 500;
}
.skip:focus { top: 16px; }

/* ---------------- layout ---------------- */
.screen {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  :root { --icon: clamp(104px, 10.8vw, 168px); }
  .screen { grid-template-columns: 1fr 1fr; }
  .sheet { grid-column: 1 / -1; }
}

/* ---------------- lock screen ---------------- */
.lock {
  background: var(--wall-lock);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: var(--pad);
  padding-bottom: calc(var(--pad) + var(--dock-h));
  position: relative;
}
.lock__inner {
  display: grid;
  gap: 0;
  padding-top: clamp(8px, 1.5vh, 24px);
}
@media (max-width: 1023px) {
  .lock { min-height: 0; padding-bottom: 8px; }
  .lock__inner { padding-top: clamp(12px, 3vh, 32px); }
  .lock__clock { font-size: clamp(52px, 14.5vw, 88px); max-width: 12ch; }
  .lock__bio { margin-top: clamp(22px, 3.5vh, 36px); }
  .lock > .lock__hint { margin-top: clamp(20px, 4vh, 40px); }
  .screen > .home { min-height: 62svh; padding-top: clamp(24px, 4vh, 44px); align-content: start; }
}
.lock__date {
  font-size: clamp(15px, 1.35vw, 19px);
  font-weight: 500;
  line-height: 1.4;
  color: var(--white-80);
  letter-spacing: 0.005em;
  margin-bottom: clamp(10px, 1.4vh, 18px);
}
.lock__date .lock__role { font-weight: 400; }
.lock__clock {
  font-size: clamp(48px, 5.9vw, 96px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.03em;
  max-width: 14.5ch;
}
.lock__bio {
  margin-top: clamp(20px, 3vh, 36px);
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.42;
  color: color-mix(in srgb, #fff 86%, var(--wall-lock));
  text-wrap: pretty;
  max-width: 36ch;
}

.lock__hint {
  margin-top: auto;
  align-self: center;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--white-80);
  letter-spacing: 0.01em;
  transition: color 0.2s var(--ease-out);
}
.lock__hint:hover { color: #fff; }
.lock__hint .chev { transition: transform 0.3s var(--ease-out); }
.lock__hint--wide { display: none; }
.lock__hint--wide .chev { transform: rotate(180deg); }
@media (min-width: 1024px) {
  .lock { padding-bottom: calc(var(--dock-h) + 28px); }
  .lock__inner { padding-top: 0; }
  .lock__hint--narrow { display: none; }
  .lock__hint--wide { display: inline-flex; }
  .lock__hint--wide:hover .chev { transform: rotate(180deg) translateY(-2px); }
}
.lock__hint--narrow:hover .chev { transform: translateY(-2px); }

/* ---------------- home screen ---------------- */
.home {
  background: var(--wall-home);
  min-height: 100svh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(28px, 4vh, 44px);
  padding: var(--pad);
  padding-bottom: calc(var(--pad) + var(--dock-h));
  position: relative;
}
@media (min-width: 1024px) {
  .home { box-shadow: inset 1px 0 0 var(--seam); }
}

.apps {
  display: grid;
  grid-template-columns: repeat(3, var(--icon));
  column-gap: clamp(20px, 4.2vw, 64px);
  row-gap: clamp(28px, 4.5vh, 52px);
  justify-content: center;
}
@media (max-width: 400px) {
  .apps { column-gap: clamp(14px, 4.5vw, 22px); }
}

.app {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0;
  transition: opacity 0.25s var(--ease-out);
}
.app__icon {
  display: block;
  width: var(--icon);
  height: var(--icon);
  border-radius: 22.4%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.app__icon img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.app__name {
  margin-top: 12px;
  font-size: clamp(15px, 1.35vw, 19px);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}
.app__meta {
  margin-top: 4px;
  font-size: clamp(12px, 1.05vw, 15px);
  color: var(--white-62);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* context menu — hover / focus / long-press */
.app__menu {
  position: absolute;
  z-index: 5;
  top: 8px;
  left: calc(100% + 12px);
  min-width: 176px;
  padding: 8px;
  border-radius: 14px;
  background: var(--menu-fill);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  color: var(--ink);
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.5) inset;
  display: grid;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.88) translateY(-4px);
  transform-origin: 0 0;
  transition: opacity 0.18s var(--ease-out), transform 0.22s var(--spring), visibility 0s linear 0.2s;
}
.app:nth-child(3n) .app__menu {
  left: auto;
  right: calc(100% + 12px);
  transform-origin: 100% 0;
}
.app__menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 0.15s var(--ease-out);
}
.app__menu a + a { border-top: 1px solid rgba(28, 28, 30, 0.08); border-radius: 0 0 8px 8px; }
.app__menu a:hover { background: rgba(28, 28, 30, 0.07); }
.app__menu .arrow { color: var(--ink-2); }
.app__blurb {
  padding: 6px 10px 8px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--ink-2);
  border-bottom: 1px solid rgba(28, 28, 30, 0.1);
  margin-bottom: 4px;
  text-wrap: pretty;
  white-space: normal;
  max-width: 22ch;
}

.app:hover .app__menu,
.app:focus-within .app__menu,
.app.is-open .app__menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.18s var(--ease-out), transform 0.28s var(--spring), visibility 0s;
}
.app:hover .app__icon,
.app:focus-within .app__icon,
.app.is-open .app__icon {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 14px 28px -10px rgba(0, 0, 0, 0.55);
}
/* one event held at a time: the rest dim */
.apps:has(.app:hover, .app:focus-within, .app.is-open) .app:not(:hover, :focus-within, .is-open) { opacity: 0.55; }

@media (hover: none) {
  /* touch: sticky :hover must not open menus; long-press (JS) toggles .is-open */
  .app:hover:not(.is-open) .app__menu { opacity: 0; visibility: hidden; }
  .app:hover:not(.is-open) .app__icon { transform: none; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
  .apps:has(.app:hover:not(.is-open)) .app { opacity: 1; }
}
@media (max-width: 1023px) {
  /* narrow: the menu opens below the icon, aligned to its column */
  .app__menu, .app:nth-child(3n) .app__menu {
    top: calc(var(--icon) + 8px);
    left: 50%; right: auto;
    transform: translateX(-50%) scale(0.88);
    transform-origin: 50% 0;
  }
  .app:hover .app__menu, .app:focus-within .app__menu, .app.is-open .app__menu { transform: translateX(-50%); }
  .app:nth-child(3n+1) .app__menu { left: 0; transform: scale(0.88); transform-origin: 0 0; }
  .app:nth-child(3n+1):hover .app__menu, .app:nth-child(3n+1):focus-within .app__menu, .app:nth-child(3n+1).is-open .app__menu { transform: none; }
  .app:nth-child(3n) .app__menu { left: auto; right: 0; transform: scale(0.88); transform-origin: 100% 0; }
  .app:nth-child(3n):hover .app__menu, .app:nth-child(3n):focus-within .app__menu, .app:nth-child(3n).is-open .app__menu { transform: none; }
}

/* page dots */
.dots {
  display: flex; gap: 12px; align-items: center;
  padding: 6px;
}
.dots a {
  display: block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--dot-off);
  transition: background-color 0.25s var(--ease-out), transform 0.25s var(--spring);
}
.dots a[aria-current="true"] { background: #fff; transform: scale(1.15); }
.dots a:hover { background: #fff; }

/* ---------------- work with me — the sheet ---------------- */
.sheet {
  position: relative;
  background: var(--sheet);
  color: var(--ink);
  border-radius: 28px 28px 0 0;
  margin-top: 0;
  padding: 18px var(--pad) calc(var(--pad) + var(--dock-h) + 16px);
  box-shadow: 0 -18px 48px -24px rgba(0, 0, 0, 0.55);
  display: grid;
  justify-items: center;
}
.sheet__grabber {
  width: 36px; height: 5px; border-radius: 999px;
  background: #c5cbc6;
  margin-bottom: clamp(32px, 5vh, 56px);
}
.sheet__inner {
  width: min(880px, 100%);
  display: grid;
  gap: 0;
}
.sheet__title {
  font-size: clamp(34px, 3.6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.sheet__lead {
  margin-top: 14px;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.4;
  color: var(--ink-2);
  max-width: 40ch;
  text-wrap: pretty;
}
.offers {
  margin-top: clamp(36px, 5vh, 56px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 56px);
}
@media (max-width: 680px) { .offers { grid-template-columns: 1fr; } }
.offer {
  padding: 20px 0 24px;
  border-top: 1px solid var(--sheet-line);
}
.offer dt {
  font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25;
}
.offer dd {
  margin-top: 8px;
  font-size: 16px; line-height: 1.5; color: var(--ink-2);
  max-width: 42ch;
  text-wrap: pretty;
}
.sheet__actions {
  margin-top: clamp(24px, 4vh, 40px);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 20px; border-radius: 999px;
  font-size: 16px; font-weight: 500; line-height: 1;
  border: 1.5px solid transparent;
  transition: transform 0.2s var(--spring), background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--dark { background: var(--wall-lock); color: #fff; }
.btn--dark:hover { background: var(--wall-home); }
.btn--line { border-color: #c9cec9; color: var(--ink); }
.btn--line:hover { border-color: var(--wall-lock); color: var(--wall-lock); }
.sheet__foot {
  margin-top: clamp(36px, 6vh, 64px);
  font-size: 14px; color: var(--ink-2);
  text-wrap: pretty;
}

/* ---------------- dock ---------------- */
.dock {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: 999px;
  background: var(--dock-fill);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  max-width: calc(100vw - 24px);
}
.dock a {
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease-out), transform 0.2s var(--spring), color 0.2s;
}
.dock a:hover { background: rgba(255, 255, 255, 0.16); }
.dock a:active { transform: scale(0.96); }
.dock__cta { background: var(--pill); color: var(--ink) !important; }
.dock__cta:hover { background: #fff !important; }
/* over the light sheet the dock flips to its light-surface variant */
.dock.on-light {
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(28, 28, 30, 0.06) inset;
}
.dock.on-light a { color: var(--ink); }
.dock.on-light a:hover { background: rgba(28, 28, 30, 0.08); }
.dock.on-light .dock__cta { background: var(--wall-lock); color: #fff !important; }
.dock.on-light .dock__cta:hover { background: var(--wall-home) !important; }
.dock { transition: background-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out); }
.dock a { transition: background-color 0.2s var(--ease-out), transform 0.2s var(--spring), color 0.3s var(--ease-out); }

@media (max-width: 560px) {
  .dock {
    left: 12px; right: 12px; transform: none;
    justify-content: space-between; gap: 0; padding: 6px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    max-width: none;
  }
  .dock a { padding: 10px 12px; font-size: 15px; }
}
@media (max-width: 360px) {
  .dock a { padding: 10px 9px; font-size: 14px; }
}

/* ---------------- motion: the unlock ---------------- */
@media (prefers-reduced-motion: no-preference) {
  /* narrow screens: scrolling from the lock screen lifts it away and pops the icons in */
  @supports (animation-timeline: view()) {
    @media (max-width: 1023px) {
      .lock__inner {
        animation: lock-lift linear both;
        animation-timeline: view();
        animation-range: exit 0% exit 70%;
      }
      .app {
        animation: icon-pop var(--ease-out) both;
        animation-timeline: view();
        animation-range: entry 10% entry 45%;
      }
    }
  }
  /* wide screens: one entrance on load once JS marks the page ready */
  .js-ready.js-wide .app { animation: icon-in 0.7s var(--spring) both; }
  .js-ready.js-wide .app:nth-child(1) { animation-delay: 0.02s; }
  .js-ready.js-wide .app:nth-child(2) { animation-delay: 0.07s; }
  .js-ready.js-wide .app:nth-child(3) { animation-delay: 0.12s; }
  .js-ready.js-wide .app:nth-child(4) { animation-delay: 0.09s; }
  .js-ready.js-wide .app:nth-child(5) { animation-delay: 0.14s; }
  .js-ready.js-wide .app:nth-child(6) { animation-delay: 0.19s; }
}
.settled .app, .settled .lock__inner { animation: none !important; }

@keyframes lock-lift {
  from { transform: translateY(0); opacity: 1; filter: blur(0); }
  to   { transform: translateY(-12vh); opacity: 0; filter: blur(6px); }
}
@keyframes icon-pop {
  from { transform: scale(0.72); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
@keyframes icon-in {
  from { transform: scale(0.8) translateY(8px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

/* ---------------- 404 ---------------- */
.lock--404 { min-height: 100svh; }
.lock--404 .lock__clock { max-width: 14ch; }
.lock__links { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.lock__links a {
  padding: 11px 18px; border-radius: 999px;
  background: rgba(255,255,255,.14); color: #fff; font-weight: 500; font-size: 15px;
  transition: background-color .2s var(--ease-out);
}
.lock__links a:hover { background: rgba(255,255,255,.26); }
.lock__links a.is-primary { background: var(--pill); color: var(--ink); }
.lock__links a.is-primary:hover { background: #fff; }
