/* ==========================================================================
   Lab.Anotasi.org — HTML replica
   Breakpoints (same as the original): desktop ≥1100 · tablet 768–1099 · mobile ≤767
   ========================================================================== */

:root {
  --black: #000;
  --white: #fff;
  --pink: #fce3fc;
  --red: #ff3737;
  --grey: #666;
  --line: #d9d9d9;

  --font: "Manrope", "Manrope Placeholder", sans-serif;

  /* type scale (desktop) */
  --fs-display: 64px;   --lh-display: 1.2;
  --fs-section: 40px;   --lh-section: 1.4;
  --fs-service: 40px;
  --fs-h3: 24px;
  --fs-body: 16px;
  --fs-link: 18px;

  --gutter: 80px;
  --section-gap: 112px;
  --ease: cubic-bezier(.44, 0, .56, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
#work, #services, #about { scroll-margin-top: 110px; }

body {
  margin: 0;
  background: var(--pink);
  color: var(--black);
  font-family: var(--font);
  font-weight: 500;
  font-size: var(--fs-body);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

h1 { font-weight: 500; }
h4 { font-size: var(--fs-link); line-height: 1.2; font-weight: 500; }

svg { fill: currentColor; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 4px; }

/* ---------- reveal-on-scroll (progressive: only hides when JS is on) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js [data-reveal="right"] { transform: translateX(40px); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

.js [data-words] .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: calc(var(--i) * 45ms);
}
.js [data-words] .w--p { display: inline; transform: none; }
.js [data-words].is-visible .w { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal], .js [data-words] .w { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1800px;
  margin: 0 auto;
  padding: 24px var(--gutter);
}
.site-header__logo { display: flex; align-items: center; width: 117px; height: 38px; flex: none; }
.site-header__logo img { flex: none; width: 117px; height: 54px; object-fit: cover; }

.site-header__nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

/* text "roll" hover used by nav + footer links */
.roll-link { display: block; height: 22px; overflow: hidden; font-size: var(--fs-link); line-height: 1.2; }
.roll-link__inner { display: flex; flex-direction: column; transition: transform .35s var(--ease); }
.roll-link__inner span { display: block; height: 22px; white-space: pre; }
.roll-link__inner span + span { opacity: .6; }
.roll-link:hover .roll-link__inner,
.roll-link:focus-visible .roll-link__inner { transform: translateY(-22px); }

.menu-toggle {
  display: none;
  position: relative;
  width: 40px; height: 40px;
  padding: 0; border: 0; background: none; cursor: pointer;
}
.menu-toggle span {
  position: absolute; left: 8px; right: 8px; height: 2px;
  background: var(--black); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s;
}
.menu-toggle span:nth-child(1) { top: 13px; }
.menu-toggle span:nth-child(2) { top: 19px; }
.menu-toggle span:nth-child(3) { top: 25px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ==========================================================================
   Page / sections
   ========================================================================== */
.page { padding: 128px var(--gutter) 240px; }
.page__inner {
  max-width: 1800px;
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: max-content;
  padding: 16px 32px;
  border: 1px solid transparent;
  border-radius: 64px;
  font-size: var(--fs-link);
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn__icon { width: 16px; height: 16px; flex: none; transition: transform .25s var(--ease); }
.btn:hover .btn__icon { transform: translate(2px, -2px); }

.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--black); }

.btn--outline { background: var(--white); color: var(--red); border-color: var(--black); }
.btn--outline:hover { background: var(--black); color: var(--white); }

/* ---------- Hero ---------- */
.hero {
  max-width: 1200px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 50px;
}
.hero__text { display: flex; flex-direction: column; gap: 27px; }
.hero__eyebrow { white-space: pre-wrap; }
.hero__headlines { display: flex; flex-direction: column; gap: 40px; }
.hero__title {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
}
.hero__title em { font-style: normal; color: var(--red); }

/* ---------- Projects ---------- */
.projects { display: flex; flex-direction: column; gap: 40px; }
.projects__featured .card { height: 800px; }
.projects__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.projects__grid .card { height: 600px; }

.card { display: flex; flex-direction: column; gap: 24px; width: 100%; }
.card__media {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, .4);
}
.card__media img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.card:hover .card__media img { transform: scale(1.06); }

.card__badge {
  position: absolute;
  left: 28px; bottom: 28px;
  width: 32px; height: 48px;
  border-radius: 200px;
  background: rgba(255, 255, 255, .2);
  display: grid; place-items: center;
  transform: rotate(45deg);
  transition: width .4s var(--ease), height .4s var(--ease), left .4s var(--ease), bottom .4s var(--ease);
}
.card__badge svg { width: 16px; height: 16px; color: var(--white); transform: rotate(-45deg); }
.card:hover .card__badge { width: 56px; height: 56px; left: 24px; bottom: 24px; }

.card__meta { display: flex; flex-direction: column; gap: 8px; }
.card__client { color: var(--grey); }
.card__title { font-size: var(--fs-h3); line-height: 1.4; font-weight: 500; }

/* ---------- Label + headline + button rows ---------- */
.split { display: flex; gap: 16px; align-items: flex-start; }
.split__label { flex: none; width: 256px; }
.split__body {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.split__title {
  max-width: 795px;
  font-size: var(--fs-section);
  line-height: var(--lh-section);
}

/* ---------- Services accordion ---------- */
.services { display: flex; flex-direction: column; gap: 24px; }
.service {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 24px 0;
  box-shadow: 0 1px 0 0 var(--line);
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.service__main { flex: 1; min-width: 0; }
.service__name { font-size: var(--fs-service); line-height: 48px; font-weight: 500; }

.service__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease);
}
.service__items {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.service__items li {
  font-size: var(--fs-h3);
  line-height: 1.4;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.service__items li:first-child { margin-top: 26px; }
.service__items li:last-child { margin-bottom: 16px; }

.service[aria-expanded="true"] .service__panel { grid-template-rows: 1fr; }
.service[aria-expanded="true"] .service__items li { opacity: 1; transform: none; }
.service[aria-expanded="true"] .service__items li:nth-child(1) { transition-delay: .10s; }
.service[aria-expanded="true"] .service__items li:nth-child(2) { transition-delay: .15s; }
.service[aria-expanded="true"] .service__items li:nth-child(3) { transition-delay: .20s; }
.service[aria-expanded="true"] .service__items li:nth-child(4) { transition-delay: .25s; }
.service[aria-expanded="true"] .service__items li:nth-child(5) { transition-delay: .30s; }

.service__icon {
  flex: none;
  width: 48px; height: 48px;
  display: grid; place-items: center;
}
.service__icon svg { width: 24px; height: 24px; transition: transform .35s var(--ease); }
.service[aria-expanded="true"] .service__icon svg { transform: rotate(180deg); }

/* ---------- Logos ---------- */
.logos {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 200px;
  --s: 1;
}
.logos__cell { display: grid; place-items: center; }
.logos__cell img {
  width: calc(var(--w) * var(--s) * 1px);
  height: calc(var(--h) * var(--s) * 1px);
  object-fit: contain;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-height: 810px;
  padding: 80px var(--gutter);
  background: var(--black);
  color: var(--white);
}
.site-footer__top {
  flex: 1;
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer__cta {
  flex: 1;
  max-width: 550px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 64px;
}
.site-footer__heading { display: flex; flex-direction: column; gap: 24px; width: 100%; }
.site-footer__heading h1 {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
}

.site-footer__links {
  flex: 1;
  max-width: 440px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.site-footer__nav, .site-footer__social {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.site-footer__social a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-link);
  line-height: 1.4;
}
.site-footer__social svg { width: 16px; height: 16px; flex: none; transition: transform .25s var(--ease); }
.site-footer__social a:hover svg { transform: translate(2px, -2px); }

.site-footer__bottom {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  color: rgba(255, 255, 255, .5);
}
.site-footer__bottom a { transition: color .2s; }
.site-footer__bottom a:hover { color: var(--white); }

/* ==========================================================================
   Tablet  (768 – 1099)
   ========================================================================== */
@media (max-width: 1099.98px) {
  :root {
    --fs-display: 52px;
    --fs-section: 32px; --lh-section: 1.4;
    --fs-service: 32px;
    --fs-h3: 22px;
    --gutter: 64px;
    --section-gap: 120px;
  }
  .site-header__bar { padding: 24px 80px; }
  .page { padding: 128px var(--gutter) 160px; }

  .projects__featured .card { height: 450px; }
  .projects__grid .card { height: 450px; }

  .split { flex-wrap: wrap; }
  .split__label { width: 136px; }
  .split__body { flex-direction: column; gap: 48px; min-width: 0; flex: 1 1 0; }
  .split__title { max-width: 530px; }

  .services { gap: 24px; }
  .logos { grid-auto-rows: 140px; --s: .68; }

  .site-footer { min-height: 0; padding: 64px; }
  .site-footer__top { flex-direction: column; gap: 40px; }
  .site-footer__cta, .site-footer__links { max-width: none; width: 100%; flex: none; }
  .site-footer__links { gap: 24px; }
}

/* ==========================================================================
   Mobile  (≤ 767)
   ========================================================================== */
@media (max-width: 767.98px) {
  :root {
    --fs-display: 32px;
    --fs-section: 26px; --lh-section: 1.4;
    --fs-service: 26px;
    --fs-h3: 20px;
    --gutter: 16px;
    --section-gap: 80px;
  }

  .site-header { background: transparent; transition: background-color .3s var(--ease); }
  .site-header__bar { flex-wrap: wrap; padding: 16px; row-gap: 24px; }
  .site-header__logo { order: 0; }
  .menu-toggle { display: block; order: 1; }
  .site-header__nav {
    order: 2;
    flex: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0;
    transition: max-height .4s var(--ease), opacity .3s var(--ease), padding .4s var(--ease);
  }
  .site-header.is-open { background: var(--pink); }
  .site-header.is-open .site-header__nav { max-height: 400px; opacity: 1; padding: 24px 0 64px; }
  .site-header.is-open + .page { /* keep layout stable */ }

  .page { padding: 120px var(--gutter) 160px; }

  .projects__featured .card { height: 300px; }
  .projects__grid { grid-template-columns: 1fr; }
  .projects__grid .card { height: 300px; }
  .card { gap: 16px; }
  .card__badge { display: none; }
  .card:hover .card__media img { transform: none; }

  .split { flex-direction: column; flex-wrap: nowrap; }
  .split__label { width: auto; }
  .split__body { width: 100%; flex: none; gap: 48px; }
  .split__title { max-width: none; line-height: 1.4; }

  .services { gap: 16px; }
  .service__items li { line-height: 1.4; }

  .logos { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 120px; --s: .62; }

  .site-footer { padding: 48px 24px; }
  .site-footer__top { gap: 40px; }
  .site-footer__cta { gap: 40px; }
  .site-footer__heading { gap: 12px; }
  .site-footer__links { flex-direction: column; gap: 24px; }
  .site-footer__nav, .site-footer__social { flex: none; width: 100%; }
}
