/* ==========================================================================
   Ihor Popel — portfolio
   Breakpoints (same as the original Framer site):
     Desktop  ≥ 1440px   → base styles
     Laptop   1280–1439  ┐
     Tablet    810–1279  ┘ → @media (max-width: 1439px)
     Mobile   ≤ 809px    → @media (max-width: 809px)
   ========================================================================== */

/* ---------- Fonts ---------- */

@font-face {
  font-family: "Aeonik";
  src: url("../assets/fonts/aeonik-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Aeonik";
  src: url("../assets/fonts/aeonik-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Arial tuned to Aeonik's metrics, so text doesn't jump while the webfont loads */
@font-face {
  font-family: "Aeonik Fallback";
  src: local("Arial");
  font-weight: 400;
  ascent-override: 98.63%;
  descent-override: 19.73%;
  line-gap-override: 0%;
  size-adjust: 101.39%;
}

@font-face {
  font-family: "Aeonik Fallback";
  src: local("Arial");
  font-weight: 500;
  ascent-override: 96.35%;
  descent-override: 19.27%;
  line-gap-override: 0%;
  size-adjust: 103.79%;
}

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

:root {
  --font: "Aeonik", "Aeonik Fallback", sans-serif;

  --color-bg: #fff;
  --color-text: #000;
  --color-muted: #aeb0b6;
  --color-card: #fdfdfd;
  --color-card-border: #efefef;
  --color-green: #00e35c;

  /* Layout (desktop) */
  --content-w: 1000px;
  --gap: 24px;
  --radius-card: 32px;
  --screen-w: 776px;      /* desktop screenshots inside cards */
  --radius-screen: 16px;
  --phone-w: 300px;       /* phone screenshots */
  --radius-phone: 30px;
  --card-h: 565px;
  --phone-card-h: 813px;

  /* Springs from the Framer original, approximated for browsers without linear() */
  --spring: cubic-bezier(0.3, 1.2, 0.5, 1);
  --spring-duration: 0.4s;
  --spring-cta: cubic-bezier(0.3, 1.15, 0.5, 1);
  --spring-cta-duration: 0.5s;
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    /* spring: duration 0.4s, bounce 0.2 (Framer default for hover states) */
    --spring: linear(0, 0.034, 0.117, 0.225, 0.344, 0.46, 0.569, 0.666, 0.748, 0.817, 0.872, 0.916, 0.949, 0.973, 0.99, 1.002, 1.009, 1.013, 1.015, 1.015, 1.014, 1.013, 1.011, 1.009, 1.008, 1.006, 1.005, 1.003, 1.002, 1.002, 1.001, 1.001, 1);
    /* spring: stiffness 400, damping 30, mass 1 (floating CTA) */
    --spring-cta: linear(0, 0.042, 0.142, 0.271, 0.408, 0.54, 0.658, 0.758, 0.839, 0.903, 0.95, 0.983, 1.006, 1.019, 1.026, 1.028, 1.028, 1.025, 1.021, 1.018, 1.014, 1.01, 1.007, 1.005, 1.003, 1.002, 1.001, 1, 1, 0.999, 0.999, 0.999, 1);
  }
}

/* Animatable gradient stops for the button shine */
@property --shine-from {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

@property --shine-to {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

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

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

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

img,
video,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

.sprite {
  position: absolute;
  overflow: hidden;
}

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

/* Hidden visually, still read by search engines and screen readers */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Page ---------- */

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding-top: 16px;
  overflow-x: clip;
}

.pattern {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 3.6;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Cards: Framer draws borders as an inner overlay on top of the content */
.card,
.shot {
  position: relative;
  background: var(--color-card);
}

.card::after,
.shot::after,
.stat--clover::after,
.media--outlined::after,
.btn::after,
.cta-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--color-card-border);
  border-radius: inherit;
  pointer-events: none;
}

/* ---------- Social links ---------- */

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

.social {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 14px;
  line-height: 18px;
  white-space: nowrap;
  transition: opacity var(--spring-duration) var(--spring);
}

.icon {
  flex: none;
  width: 16px;
  height: 16px;
}

@media (hover: hover) {
  .social:hover {
    opacity: 0.6;
  }
}

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

.btn {
  position: relative;
  display: block;
  flex: none;
  width: 136px;
  height: 40px;
  overflow: hidden;
  border-radius: 70px;
  font-size: 15px;
  line-height: 24px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.btn--dark {
  color: #fff;
  background: linear-gradient(96.8deg, #1a1d23 0%, #000 100%);
}

.btn--dark::after {
  border-color: #000;
}

.btn--light {
  color: #000;
  background: #ededed;
}

.btn--light::after {
  border-color: #eaeaeb;
}

.btn__label {
  position: absolute;
  top: 50%;
  left: 43%;
  transform: translate(-50%, -50%);
}

.btn--light .btn__label {
  left: 44%;
}

.btn__icon {
  position: absolute;
  top: calc(50% - 8px);
  left: calc(77.9412% - 8px);
  width: 16px;
  height: 16px;
}

/* Soft white highlight at the top of the button, it slides/grows on hover */
.btn__shine {
  position: absolute;
  left: 0;
  pointer-events: none;
  transition:
    transform var(--spring-duration) var(--spring),
    --shine-from var(--spring-duration) var(--spring),
    --shine-to var(--spring-duration) var(--spring);
}

.btn--dark .btn__shine {
  --shine-from: 0%;
  top: -21px;
  width: 136px;
  height: 43px;
  opacity: 0.2;
  background: linear-gradient(180deg, #fff var(--shine-from), rgb(255 255 255 / 0) 100%);
}

.btn--light .btn__shine {
  --shine-from: 29%;
  --shine-to: 83%;
  top: -23px;
  right: 0;
  height: 51px;
  background: linear-gradient(180deg, #fff var(--shine-from), rgb(255 255 255 / 0) var(--shine-to));
}

@media (hover: hover) {
  .btn--dark:hover .btn__shine {
    --shine-from: 23%;
    transform: translateY(16px);
  }

  .btn--light:hover .btn__shine {
    --shine-from: 49%;
    --shine-to: 100%;
  }
}

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

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 48px;
  width: 640px;
  padding-top: 8px;
}

.hero__cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  border-radius: 24px;
}

.intro {
  height: 244px;
}

.status {
  position: absolute;
  top: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  line-height: 18px;
  white-space: nowrap;
}

.status__dot {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
}

.status__dot::before,
.status__dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.status__dot::before {
  width: 12px;
  height: 12px;
  border: 0.5px solid var(--color-green);
  background: radial-gradient(50% 50%, rgb(0 227 92 / 0) 0%, rgb(0 227 92 / 0.2) 100%) border-box;
}

.status__dot::after {
  width: 6px;
  height: 6px;
  background: var(--color-green);
}

.intro__socials {
  position: absolute;
  top: 24px;
  right: 24px;
}

.intro__title {
  position: absolute;
  top: 112px;
  left: 24px;
  width: 220px;
  font-size: 32px;
  font-weight: 400;
  line-height: 36px;
}

.pitch {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 31px;
  min-height: 264px;
  padding: 24px;
}

.pitch__text {
  width: 462px;
  max-width: 100%;
  font-size: 32px;
  font-weight: 400;
  line-height: 36px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat {
  position: relative;
  flex: none;
  width: 300px;
  height: 300px;
}

.stat--clover {
  overflow: hidden;
}

.stat--clover::after {
  border: 0.5px solid #fff;
}

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

.stat--circle .stat__video {
  border-radius: 50%;
}

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

.project {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap);
  width: 100%;
  padding-top: 100px;
}

/* Everything below the heading shares one column width */
.project > :not(.project__head) {
  width: var(--content-w);
  max-width: calc(100% - 32px);
}

.project__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 352px;
  max-width: calc(100% - 16px);
  text-align: center;
}

.project--tradevision .project__head {
  padding-bottom: 16px;
}

.project__title {
  font-size: 16px;
  line-height: 1.2;
}

.project__desc {
  flex: none;
  width: var(--desc-w, 100%);
  color: var(--color-muted);
  font-size: 14px;
  line-height: 20px;
}

.project--tradevision { --desc-w: 508px; }
.project--inhub       { --desc-w: 510px; }
.project--furrend     { --desc-w: 392px; }
.project--pawa        { --desc-w: 482px; }

.project__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap);
  width: 100%;
}

/* Logo cards (SVG with their own background and border) */
.logo-card {
  width: 100%;
  height: auto;
}

/* Furrend cover (PNG with its own rounded card) */
.cover-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1.76991;
  object-fit: cover;
}

/* Card with a centred screenshot */
.shot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-card);
}

.shot--landing {
  aspect-ratio: 1.77305;
}

.shot--screen,
.shot--cover {
  height: var(--card-h);
}

/* Full-bleed image card (inhub icons) */
.shot--cover {
  background: none;
}

.shot--solo {
  padding: 82px 0;
}

.shot--dashboard {
  height: 610px;
}

/* Two cards in a row */
.split {
  display: flex;
  gap: var(--gap);
  width: 100%;
  height: 564px;
}

.split > .shot {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
}

.split--phones {
  height: var(--phone-card-h);
}

/* Screenshots */
.media {
  display: block;
  flex: none;
  height: auto;
  object-fit: cover;
}

.media--landing,
.media--screen,
.media--dashboard {
  width: var(--screen-w);
  max-width: calc(100% - 32px);
  border-radius: var(--radius-screen);
}

.media--landing   { aspect-ratio: 1.80886; }
.media--screen    { aspect-ratio: 1.80046; }
.media--dashboard { aspect-ratio: 1.58416; }

.media--half {
  width: 346px;
  aspect-ratio: 0.873737;
}

.media--half-alt {
  width: 347px;
  aspect-ratio: 0.876263;
}

.media--phone {
  width: var(--phone-w);
  aspect-ratio: 0.461823;
  border-radius: var(--radius-phone);
}

.media--outlined {
  position: relative;
  overflow: hidden;
}

.media--outlined::after {
  border-color: #ebebeb;
}

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

.media--fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

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

.about {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 130px 16px 189px;
  text-align: center;
}

.about__avatar {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  object-fit: cover;
}

.about__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
}

.about__name {
  font-size: 16px;
  line-height: 1.2;
}

.about__bio {
  width: 528px;
  max-width: 100%;
  color: var(--color-muted);
  font-size: 16px;
  line-height: 22.5px;
}

.about__socials {
  margin-top: 56px;
}

/* ---------- Floating CTA ---------- */

.cta-bar {
  position: fixed;
  bottom: 16px;
  left: calc(50% - 158px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 316px;
  height: 72px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 40px rgb(30 32 46 / 0.07);
  opacity: 0;
  visibility: hidden;
  transform: translateY(110px);
  transition:
    opacity var(--spring-cta-duration) var(--spring-cta),
    transform var(--spring-cta-duration) var(--spring-cta),
    visibility 0s var(--spring-cta-duration);
}

.cta-bar::after {
  border-color: #eaeaeb;
}

.cta-bar.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity var(--spring-cta-duration) var(--spring-cta),
    transform var(--spring-cta-duration) var(--spring-cta),
    visibility 0s;
}

/* ---------- 404 page ---------- */

.not-found {
  justify-content: center;
  padding: 16px;
}

.not-found__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 31px;
  width: 640px;
  max-width: 100%;
  padding: 24px;
}

.not-found__code {
  color: var(--color-muted);
  font-size: 14px;
  line-height: 18px;
}

.not-found__title {
  font-size: 32px;
  font-weight: 400;
  line-height: 36px;
}

/* Button that sizes to its label (the regular ones are fixed at 136px) */
.btn--auto {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: auto;
  padding: 0 22px 0 23px;
}

.btn--auto .btn__label,
.btn--auto .btn__icon {
  position: static;
  transform: none;
}

.btn--auto .btn__shine {
  right: 0;
  width: auto;
}

/* ==========================================================================
   Laptop & tablet: 810–1439px
   ========================================================================== */

@media (max-width: 1439px) {
  :root {
    --content-w: 750px;
    --screen-w: 640px;
    --phone-w: 270px;
    --card-h: 450px;
    --phone-card-h: 690px;
  }

  .shot--landing {
    aspect-ratio: auto;
    height: 450px;
  }

  .split {
    height: 450px;
  }

  /* re-declared so the rule above doesn't override it */
  .split--phones {
    height: var(--phone-card-h);
  }

  .media--half,
  .media--half-alt {
    width: 300px;
  }

  .cover-image {
    border-radius: 32px;
  }

  .shot--solo {
    padding: 64px 0;
  }

  .shot--dashboard {
    height: auto;
    padding: 48px 0;
  }

  .about {
    padding-bottom: 166px;
  }

  .about__socials {
    margin-top: 46px;
  }
}

@media (max-width: 1279px) {
  .about {
    padding-bottom: 162px;
  }
}

/* ==========================================================================
   Mobile: ≤ 809px
   ========================================================================== */

@media (max-width: 809px) {
  :root {
    --content-w: 343px;
    --gap: 16px;
    --radius-card: 20px;
    --screen-w: 311px;
    --radius-screen: 8px;
    --phone-w: 130px;
    --radius-phone: 10px;
  }

  /* Hero */
  .hero {
    width: 100%;
    padding: 0 16px;
  }

  .intro {
    height: 300px;
  }

  .intro__socials {
    top: 258px;
    right: auto;
    left: 24px;
    gap: 16px;
  }

  .intro__title {
    top: 125px;
  }

  .pitch {
    min-height: 299px;
  }

  .pitch__text {
    width: 298px;
  }

  .desktop-br {
    display: none;
  }

  .actions {
    width: 100%;
  }

  .actions .btn {
    flex: 1 1 0;
    width: auto;
  }

  .stat {
    flex: 1 1 0;
    width: auto;
    height: auto;
    aspect-ratio: 1;
  }

  /* Projects */
  .project {
    padding-top: 70px;
  }

  .project--pawa {
    padding-top: 80px;
  }

  .project--inhub {
    gap: 24px;
  }

  .project__desc {
    --desc-w: 100%;
  }

  .project--tradevision .logo-card {
    aspect-ratio: 343 / 193;
  }

  .shot--landing {
    height: auto;
    aspect-ratio: 1.66667;
    border-radius: 21px;
  }

  .shot--screen,
  .shot--cover {
    height: auto;
    aspect-ratio: 1.66667;
  }

  .split {
    align-items: flex-start;
    height: auto;
    aspect-ratio: 1.77305;
  }

  .split > .shot {
    height: 190px;
  }

  .media--half,
  .media--half-alt {
    width: 130px;
    border-radius: 10px;
  }

  .split--phones {
    aspect-ratio: auto;
  }

  .split--phones > .shot {
    height: auto;
    padding: 21px 0;
  }

  .cover-image {
    border-radius: 20px;
  }

  .shot--solo {
    padding: 32px 0;
  }

  .shot--dashboard {
    padding: 16px 0;
  }

  /* About */
  .about {
    padding: 100px 16px 140px;
  }

  .about__bio {
    width: 307px;
  }

  .about__socials {
    margin-top: 50px;
    gap: 16px;
  }
}

/* Very narrow phones (< 360px): keep the button label and arrow from overlapping */
@media (max-width: 359px) {
  .actions .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }

  .actions .btn__label,
  .actions .btn__icon {
    position: static;
    transform: none;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
  }
}
