/* =========================================================================
   Portfolio Home — Vladyslav Ovod
   Bespoke landing page. Reuses shared/case.css tokens + reset; this file
   carries the home-specific layout and the orange/blue marketing accents.
   ========================================================================= */

:root {
  --home-orange: #f54900;          /* Contact pill */
  --home-ink-soft: #b2b8c1;        /* muted headline grey */
  --home-recent-bg: #e8eaf0;       /* recent-work card */
  --home-nav-bg: rgba(45, 91, 255, 0.09);
  --home-lock-bg: #162b62;         /* DesignOps locked thumb */
  --home-max: 1440px;
  --home-pad: 89px;
}

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

/* ---------- shared wrappers ---------- */
.wrap { max-width: var(--home-max); margin: 0 auto; padding-left: var(--home-pad); padding-right: var(--home-pad); }

/* =========================================================================
   HERO
   ========================================================================= */
.hero-home { position: relative; width: 100%; height: 790px; background: #fdfefe; overflow: hidden; }
.hero-home__inner {
  position: relative;
  z-index: 1;
  max-width: var(--home-max);
  margin: 0 auto;
  height: 100%;
}

/* brand (top-left) — constrained so the role wraps to two lines like the design */
.brand { position: absolute; left: var(--home-pad); top: 40px; max-width: 290px; line-height: 1.05; }
.brand__name { font-family: var(--sans); font-weight: 500; font-size: 20px; color: #0a0a0a; }
.brand__role { font-family: var(--sans); font-weight: 500; font-size: 20px; color: var(--home-ink-soft); }

/* pill nav — centered, overlaying the hero (pill styles live in shared/case.css) */
.hero-home .navpills { position: absolute; left: 50%; transform: translateX(-50%); top: 30px; z-index: 2; }

/* headline (two-tone) */
.hero-headline {
  position: absolute; left: var(--home-pad); top: 395px; width: 607px;
  font-family: var(--sans); font-weight: 500; font-size: 45px; line-height: 1.05;
  letter-spacing: -0.02em; color: var(--home-ink-soft);
}
.hero-headline .lead { color: var(--accent); }

/* recent-work card */
.recent-card {
  position: absolute; left: var(--home-pad); top: 618px;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--home-recent-bg); border-radius: 9px; padding: 13.5px;
}
.recent-card__thumb {
  width: 125px; height: 76px; flex: none;
  border: 1px solid var(--accent); border-radius: 7px; overflow: hidden;
}
.recent-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-card__text { display: flex; flex-direction: column; gap: 4px; width: 319px; }
.recent-card__kicker { font-family: var(--sans); font-weight: 500; font-size: 22px; line-height: 1.05; color: var(--accent); }
.recent-card__title { font-family: var(--sans); font-weight: 500; font-size: 22px; line-height: 1.05; color: #0a0a0a; }

/* portrait — keeps its design position inside the centered 1440 inner; the full-width
   hero (overflow:hidden) clips at the viewport edge, so on screens >1440 it continues
   past the inner instead of being cropped at 1440. */
.hero-portrait { position: absolute; top: -23px; right: -385px; width: 1327px; height: auto; z-index: 0; pointer-events: none; }
.hero-portrait img { width: 100%; height: auto; display: block; }

/* =========================================================================
   SELECTED OUTCOMES (blue band)
   ========================================================================= */
.stats { width: 100%; background: var(--accent); }
.stats__inner {
  max-width: var(--home-max); margin: 0 auto; padding: 63px 90px;
  display: flex; flex-direction: column; gap: 36px;
}
.stats__label {
  font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase; color: #fdfefe;
}
.stats__row { display: flex; justify-content: space-between; gap: 24px; }
.stat { width: 217px; flex: none; border-left: 1px solid #fff; padding-left: 23px; }
.stat__num { font-family: var(--mono); font-weight: 500; font-size: 47px; line-height: 1; color: #fff; white-space: nowrap; }
.stat__num .sp { font-size: 15px; }   /* tight spaces around the arrow, per the design */
.stat__desc { font-family: var(--sans); font-weight: 400; font-size: 15px; line-height: 1.33; color: #fff; margin-top: 14px; }

/* =========================================================================
   WORK (featured + grid)
   ========================================================================= */
.work { max-width: var(--home-max); margin: 0 auto; padding: 71px var(--home-pad) 72px; display: flex; flex-direction: column; gap: 25px; }

/* featured cards */
.featured { display: flex; flex-direction: column; gap: 25px; }
.feat-card {
  display: flex; align-items: stretch;
  border: 1px solid #0a0a0a; border-radius: 17px; overflow: hidden; min-height: 400px;
}
.feat-card__img { width: 694px; flex: none; overflow: hidden; }
.feat-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feat-card__text {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: 42px;
}
.feat-card--reverse .feat-card__img { border-left: 1px solid #0a0a0a; }
.feat-card:not(.feat-card--reverse) .feat-card__text { border-left: 1px solid #0a0a0a; }
.feat-card__num { font-family: var(--sans); font-weight: 600; font-size: 67px; line-height: 1; color: #0a0a0a; }
.feat-card__body { display: flex; flex-direction: column; gap: 6px; }
.feat-card__title { font-family: var(--sans); font-weight: 600; font-size: 29px; line-height: 1.21; color: #0a0a0a; max-width: 484px; }
.feat-card__meta { font-family: var(--mono); font-weight: 400; font-size: 13.5px; color: #000; }
.feat-card__link { font-family: var(--mono); font-weight: 400; font-size: 12.5px; color: var(--accent); margin-top: 6px; }

/* grid cards */
.work-grid { display: flex; gap: 25px; }
.grid-card {
  flex: 1 1 0; min-width: 0;
  border: 1px solid #0a0a0a; border-radius: 15px; overflow: hidden;
  display: flex; flex-direction: column;
}
.grid-card__thumb { position: relative; aspect-ratio: 403.84 / 231.37; overflow: hidden; }
.grid-card__thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.grid-card__footer { padding: 18.93px; display: flex; flex-direction: column; gap: 4px; }
.grid-card__title { font-family: var(--sans); font-weight: 500; font-size: 18px; line-height: 1.29; color: #0a0a0a; }
.grid-card__meta { font-family: var(--mono); font-weight: 400; font-size: 12.5px; color: #000; }

/* locked (DesignOps) thumb */
.grid-card__thumb--locked { background: var(--home-lock-bg); }
.grid-card__thumb--locked .locked-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(28px); opacity: 0.9; transform: scale(1.2); }
.grid-card__lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.grid-card__lock img { width: 34px; height: 34px; }

/* motion thumb (4 pastel scenes on a blue→light gradient) */
.grid-card__thumb--motion { background: linear-gradient(178deg, #355adb 0%, #f4f6fb 92%); display: flex; align-items: center; justify-content: center; }
.motion-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 64%; }
.motion-tile { position: relative; overflow: hidden; aspect-ratio: 119 / 100; border-radius: 9px; }
.motion-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.motion-tile--1 { background: linear-gradient(150deg, #eaf3ff, #dbe8ff); }
.motion-tile--2 { background: linear-gradient(150deg, #ecfbe9, #d8f5d4); }
.motion-tile--3 { background: linear-gradient(150deg, #fdf7e6, #fbeecb); }
.motion-tile--4 { background: linear-gradient(150deg, #fbeafb, #f3d9f5); }

/* =========================================================================
   CONTACT / FOOTER (blue)
   ========================================================================= */
.contact { position: relative; width: 100%; background: var(--accent); overflow: hidden; }
.contact__inner { position: relative; z-index: 2; max-width: var(--home-max); margin: 0 auto; padding: 70px var(--home-pad) 0; min-height: 357px; }
.contact__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 48px; }
.contact__cta { font-family: var(--sans); font-weight: 500; font-size: 45px; line-height: 1.05; letter-spacing: -0.02em; color: #fff; max-width: 647px; }
.contact__right { display: flex; flex-direction: column; align-items: flex-end; gap: 26px; }
.contact__email { font-family: var(--sans); font-weight: 500; font-size: 45px; line-height: 1.05; letter-spacing: -0.02em; color: #fff; text-align: right; }
.contact__links { display: flex; gap: 26px; align-items: center; font-family: var(--mono); font-weight: 400; font-size: 13.5px; color: #fff; }
.contact__links a:hover { text-decoration: none; }
/* arrow-nudge on hover (no underline) — used by footer links & the About CTA */
.lnk-arr { display: inline-block; transition: transform .18s ease; will-change: transform; }
a:hover .lnk-arr { transform: translateX(4px); }
.contact__bottom { margin-top: 46px; display: flex; flex-direction: column; gap: 22px; }
.contact__rule { width: 100%; height: 1px; background: #fff; }
.contact__meta { display: flex; align-items: center; justify-content: space-between; gap: 24px; font-family: var(--mono); font-weight: 400; font-size: 12px; color: #fff; }

/* giant soft-light wordmark at the very bottom */
.contact__wordmark { position: absolute; left: 50%; transform: translateX(-50%); bottom: -34px; width: 1440px; max-width: none; z-index: 1; mix-blend-mode: soft-light; pointer-events: none; }
.contact__wordmark img { display: block; width: 100%; height: auto; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 1240px) {
  :root { --home-pad: 48px; }
  .hero-home { height: auto; }
  .hero-home__inner { height: auto; padding-bottom: 56px; }
  .brand { position: static; max-width: none; padding: 32px var(--home-pad) 0; }
  .hero-home .navpills { position: static; transform: none; display: flex; width: fit-content; margin: 20px auto 0; }
  .hero-headline { position: static; width: auto; max-width: 620px; margin: 56px var(--home-pad) 0; font-size: 38px; }
  .recent-card { position: static; margin: 28px var(--home-pad) 0; }
  .recent-card__text { width: auto; }
  .hero-portrait { display: none; }

  .stats__inner { padding: 48px var(--home-pad); }
  .stats__row { flex-wrap: wrap; gap: 32px 24px; }
  .stat { flex: 1 1 40%; width: auto; }

  .feat-card { flex-direction: column; min-height: 0; }
  .feat-card--reverse { flex-direction: column-reverse; }
  .feat-card__img { width: 100%; aspect-ratio: 694 / 400; border-left: none !important; }
  .feat-card:not(.feat-card--reverse) .feat-card__text { border-left: none; border-top: 1px solid #0a0a0a; }
  .feat-card--reverse .feat-card__img { border-left: none; border-top: 1px solid #0a0a0a; }
  .feat-card__num { font-size: 48px; }
  .feat-card__title { font-size: 24px; }

  .work-grid { flex-wrap: wrap; }
  .grid-card { flex-basis: calc(50% - 13px); }

  .contact__top { flex-direction: column; gap: 32px; }
  .contact__right { align-items: flex-start; }
  .contact__email, .contact__cta { font-size: 34px; }
  .contact__wordmark { width: 1100px; }
}

@media (max-width: 680px) {
  :root { --home-pad: 20px; }
  .stat { flex-basis: 100%; }
  .stat__num { font-size: 34px; }
  .hero-headline { font-size: 32px; }
  .recent-card { display: flex; }
  .work-grid { flex-direction: column; }
  /* column flex: flex-basis/grow/shrink act on HEIGHT and squash the cards —
     make each card its natural height (thumb aspect-ratio + footer) at full width */
  .grid-card { flex: none; width: 100%; }
  .contact__meta { flex-direction: column; align-items: flex-start; gap: 10px; }
  .contact__links { flex-wrap: wrap; }
  .contact__wordmark { width: 760px; bottom: -16px; }
}
