/* The live homepage below the presentation (home.js): the same sections, text and links as
   iankoncevich.com, redrawn in the presentation's style: black page, light text, Arial headings,
   Reddit Mono labels and white pill buttons. Everything is scoped to .home. */

/* --- The layer the content lives in --------------------------------------------------------- */
/* While presenting, the page itself never scrolls, so the content gets its own scrolling layer over
   the slides. It starts one screen down (.home-gap), so the slides show until it is scrolled in;
   at the top it lets every click and scroll through to the slides. */
html.is-presenting .home-scroll {
  position: fixed;
  inset: 0;
  /* Above the narrator, so the content slides over it; the header (below) stays on top. */
  z-index: 6;
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: none;
  scrollbar-color: #3a3a3a transparent;
}
html.is-reading .home-scroll { pointer-events: auto; }
.home-gap { display: none; }
html.is-presenting .home-gap { display: block; height: 100%; }
html.is-presenting .home {
  border-top: 1px solid var(--edge);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, .55);
}

/* While the content is in view, the narration controls step aside and the header turns solid. */
.narrator, .pager, .elastic, .sources { transition: opacity .35s ease, visibility 0s linear 0s; }
html.is-reading :is(.narrator, .pager, .elastic, .sources) { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .35s ease, visibility 0s linear .35s; }
html.is-presenting .site-header { z-index: 8; transition: background-color .3s ease, border-color .3s ease; }
html.is-covered .site-header { background: rgba(0, 0, 0, .86); border-bottom-color: var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

/* Every slide switched off in the admin: no slide controls, just the page's sections. */
html.no-slides :is(#story, .skip-link, .pager, .narrator, .sources, .elastic, .home-hint) { display: none !important; }

/* "See my portfolio ↓": on the last slide (normally Book a call), bottom left, level with the slide counter. */
.home-hint { display: none; }
html.is-presenting.is-last-slide:not(.is-reading) .home-hint {
  position: fixed;
  left: var(--gutter);
  bottom: 18px;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  animation: home-hint-in .6s ease 1.2s both;
}
.home-hint:hover { color: var(--ink); }
.home-hint span { display: inline-block; animation: home-hint-arrow 1.6s ease-in-out infinite; }
@keyframes home-hint-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes home-hint-arrow { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }

/* --- Base ------------------------------------------------------------------------------------ */
.home {
  --surface: #0b0b0b;
  --edge: #262626;
  --soft: #bdbdbd;
  --live: #5ee08f;
  position: relative;
  background: var(--paper);
  color: var(--ink);
  outline: none;
}
.home :is(h3, ul, ol, dl, dd, figure) { margin: 0; }
.home :is(ul, ol) { padding: 0; list-style: none; }
.home img { max-width: 100%; }
.home p { color: var(--soft); line-height: 1.6; }
.home strong { font-weight: 600; }
.home h3 { font-size: clamp(1.2rem, 1.5vw, 1.5rem); font-weight: 500; letter-spacing: -.025em; line-height: 1.2; }
.home .wrap { width: 100%; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.home .section { padding: clamp(80px, 10vw, 150px) 0; border-top: 1px solid var(--line); }
/* The first block (normally the portfolio) starts clear of the header. */
.home > :is(.section, .hero, .talk):first-child { padding-top: calc(var(--header-height) + clamp(48px, 6vw, 100px)); border-top: 0; }

/* Small labels in Reddit Mono, as on the slides. */
.home :is(.kicker, .label, .contact-tiles span, .duration) {
  font-family: "Reddit Mono", ui-monospace, Menlo, monospace;
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.home .kicker { margin-bottom: 20px; }

/* Buttons: the slides' white pill, and an outlined one beside it. */
.home .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, scale .3s cubic-bezier(.3, 1.5, .5, 1);
}
.home .btn-lg { min-height: 58px; padding: 0 30px; font-size: 1.125rem; }
.home :is(.btn-accent, .btn-dark) { color: #000; background: var(--ink); }
.home :is(.btn-accent, .btn-dark):hover { background: #fff; scale: 1.03; }
.home .btn-outline { color: var(--ink); border-color: #3a3a3a; }
.home .btn-outline:hover { border-color: var(--ink); }

/* Text links with an arrow. */
.home :is(.link-arrow, .card-link) {
  align-self: flex-start;
  padding-bottom: 4px;
  border-bottom: 1px solid #3a3a3a;
  font-size: .9375rem;
  color: var(--ink);
  white-space: nowrap;
  transition: border-color .2s ease;
}
.home :is(.link-arrow, .card-link):hover { border-color: var(--ink); }

/* Cards: near-black panels with a hairline edge that lights up on hover. */
.home :is(.now-card, .video-card, .work-card, .contact-tiles a) {
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color .25s ease;
}
.home :is(.now-card, .work-card, .contact-tiles a):hover { border-color: #3a3a3a; }

/* Section heads: kicker and title on the left, a link on the right. */
.home .section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(40px, 5vw, 72px); }

/* --- Hero (the intro block, after the portfolio) --------------------------------------------- */
.home .hero { border-top: 1px solid var(--line); }
.home .hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(36px, 6vw, 96px);
  padding-top: clamp(80px, 10vw, 150px);
  padding-bottom: clamp(80px, 10vw, 150px);
}
.home .hero-id { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.home .avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; filter: grayscale(1); }
.home .hero h1 { margin: 0; font-size: clamp(3.25rem, 7.2vw, 8rem); font-weight: 500; line-height: .98; letter-spacing: -.065em; }
.home .hero-role {
  margin-top: 22px;
  font-family: "Reddit Mono", ui-monospace, Menlo, monospace;
  font-size: clamp(.8125rem, 1vw, .9375rem);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
}
.home .hero-promise { max-width: 16em; margin-top: 34px; font-size: clamp(1.75rem, 2.9vw, 2.9rem); line-height: 1.08; letter-spacing: -.045em; color: var(--ink); }
.home .hero-lead { max-width: 560px; margin-top: 22px; font-size: clamp(1rem, 1.2vw, 1.125rem); }
.home .hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.home .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 56px; border-top: 1px solid var(--line); }
.home .stats li { padding: 24px 20px 0 0; font-size: .875rem; line-height: 1.5; color: var(--muted); }
.home .stats li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.home .stats strong { display: block; margin-bottom: 6px; font-size: clamp(1.75rem, 2.6vw, 2.6rem); font-weight: 500; letter-spacing: -.045em; color: var(--ink); }

.home .now-card { display: block; overflow: hidden; border-radius: 28px; }
.home .now-img { display: block; overflow: hidden; }
.home .now-img img { display: block; width: 100%; height: auto; transition: scale .6s cubic-bezier(.2, .8, .2, 1); }
.home .now-card:hover .now-img img { scale: 1.025; }
.home .now-body { display: grid; gap: 10px; padding: 24px 28px 30px; }
.home .now-body .label { display: inline-flex; align-items: center; gap: 10px; color: #bdbdbd; }
.home .now-body .label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(94, 224, 143, .5); animation: home-live 2s ease-out infinite; }
@keyframes home-live { 70%, 100% { box-shadow: 0 0 0 8px rgba(94, 224, 143, 0); } }
.home .now-body strong { font-size: clamp(1.6rem, 2.2vw, 2.1rem); font-weight: 500; letter-spacing: -.04em; }
.home .now-body .desc { font-size: .9375rem; line-height: 1.55; color: var(--soft); }

/* --- Track record: two videos, then the Upwork numbers ---------------------------------------- */
.home .section-lead { max-width: 620px; margin-top: 20px; font-size: clamp(1rem, 1.2vw, 1.125rem); }
.home .proof-videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.home .video-card { padding: 12px 12px 6px; border-radius: 28px; }
.home .video-card h3 { margin: 16px 10px 12px; }

/* Click-to-play videos (home.js swaps the picture for the player). */
.home .facade { position: relative; display: block; overflow: hidden; border-radius: 18px; aspect-ratio: 16 / 9; background: #111; }
.home .facade img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.home .facade::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .25); transition: background-color .2s ease; }
.home .facade:hover::after { background: rgba(0, 0, 0, .08); }
.home .facade .play { position: absolute; left: 50%; top: 50%; z-index: 1; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--ink); transform: translate(-50%, -50%); box-shadow: 0 0 0 0 rgba(244, 244, 244, .3); transition: transform .3s cubic-bezier(.3, 1.5, .5, 1); animation: home-play 2.2s ease-in-out infinite; }
.home .facade:hover .play { transform: translate(-50%, -50%) scale(1.07); }
.home .facade .play svg { width: 30px; height: 30px; margin-left: 3px; }
@keyframes home-play { 50% { box-shadow: 0 0 0 14px rgba(244, 244, 244, 0); } }
.home .facade .duration { position: absolute; right: 12px; bottom: 12px; z-index: 1; padding: 4px 10px; border-radius: 999px; color: var(--ink); background: rgba(0, 0, 0, .72); }
.home .facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.home .facade.is-playing::after { display: none; }

.home .trust { margin-top: clamp(56px, 7vw, 96px); }
.home .trust ul { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.home .trust li { padding: 26px 18px 26px 0; font-size: .875rem; line-height: 1.45; color: var(--muted); }
.home .trust li + li { padding-left: 22px; border-left: 1px solid var(--line); }
.home .trust strong { display: block; margin-bottom: 6px; font-size: clamp(1.5rem, 2.3vw, 2.3rem); font-weight: 500; letter-spacing: -.045em; color: var(--ink); }

/* Selected products: four cards in a row, each with its client review in a same-size white frame,
   so the cards line up whatever the screenshot's shape. */
.home .subhead { margin-top: clamp(80px, 9vw, 130px); margin-bottom: clamp(32px, 4vw, 52px); }
.home .subhead h2 { font-size: clamp(2.2rem, 3.4vw, 3.8rem); }
.home .subhead p { max-width: 620px; margin-top: 18px; font-size: clamp(1rem, 1.2vw, 1.125rem); }
.home .work-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.4vw, 22px); }
.home .work-card { display: flex; flex-direction: column; gap: 12px; padding: 10px 10px 22px; border-radius: 24px; }
.home .work-card > :not(.work-thumb) { margin-left: 10px; margin-right: 10px; }
.home .work-thumb { display: block; overflow: hidden; margin-bottom: 6px; border-radius: 16px; aspect-ratio: 4 / 3; background: #111; }
.home .work-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale .6s cubic-bezier(.2, .8, .2, 1); }
.home .work-card:hover .work-thumb img { scale: 1.03; }
.home .work-card .tags { font-family: "Reddit Mono", ui-monospace, Menlo, monospace; font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.5; }
.home .work-card h3 { font-size: clamp(1.1rem, 1.35vw, 1.35rem); }
.home .work-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.home .work-card > p { flex: 1; font-size: .875rem; line-height: 1.55; }
.home .review-shot { display: block; overflow: hidden; border-radius: 12px; aspect-ratio: 2.78; background: #fff; opacity: .92; transition: opacity .2s ease; }
.home .review-shot:hover { opacity: 1; }
.home .review-shot img { display: block; width: 100%; height: 100%; object-fit: contain; }
.home .work-card .card-link { margin-top: 4px; font-size: .875rem; }

/* --- Let's talk + footer ----------------------------------------------------------------------- */
.home .talk { padding-top: clamp(72px, 8vw, 120px); border-top: 1px solid var(--line); }
.home .talk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.home .talk h2 { font-size: clamp(3.25rem, 7.2vw, 8rem); line-height: 1; letter-spacing: -.065em; }
.home .talk-lead { max-width: 600px; margin-top: 24px; font-size: clamp(1.1rem, 1.5vw, 1.4rem); line-height: 1.5; }
.home .talk-actions .btn { min-height: 64px; padding: 0 34px; font-size: clamp(1.1rem, 1.5vw, 1.4rem); animation: home-cta 2.2s ease-in-out 1s infinite; }
@keyframes home-cta { 0%, 100% { box-shadow: 0 0 0 0 rgba(244, 244, 244, .28); } 50% { box-shadow: 0 0 0 12px rgba(244, 244, 244, 0); } }
.home .contact-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(56px, 7vw, 96px); }
.home .contact-tiles a { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; min-height: 150px; padding: 24px 26px; border-radius: 22px; }
.home .contact-tiles strong { font-size: clamp(1.05rem, 1.4vw, 1.35rem); font-weight: 500; letter-spacing: -.02em; overflow-wrap: anywhere; }
/* The cal.com calendar at the very bottom (it draws its own card); the space is held while it loads. */
.home .booking { margin-top: clamp(56px, 7vw, 96px); }
.home .booking-calendar { width: 100%; min-height: 600px; }
.home .site-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-top: clamp(72px, 9vw, 130px); padding: 28px 0 36px; border-top: 1px solid var(--line); font-size: .8125rem; line-height: 1.5; color: var(--muted); }
.home .site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.home .site-footer a { transition: color .2s ease; }
.home .site-footer a:hover { color: var(--ink); }

/* --- Narrower windows ------------------------------------------------------------------------ */
@media (max-width: 1100px) {
  .home .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .home .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home .trust ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home .trust li:nth-child(4n + 1) { padding-left: 0; border-left: 0; }
}
@media (max-width: 760px) {
  .home .section-head, .home .talk-head { flex-direction: column; align-items: flex-start; }
  .home .stats, .home .proof-videos, .home .work-grid, .home .contact-tiles { grid-template-columns: minmax(0, 1fr); }
  .home .stats li, .home .stats li + li { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .home .trust ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home .trust li:nth-child(n) { padding-left: 0; border-left: 0; }
  .home .trust li:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--line); }
  .home .site-footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .home *, .home-hint, .home-hint span { transition-duration: .01s !important; animation: none !important; }
}
