/* =========================
   全域變數
========================= */

:root {
  --background-blue: #98d3f3;
  --background-white: #ffffff;
  --header-blue: #c1e3f5;
  --black: #000000;
  --white: #ffffff;
  --image-radius: 25px;
  --page-width: 1280px;
}

/* =========================
   基本設定
========================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;

  color: var(--black);

  font-family:
    Arial,
    Helvetica,
    "Noto Sans TC",
    sans-serif;

  background:
    linear-gradient(
      180deg,
      var(--background-blue) 0%,
      var(--background-white) 100%
    );
}

button {
  margin: 0;
  padding: 0;

  color: inherit;
  font: inherit;

  border: none;
  background: none;

  cursor: pointer;
}

img {
  display: block;
}

/* 所有主要內容圖片圓角 25px */
.home-main img:not(.section-return-icon) {
  border-radius: var(--image-radius);
}

/* =========================
   Header
========================= */

.top-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  width: 100%;
  height: 92px;

  background-color: var(--header-blue);
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: min(100%, var(--page-width));
  height: 100%;
  margin: 0 auto;
  padding: 0 42px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 26px;
}

.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 58px;
  height: 58px;

  border-radius: 50%;

  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.icon-button:hover {
  background-color: rgba(255, 255, 255, 0.45);
  transform: scale(1.08);
}

.icon-button:active {
  transform: scale(0.95);
}

.header-icon {
  width: 48px;
  height: 48px;

  object-fit: contain;

  /*
    icon 不套主要圖片的 25px 圓角
  */
  border-radius: 0 !important;
}

.menu-icon {
  width: 50px;
  height: 36px;
}

.search-icon {
  width: 45px;
  height: 45px;
}

.user-icon {
  width: 49px;
  height: 49px;
}

/* =========================
   首頁主體
========================= */

.home-main {
  width: min(100%, var(--page-width));
  margin: 0 auto;
  padding: 0 38px 120px;
}

/* =========================
   品牌標題
========================= */

.brand-section {
  padding: 18px 0 24px;
}

.brand-title {
  margin: 0;

  color: var(--black);

  font-size: clamp(80px, 13.5vw, 180px);
  font-weight: 900;
  font-style: italic;
  line-height: 0.95;
  letter-spacing: -9px;
  text-align: center;
  text-transform: lowercase;

  white-space: nowrap;
}

/* =========================
   廣告輪播
========================= */

.promo-section {
  width: 100%;
}

.promo-slider {
  position: relative;
  overflow: hidden;

  width: 100%;
  aspect-ratio: 1205 / 706;

  border-radius: var(--image-radius);
  background-color: #d9d9d9;
}

.promo-image {
  width: 100%;
  height: 100%;

  object-fit: cover;

  opacity: 1;

  transition:
    opacity 0.3s ease,
    transform 5s ease;
}

.promo-image.is-changing {
  opacity: 0;
}

.promo-slider:hover .promo-image {
  transform: scale(1.025);
}

.slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 52px;
  height: 52px;

  color: var(--white);
  font-size: 29px;

  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.48);

  opacity: 0;
  transform: translateY(-50%);

  transition:
    opacity 0.2s ease,
    background-color 0.2s ease;
}

.promo-slider:hover .slider-arrow {
  opacity: 1;
}

.slider-arrow:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.slider-arrow-left {
  left: 20px;
}

.slider-arrow-right {
  right: 20px;
}

.slider-dots {
  position: absolute;
  bottom: 25px;
  left: 50%;
  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  min-width: 145px;
  min-height: 43px;
  padding: 0 22px;

  border-radius: 30px;
  background-color: var(--black);

  transform: translateX(-50%);
}

.slider-dot {
  width: 9px;
  height: 9px;

  border-radius: 50%;
  background-color: #777777;

  transition:
    width 0.2s ease,
    background-color 0.2s ease;
}

.slider-dot.active {
  width: 24px;

  border-radius: 10px;
  background-color: var(--white);
}

/* =========================
   AI 試衣展示
========================= */

.ai-showcase-section {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 70px;

  margin-top: 120px;
}

.ai-showcase-image-wrapper {
  overflow: hidden;

  width: 100%;
  aspect-ratio: 625 / 706;

  border-radius: var(--image-radius);
  background-color: #d4d4d4;
}

.ai-showcase-image {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.ai-showcase-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 48px;
}

.showcase-label {
  width: 100%;
  margin: 0;
  padding: 15px 30px;

  font-size: clamp(23px, 2.5vw, 38px);
  font-weight: 800;
  text-align: center;

  border-radius: 25px;
}

.showcase-label-black {
  color: var(--white);
  background-color: var(--black);
}

.showcase-label-white {
  color: var(--black);
  background-color: var(--white);
}

.label-one {
  transform: rotate(6deg);
}

.label-two {
  transform: rotate(-4deg);
}

.label-three {
  transform: rotate(5deg);
}

.start-now-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;

  min-width: 340px;
  padding: 10px 15px 10px 30px;

  color: var(--white);

  font-size: 34px;
  font-weight: 900;
  font-style: italic;

  border-radius: 36px;
  background-color: var(--black);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.start-now-button:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transform: translateY(-4px);
}

.start-arrow {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 54px;
  height: 54px;

  color: var(--black);
  font-size: 36px;
  font-style: normal;

  border-radius: 50%;
  background-color: var(--white);
}

/* =========================
   共用標題
========================= */

.content-section {
  margin-top: 120px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;

  width: 100%;
  margin-bottom: 38px;
  padding: 0 8px;

  cursor: pointer;
}

.section-heading h2 {
  margin: 0;

  color: var(--white);

  font-size: clamp(40px, 5vw, 68px);
  font-weight: 900;
  font-style: italic;
  line-height: 1;

  -webkit-text-stroke: 3px #31576a;
  paint-order: stroke fill;
}

.section-return-icon {
  width: 62px;
  height: 62px;

  object-fit: contain;

  border-radius: 0 !important;

  /*
    原始箭頭鏡像翻轉，讓箭頭指向右邊
  */
  transform: scaleX(-1);

  transition: transform 0.2s ease;
}

.clickable-heading:hover .section-return-icon {
  transform: scaleX(-1) translateX(-9px);
}

/* =========================
   Put on now 卡片
========================= */

.wardrobe-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;

  width: 100%;
}

.wardrobe-card {
  overflow: hidden;

  padding: 24px;

  border-radius: var(--image-radius);
  background-color: var(--white);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.wardrobe-card:hover {
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.14);
  transform: translateY(-7px);
}

.wardrobe-image-box {
  overflow: hidden;

  width: 100%;
  height: 480px;

  border-radius: var(--image-radius);
  background-color: #ededed;
}

.wardrobe-image {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transition: transform 0.3s ease;
}

.wardrobe-card:hover .wardrobe-image {
  transform: scale(1.04);
}

.wardrobe-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding-top: 18px;

  font-size: 20px;
  font-weight: 800;
  font-style: italic;
}

.wardrobe-card-arrow {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 44px;
  height: 44px;

  font-size: 27px;

  border: 2px solid var(--black);
  border-radius: 50%;
}

/* =========================
   Posting now
========================= */

.posting-section {
  margin-top: 120px;
}

.post-card {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  overflow: hidden;

  width: 92%;
  min-height: 590px;
  margin: 0 auto;

  border-radius: var(--image-radius);
  background-color: var(--white);

  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.09);
}

.post-image-area {
  overflow: hidden;
  padding: 18px;
}

.post-main-image {
  width: 100%;
  height: 100%;
  min-height: 550px;

  object-fit: cover;
}

.post-information {
  display: flex;
  flex-direction: column;

  padding: 32px 38px 30px 24px;
}

.post-user-header {
  display: flex;
  align-items: center;
  gap: 25px;
}

.post-avatar {
  width: 100px;
  height: 100px;

  object-fit: cover;

  border: 4px solid var(--black);
  border-radius: 50% !important;
}

.post-user-details h3 {
  margin: 0 0 8px;

  font-size: 34px;
  font-weight: 900;
  font-style: italic;
}

.post-user-details p {
  margin: 3px 0;

  font-size: 17px;
  font-weight: 700;
}

.post-description {
  margin: 50px 0 0;

  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.post-tags {
  margin: auto 0 28px;

  font-size: 19px;
  font-weight: 800;
}

.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.follow-button {
  min-width: 150px;
  padding: 11px 22px;

  color: var(--white);

  font-size: 18px;
  font-weight: 800;

  border-radius: 28px;
  background-color: var(--black);

  transition: transform 0.2s ease;
}

.follow-button:hover {
  transform: scale(1.05);
}

.post-icon-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-icon-buttons button {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 48px;
  height: 48px;

  font-size: 29px;

  border-radius: 50%;

  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.post-icon-buttons button:hover {
  background-color: #e4f4fc;
  transform: scale(1.1);
}

/* =========================
   鍵盤焦點
========================= */

button:focus-visible,
.clickable-heading:focus-visible {
  outline: 3px solid var(--black);
  outline-offset: 4px;
}

/* =========================
   平板尺寸
========================= */

@media (max-width: 950px) {
  .header-nav {
    padding: 0 24px;
  }

  .home-main {
    padding: 0 24px 90px;
  }

  .brand-title {
    letter-spacing: -5px;
  }

  .ai-showcase-section {
    grid-template-columns: 1fr;
    gap: 48px;

    margin-top: 80px;
  }

  .ai-showcase-content {
    gap: 35px;
  }

  .wardrobe-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .wardrobe-card:last-child {
    grid-column: 1 / -1;
    width: calc(50% - 18px);
    margin: 0 auto;
  }

  .post-card {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .post-information {
    padding: 30px;
  }

  .post-tags {
    margin-top: 45px;
  }
}

/* =========================
   手機尺寸
========================= */

@media (max-width: 620px) {
  .top-header {
    height: 74px;
  }

  .header-nav {
    padding: 0 14px;
  }

  .header-left {
    gap: 6px;
  }

  .icon-button {
    width: 50px;
    height: 50px;
  }

  .header-icon {
    width: 40px;
    height: 40px;
  }

  .menu-icon {
    height: 28px;
  }

  .home-main {
    padding: 0 15px 70px;
  }

  .brand-section {
    padding: 18px 0;
  }

  .brand-title {
    font-size: 55px;
    letter-spacing: -3px;
  }

  .promo-slider {
    aspect-ratio: 16 / 10;
  }

  .slider-arrow {
    display: none;
  }

  .slider-dots {
    bottom: 12px;

    min-width: 105px;
    min-height: 34px;
  }

  .ai-showcase-section {
    margin-top: 60px;
  }

  .showcase-label {
    padding: 12px 18px;
    font-size: 20px;
  }

  .start-now-button {
    width: 100%;
    min-width: 0;

    font-size: 26px;
  }

  .start-arrow {
    width: 44px;
    height: 44px;

    font-size: 29px;
  }

  .content-section {
    margin-top: 75px;
  }

  .section-heading h2 {
    font-size: 40px;
    -webkit-text-stroke: 2px #31576a;
  }

  .section-return-icon {
    width: 48px;
    height: 48px;
  }

  .wardrobe-list {
    display: flex;
    gap: 20px;

    overflow-x: auto;

    padding-bottom: 20px;
  }

  .wardrobe-card,
  .wardrobe-card:last-child {
    flex: 0 0 82%;

    width: auto;
    margin: 0;
  }

  .wardrobe-image-box {
    height: 390px;
  }

  .post-user-header {
    align-items: flex-start;
  }

  .post-avatar {
    width: 78px;
    height: 78px;
  }

  .post-user-details h3 {
    font-size: 27px;
  }

  .post-description {
    margin-top: 30px;
    font-size: 17px;
  }

  .post-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}
