@font-face {
  font-family: "Yael";
  src: url("assets/fonts/OHYaelLeibushor2.0-Regular.woff2") format("woff2");
  font-display: swap;
}

:root {
  --red: #A3161C;
  --red-deep: #7E0F14;
  --beige: #F4ECE4;
  --beige-dark: #E8DCD0;
  --ink: #2B1414;
  --phone: #141012;
  --gutter: clamp(16px, 5vw, 64px);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --display: "Karantina", "Assistant", sans-serif;
  --hand: "Yael", "Assistant", cursive;
  --body: "Assistant", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--beige);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }

/* ---------- shared type ---------- */
.hand {
  font-family: var(--hand);
  font-size: clamp(60px, 8vw, 104px);
  line-height: 1;
  margin: 0 0 -.12em;
}
.display {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(96px, 15vw, 200px);
  line-height: .82;
  margin: 0;
}
.head { text-align: center; }

/* heading reveal: one orchestrated move per section */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.hand { transition-delay: .12s; }
.is-in .reveal, .reveal.is-in { opacity: 1; transform: none; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  color: var(--red);
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease), color .4s var(--ease);
}
.nav.is-scrolled { background: rgb(244 236 228 / .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgb(43 20 20 / .08); }
.nav__logo { font-family: var(--hand); font-size: 34px; text-decoration: none; line-height: 1; }
.nav__links { display: flex; gap: clamp(20px, 3vw, 40px); }
.nav__links a { text-decoration: none; font-weight: 600; font-size: 18px; position: relative; padding: 4px 0; }
.nav__links a::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__toggle { display: none; }

@media (max-width: 760px) {
  .nav__toggle {
    display: grid; place-content: center; gap: 7px; width: 44px; height: 44px;
    background: none; border: 0; position: relative; z-index: 2;
  }
  .nav__toggle span { display: block; width: 26px; height: 2.5px; background: currentColor; border-radius: 2px; transition: transform .4s var(--ease); }
  .nav.is-open .nav__toggle span:first-child { transform: translateY(4.75px) rotate(45deg); }
  .nav.is-open .nav__toggle span:last-child { transform: translateY(-4.75px) rotate(-45deg); }
  .nav__links {
    position: fixed; inset: 0; background: var(--red); color: var(--beige);
    flex-direction: column; align-items: center; justify-content: center; gap: 18px;
    clip-path: circle(0 at calc(100% - 0px) 0); visibility: hidden;
    transition: clip-path .6s var(--ease), visibility 0s .6s;
  }
  .nav.is-open .nav__links { clip-path: circle(150% at 100% 0); visibility: visible; transition: clip-path .6s var(--ease); }
  .nav.is-open { color: var(--beige); }
  .nav.is-open.is-scrolled { background: transparent; box-shadow: none; backdrop-filter: none; }
  .nav__links a { font-family: var(--display); font-size: 64px; line-height: 1; font-weight: 700; }
}

/* ---------- 1. about ---------- */
.about {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: end;
  gap: 24px;
  padding: 96px var(--gutter) 0;
  color: var(--red);
}
.about__text { align-self: center; padding-bottom: 6vh; }
.about .hand { font-size: clamp(66px, 8.4vw, 116px); }
.about .display { font-size: clamp(110px, 15vw, 230px); }
.typer {
  margin: 28px 0 0;
  font-size: clamp(24px, 2.6vw, 36px);
  color: var(--ink);
  min-height: 1.5em;
}
.typer__lead { margin-left: .25em; }
.typer__word { color: var(--red); font-weight: 700; }
.typer__cursor {
  display: inline-block; width: 3px; height: 1.05em; background: var(--red);
  vertical-align: -.15em; margin-right: 3px;
  animation: blink 1s steps(1) infinite;
}
.typer.is-typing .typer__cursor { animation: none; }
@keyframes blink { 50% { opacity: 0; } }

.about__pic { position: relative; align-self: end; justify-self: center; width: min(100%, 520px); }
.about__arch {
  position: absolute; inset: 22% 6% 0 6%;
  background: var(--red);
  border-radius: 999px 999px 0 0;
  transform-origin: bottom; animation: rise 1.2s var(--ease) both;
}
.about__pic img { position: relative; width: 100%; height: auto; animation: fadeUp 1.2s .15s var(--ease) both; }
@keyframes rise { from { transform: scaleY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } }

@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; text-align: center; padding-top: 84px; gap: 8px; }
  .about__text { padding-bottom: 0; }
  .about__pic { order: -1; width: min(78%, 360px); }
  .typer { min-height: 3em; }
}

/* ---------- marquee ---------- */
.marquee { background: var(--red); color: var(--beige); overflow: hidden; padding: 16px 0 12px; direction: ltr; }
.marquee__track { display: flex; width: max-content; animation: marquee 38s linear infinite; will-change: transform; }
.marquee__group { display: flex; align-items: center; direction: rtl; }
.marquee span { font-family: var(--display); font-weight: 700; font-size: clamp(34px, 4vw, 52px); line-height: 1; padding: 0 22px; white-space: nowrap; }
.marquee i { font-style: normal; font-size: 22px; opacity: .8; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 2. works ---------- */
.works { padding: clamp(64px, 8vw, 110px) 0 clamp(80px, 10vw, 120px); color: var(--red); }
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 40px var(--gutter) 36px; }
.tab {
  border: 2px solid var(--red); background: transparent; color: var(--red);
  padding: 9px 22px; border-radius: 999px; font-weight: 700; font-size: 17px;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
.tab:hover { background: rgb(163 22 28 / .08); }
.tab[aria-selected="true"] { background: var(--red); color: var(--beige); }

.carousel { position: relative; }
.carousel__viewport {
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 10px var(--gutter) 20px;
  -webkit-overflow-scrolling: touch;
}
.carousel__viewport::-webkit-scrollbar { display: none; }
.carousel__track {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: clamp(20px, 3vw, 40px); width: max-content; margin-inline: auto;
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.carousel__track.is-leaving { opacity: 0; transform: translateX(-40px); }
.carousel__track.is-entering { opacity: 0; transform: translateX(40px); transition: none; }

.work { scroll-snap-align: center; width: clamp(220px, 22vw, 280px); }
.phone {
  position: relative; aspect-ratio: 9 / 19.5;
  background: var(--phone); border-radius: 44px; padding: 10px;
  box-shadow: 0 0 0 2px #2c2628, 0 24px 50px -18px rgb(43 20 20 / .55);
}
.phone::before { /* side button */
  content: ""; position: absolute; left: -4px; top: 22%; width: 4px; height: 64px; background: #2c2628; border-radius: 2px 0 0 2px;
}
.phone__screen { position: relative; height: 100%; border-radius: 34px; overflow: hidden; background: #000; }
.phone__island { position: absolute; top: 10px; left: 50%; translate: -50% 0; width: 32%; height: 22px; background: #000; border-radius: 20px; z-index: 3; }
.phone__screen img, .phone__screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone__screen video { z-index: 1; }
.play {
  position: absolute; inset: 0; z-index: 2; border: 0; background: rgb(0 0 0 / .12);
  display: grid; place-items: center; transition: background-color .3s var(--ease), opacity .4s var(--ease);
}
.play:hover { background: rgb(0 0 0 / .25); }
.play span {
  width: 64px; height: 64px; border-radius: 50%; background: rgb(244 236 228 / .92);
  display: grid; place-items: center; transition: transform .3s var(--ease);
}
.play:hover span { transform: scale(1.08); }
.play svg { width: 24px; height: 24px; fill: var(--red); margin-left: 4px; }
.work.is-playing .play { opacity: 0; pointer-events: none; }
.fs {
  position: absolute; top: 14px; right: 14px; z-index: 4; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: rgb(20 10 10 / .45); color: #fff; display: grid; place-items: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background-color .3s var(--ease), transform .3s var(--ease);
}
.fs:hover { background: var(--red); transform: scale(1.08); }
.fs svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.phone__screen video:fullscreen { object-fit: contain; background: #000; }
.phone__screen video:-webkit-full-screen { object-fit: contain; background: #000; }
.work__caption { margin-top: 18px; text-align: center; }
.work__title { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1; color: var(--red); margin: 0; }

.carousel__arrow {
  position: absolute; top: 40%; z-index: 5; width: 52px; height: 52px; border-radius: 50%;
  border: 0; background: var(--red); color: var(--beige); display: grid; place-items: center;
  box-shadow: 0 10px 24px -10px rgb(126 15 20 / .7);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.carousel__arrow:hover { transform: scale(1.08); }
.carousel__arrow[disabled] { opacity: 0; pointer-events: none; }
.carousel__arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.carousel__arrow--prev { right: calc(var(--gutter) / 2); }
.carousel__arrow--next { left: calc(var(--gutter) / 2); }
@media (max-width: 760px) {
  .carousel__arrow { display: none; }
  /* six tabs: one swipeable row instead of three wrapped rows */
  .tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin-inline: 0; padding: 4px var(--gutter); scroll-padding-inline: var(--gutter); }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; font-size: 16px; padding: 8px 18px; }
}

/* ---------- 3. clients ---------- */
.clients { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; background: var(--red); color: var(--beige); padding: clamp(72px, 8vw, 110px) 0; overflow: hidden; }
.reel { margin-top: 40px; direction: ltr; touch-action: pan-y; display: flex; justify-content: flex-end; cursor: grab; user-select: none; -webkit-user-select: none; }
.reel.is-dragging { cursor: grabbing; }
.reel__set { flex: none; display: flex; align-items: center; gap: inherit; }
.reel__track { display: flex; align-items: center; gap: 56px; width: max-content; will-change: transform; }
.quote { direction: rtl; flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.quote__who { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; margin-bottom: 8px; }
.quote__av { width: 34px; height: 34px; border-radius: 50%; background: var(--beige); color: var(--red); display: grid; place-items: center; font-family: var(--display); font-size: 22px; }
.quote img { zoom: .72; height: auto; filter: drop-shadow(0 8px 16px rgb(60 0 0 / .28)); }
@media (max-width: 760px) {
  .reel__track { gap: 32px; }
  .quote img { zoom: .6; }
}

/* ---------- 4. contact ---------- */
.contact { padding: clamp(90px, 12vw, 150px) var(--gutter); text-align: center; color: var(--red); }
.contact__line { font-size: clamp(22px, 2.4vw, 30px); color: var(--ink); margin: 26px 0 36px; }
.contact__icons { display: flex; justify-content: center; gap: 22px; }
.icon-btn {
  width: 76px; height: 76px; border-radius: 50%; background: var(--red); color: var(--beige);
  display: grid; place-items: center;
  transition: transform .35s var(--ease), background-color .35s var(--ease);
}
.icon-btn svg { width: 36px; height: 36px; }
.icon-btn svg path { fill: currentColor; }
.icon-btn:hover { transform: translateY(-4px) rotate(-6deg); background: var(--red-deep); }
.contact__details { margin: 38px 0 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 22px; font-size: clamp(19px, 2vw, 24px); font-weight: 600; }
.contact__details a { text-decoration: none; border-bottom: 2px solid transparent; transition: border-color .3s var(--ease); }
.contact__details a:hover { border-color: currentColor; }
.contact__sep { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; }
@media (max-width: 520px) { .contact__sep { display: none; } .contact__details { flex-direction: column; } }

.foot { background: var(--red); color: var(--beige); text-align: center; padding: 22px var(--gutter); font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .marquee__track { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
