/* ==========================================================================
   Aleksas Rusnak — Portfolio
   Plain HTML/CSS rebuild of the Framer site. No build step required.
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face { font-family: "N27"; src: url("../fonts/n27-light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "N27"; src: url("../fonts/n27-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "N27"; src: url("../fonts/n27-medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "N27"; src: url("../fonts/n27-medium-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "N27"; src: url("../fonts/n27-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "PP Neue Montreal"; src: url("../fonts/ppneuemontreal-book.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "PP Neue Montreal"; src: url("../fonts/ppneuemontreal-medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap;
  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; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-ext-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Inter"; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("../fonts/open-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap;
  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; }
@font-face { font-family: "Open Sans"; src: url("../fonts/open-sans-latin-ext-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  --ink: #000;
  --bg: #fff;
  --muted: #696969;
  --muted-2: #616161;
  --soft: #f9f9f9;
  --card: #f5f5f7;
  --line: #ebebeb;
  --accent: #95ff8a;

  --f-display: "N27", "Helvetica Neue", Arial, sans-serif;
  --f-body: "PP Neue Montreal", "Helvetica Neue", Arial, sans-serif;
  --f-inter: "Inter", "Helvetica Neue", Arial, sans-serif;
  --f-quote: "Open Sans", "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --header-h: 100px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[id] { scroll-margin-top: 90px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.logo { display: block; width: 60px; height: 60px; }
.logo img { width: 100%; height: 100%; object-fit: cover; }

.nav { display: flex; align-items: center; gap: 8px; }
.nav__links { display: flex; align-items: center; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 16px;
  border-radius: 100px;
  background: var(--soft);
  font-family: var(--f-display); font-size: 14px; line-height: 1;
  white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.pill:hover { background: #efefef; }
.pill--dark { background: var(--ink); color: #fff; }
.pill--dark:hover { background: #222; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }

.nav__links .pill {
  opacity: 0; transform: translateX(12px); pointer-events: none;
  transition: opacity .35s var(--ease), transform .45s var(--ease), background-color .25s;
}
.nav.is-open .nav__links .pill { opacity: 1; transform: none; pointer-events: auto; }
.nav.is-open .nav__links .pill:nth-child(4) { transition-delay: 0s; }
.nav.is-open .nav__links .pill:nth-child(3) { transition-delay: .04s; }
.nav.is-open .nav__links .pill:nth-child(2) { transition-delay: .08s; }
.nav.is-open .nav__links .pill:nth-child(1) { transition-delay: .12s; }
.nav__toggle { min-width: 68px; justify-content: center; }
.nav:not(.is-open) .nav__links { visibility: hidden; transition: visibility 0s .45s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 44px; padding: 0 20px;
  border-radius: 100px;
  background: var(--ink); color: #fff;
  font-family: var(--f-display); font-size: 14px; line-height: 1; letter-spacing: .02em;
  transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.btn:hover { background: #1f1f1f; transform: translateY(-1px); }
.btn .dot { width: 8px; height: 8px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); filter: blur(6px);
  transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; filter: none; }
.split .w { display: inline-block; opacity: 0; transform: translateY(.35em); filter: blur(8px);
  animation: word-in .9s var(--ease) forwards; animation-delay: calc(var(--i) * 45ms + var(--d, 0ms)); }
@keyframes word-in { to { opacity: 1; transform: none; filter: none; } }
@media (max-width: 809px), (hover: none) {
  /* Phones: no blur (it drops frames), a shorter travel and one shared timing */
  .reveal { transform: translate3d(0, 16px, 0); filter: none;
    transition: opacity .7s var(--ease), transform .7s var(--ease); will-change: opacity, transform; }
  .reveal.is-in { will-change: auto; }
  .split .w { filter: none; }
  .shot img, .case__media img { transition: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .split .w { opacity: 1 !important; transform: none !important; filter: none !important; animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
.no-js .reveal, .no-js .split .w { opacity: 1; transform: none; filter: none; }

/* ==========================================================================
   HOME
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
  min-height: max(100svh, 760px);
  display: flex; flex-direction: column;
  padding: 200px 24px 120px;
}
.hero__head { text-align: center; }
.hero__title {
  font-family: var(--f-display); font-weight: 500;
  font-size: 50px; line-height: 1; letter-spacing: -3px; text-transform: uppercase;
}
.hero__title .line { display: block; }
.hero__lede { margin-top: 32px; font-size: 16px; line-height: 1.2; color: rgba(0,0,0,.8); }
.hero__foot {
  margin-top: auto;
  width: 100%; max-width: 1136px; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
}
.hero__meta { display: flex; gap: 70px; }
.meta h2 { font-size: 14px; font-weight: 400; line-height: 1.2; letter-spacing: -.02em; color: var(--muted); margin-bottom: 10px; }
.meta li { list-style: none; font-size: 14px; line-height: 1.6; }
.meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.hero__cta { margin-right: 48px; }

/* ---------- Archive (home) ---------- */
.archive {
  display: grid; grid-template-columns: 1fr 1.88fr; gap: 40px;
  padding: 0 40px;
}
.archive__aside { position: relative; }
.archive__sticky {
  position: sticky; top: 0;
  height: 100vh; max-height: 100vh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 120px 0 64px;
}
.eyebrow { font-family: var(--f-display); font-weight: 500; font-size: 16px; line-height: 1.2; letter-spacing: -.02em; text-transform: uppercase; }
.archive__intro p { margin-top: 10px; max-width: 320px; font-size: 16px; line-height: 1.6; letter-spacing: -.02em; }
.archive__pitch p { margin-top: 16px; max-width: 250px; font-size: 14px; line-height: 1.4; color: var(--muted-2); }

.archive__list { display: grid; gap: 10px; padding: 120px 0 0; list-style: none; }
.shot {
  position: relative; display: block; overflow: hidden;
  border-radius: 12px; background: var(--card);
  aspect-ratio: 862 / 594;
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.shot:hover img { transform: scale(1.015); }
.shot figcaption { position: absolute; z-index: 1; left: 24px; bottom: 20px; font-size: 12px; line-height: 1.2; }
/* Mobile: a stack of frames per card that rotate endlessly (see main.js) */
.shot__rot { display: none; }
.shot__rot img { position: absolute; inset: 0; opacity: 0; transition: opacity var(--swap, 0ms) linear; }
.shot__rot img.is-active { opacity: 1; }

/* ---------- Case studies ---------- */
.cases { max-width: 1152px; margin: 0 auto; padding: 160px 24px 200px; }
.cases__grid { margin-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.case { display: block; position: relative; }
.case__media { position: relative; overflow: hidden; border-radius: 12px; background: var(--card); aspect-ratio: 532 / 322; }
.case__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
a.case:hover .case__media img, .case--locked:hover .case__media img { transform: scale(1.03); }
.case__title { margin-top: 24px; display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 16px; line-height: 1.4; }
.case__arrow { width: 12px; height: 12px; opacity: 0; transform: translate(-4px, 4px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.case:hover .case__arrow { opacity: 1; transform: none; }
.case__lock { position: absolute; top: 18px; right: 22px; font-size: 22px; line-height: 1; opacity: 0; transform: translateY(-4px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.case--locked:hover .case__lock, .case--locked:focus-within .case__lock { opacity: 1; transform: none; }
.case--locked { cursor: default; }
.tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border: 1px solid rgba(0,0,0,.55); border-radius: 100px; font-size: 12px; line-height: 1; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); overflow: hidden; }
.site-footer__inner { max-width: 1142px; margin: 0 auto; padding: 68px 24px 0; }
.site-footer__cols { display: grid; grid-template-columns: 314px 384px 298px auto; font-size: 14px; line-height: 20px; letter-spacing: -.02em; }
.site-footer__cols ul { list-style: none; }
.site-footer__cols li { white-space: nowrap; }
.site-footer__cols a:hover { text-decoration: underline; text-underline-offset: 3px; }
.wordmark { margin-top: 40px; width: 100%; height: auto; aspect-ratio: 1094 / 100; object-fit: contain; object-position: left bottom; }
.site-footer--display .site-footer__cols { font-family: var(--f-display); }

/* ==========================================================================
   CASE STUDY (Telia)
   ========================================================================== */
.study { font-family: var(--f-display); max-width: 1068px; margin: 0 auto; padding: 100px 24px 120px; }
.study h1 { font-weight: 500; font-size: 44px; line-height: 1.2; letter-spacing: -.01em; }
.study section { padding: 56px 0; border-top: 1px solid var(--line); }
.study section:first-of-type { margin-top: 56px; }
.study .cover { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.study .cover img:first-child { width: 100%; aspect-ratio: 431 / 287; object-fit: cover; }
.study .cover img:last-child { width: 100%; max-width: 417px; justify-self: end; }

.study .h-sm { font-weight: 700; font-size: 16px; line-height: 1.4; }
.study .h-md { font-weight: 700; font-size: 20px; line-height: 1.4; }
.study .h-lg { font-weight: 700; font-size: 24px; line-height: 1.4; }
.study .h-item { font-weight: 500; font-size: 16px; line-height: 1.4; }
.study .body { font-size: 14px; line-height: 1.6; }
.study .lead { font-weight: 300; font-size: 18px; line-height: 1.6; max-width: 714px; margin-top: 24px; }
.study .copy { font-weight: 300; font-size: 16px; line-height: 1.6; max-width: 714px; margin-top: 10px; }
.study .copy + .copy { margin-top: 1.6em; }
.study .h-sm + .body { margin-top: 16px; }
.study .h-md + .body, .study .h-md + ul { margin-top: 24px; }
.study ul.bullets { padding-left: 17px; }
.study ul.bullets li { font-size: 14px; line-height: 1.6; }
.study ul.bullets li + li { margin-top: 0; }
.study ul.bullets--lg li { font-size: 16px; line-height: 1.6; max-width: 714px; }

.study .chip { display: inline-flex; align-items: center; margin-top: 16px; height: 28px; padding: 0 10px; border: 1px solid var(--ink); border-radius: 100px; font-size: 14px; transition: background-color .25s, color .25s; }
.study .chip:hover { background: var(--ink); color: #fff; }

.study .grid-2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 111px; row-gap: 72px; }
.study .grid-2 > div:nth-child(even) { max-width: 505px; }
.study .grid-2 .body { max-width: 404px; }
.study .grid-2 > div:nth-child(4) .bullets { max-width: 505px; }
.study .points { margin-top: 56px; display: grid; gap: 48px; }
.study .points .h-item + .copy { margin-top: 12px; }

.study ol.step { margin-top: 56px; padding-left: 19px; }
.study ol.step:first-of-type { margin-top: 48px; }
.study ol.step > li { font-weight: 500; font-size: 16px; line-height: 1.4; }
.study ol.step .copy { margin-left: -19px; }

.study .fig { margin-top: 40px; }
.study .fig img { width: 100%; }
.study .fig--research { max-width: 763px; }
.study .fig--flow img { aspect-ratio: 1020 / 371; object-fit: cover; }
.study .pair { margin-top: 40px; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.study .pair--proto img:first-child { width: 38.3%; }
.study .pair--proto img:last-child { width: 55.8%; }
.study .pair--fallback img:first-child { width: 42.4%; }
.study .pair--fallback img:last-child { width: 40.3%; }
.study figcaption { margin-top: 24px; font-weight: 500; font-size: 16px; line-height: 1.2; }
.study figcaption.it { font-style: italic; }
.study .sub { margin-top: 48px; font-weight: 500; font-size: 16px; line-height: 1.2; }
.study .sub + .bullets { margin-top: 10px; }

.study .quotes { margin-top: 24px; display: grid; gap: 24px; font-family: var(--f-quote); font-size: 16px; line-height: 1.6; }
.study .screens { display: flex; justify-content: space-between; gap: 40px; margin-top: 72px; }
.study .screens img { width: 45.8%; aspect-ratio: 467 / 696; object-fit: cover; border-radius: 12px; }

/* ---------- 404 ---------- */
.notfound { min-height: 80vh; display: grid; place-items: center; text-align: center; padding: 160px 24px 80px; }
.notfound h1 { font-family: var(--f-display); font-weight: 500; font-size: 50px; letter-spacing: -3px; text-transform: uppercase; }
.notfound p { margin: 16px 0 32px; color: rgba(0,0,0,.7); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1199px) {
  .hero__foot { max-width: 960px; }
  .hero__cta { margin-right: 0; }
  .site-footer__cols { grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 32px; }
  .study .grid-2 { column-gap: 56px; }
}

@media (max-width: 809px) {
  :root { --header-h: 82px; }
  .site-header { padding: 16px; align-items: flex-start; }
  .logo { width: 50px; height: 50px; }
  .nav { flex-direction: column-reverse; align-items: flex-end; gap: 8px; padding-top: 10px; }
  .nav__links { flex-direction: column; align-items: flex-end; }
  .nav__links .pill { transform: translateY(-8px); background: #fff; box-shadow: 0 2px 14px rgba(0,0,0,.08); }
  .nav__links .pill--dark { background: var(--ink); }

  /* Hero */
  .hero { min-height: auto; padding: 160px 16px 80px; }
  .hero__title { font-size: 34px; letter-spacing: -2px; }
  .hero__lede { max-width: 300px; margin: 24px auto 0; }
  .hero__foot { margin-top: 56px; flex-direction: column; align-items: center; gap: 40px; }
  .hero__meta { gap: 32px; justify-content: center; text-align: left; }
  .hero__cta { order: -1; }

  /* Archive */
  .archive { grid-template-columns: 1fr; gap: 0; padding: 0 12px; }
  .archive__sticky { position: static; height: auto; max-height: none; padding: 40px 4px 32px; gap: 0; }
  .archive__pitch { display: none; }
  .archive__list { padding-top: 0; }
  .shot { aspect-ratio: 366 / 400; }
  .shot__desk { display: none; }
  .shot__rot { display: block; position: absolute; inset: 0; }
  .shot .desk-only { display: none; }
  .shot figcaption { left: 16px; bottom: 16px; }
  .archive__pitch--mobile { display: flex !important; flex-direction: column; align-items: center; text-align: center; padding: 48px 16px 0; }
  .archive__pitch--mobile p { max-width: 300px; }

  /* Cases */
  .cases { padding: 120px 12px 120px; }
  .cases .eyebrow { text-transform: none; font-weight: 400; font-family: var(--f-body); font-size: 18px; padding-left: 4px; }
  .cases__grid { grid-template-columns: 1fr; gap: 48px; margin-top: 24px; }
  .case__media { aspect-ratio: 342 / 222; }
  .case__title, .case .tags { padding-left: 4px; }
  .case__lock { opacity: 1; transform: none; }

  /* Footer */
  .site-footer__inner { padding: 56px 24px 0; }
  .site-footer__cols { grid-template-columns: 1fr; gap: 20px; }
  .wordmark { margin-top: 40px; }

  /* Case study */
  .study { padding: 120px 16px 80px; }
  .study h1 { font-size: 30px; }
  .study section { padding: 40px 0; }
  .study section:first-of-type { margin-top: 40px; }
  .study .cover, .study .grid-2 { grid-template-columns: 1fr; row-gap: 40px; }
  .study .cover img:last-child { justify-self: start; }
  .study .pair, .study .screens { flex-direction: column; gap: 24px; }
  .study .pair img, .study .screens img { width: 100% !important; }
  .study .lead { font-size: 17px; }

}
@media (min-width: 810px) {
  .archive__pitch--mobile { display: none; }
  .site-header { background: var(--bg); }
}
