/* ==========================================================================
   Oloweb
   ========================================================================== */

:root {
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --maxw: 1160px;
  --gutter: clamp(20px, 4.5vw, 56px);
  --gap: 24px;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .25, 1);

  color-scheme: light;
  --bg: #f4f4f1;
  --ink: #0b0b0b;
  --ink-2: #3c3c38;
  --muted: #6e6d68;
  --line: rgba(11, 11, 11, .12);
  --surface: #eaeae6;
  --knob: #fff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 18px 40px -18px rgba(0, 0, 0, .22);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0c0c;
  --ink: #f1f0eb;
  --ink-2: #bdbcb5;
  --muted: #8a8984;
  --line: rgba(241, 240, 235, .13);
  --surface: #171716;
  --knob: #2c2c2a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 18px 40px -18px rgba(0, 0, 0, .9);
}

/* Base ------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 28px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: .005em;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
h1, h2, h3 { font: inherit; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: var(--ink); color: var(--bg); }

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

.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;
}

.nowrap { white-space: nowrap; }

/* Theme-specific artwork */
:root:not([data-theme="dark"]) .only-dark,
:root[data-theme="dark"] .only-light { display: none !important; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}

/* Small label used across the page */
.top, .sec__label, .social__name, .foot {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1.4;
}

/* Header ----------------------------------------------------------------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.top__nav { display: flex; gap: clamp(16px, 3vw, 36px); }

.top__nav a { color: var(--muted); transition: color .25s; }

/* Theme switch: a pill with a knob that springs between sun and moon */
.theme {
  --cell: 28px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, var(--cell));
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.theme__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: var(--cell);
  height: 26px;
  border-radius: inherit;
  background: var(--knob);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .1), 0 3px 8px -2px rgba(0, 0, 0, .16);
  transition: translate .6s var(--ease), scale .3s var(--ease);
}

:root[data-theme="dark"] .theme__thumb { translate: var(--cell) 0; }

.theme:active .theme__thumb { scale: .9; }

.theme__icon {
  position: relative;
  width: 15px;
  height: 15px;
  margin: 5.5px auto;
  transition: color .3s, rotate .6s var(--ease), scale .6s var(--ease);
}

/* the active side is full ink; the resting icon turns away slightly */
:root:not([data-theme="dark"]) .theme__icon--sun,
:root[data-theme="dark"] .theme__icon--moon { color: var(--ink); }

:root[data-theme="dark"] .theme__icon--sun { rotate: -90deg; scale: .85; }
:root:not([data-theme="dark"]) .theme__icon--moon { rotate: 25deg; scale: .85; }

@media (hover: hover) {
  .top__nav a:hover,
  .theme:hover .theme__icon { color: var(--ink); }
}

/* Masthead --------------------------------------------------------------- */

.mast {
  padding-block: clamp(40px, 7vw, 96px) clamp(24px, 4vw, 48px);
}

.mast__logo {
  width: clamp(150px, 22vw, 240px);
  margin-inline: auto;
  overflow: hidden;
  line-height: 0;
}

.mast__logo img { width: 100%; }

/* Sections --------------------------------------------------------------- */

.sec { padding-block: clamp(40px, 6vw, 80px); }

.sec__label { margin-bottom: clamp(24px, 3vw, 40px); }

.sec__body { min-width: 0; }

/* About ------------------------------------------------------------------ */

.about p {
  max-width: 31em;
  font-size: clamp(19px, 1rem + .8vw, 27px);
  font-weight: 500;
  line-height: 1.17;
  letter-spacing: -.004em;
  text-wrap: pretty;
}

.about p + p {
  margin-top: .8em;
  color: var(--ink-2);
}

/* Socials ---------------------------------------------------------------- */

.socials {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 16px);
}

.social {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(28px, 4vw, 48px);
  height: 100%;
  padding: 22px;
  border-radius: 18px;
  background: var(--surface);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}

.social__icon {
  align-self: flex-start;
  width: auto;
  height: 32px;
}

.social__icon--youtube { height: 24px; margin-block: 4px; }
.social__icon--x { height: 27px; margin-block: 2.5px; color: var(--ink); }
.social__icon--email { height: 32px; color: var(--ink); }

.social__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.social__name { color: var(--muted); }

.social__handle {
  font-size: clamp(17px, .85rem + .55vw, 22px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.social__arrow {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform .5s var(--ease), color .3s;
}

@media (hover: hover) {
  .social:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
  .social:hover .social__arrow { color: var(--ink); transform: translate(2px, -2px); }
}

/* Contact ---------------------------------------------------------------- */

/* extra room after the projects, which already end on a big gap between them */
#contact { padding-top: clamp(64px, 10vw, 140px); }

.contact__lead {
  max-width: 24em;
  font-size: clamp(19px, 1rem + .8vw, 27px);
  font-weight: 500;
  line-height: 1.17;
  letter-spacing: -.004em;
  text-wrap: pretty;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: clamp(24px, 3vw, 36px);
}

.contact__email,
.copy {
  height: 52px;
  border-radius: 999px;
  font-size: clamp(15px, .8rem + .3vw, 17px);
  font-weight: 500;
}

.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-inline: 20px 24px;
  background: var(--ink);
  color: var(--bg);
  transition: transform .5s var(--ease);
}

.contact__email svg {
  width: 20px;
  height: 20px;
}

.copy {
  min-width: 92px;
  padding-inline: 22px;
  background: var(--surface);
  color: var(--ink-2);
  transition: color .25s, background-color .25s;
}

.copy.is-done { color: var(--ink); }

@media (hover: hover) {
  .contact__email:hover { transform: translateY(-2px); }
  .copy:not(.is-done):hover { color: var(--ink); }
}

/* Projects --------------------------------------------------------------- */

.project {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 6fr);
  column-gap: var(--gap);
  align-items: start;
  scroll-margin-top: 28px;
}

.project + .project { margin-top: clamp(80px, 10vw, 140px); }

.project__logo { line-height: 0; }

.project__logo--keepon img { width: 150px; }
.logo-svg--steer { width: 132px; height: auto; }
.logo-svg--coinsta { width: 172px; height: auto; overflow: visible; }

.project__text {
  max-width: 36em;
  color: var(--ink-2);
  text-wrap: pretty;
}

.project__text p + p { margin-top: 1em; }

.project__media {
  grid-column: 1 / -1;
  margin-top: clamp(32px, 4vw, 52px);
}

/* KeepOn — phone strip */
.phones {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(8px, 1.2vw, 16px);
}

.phone {
  position: relative;
  aspect-ratio: 600 / 1301;
  border-radius: 13.5% / 6.23%;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--shadow);
  transition: transform .7s var(--ease);
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (hover: hover) {
  .phone:hover { transform: translateY(-6px); }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .phone { will-change: transform; }
}

/* Steer — screenshot viewer */
.shots__stage { position: relative; }

.shots__frame {
  position: relative;
  aspect-ratio: 1920 / 1227;
  border-radius: clamp(8px, 1vw, 12px);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--shadow);
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.shots__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .6s var(--ease);
  -webkit-user-drag: none;
}

.shots__frame img.is-active { opacity: 1; }

.shots__nav {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 50%;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 8px 20px -8px rgba(0, 0, 0, .3);
  transition: transform .4s var(--ease), background-color .25s;
}

.shots__nav--prev { left: clamp(8px, 1.4vw, 16px); }
.shots__nav--next { right: clamp(8px, 1.4vw, 16px); }

.shots__nav svg {
  width: 16px;
  height: 16px;
}

.shots__nav:active { transform: scale(.92); }

.shots__thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(6px, 1vw, 12px);
  margin-top: clamp(10px, 1.2vw, 16px);
}

.shots__thumbs button {
  aspect-ratio: 1920 / 1227;
  border-radius: clamp(4px, .6vw, 8px);
  overflow: hidden;
  background: var(--surface);
  opacity: .55;
  transition: opacity .3s, box-shadow .3s;
}

.shots__thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
}

.shots__thumbs button[aria-current="true"] {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--ink);
}

@media (hover: hover) {
  .shots__nav:hover { background: var(--bg); }
  .shots__thumbs button:not([aria-current="true"]):hover { opacity: .8; }
}

/* Coinsta — the star spins */
.fidget {
  display: block;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.fidget:active { cursor: grabbing; }
.fidget:focus-visible { outline-offset: 10px; }

.c-eye { fill: var(--bg); }

/* Footer ----------------------------------------------------------------- */

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(24px, 4vw, 48px);
  padding-block: 26px 40px;
  color: var(--muted);
}

.foot__top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .25s;
}

.foot__top svg {
  width: 12px;
  height: 12px;
  transition: transform .5s var(--ease);
}

.foot__follow {
  display: flex;
  align-items: center;
  gap: 14px;
}

.foot__socials {
  display: flex;
  align-items: center;
  gap: 4px;
}

.foot__socials a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  transition: background-color .25s, transform .5s var(--ease);
}

.foot__icon { width: 18px; height: 18px; }
.foot__icon--youtube { width: 20px; height: auto; }
.foot__icon--x { width: 16px; height: 16px; color: var(--ink); }

@media (hover: hover) {
  .foot__socials a:hover { background: var(--surface); transform: translateY(-2px); }
  .foot__top:hover { color: var(--ink); }
  .foot__top:hover svg { transform: translateY(-2px); }
}

/* Motion ----------------------------------------------------------------- */

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .top { animation: fade .9s var(--ease) .05s both; }

  /* reveals use `translate` so they never fight hover `transform`s */
  .js .reveal {
    opacity: 0;
    translate: 0 18px;
    transition:
      opacity .9s var(--ease) var(--d, 0s),
      translate 1.1s var(--ease) var(--d, 0s);
  }

  .js .phone.reveal {
    --d: calc(var(--i, 0) * 70ms + .1s);
    translate: 0 36px;
    transition:
      opacity .9s var(--ease) var(--d),
      translate 1.2s var(--ease) var(--d),
      transform .7s var(--ease);
  }

  .js .reveal.is-in {
    opacity: 1;
    translate: none;
  }
}

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

/* Responsive ------------------------------------------------------------- */

@media (max-width: 820px) {
  .socials { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .project { grid-template-columns: minmax(0, 1fr); }

  .project__text { margin-top: 24px; }

  .phones {
    display: flex;
    gap: 10px;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    padding-block: 4px 24px;
    margin-bottom: -24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  .phones::-webkit-scrollbar { display: none; }

  .phone {
    flex: 0 0 min(46vw, 220px);
    scroll-snap-align: start;
  }
}

@media (max-width: 600px) {
  .socials { grid-template-columns: minmax(0, 1fr); }

  .social {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
  }

  .social__icon { flex: 0 0 auto; width: 30px; }
  .social__icon--youtube { width: 30px; height: auto; margin-block: 0; }
  .social__icon--x { width: 26px; margin-inline: 2px; }

  .social__arrow {
    position: static;
    margin-left: auto;
  }

  .contact__email {
    flex: 1 1 auto;
    justify-content: center;
    gap: 8px;
    padding-inline: 16px 18px;
  }

  .copy {
    min-width: 78px;
    padding-inline: 12px;
  }

  .shots__nav {
    width: 36px;
    height: 36px;
    margin-top: -18px;
  }

  .shots__nav svg {
    width: 14px;
    height: 14px;
  }

  .foot { flex-wrap: wrap; row-gap: 18px; }

  .foot__follow {
    order: -1;
    flex-basis: 100%;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 400px) {
  .top__nav { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
