/* ==========================================================================
   Josip Brekalo, portfolio
   Neutral ground and ink; colour comes only from the brands in the work.
   ========================================================================== */

/* Funnel Display and Funnel Sans: variable fonts served from this site, so no
   visitor data goes to a font CDN. SIL Open Font License 1.1, see
   assets/fonts/OFL-*.txt. */
@font-face {
  font-family: "Funnel Display";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/funnel-display-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Funnel Display";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/funnel-display-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;
}
@font-face {
  font-family: "Funnel Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/funnel-sans-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Funnel Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/funnel-sans-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 {
  --ground: #f5f5f3;
  --surface: #ffffff;
  --ink: #121416;
  --muted: #5b6166;
  --line: #dedfdb;
  --soft: #ecece8;

  --puresgp: #c21e4b;
  --mavosten: #142745;
  --mavosten-yellow: #fac800;

  --display: "Funnel Display", "Helvetica Neue", Arial, sans-serif;
  --text: "Funnel Sans", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 48px);
  --page: 1200px;
  --section-y: clamp(56px, 7vw, 88px);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.125rem/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}
.case :focus-visible,
.contact :focus-visible { outline-color: #fff; }

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}
.skip-link:focus { top: 12px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding-inline: 30px;
  border-radius: 999px;
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn--solid { background: var(--ink); color: #fff; }
.btn--solid:hover { background: #2b3034; }
.btn--outline { box-shadow: inset 0 0 0 2px var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--light { min-height: 60px; padding-inline: 34px; background: #fff; color: var(--ink); font-size: 1.125rem; }
.btn--light:hover { background: var(--soft); }
.btn--small { min-height: 44px; padding-inline: 20px; font-size: 1rem; font-weight: 600; }

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

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 24px;
}
.site-header__name {
  padding-block: 10px;
  font: 700 1.375rem/1 var(--display);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; }
.site-nav a:not(.btn) {
  padding-block: 12px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 5px; }

@media (max-width: 760px) {
  .site-nav a:not(.btn) { display: none; }
}

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

.hero { padding-bottom: 64px; }
.hero__grid {
  display: grid;
  gap: 48px 56px;
  align-items: center;
  padding-top: clamp(24px, 3.4vw, 48px);
}
.hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }
.hero__role { font-size: 1.0625rem; font-weight: 600; }
.hero h1 {
  font: 700 clamp(2.375rem, 4.5vw, 4rem)/1.02 var(--display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero__lead {
  max-width: 33em;
  font-size: clamp(1.125rem, 1.4vw, 1.25rem);
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__media { position: relative; padding-bottom: 48px; padding-right: 5%; }
.browser {
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 70px rgb(18 20 22 / 0.16);
}
.browser__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  background: var(--soft);
  font-size: 0.8125rem;
  line-height: 1;
  color: var(--muted);
}
.browser__dots { display: flex; gap: 6px; }
.browser__dots i { width: 9px; height: 9px; border-radius: 50%; background: #c9cac5; }
.browser img { width: 100%; aspect-ratio: 1440 / 900; object-fit: cover; object-position: top; }

.phone {
  overflow: hidden;
  border: 6px solid var(--ink);
  border-radius: 26px;
  background: #fff;
}
.phone img { width: 100%; aspect-ratio: 780 / 1688; object-fit: cover; object-position: top; }
.hero__phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 28%;
  box-shadow: 0 24px 60px rgb(18 20 22 / 0.22);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 28px 40px;
  margin-top: clamp(48px, 6vw, 80px);
}
.facts li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}
.facts strong { font: 700 2.75rem/1 var(--display); letter-spacing: -0.03em; }
.facts span { font-size: 1rem; line-height: 1.4; color: var(--muted); }

@media (min-width: 1000px) {
  .hero__grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
}

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

.section { padding-block: var(--section-y); }
.section--white { background: var(--surface); }
.section__inner { display: flex; flex-direction: column; gap: 48px; }
.section__inner--tight { gap: 40px; }

.section-title {
  font: 700 clamp(2.125rem, 4.4vw, 3.75rem)/1.02 var(--display);
  letter-spacing: -0.03em;
}

/* ---------- Work ---------- */

.work { padding-block: 40px var(--section-y); }
.work__inner { display: flex; flex-direction: column; gap: 32px; }
.work__head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 8px; }
.work__head p { max-width: 34em; color: var(--muted); }

.case {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3.4vw, 48px);
  padding: clamp(24px, 4.4vw, 64px);
  border-radius: 32px;
  background: var(--brand);
  color: #fff;
}
.case--puresgp { --brand: var(--puresgp); --figure: #fff; --body: rgb(255 255 255 / 0.93); }
.case--mavosten { --brand: var(--mavosten); --figure: var(--mavosten-yellow); --body: rgb(255 255 255 / 0.9); --phone-border: #3d5282; }

.case__head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 28px 64px; }
.case__title {
  flex: 3 1 420px;
  min-width: 0;
  font: 700 clamp(1.625rem, 3vw, 2.5rem)/1.08 var(--display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.case__facts {
  flex: 2 1 320px;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr));
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid rgb(255 255 255 / 0.4);
}
.case__facts li { display: flex; flex-direction: column; gap: 6px; }
.case__facts strong {
  font: 700 clamp(2rem, 3.4vw, 3rem)/1 var(--display);
  letter-spacing: -0.03em;
  color: var(--figure);
}
.case__facts span { font-size: 0.875rem; line-height: 1.35; color: var(--body); }

.story {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 24px 32px;
  font-size: 1.0625rem;
  line-height: 1.5;
}
.story dt { margin-bottom: 8px; font: 700 1.125rem/1.3 var(--display); color: var(--figure); }
.story dd { color: var(--body); }

.case__media { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.fig { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fig figcaption { font-size: 0.9375rem; line-height: 1.4; color: var(--body); }
.fig--compare { flex: 3 1 460px; }
.fig--stages { flex: 2 1 300px; }
.fig--phone { flex: 1 1 150px; max-width: 240px; }
.fig--phone .phone { border-color: var(--phone-border, var(--ink)); border-radius: 28px; }

.stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stage {
  position: relative;
  aspect-ratio: 1 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
}
.stage img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.stage__n {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
}

/* before / after comparison */
.ba {
  --pos: 50%;
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: var(--ar, 16 / 10);
  border-radius: 18px;
  background: #fff;
}
.ba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
}
.ba__before {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.ba__tag {
  position: absolute;
  top: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}
.ba__tag--before { left: 14px; background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.ba__tag--after { right: 14px; background: var(--ink); color: #fff; }
.ba__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--ink);
  pointer-events: none;
}
.ba__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 0 0 4px rgb(255 255 255 / 0.92);
}
.ba__knob svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ba__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}
.ba:has(.ba__range:focus-visible) .ba__knob { outline: 3px solid #fff; outline-offset: 4px; }

/* stores */
.stores { display: flex; flex-direction: column; gap: 20px; margin-top: 24px; }
.stores h3 {
  font: 700 clamp(1.375rem, 2.2vw, 1.75rem)/1.15 var(--display);
  letter-spacing: -0.015em;
}
.stores__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 16px;
}
.store {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border-radius: 22px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}
.store__head { display: flex; align-items: center; gap: 14px; }
.store__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}
.store__icon img { width: var(--s, 56px); height: var(--s, 56px); object-fit: contain; }
.store__icon--cover img { object-fit: cover; }
.store__name {
  display: block;
  font: 700 1.375rem/1.15 var(--display);
  letter-spacing: -0.015em;
}
.store__domain { display: block; margin-top: 2px; font-size: 0.9375rem; line-height: 1.3; color: var(--muted); }
.store p { font-size: 0.9375rem; line-height: 1.45; color: var(--muted); }
.stores__more { font-size: 1rem; line-height: 1.5; color: var(--muted); }

/* ---------- What I do ---------- */

.areas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 48px 40px;
}
.area { padding-top: 20px; border-top: 2px solid var(--ink); }
.area h3 { font: 700 1.5rem/1.2 var(--display); letter-spacing: -0.015em; }
.area__why { margin-top: 6px; font-size: 1rem; color: var(--muted); }

.bullets {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  font-size: 1.0625rem;
  line-height: 1.45;
}
.bullets li { position: relative; padding-left: 20px; }
.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--ink);
}

/* ---------- Experience ---------- */

.roles { border-bottom: 1px solid var(--line); }
.role {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 40px;
  padding-block: 26px;
  border-top: 1px solid var(--line);
}
.role__when { flex: 0 0 210px; font-size: 1rem; color: var(--muted); }
.role__where { flex: 1 1 260px; font: 700 1.5rem/1.2 var(--display); letter-spacing: -0.01em; }
.role__what { flex: 2 1 340px; min-width: 0; font-size: 1.0625rem; line-height: 1.5; color: var(--muted); }

.stack { display: flex; flex-direction: column; gap: 20px; }
.stack h3 { font: 700 1.25rem/1.3 var(--display); }
.stack__groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 28px 32px;
}
.stack__group h4 { margin-bottom: 12px; font-size: 1rem; font-weight: 600; line-height: 1.3; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.9375rem; font-weight: 500; line-height: 1; }
.chips li { padding: 11px 16px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- Reference ---------- */

.quote-lead p {
  max-width: 22em;
  font: 600 clamp(1.625rem, 3.4vw, 2.875rem)/1.14 var(--display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 24px 56px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.quotes p { max-width: 26em; font-size: 1.1875rem; line-height: 1.45; }
.reference figcaption { max-width: 44em; margin-top: 36px; font-size: 0.9375rem; line-height: 1.5; color: var(--muted); }

/* ---------- Contact and footer ---------- */

.contact { background: var(--ink); color: #fff; }
.contact__main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  padding-block: clamp(64px, 8vw, 112px);
}
.contact h2 {
  max-width: 12em;
  font: 700 clamp(2.375rem, 5.6vw, 5rem)/1 var(--display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.contact__main p {
  max-width: 32em;
  font-size: clamp(1.125rem, 1.5vw, 1.3125rem);
  line-height: 1.5;
  color: rgb(255 255 255 / 0.86);
}
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 40px;
  padding-block: 26px 34px;
  border-top: 1px solid rgb(255 255 255 / 0.24);
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgb(255 255 255 / 0.82);
}
.site-footer span:last-child { max-width: 44em; }

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

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