/* ============================================================
   Piuma Books — Branding case study
   Source: Figma "Branding - Case Study - Piuma" (1440x9978)
   ============================================================ */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: "DM Sans", sans-serif;
}

img {
  display: block;
}

.page {
  position: relative;
  overflow: clip;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 720px;
  background: #7e7dfc;
}

.home-link {
  position: absolute;
  left: 40px;
  top: 32px;
  z-index: 5;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.home-link:hover {
  color: #fff;
}

.hero-logo {
  position: absolute;
  left: 50%;
  top: 240px;
  transform: translateX(-50%);
  width: 224px;
  height: 241px;
}

.hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.grain {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 720px;
  opacity: 0.2;
  pointer-events: none;
}

.grain .crop {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.grain img {
  position: absolute;
  left: -66.05%;
  top: -0.02%;
  width: 166.05%;
  height: 186.83%;
  max-width: none;
  opacity: 0.4;
}

.hero-meta {
  position: absolute;
  left: 50%;
  top: 599px;
  transform: translateX(-50%);
  width: 709px;
  display: flex;
  justify-content: space-between;
  font-size: 24px;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

.hero-meta span {
  margin: 0;
}

.hero-name {
  position: absolute;
  left: 50%;
  top: 599px;
  transform: translateX(-50%);
  margin: 0;
  font-size: 24px;
  letter-spacing: 4.8px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  white-space: nowrap;
}

/* ---------- Decorative feathers / textures ---------- */

.deco {
  position: absolute;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deco .spin {
  position: relative;
  flex: none;
}

.deco .crop {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  overflow: hidden;
}

.deco .crop img,
.deco img.cover {
  max-width: none;
}

.d1 {
  left: -268px;
  top: 652px;
  width: 2358px;
  height: 2420px;
}

.d1 .spin {
  transform: rotate(-40.39deg);
  width: 1422px;
  height: 1968px;
}

.d1 .crop img,
.d2 .crop img {
  position: absolute;
  left: -113.24%;
  top: 0;
  width: 213.24%;
  height: 209.01%;
}

/* d2 sits above the mockups' white fade-in so the monogram curves
   dissolve into the first photo, as in the design */
.d2 {
  left: -569px;
  top: 5003px;
  width: 2305px;
  height: 2276px;
  z-index: 2;
  -webkit-mask-image: linear-gradient(#000 68%, transparent 96%);
  mask-image: linear-gradient(#000 68%, transparent 96%);
}

.d2 .spin {
  transform: rotate(132.76deg);
  width: 1360px;
  height: 1882px;
}

.d3 {
  left: -898px;
  top: 2476px;
  width: 1427px;
  height: 1704px;
}

.d3 img.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.1;
}

.d4 {
  left: -262px;
  top: -667px;
  width: 1649px;
  height: 1652px;
  mix-blend-mode: multiply;
}

.d4 .spin {
  transform: rotate(135.22deg);
  width: 902px;
  height: 1432px;
}

.d4 .crop img {
  position: absolute;
  left: -144.82%;
  top: 0;
  width: 244.82%;
  height: 209.01%;
}

.d5 {
  left: calc(50% + 72px);
  top: 4165px;
  width: 1430px;
  height: 1149px;
}

.d5 .spin {
  transform: rotate(74.03deg) scaleY(-1);
  width: 838px;
  height: 1248px;
}

.d5 .crop img {
  position: absolute;
  left: -155.52%;
  top: -66.41%;
  width: 255.53%;
  height: 166.41%;
}

.d6 {
  left: calc(58.33% + 81px);
  top: 3873px;
  width: 467px;
  height: 415px;
}

.d6 .crop img {
  position: absolute;
  left: -3.29%;
  top: -171.52%;
  width: 448.51%;
  height: 684.52%;
}

.d7 {
  left: calc(41.67% - 8px);
  top: 3951px;
  transform: translateX(-50%);
  width: 144px;
  height: 162px;
}

.d7 .crop img {
  position: absolute;
  left: -34.1%;
  top: -234.08%;
  width: 719.49%;
  height: 866.22%;
}

/* ---------- Content column ---------- */

.content {
  position: relative;
}

.col {
  width: 710px;
  margin-left: auto;
  margin-right: auto;
}

.overview {
  margin-top: 80px;
  font-size: 20px;
  line-height: 28px;
}

.overview p,
.final p,
.block .body p {
  margin: 0;
}

.overview p + p,
.final p + p,
.block .body p + p {
  margin-top: 28px;
}

.star {
  margin: 80px auto 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", sans-serif;
  font-size: 72px;
  line-height: normal;
  color: #ffd674;
  text-align: center;
}

.quote {
  margin: 80px auto 0;
  font-family: "Bodoni Moda", serif;
  font-weight: 500;
  font-size: 48px;
  line-height: normal;
  text-align: center;
}

.block {
  margin-top: 80px;
}

.block h2 {
  margin: 0 0 32px;
  font-size: 32px;
  font-weight: 400;
  line-height: normal;
  text-transform: capitalize;
}

.block .body {
  font-size: 20px;
  line-height: 28px;
}

/* ---------- Concepts 01 / 02 / 03 ---------- */

.concepts {
  position: relative;
  margin-top: 80px;
  height: 1436px;
}

.concept .num {
  position: absolute;
  margin: 0;
  transform: translateX(-50%);
  font-family: "Bodoni Moda", serif;
  font-weight: 600;
  font-size: 128px;
  line-height: 120px;
  color: rgba(147, 129, 255, 0.5);
  text-align: center;
  white-space: nowrap;
}

.concept .text {
  position: absolute;
  width: 345px;
}

.concept .text h3 {
  margin: 0 0 24px;
  font-size: 24px;
  font-weight: 500;
  line-height: normal;
  white-space: nowrap;
}

.concept .text h3 em {
  font-size: 18px;
  font-weight: 400;
  font-style: italic;
  float: right;
  line-height: 31px;
}

.concept .text p {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
}

.concept .logo {
  position: absolute;
  mix-blend-mode: multiply;
}

.concept .logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.c1 .num  { left: calc(25% + 76.5px); top: 0; }
.c1 .text { left: calc(25% + 5px); top: 160px; }
.c1 .logo { left: calc(50% + 70px); top: 95px; width: 316px; height: 315px; }

.c2 .num  { left: calc(33.33% + 86.5px); top: 513px; }
.c2 .text { left: calc(33.33% + 8px); top: 673px; }
.c2 .logo { left: calc(58.33% + 78px); top: 618px; width: 314px; height: 314px; }

.c3 .num  { left: calc(25% + 81.5px); top: 1026px; }
.c3 .text { left: calc(25% + 5px); top: 1186px; width: 394px; }
.c3 .logo { left: calc(58.33% - 1px); top: 1121px; width: 316px; height: 315px; }

/* ---------- Color palette ---------- */

.palette-head {
  margin-top: 322px;
  width: 711px;
  margin-left: auto;
  margin-right: auto;
}

.palette-cards {
  margin: 40px 0 0 calc(50% - 559px);
  width: 914px;
  display: flex;
  gap: 24px;
  align-items: stretch;
}

.swatch {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  border-radius: 24px;
}

.swatch h3 {
  margin: 0;
  font-size: 32px;
  font-weight: 500;
  line-height: normal;
}

.swatch p {
  margin: 0;
  font-size: 24px;
  line-height: normal;
}

.swatch--main {
  width: 625px;
  padding: 160px 64px 32px 32px;
  background: #7d7dfb;
  color: #fff;
}

.swatch--accent {
  padding: 64px 64px 32px 32px;
  background: #ffd674;
  color: #3c2a27;
}

/* ---------- Typography section ---------- */

.typography {
  margin: 80px 0 0 calc(50% - 355px);
  width: 915px;
}

.typography h2 {
  margin: 0 0 80px;
  font-size: 32px;
  font-weight: 400;
  line-height: normal;
  text-transform: capitalize;
}

.type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 92px 123px 92px 250px;
  column-gap: 62px;
  row-gap: 40px;
}

.t-label {
  margin: 0;
  grid-row: 1;
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
  letter-spacing: 4px;
  color: #9381ff;
}

.aa {
  margin: 0;
}

.aa--serif {
  grid-column: 1;
  grid-row: 2 / span 2;
  align-self: start;
  font-family: "Bodoni Moda", serif;
  font-size: 340px;
  line-height: 255px;
}

.aa--sans {
  grid-column: 2;
  grid-row: 3;
  font-size: 128px;
  line-height: 92px;
}

.t-desc {
  grid-row: 4;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.t-desc h4 {
  margin: 0;
  font-size: 40px;
  font-weight: 400;
  line-height: 30px;
}

.t-desc h4.serif {
  font-family: "Bodoni Moda", serif;
}

.t-desc p {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
}

/* ---------- Final identity & mockups ---------- */

.final {
  margin-top: 80px;
  font-family: "Inter", sans-serif;
  font-size: 20px;
  line-height: 28px;
}

.mockups {
  position: relative;
  margin-top: 223px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* White fade at the top of the mockup stack */
.mockups::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 420px;
  background: linear-gradient(#fff 0%, rgba(255, 255, 255, 0) 100%);
  z-index: 1;
  pointer-events: none;
}

.mock {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.mock img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mockup images are exact Figma node exports (already cropped) */
.m1 { aspect-ratio: 1440 / 1080; }
.m2 { aspect-ratio: 1440 / 810; }
.m3 { aspect-ratio: 1440 / 794; }
.m4 { aspect-ratio: 1440 / 1080; }

/* ============================================================
   Tablet adaptation — fixed 1440 geometry doesn't fit below
   ~1150px, so wide sections reflow while keeping desktop type
   ============================================================ */

@media (max-width: 1150px) {
  .concepts {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 64px;
    padding: 0 40px;
  }

  .concept {
    position: relative;
  }

  .concept .num,
  .concept .text,
  .concept .logo {
    position: static;
    transform: none;
  }

  .concept .num {
    text-align: left;
  }

  .concept .text {
    width: auto;
    max-width: 480px;
    margin-top: 16px;
  }

  .concept .logo {
    margin-top: 24px;
  }

  .c3 .text {
    width: auto;
  }

  .palette-cards {
    width: auto;
    margin: 40px 40px 0;
  }

  .swatch--main {
    width: 64%;
  }

  .typography {
    width: auto;
    margin: 80px 40px 0;
  }
}

/* ============================================================
   Mobile adaptation (no mobile frame in Figma — scaled layout)
   ============================================================ */

@media (max-width: 767px) {
  .deco {
    display: none;
  }

  .hero {
    height: 440px;
  }

  .home-link {
    left: 20px;
    top: 20px;
  }

  .hero-logo {
    top: 110px;
    width: 150px;
    height: 161px;
  }

  .grain {
    height: 440px;
  }

  .hero-meta {
    top: 380px;
    width: calc(100% - 40px);
    font-size: 15px;
  }

  .hero-name {
    top: 380px;
    font-size: 15px;
    letter-spacing: 3px;
  }

  .col,
  .palette-head {
    width: auto;
    margin-left: 20px;
    margin-right: 20px;
  }

  .overview {
    margin-top: 48px;
    font-size: 16px;
    line-height: 26px;
  }

  .overview p + p,
  .final p + p,
  .block .body p + p {
    margin-top: 26px;
  }

  .star {
    margin-top: 48px;
    font-size: 52px;
  }

  .quote {
    margin-top: 48px;
    font-size: 28px;
  }

  .block {
    margin-top: 48px;
  }

  .block h2 {
    margin-bottom: 20px;
    font-size: 24px;
  }

  .block .body {
    font-size: 16px;
    line-height: 26px;
  }

  /* Concepts stack vertically */
  .concepts {
    margin-top: 48px;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 56px;
    padding: 0 20px;
  }

  .concept {
    position: relative;
  }

  .concept .num,
  .concept .text,
  .concept .logo {
    position: static;
    transform: none;
  }

  .concept .num {
    font-size: 72px;
    line-height: 70px;
    text-align: left;
  }

  .concept .text {
    width: auto;
    margin-top: 16px;
  }

  .concept .text h3 {
    white-space: normal;
  }

  .concept .text p {
    font-size: 16px;
    line-height: 26px;
  }

  .concept .logo {
    width: 240px;
    height: 240px;
    margin: 24px auto 0;
  }

  .c3 .text {
    width: auto;
  }

  .palette-head {
    margin-top: 48px;
  }

  .palette-cards {
    margin: 24px 20px 0;
    width: auto;
    flex-direction: column;
  }

  .swatch--main {
    width: auto;
    padding: 96px 24px 24px;
  }

  .swatch--accent {
    padding: 64px 24px 24px;
  }

  .swatch h3 {
    font-size: 24px;
  }

  .swatch p {
    font-size: 18px;
  }

  .typography {
    margin: 48px 20px 0;
    width: auto;
  }

  .typography h2 {
    margin-bottom: 32px;
    font-size: 24px;
  }

  /* Stack in reading order: primary label, serif Aa, Bodoni text,
     then secondary label, sans Aa, DM Sans text */
  .type-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .t-label:nth-of-type(1) { order: 1; }
  .aa--serif              { order: 2; }
  .t-desc:nth-of-type(1)  { order: 3; }
  .t-label:nth-of-type(2) { order: 4; margin-top: 32px; }
  .aa--sans               { order: 5; }
  .t-desc:nth-of-type(2)  { order: 6; }

  .t-label {
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 3px;
  }

  .aa--serif {
    font-size: 160px;
    line-height: 130px;
  }

  .aa--sans {
    font-size: 96px;
    line-height: 80px;
  }

  .t-desc h4 {
    font-size: 28px;
    line-height: 24px;
  }

  .t-desc p {
    font-size: 16px;
    line-height: 26px;
  }

  .final {
    margin-top: 48px;
    font-size: 16px;
    line-height: 26px;
  }

  .mockups {
    margin-top: 64px;
  }
}
