:root {
  --ivory: #f1efe7;
  --bone: #e5ded1;
  --milk: #f8f6f0;
  --charcoal: #20211f;
  --coffee: #7a553d;
  --muted: #6f6b63;

  --edge-x: clamp(1.5rem, 3.2vw, 3.75rem);
  --edge-y: clamp(1.35rem, 3vw, 3.25rem);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* =========================================================
   RESET
   ========================================================= */

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

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--ivory);
  color: var(--charcoal);

  font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

/* =========================================================
   MAIN POSTER
   ========================================================= */

.poster {
  position: relative;

  width: 100%;
  height: 100vh;
  height: 100svh;

  min-height: 32rem;

  isolation: isolate;
  overflow: hidden;

  background:
    radial-gradient(
      circle at 72% 42%,
      rgba(255, 255, 255, 0.72) 0,
      rgba(255, 255, 255, 0) 30%
    ),
    var(--ivory);
}

/* =========================================================
   PAPER GRAIN
   ========================================================= */

.paper-grain {
  position: absolute;
  inset: 0;

  z-index: 10;

  pointer-events: none;

  opacity: 0.16;

  mix-blend-mode: multiply;

  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.24'/%3E%3C/svg%3E");
}

/* =========================================================
   SUNLIGHT
   ========================================================= */

.sunlight {
  position: absolute;

  inset: -18% -7% 0 38%;

  z-index: 0;

  pointer-events: none;

  transform: rotate(-12deg);

  opacity: 0.5;

  filter: blur(1px);

  background: linear-gradient(
    112deg,
    rgba(255, 252, 237, 0.9),
    rgba(255, 252, 237, 0) 61%
  );

  animation: atmosphere-in 1400ms 120ms var(--ease-out) both;
}

.sunlight::before,
.sunlight::after,
.sunlight i {
  content: "";

  position: absolute;

  border-radius: 52% 48% 56% 44%;

  background: rgba(95, 82, 60, 0.075);

  filter: blur(14px);
}

.sunlight::before {
  width: 38%;
  height: 64%;

  top: 3%;
  left: 29%;
}

.sunlight::after {
  width: 23%;
  height: 42%;

  top: 44%;
  left: 4%;

  transform: rotate(34deg);
}

.sunlight i:nth-child(1) {
  width: 18%;
  height: 37%;

  top: 7%;
  left: 2%;

  transform: rotate(-31deg);
}

.sunlight i:nth-child(2) {
  width: 16%;
  height: 48%;

  top: 21%;
  right: 1%;

  transform: rotate(29deg);
}

.sunlight i:nth-child(3) {
  width: 11%;
  height: 30%;

  top: 65%;
  left: 48%;

  transform: rotate(-20deg);
}

.sunlight i:nth-child(4) {
  width: 9%;
  height: 25%;

  top: 11%;
  left: 72%;

  transform: rotate(46deg);
}

/* =========================================================
   HEADER
   ========================================================= */

.masthead {
  position: absolute;

  top: calc(var(--edge-y) + env(safe-area-inset-top));

  left: var(--edge-x);
  right: var(--edge-x);

  z-index: 8;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

/* =========================================================
   BRAND
   ========================================================= */

.brand {
  display: inline-flex;

  flex-direction: column;
  align-items: flex-start;

  gap: 0.38rem;

  animation: brand-in 650ms 60ms var(--ease-out) both;
}

.brand span {
  font-size: clamp(1.55rem, 2.2vw, 2.3rem);

  font-weight: 800;

  line-height: 0.74;

  letter-spacing: -0.095em;
}

.brand small {
  color: var(--muted);

  font-size: clamp(0.45rem, 0.54vw, 0.57rem);

  font-weight: 700;

  line-height: 1;

  letter-spacing: 0.13em;
}

/* =========================================================
   INSTAGRAM
   ========================================================= */

.instagram {
  position: relative;

  margin-top: 0.15rem;

  padding-block: 0.2rem;

  color: var(--charcoal);

  font-size: clamp(0.68rem, 0.78vw, 0.82rem);

  font-weight: 600;

  letter-spacing: -0.02em;

  animation: brand-in 650ms 120ms var(--ease-out) both;

  transition: color 180ms ease;
}

.instagram::after {
  content: "";

  position: absolute;

  left: 0;
  right: 0;

  bottom: -0.1rem;

  height: 1px;

  background: currentColor;

  transform: scaleX(0);

  transform-origin: right;

  transition: transform 240ms var(--ease-out);
}

/* =========================================================
   CAMPAIGN
   ========================================================= */

.campaign {
  position: absolute;
  inset: 0;

  z-index: 2;
}

/* =========================================================
   HERO COPY
   ========================================================= */

.hero-copy {
  position: absolute;

  /*
   * Posisi keseluruhan:
   * COMING
   * SOON
   * supporting text
   */
  top: 20%;
  left: 5.7%;

  z-index: 5;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  width: max-content;

  pointer-events: none;
}

/* =========================================================
   HEADLINE
   ========================================================= */

.headline {
  position: relative;

  display: flex;

  /*
   * WAJIB column.
   * Ini memastikan:
   *
   * COMING
   * SOON
   *
   * bukan COMING SOON.
   */
  flex-direction: column;

  align-items: flex-start;

  width: max-content;

  margin: 0;

  font-size: clamp(6rem, min(12.5vw, 21vh), 13rem);

  font-weight: 700;

  line-height: 0.76;

  letter-spacing: -0.095em;

  white-space: nowrap;

  pointer-events: none;
}

/* =========================================================
   HEADLINE LINES
   ========================================================= */

.line {
  position: relative;

  display: block;

  flex: 0 0 auto;

  width: max-content;

  overflow: hidden;
}

.line b {
  display: block;

  font: inherit;

  white-space: nowrap;

  transform: translateY(115%);

  animation: type-reveal 900ms var(--ease-out) forwards;
}

/* =========================================================
   COMING
   ========================================================= */

.line-coming {
  padding-right: 0.08em;
}

.line-coming b {
  animation-delay: 170ms;
}

/* =========================================================
   SOON
   ========================================================= */

.line-soon {
  /*
   * SOON berada di baris kedua.
   *
   * Sedikit digeser kanan supaya
   * komposisi tetap editorial.
   */
  margin-top: 0.055em;

  margin-left: 1.47em;

  padding-right: 0.1em;
}

.line-soon b {
  animation-delay: 250ms;
}

/* =========================================================
   MESSAGE
   ========================================================= */

.message {
  position: relative;

  /*
   * Karena .message ada SETELAH .headline
   * di dalam hero-copy,
   * teks otomatis berada di bawah
   * COMING + SOON.
   */

  margin: 0;

  margin-top: clamp(1.45rem, 2.5vh, 2rem);

  /*
   * Sedikit mengikuti offset SOON.
   */
  margin-left: clamp(2.5rem, 5vw, 6.5rem);

  color: var(--muted);

  font-size: clamp(0.78rem, 0.95vw, 1rem);

  font-weight: 500;

  line-height: 1.45;

  letter-spacing: -0.025em;

  animation: copy-in 700ms 680ms var(--ease-out) both;
}

/* =========================================================
   PRODUCT
   ========================================================= */

.product-stage {
  position: absolute;

  z-index: 3;

  top: 9%;

  right: 8.5%;

  width: clamp(19rem, min(35vw, 56vh), 34rem);

  height: 82%;

  transform: translateY(24px);

  opacity: 0;

  animation: product-in 1050ms 300ms var(--ease-out) forwards;

  will-change: transform, opacity;
}

/* =========================================================
   PRODUCT PARALLAX
   ========================================================= */

.product-parallax {
  width: 100%;
  height: 100%;

  transform: translate3d(0, 0, 0) rotate(1.5deg);

  transform-origin: 50% 60%;

  will-change: transform;
}

.product-parallax img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;

  filter: drop-shadow(1.5rem 2.2rem 2rem rgba(67, 48, 33, 0.19));

  user-select: none;

  -webkit-user-drag: none;
}

/* =========================================================
   BOTTOM / BASELINE
   ========================================================= */

.baseline {
  position: absolute;

  left: var(--edge-x);
  right: var(--edge-x);

  bottom: calc(var(--edge-y) + env(safe-area-inset-bottom));

  z-index: 8;

  display: flex;

  align-items: flex-end;
  justify-content: space-between;

  gap: 2rem;

  color: var(--charcoal);

  font-size: clamp(0.65rem, 0.77vw, 0.8rem);

  font-weight: 600;

  letter-spacing: -0.025em;

  animation: copy-in 700ms 760ms var(--ease-out) both;
}

.baseline p {
  margin: 0;
}

.baseline a {
  position: relative;

  color: var(--coffee);

  transition: color 180ms ease;
}

.baseline a::after {
  content: "";

  position: absolute;

  left: 0;
  right: 0;

  bottom: -0.25rem;

  height: 1px;

  background: currentColor;

  transform: scaleX(0.22);

  transform-origin: left;

  transition: transform 240ms var(--ease-out);
}

/* =========================================================
   HOVER
   ========================================================= */

@media (hover: hover) and (pointer: fine) {
  .instagram:hover,
  .baseline a:hover {
    color: var(--coffee);
  }

  .instagram:hover::after,
  .baseline a:hover::after {
    transform: scaleX(1);

    transform-origin: left;
  }
}

/* =========================================================
   ANIMATION
   ========================================================= */

@keyframes brand-in {
  from {
    opacity: 0;

    transform: translateY(-8px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

@keyframes type-reveal {
  from {
    opacity: 0;

    transform: translateY(115%);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

@keyframes product-in {
  from {
    opacity: 0;

    transform: translateY(24px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

@keyframes copy-in {
  from {
    opacity: 0;

    transform: translateY(8px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

@keyframes atmosphere-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 0.5;
  }
}

/* =========================================================
   MEDIUM DESKTOP / LAPTOP
   ========================================================= */

@media (min-width: 721px) and (max-width: 1250px) {
  .hero-copy {
    top: 21%;
    left: 5%;
  }

  .headline {
    font-size: clamp(5.7rem, 11.5vw, 9.5rem);
  }

  .line-soon {
    margin-left: 0.43em;
  }

  .message {
    margin-left: clamp(2.2rem, 4.5vw, 4.5rem);
  }

  .product-stage {
    right: 4%;

    width: clamp(18rem, 34vw, 29rem);
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 720px) {
  :root {
    --edge-x: clamp(1.25rem, 6vw, 2rem);

    --edge-y: clamp(1.4rem, 5.5vw, 2rem);
  }

  .poster {
    min-height: 35rem;

    background:
      radial-gradient(
        circle at 86% 50%,
        rgba(255, 255, 255, 0.68) 0,
        rgba(255, 255, 255, 0) 33%
      ),
      var(--ivory);
  }

  /* SUNLIGHT */

  .sunlight {
    inset: 1% -55% -10% 18%;

    transform: rotate(-18deg);

    opacity: 0.4;
  }

  /* HERO COPY */

  .hero-copy {
    top: 17%;
    left: var(--edge-x);

    max-width: calc(100vw - (var(--edge-x) * 2));
  }

  /* HEADLINE */

  .headline {
    font-size: clamp(4.5rem, min(23vw, 14vh), 7rem);

    line-height: 0.78;
  }

  /* SOON */

  .line-soon {
    margin-top: 0.045em;

    margin-left: 0.18em;
  }

  /* MESSAGE */

  .message {
    margin-top: 1.15rem;

    margin-left: 0.35rem;

    max-width: 10rem;

    font-size: clamp(0.69rem, 3vw, 0.82rem);
  }

  /* PRODUCT */

  .product-stage {
    top: 26%;

    right: -16%;

    width: clamp(16rem, 75vw, 24rem);

    height: 66%;
  }

  .product-parallax {
    transform: translate3d(0, 0, 0) rotate(2.5deg);
  }

  .product-parallax img {
    filter: drop-shadow(1rem 1.6rem 1.3rem rgba(67, 48, 33, 0.16));
  }

  /* FOOTER */

  .baseline {
    font-size: clamp(0.59rem, 2.65vw, 0.72rem);
  }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {
  .hero-copy {
    top: 16.5%;
  }

  .headline {
    font-size: clamp(4.1rem, 21.5vw, 5.7rem);
  }

  .line-soon {
    margin-left: 0.14em;
  }

  .message {
    margin-top: 1rem;
    margin-left: 0.25rem;

    max-width: 9rem;
  }

  .product-stage {
    top: 28%;

    right: -20%;

    width: 78vw;

    height: 63%;
  }
}

/* =========================================================
   SHORT MOBILE
   ========================================================= */

@media (max-height: 640px) and (max-width: 720px) {
  .hero-copy {
    top: 14%;
  }

  .headline {
    font-size: clamp(3.9rem, min(20vw, 13vh), 5.4rem);
  }

  .message {
    margin-top: 0.75rem;
  }

  .product-stage {
    top: 21%;

    height: 68%;
  }
}

/* =========================================================
   SHORT DESKTOP
   ========================================================= */

@media (min-width: 721px) and (max-height: 700px) {
  .hero-copy {
    top: 17%;
  }

  .headline {
    font-size: clamp(5rem, min(10vw, 19vh), 8rem);
  }

  .line-soon {
    margin-left: 0.42em;
  }

  .message {
    margin-top: 1rem;
  }

  .product-stage {
    top: 8%;

    height: 84%;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .brand,
  .instagram,
  .line b,
  .message,
  .product-stage,
  .baseline,
  .sunlight {
    animation: none;

    opacity: 1;

    transform: none;
  }

  .product-parallax {
    transform: rotate(1.5deg) !important;
  }

  .instagram::after,
  .baseline a::after {
    transition-duration: 0.01ms;
  }
}
