@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("assets/fonts/barlow-condensed-300-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/barlow-condensed-600-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/barlow-condensed-700-latin.woff2") format("woff2");
}

:root {
  --bg: #ffffff;
  --text: #1e1e1e;
  --mute: #28363b;
  --fill-image: url("assets/images/title-fill.jpg");
  --fill-image-ui: url("assets/images/title-fill-bright.jpg");
  --fill-size: cover;
  --fill-position: 50% 50%;
  --fill-position-ui: 50% 60%;
  --li-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "Barlow Condensed", sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

.hero {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}

/* Large full-height composition, bottom-anchored photo */
.hero__compose {
  position: relative;
  width: min(96vw, 78rem);
  height: 100vh;
  height: 100dvh;
  container-type: size;
  transform: translateX(8%);
}

.hero__title {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 40%;
  margin: 0;
  font-size: 38cqh;
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.03em;
  white-space: nowrap;
  pointer-events: none;
  transform: translateY(-50%);
  color: transparent;
  background-image: var(--fill-image);
  background-size: var(--fill-size);
  background-position: var(--fill-position);
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__meta {
  position: absolute;
  z-index: 3;
  left: 45%;
  top: 64%;
  margin: 0;
  width: min(34%, 28rem);
  max-width: 28rem;
  padding-left: 0.75rem;
  padding-bottom: 1.5rem;
}

.hero__lede {
  margin: 0;
  font-size: 2.35cqh;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.45;
  color: var(--mute);
}

.hero__focus {
  margin: 1.4cqh 0 0;
  font-size: 1.55cqh;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--mute);
  white-space: nowrap;
}

.hero__connect {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.8cqh;
  text-decoration: none;
  line-height: 1;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.hero__connect-icon {
  flex: 0 0 auto;
  width: 3.6cqh;
  height: 3.6cqh;
  background-image: var(--fill-image-ui);
  background-size: var(--fill-size);
  background-position: var(--fill-position-ui);
  background-repeat: no-repeat;
  -webkit-mask-image: var(--li-mask);
  mask-image: var(--li-mask);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.hero__connect-label {
  font-size: 2.7cqh;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: transparent;
  background-image: var(--fill-image-ui);
  background-size: var(--fill-size);
  background-position: var(--fill-position-ui);
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__connect:hover,
.hero__connect:focus-visible {
  outline: none;
  transform: scale(0.97);
  opacity: 0.88;
}

.hero__media {
  position: absolute;
  z-index: 2;
  left: -8%;
  bottom: 0;
  width: min(52%, 68cqh);
  height: 100%;
}

.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom left;
}

/* Desktop large: keep layered composition */
@media (min-width: 1600px) {
  .hero__compose {
    width: min(88vw, 88rem);
    transform: translateX(8%);
  }

  .hero__title {
    left: 1%;
  }

  .hero__meta {
    left: 45%;
    top: 64%;
    width: min(32%, 28rem);
    max-width: 28rem;
    padding-left: 0.75rem;
  }

  .hero__focus {
    font-size: 1.5cqh;
    letter-spacing: 0.05em;
    white-space: nowrap;
  }

  .hero__media {
    left: -4%;
    width: min(50%, 64cqh);
    height: 100%;
  }
}

/* Nest Hub Max (~16:10, short-ish): not regular desktop monitors */
@media (orientation: landscape) and (min-width: 1101px) and (max-width: 1400px) and (min-height: 701px) and (max-height: 820px) and (min-aspect-ratio: 1.55) {
  .hero {
    justify-content: stretch;
    align-items: stretch;
  }

  .hero__compose {
    width: 100%;
    height: 100dvh;
    max-width: none;
    margin: 0;
    padding: 0;
    transform: none;
    container-type: size;
  }

  .hero__media {
    left: 14%;
    bottom: 0;
    width: min(50%, 78cqh);
    height: 100%;
    overflow: hidden;
  }

  .hero__photo {
    position: absolute;
    left: 0;
    bottom: 0;
    width: auto;
    height: 108%;
    max-width: none;
    object-fit: contain;
    object-position: bottom left;
    transform: none;
  }

  .hero__title {
    left: 11%;
    top: 40%;
    font-size: 36cqh;
    z-index: 1;
  }

  .hero__meta {
    left: 60%;
    top: 62%;
    width: min(28%, 22rem);
    max-width: 22rem;
    padding: 0 0.75rem 1rem 0.5rem;
  }

  .hero__lede {
    font-size: 2.4cqh;
    line-height: 1.3;
  }

  .hero__focus {
    margin-top: 2.1cqh;
    font-size: 1.55cqh;
    letter-spacing: 0.05em;
    white-space: normal;
  }

  .hero__connect {
    margin-top: 1.3cqh;
  }

  .hero__connect-icon {
    width: 2.9cqh;
    height: 2.9cqh;
  }

  .hero__connect-label {
    font-size: 2.3cqh;
  }
}

/*
  iPad / fold landscape (~4:3 to ~3:2): scale title down so period
  stays on-screen; full figure; meta under "Filip."
*/
@media (orientation: landscape) and (min-height: 701px) and (max-aspect-ratio: 1.55) {
  .hero {
    justify-content: stretch;
    align-items: stretch;
  }

  .hero__compose {
    width: 100%;
    height: 100dvh;
    max-width: none;
    margin: 0;
    padding: 0;
    transform: none;
    container-type: size;
  }

  .hero__media {
    left: 6%;
    bottom: 0;
    width: min(56%, 82cqh);
    height: 100%;
    overflow: visible;
  }

  .hero__photo {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    object-position: bottom center;
    transform: none;
  }

  .hero__title {
    left: 8%;
    top: 40%;
    font-size: 30cqh;
    z-index: 1;
  }

  .hero__meta {
    left: 62%;
    top: 58%;
    width: min(24%, 18rem);
    max-width: 20rem;
    padding: 0 0.7rem 1rem 0.45rem;
  }

  .hero__lede {
    font-size: 2cqh;
    line-height: 1.3;
  }

  .hero__focus {
    margin-top: 1.7cqh;
    font-size: 1.25cqh;
    letter-spacing: 0.05em;
    white-space: normal;
  }

  .hero__connect {
    margin-top: 1.1cqh;
  }

  .hero__connect-icon {
    width: 2.4cqh;
    height: 2.4cqh;
  }

  .hero__connect-label {
    font-size: 1.9cqh;
  }
}

/* iPad Air / fold landscape mid-width */
@media (orientation: landscape) and (min-height: 701px) and (max-aspect-ratio: 1.55) and (min-width: 1100px) and (max-width: 1300px) {
  .hero__media {
    left: 0;
    width: min(52%, 88cqh);
    overflow: visible;
  }

  .hero__photo {
    object-position: bottom left;
    height: 100%;
    width: auto;
    max-width: none;
    left: 0;
  }

  .hero__title {
    left: 2%;
    font-size: 34cqh;
  }

  .hero__meta {
    left: 54%;
    top: 58%;
    width: min(28%, 20rem);
    max-width: 22rem;
  }

  .hero__lede {
    font-size: 2.15cqh;
  }

  .hero__focus {
    font-size: 1.35cqh;
  }
}

/* Nest Hub / short landscape (~16:10 and shorter) */
@media (orientation: landscape) and (max-height: 700px) {
  .hero {
    justify-content: stretch;
    align-items: stretch;
  }

  .hero__compose {
    width: 100%;
    height: 100dvh;
    max-width: none;
    margin: 0;
    padding: 0;
    transform: none;
    container-type: size;
  }

  .hero__media {
    left: 16%;
    bottom: 0;
    width: min(52%, 82cqh);
    height: 100%;
    overflow: hidden;
  }

  .hero__photo {
    position: absolute;
    left: 0;
    bottom: 0;
    width: auto;
    height: 110%;
    max-width: none;
    object-fit: contain;
    object-position: bottom left;
    transform: none;
  }

  .hero__title {
    left: 13%;
    top: 40%;
    font-size: 36cqh;
    z-index: 1;
  }

  .hero__meta {
    left: 64%;
    top: 62%;
    width: min(24%, 16rem);
    max-width: 18rem;
    padding: 0 0.6rem 0.85rem 0.45rem;
  }

  .hero__lede {
    font-size: 2.3cqh;
    line-height: 1.28;
  }

  .hero__focus {
    margin-top: 2.1cqh;
    font-size: 1.5cqh;
    letter-spacing: 0.05em;
    white-space: normal;
  }

  .hero__connect {
    margin-top: 1.2cqh;
  }

  .hero__connect-icon {
    width: 2.9cqh;
    height: 2.9cqh;
  }

  .hero__connect-label {
    font-size: 2.35cqh;
  }
}

/* Very short phone landscape (e.g. iPhone landscape) */
@media (orientation: landscape) and (max-height: 450px) {
  .hero__media {
    left: 14%;
    width: min(50%, 88cqh);
  }

  .hero__photo {
    left: 0;
    height: 112%;
  }

  .hero__title {
    left: 11%;
    top: 42%;
    font-size: 38cqh;
  }

  .hero__meta {
    left: 50%;
    top: 64%;
    width: min(23%, 10.5rem);
    max-width: 10.5rem;
    padding: 0 0.25rem 0.4rem 0.15rem;
  }

  .hero__lede {
    font-size: 2.55cqh;
    line-height: 1.26;
  }

  .hero__focus {
    margin-top: 1.7cqh;
    font-size: 1.3cqh;
    letter-spacing: 0.035em;
    white-space: normal;
  }

  .hero__connect {
    margin-top: 0.9cqh;
  }

  .hero__connect-icon {
    width: 2.5cqh;
    height: 2.5cqh;
  }

  .hero__connect-label {
    font-size: 2.1cqh;
  }
}

/* iPhone SE / narrow landscape: meta under Filip., clear of arm */
@media (orientation: landscape) and (max-height: 450px) and (max-width: 720px) {
  .hero__media {
    left: 8%;
  }

  .hero__title {
    left: 5%;
  }

  .hero__meta {
    left: 52%;
    top: 65%;
    width: min(26%, 10.5rem);
    max-width: 10.5rem;
  }
}

/* Galaxy Z Fold cover landscape: closer to photo, stop at period */
@media (orientation: landscape) and (max-height: 360px) and (min-width: 800px) {
  .hero__media {
    left: 12%;
  }

  .hero__title {
    left: 9%;
    top: 38%;
    font-size: 38cqh;
  }

  .hero__meta {
    left: 42%;
    top: 68%;
    width: min(22%, 10.5rem);
    max-width: 10.5rem;
  }

  .hero__lede {
    font-size: 2.35cqh;
    line-height: 1.22;
  }

  .hero__focus {
    margin-top: 1.2cqh;
    font-size: 1.2cqh;
  }

  .hero__connect {
    margin-top: 0.7cqh;
  }
}

/* Portrait phones + tablets (+ tall fold covers) */
@media (max-width: 1024px) and (orientation: portrait),
       (max-width: 920px) and (min-height: 1100px) {
  .hero {
    align-items: stretch;
  }

  .hero__compose {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100dvh;
    transform: none;
    container-type: normal;
  }

  .hero__title {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    flex: 0 0 auto;
    padding: clamp(1.9rem, 5.8vh, 2.85rem) clamp(1.1rem, 4vw, 1.75rem) 0;
    font-size: clamp(3.15rem, 13.5vw, 4.35rem);
    line-height: 0.95;
    white-space: nowrap;
    background-position: center;
  }

  .hero__meta {
    position: relative;
    left: auto;
    top: auto;
    flex: 0 0 auto;
    width: auto;
    max-width: 36rem;
    margin: 0;
    padding: 1.15rem clamp(1.1rem, 4vw, 1.75rem) 0.35rem;
  }

  .hero__lede {
    font-size: clamp(1.02rem, 3.7vw, 1.2rem);
    line-height: 1.4;
  }

  .hero__focus {
    margin-top: 0.75rem;
    font-size: clamp(0.68rem, 2.5vw, 0.78rem);
    letter-spacing: 0.07em;
    white-space: normal;
  }

  .hero__connect {
    margin-top: 0.9rem;
  }

  .hero__connect-icon {
    width: 1.85rem;
    height: 1.85rem;
  }

  .hero__connect-label {
    font-size: 1.2rem;
  }

  .hero__media {
    position: relative;
    flex: 1 1 auto;
    left: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    margin-top: 0.35rem;
    overflow: hidden;
  }

  .hero__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
  }
}

/* Tablet portrait: stronger type */
@media (min-width: 700px) and (max-width: 1024px) and (orientation: portrait),
       (min-width: 700px) and (max-width: 920px) and (min-height: 1100px) {
  .hero__title {
    padding-top: 2.5rem;
    font-size: clamp(3.4rem, 8.5vw, 4.5rem);
  }

  .hero__meta {
    max-width: 40rem;
    padding-top: 1.35rem;
  }

  .hero__lede {
    font-size: 1.25rem;
    line-height: 1.42;
  }

  .hero__focus {
    font-size: 0.82rem;
  }

  .hero__connect-label {
    font-size: 1.35rem;
  }

  .hero__connect-icon {
    width: 2.1rem;
    height: 2.1rem;
  }
}

/* Tall fold portrait (Zenbook Fold cover…): keep title on one line */
@media (max-width: 920px) and (min-height: 1100px) {
  .hero__title {
    font-size: clamp(3.2rem, 11vw, 4rem);
    padding-top: clamp(1.6rem, 4vh, 2.4rem);
  }

  .hero__meta {
    padding-top: 1rem;
    padding-bottom: 0.15rem;
    max-width: 34rem;
  }

  .hero__lede {
    font-size: clamp(1.05rem, 2.6vw, 1.2rem);
  }

  .hero__connect {
    margin-top: 0.7rem;
  }

  .hero__media {
    margin-top: 0.15rem;
  }

  .hero__photo {
    inset: auto;
    left: 50%;
    bottom: 0;
    top: auto;
    right: auto;
    height: 102%;
    width: auto;
    max-width: none;
    transform: translateX(-50%);
    object-fit: contain;
    object-position: bottom center;
  }
}
