/* ==========================================================================
   Lukas Vanek — portfolio
   Hand-written replacement for the Webflow export (normalize + webflow.css +
   lukas-vanek.webflow.css + webflow.js interactions).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts — only the weights the page actually uses, as woff2.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: Univanova;
  src: url('../fonts/UnivaNova-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Univanova;
  src: url('../fonts/UnivaNova-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

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

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Keeps anchor targets and keyboard-focused elements clear of the
     fixed header. */
  scroll-padding-top: 7rem;
}

body {
  min-height: 100%;
  margin: 0;
}

img,
svg {
  max-width: 100%;
  vertical-align: middle;
}

img {
  display: inline-block;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding-left: 0;
  list-style: none;
}

a {
  color: inherit;
}

:where(html) {
  scroll-behavior: smooth;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  --bg: #0f0f0f;
  --text: #fff;
  --text-muted: #e2e2e2;
  --line: #272727;
  --accent-from: #ff6a00;
  --accent-to: #fdbb2d;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: Univanova, sans-serif;
  font-weight: 400;
}

h1 {
  max-width: 50rem;
  font-size: 3.5rem;
  font-weight: 400;
  line-height: 120%;
  letter-spacing: .01em;
}

h2 {
  max-width: 60%;
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 128%;
  letter-spacing: .04em;
}

p {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 130%;
  letter-spacing: .04em;
}

.gradient {
  background-image: linear-gradient(to right, var(--accent-from), var(--accent-to));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-center {
  text-align: center;
}

.black {
  color: var(--bg);
}

/* Section label that needs heading semantics but body-copy looks. */
.eyebrow {
  max-width: none;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 130%;
  letter-spacing: .04em;
}

.container {
  /* flow-root contains the children's vertical margins, so section
     backgrounds (the white contact block) still wrap them. */
  display: flow-root;
  max-width: 128rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 4rem;
  padding-right: 4rem;
}

/* --------------------------------------------------------------------------
   Keyboard access
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 8px;
  background-color: #fff;
  color: var(--bg);
  font-size: 0.875rem;
  line-height: 0.875rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-120%);
  transition: transform .2s ease-out;
}

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-to);
  outline-offset: 0.25rem;
}

.section-contact a:focus-visible {
  outline-color: var(--bg);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.button-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.5rem 0.5rem 1.25rem;
  border: 1px solid #fff;
  border-radius: 50px;
  background-image: url('../images/white-mask.svg');
  background-position: 50% 250%;
  background-repeat: no-repeat;
  background-size: 100%;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 0.875rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all .4s ease-out;
}

.button-wrapper:hover {
  background-position: 50% 0;
  color: var(--bg);
}

.button-wrapper.top-3rem {
  margin-top: 3rem;
}

.button-wrapper.dark {
  border-color: var(--bg);
  background-image: url('../images/dark-mask.svg');
  background-position: 50% 290%;
  color: var(--bg);
}

.button-wrapper.dark:hover {
  background-position: 50% 0;
  color: #fff;
}

.btn-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background-color: #fff;
  color: var(--bg);
  transition: background-color .3s ease-out, color .3s ease-out;
}

.btn-icon.dark {
  background-color: var(--bg);
  color: #fff;
}

/* The icon inverts with the button (was a Webflow interaction). */
.button-wrapper:hover .btn-icon {
  background-color: var(--bg);
  color: #fff;
}

.button-wrapper.dark:hover .btn-icon {
  background-color: #fff;
  color: var(--bg);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  /* min-height, not height: on a short viewport (a phone held sideways) a
     fixed height centred the hero copy into negative offsets and clipped it. */
  min-height: 100vh;
  min-height: 100svh;
  border-bottom: 1px solid var(--line);
}

.hero-main-wrapper {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  /* Top and bottom are equal, so the copy stays centred exactly where it was;
     the extra room only matters on a short viewport, where it keeps the copy
     from starting underneath the fixed header. */
  padding: 5.5rem 4rem;
}

/* Sits over the hero at rest, exactly where the logo used to be, and picks up
   a backdrop once the page scrolls so it stays readable over the cards and
   the white contact block. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  /* Shallow bottom padding so the transparent resting header overlays as
     little of the hero as the old logo bar did. */
  padding: 2.5rem 4rem .5rem;
  border-bottom: 1px solid #0000;
  transition: padding .3s ease-out, background-color .3s ease-out, border-bottom-color .3s ease-out;
}

.site-header.is-scrolled {
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom-color: var(--line);
  background-color: #0f0f0fd9;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-logo {
  display: flex;
  align-items: center;
}

.site-nav {
  display: flex;
  gap: 2rem;
}

.site-nav a {
  color: #fff;
  font-size: .875rem;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: .7;
  transition: opacity .2s ease-out;
}

.site-nav a:hover {
  opacity: 1;
}

.pill {
  padding: 0.25rem 1rem;
  border: 1px solid #ffffff80;
  border-radius: 16px;
}

.pill-text {
  font-size: 0.75rem;
  line-height: 1rem;
}

.hero-block {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 2rem;
  width: 20%;
  /* Keeps the label inside the column when the visitor runs a larger
     browser font; the hero copy gives up the space instead. */
  min-width: fit-content;
  padding-bottom: 2rem;
  padding-left: 2.5rem;
}

.hero-block.design-block {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.body-large {
  font-size: 2.5rem;
  line-height: 3rem;
  letter-spacing: .04em;
}

.bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity .4s ease-out;
}

.bg.design {
  background-image: url('../images/bg-design.svg');
  background-position: 50%;
  background-size: auto;
}

.bg.webflow {
  background-image: url('../images/bg-webflow.svg');
  background-position: 50%;
  background-size: auto;
}

.hero-block:hover .bg {
  opacity: 1;
}

/* Shortcut to the newest project, revealed on hover (was a Webflow
   interaction). display is animated so the block's resting layout is
   unchanged. transition-behavior is kept out of the shorthand so that a
   browser without it still gets the opacity fade. */
.hero-cta {
  display: none;
  opacity: 0;
  transition: opacity .2s ease-out, display .2s ease-out;
  transition-behavior: allow-discrete;
}

.hero-block:hover .hero-cta {
  display: flex;
  opacity: 1;
}

@starting-style {
  .hero-block:hover .hero-cta {
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   Intro + client logos
   -------------------------------------------------------------------------- */

.about-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4rem;
  margin-top: 9rem;
  margin-bottom: 9rem;
}

.about-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  max-width: 26rem;
}

.logo-wrapper {
  display: flex;
  justify-content: space-between;
  max-width: 90rem;
  margin: 4rem auto 0;
}

.logo-wrapper li {
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.projects {
  max-width: none;
  margin-top: 9rem;
  margin-bottom: 4rem;
  text-align: center;
}

.reference-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.reference-item {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  height: 80vh;
  padding-bottom: 3rem;
  padding-left: 3rem;
  padding-right: 3rem;
  border: 1px solid var(--line);
  overflow: hidden;
}

.ref-img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 1s ease-out;
}

/* Slow zoom as the card enters the viewport (was a Webflow interaction);
   js/main.js adds the class. */
.ref-img.is-inview {
  transform: scale(1.05);
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  background-color: #0009;
}

.ref-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2.5rem;
}

.ref-title {
  max-width: 60%;
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 128%;
  letter-spacing: .04em;
}

.ref-details {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.5rem;
}

.detail-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.description {
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 0.875rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.detail-value {
  min-width: 18.125rem;
  max-width: 18.125rem;
}

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

.photo {
  flex: 1;
  align-self: stretch;
  min-width: min(20.375rem, 100%);
  max-width: 20.375rem;
  height: 13rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  object-fit: cover;
}

.credentials-wrapper {
  display: flex;
  justify-content: flex-end;
  column-gap: 6rem;
  margin-bottom: 9rem;
}

.credential-item {
  display: flex;
  flex: 0 auto;
  flex-direction: column;
  align-items: flex-end;
  column-gap: 2rem;
}

.credential-item.width-half {
  align-items: flex-start;
  gap: 2rem;
  width: 40%;
  max-width: 40.625rem;
}

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

.section-contact {
  background-color: #fff;
}

.contact-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 9rem;
  margin-bottom: 9rem;
}

/* --------------------------------------------------------------------------
   Breakpoints
   -------------------------------------------------------------------------- */

@media screen and (max-width: 61.9375em) {
  h2,
  .ref-title {
    max-width: none;
  }

  .hero {
    flex-direction: column;
  }

  .hero-block {
    flex-direction: row-reverse;
    justify-content: center;
    width: auto;
    padding: 2.5rem 4rem;
  }

  .hero-block.design-block {
    border-style: solid none;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .button-wrapper {
    flex: none;
  }

  .about-wrapper {
    flex-direction: column;
  }

  .about-intro {
    flex-direction: row;
    gap: 3rem;
    max-width: none;
  }

  .logo-wrapper {
    display: grid;
    grid-template-rows: auto auto;
    grid-template-columns: 1fr 1fr 1fr;
    grid-auto-columns: 1fr;
    gap: 2rem;
    place-items: center;
  }

  .ref-details {
    flex-direction: column;
    gap: 2rem;
  }

  .detail-value {
    min-width: auto;
    max-width: 18.75rem;
  }

  .credentials-wrapper {
    justify-content: flex-start;
  }

  .credential-item.width-half {
    width: auto;
    max-width: none;
  }
}

@media screen and (max-width: 47.9375em) {
  h1 {
    font-size: 2.5rem;
  }

  h2,
  .ref-title {
    font-size: 2rem;
  }

  p,
  .eyebrow {
    font-size: 1rem;
  }

  .hero-block,
  .hero-main-wrapper {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }

  .site-header {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }

  .container {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }

  .reference-item {
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 4rem;
    padding-bottom: 2rem;
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .ref-info {
    gap: 1.5rem;
  }

  .ref-details {
    align-items: stretch;
    gap: 1.5rem;
  }

  .detail-wrapper {
    gap: 0.5rem;
  }

  .detail-value {
    max-width: 70%;
  }

  .contact-wrapper {
    flex-direction: column;
    gap: 2rem;
  }
}

@media screen and (max-width: 29.9375em) {
  h1 {
    font-size: 2rem;
  }

  h2,
  .ref-title {
    font-size: 1.75rem;
  }

  .hero-block,
  .hero-block.design-block {
    justify-content: center;
  }

  .hero-block {
    padding: 1.5rem;
  }

  .hero-main-wrapper {
    gap: 0.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .button-wrapper.top-3rem {
    margin-top: 2rem;
  }

  .button-wrapper.dark {
    flex: 1;
  }

  .body-large {
    font-size: 1.5rem;
    line-height: 2.625rem;
  }

  .site-header {
    gap: 1rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .site-nav {
    gap: 1rem;
  }

  .site-nav a {
    font-size: .75rem;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .about-wrapper {
    margin-top: 6rem;
    margin-bottom: 6rem;
  }

  .about-intro {
    flex-direction: column;
    gap: 0;
  }

  .logo-wrapper {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    place-items: stretch;
    margin-top: 2rem;
  }

  .projects {
    margin-top: 6rem;
    margin-bottom: 2rem;
  }

  .reference-item {
    gap: 3rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .detail-wrapper {
    gap: 0.5rem;
  }

  .detail-value {
    max-width: none;
  }

  .photo {
    min-width: auto;
    max-width: none;
  }

  .credentials-wrapper {
    flex-direction: column;
    gap: 4rem;
    margin-bottom: 6rem;
  }

  .contact-wrapper {
    margin-top: 6rem;
    margin-bottom: 6rem;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

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

  .ref-img.is-inview {
    transform: none;
  }
}
