/**
 * NOA 首页骨架布局样式
 * 核心结构：12 栏瑞士网格 + Hero 固定幕布 + 左右不对称产品流 + 深青 About 嵌标 + 揭幕式 Footer
 */

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

html {
  height: 100%;
  overscroll-behavior: none;
  scroll-behavior: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern";
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-feature-settings: "ss02" on, "kern" on;
  font-size: var(--body);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  line-height: var(--body-l);
  min-height: 100%;
  overscroll-behavior: none;
}

body.no-overflow {
  overflow: hidden !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
button,
input,
ul,
ol {
  font-weight: 400;
  text-rendering: geometricPrecision;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  overflow-wrap: break-word;
}

em,
i {
  font-style: normal;
}

a {
  color: var(--black);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* 替换默认 inline 显示，消除 canvas/img/svg 基线空隙（遵循 css-layout 规范，不依赖 overflow:hidden 掩盖） */
canvas,
img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

/* ==========================================================================
   页面滚动主容器
   ========================================================================== */
.page-home {
  min-height: 100%;
  overflow-x: clip;
  position: relative;
  z-index: 10;
}

.page-content {
  height: fit-content;
  min-height: 100%;
}

/* ==========================================================================
   首屏 Hero（绿色背景 + 左侧巨幅 Logo + 右半屏满高摄影）
   桌面使用 sticky，让后续画廊在原有文档流里覆盖首屏。
   ========================================================================== */
.home-hero {
  background-color: var(--green);
  height: 100vh;
  height: 100svh;
  opacity: 0;
  padding: var(--gutter);
  position: relative;
  width: 100%;
  z-index: 1;
}

@media (min-width: 813px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body:not(.reduced-motion) .home-hero {
    position: sticky;
    top: 0;
  }
}

body.preloader-started .home-hero,
body.preloader-finished .home-hero {
  opacity: 1;
}

/* 首屏标题沿用左列起点，并可跨过中轴。 */
.home-hero .logo {
  height: auto;
  left: var(--gutter);
  position: absolute;
  top: calc(var(--menuHeight) + var(--gutter));
  width: calc(58.33333% - var(--gutter) * 11 * 0.58333 + var(--gutter) * 6);
  z-index: 2;
}

.home-hero .logo {
  color: var(--black);
  font-family: var(--font-body);
  font-size: clamp(2rem, 11.4vw, 12rem);
  font-weight: 400;
  letter-spacing: -0.07em;
  line-height: 0.88;
  margin: 0;
}

.home-hero .logo span {
  display: block;
}

.home-hero .image-full-container {
  height: 100%;
  position: absolute;
  right: 0;
  top: 0;
  width: calc(50% - var(--gutter-half));
  z-index: 1;
}

.home-hero .image-full-container img {
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

@media only screen and (max-width: 1180px) and (orientation: portrait) {
  .home-hero {
    height: 80vh;
  }

  .home-hero .image-full-container {
    height: 80vh;
  }
}

@media only screen and (max-width: 812px) {
  .home-hero {
    height: 100vh;
    height: 100svh;
  }

  .home-hero .image-full-container {
    bottom: var(--gutter);
    height: auto;
    left: auto;
    right: var(--gutter);
    top: auto;
    width: calc(90% - var(--gutter-2));
  }

  .home-hero .image-full-container img {
    height: auto;
    min-height: 66.666vh;
    width: 100%;
  }
}

/* ==========================================================================
   上方滑过首屏的内容幕布层 (.un-pinned)
   ========================================================================== */
.un-pinned {
  background-color: var(--white);
  padding-top: 0;
  position: relative;
  z-index: 10;
}

/* ==========================================================================
   非对称双列产品展示网格（12 列总网格 -> 左右各占 6 列子网格）
   ========================================================================== */
.home-grid-wrapper {
  background-color: var(--white);
  overflow: clip;
  padding: var(--gutter);
}

.home-grid {
  align-items: flex-start;
  display: grid;
  gap: var(--gutter);
  grid-template-columns: repeat(12, 1fr);
  min-height: 100vh;
}

/* 左列（共 8 件商品）：顶部推低 20vh，与右列错开入场节奏 */
.column-left {
  display: grid;
  gap: var(--gutter);
  grid-auto-flow: row;
  grid-column: 1 / span 6;
  grid-template-columns: repeat(6, 1fr);
  margin-bottom: 10vh;
  padding-top: 20vh;
}

.column-left .grid-item {
  grid-row: auto;
  margin-bottom: 20vh;
}

/* 左列奇偶宽度交替：窄 3 栏 (第 2~4 列) <-> 宽 4 栏 (第 2~5 列) */
.column-left .grid-item:nth-child(odd) {
  grid-column: 2 / span 3;
}

.column-left .grid-item:nth-child(2n + 2) {
  grid-column: 2 / span 4;
}

/* 右列（共 7 件商品）：顶部推低 10vh，滚动时比左列略晚跟上。 */
.column-right {
  display: grid;
  gap: var(--gutter);
  grid-auto-flow: row;
  grid-column: 7 / span 6;
  grid-template-columns: repeat(6, 1fr);
  margin-top: 10vh;
}

.column-right .grid-item {
  margin-bottom: 20vh;
}

/* 右列奇偶宽度交替：超宽 5 栏 (第 1~5 列) <-> 居中 4 栏 (第 2~5 列) */
.column-right .grid-item:nth-child(odd) {
  grid-column: 1 / span 5;
}

.column-right .grid-item:nth-child(2n + 2) {
  grid-column: 2 / span 4;
}

@media only screen and (max-width: 1180px) and (orientation: portrait) {
  .column-left {
    margin-bottom: 0;
  }
}

@media only screen and (max-width: 812px) {
  .column-left,
  .column-right {
    grid-column: 1 / span 12;
    margin-bottom: 0;
    margin-top: 0;
    padding-top: 0;
  }

  .column-left .grid-item,
  .column-right .grid-item {
    margin-bottom: 10vh;
  }

  .column-left .grid-item:nth-child(odd),
  .column-left .grid-item:nth-child(2n + 2),
  .column-right .grid-item:nth-child(odd),
  .column-right .grid-item:nth-child(2n + 2) {
    grid-column: 1 / span 6;
    margin-top: 0;
  }
}

/* ==========================================================================
   About & Ethos 品牌叙事区（深青底色 #244544 + 裸粉文字 #eed0cc）
   ========================================================================== */
.home-about {
  background: var(--deep-teal);
  color: var(--pink);
  padding: var(--gutter);
  position: relative;
  z-index: 10;
}

.home-about a {
  color: var(--pink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.home-about a:hover {
  text-decoration: none;
}

.home-about-top {
  padding-bottom: var(--gutter-2);
}

.home-about-top-item {
  position: relative;
}

/* 小标题绝对定位在左上角，顺理成章嵌进首段 2 个栅格宽度（16.666667%）的缩进槽内 */
.home-about-top-item h2 {
  font-family: var(--font-body);
  font-feature-settings: "ss02" on, "kern" on;
  font-size: var(--body);
  font-style: normal;
  font-weight: 400;
  left: 0;
  letter-spacing: 0;
  line-height: var(--body-l);
  position: absolute;
  top: 0;
}

.home-about-top p {
  font-family: var(--font-display);
  font-feature-settings: "titl" on, "kern" on;
  font-size: var(--heading);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  line-height: var(--heading-l);
  margin-bottom: var(--gutter-2);
  text-indent: 0;
}

.home-about-top p:first-of-type {
  text-indent: 16.666667%;
}

.home-about-columns {
  display: grid;
  gap: var(--gutter);
  grid-template-columns: repeat(12, 1fr);
}

.home-about-columns-left {
  grid-column: 1 / span 6;
}

.home-about-columns-right {
  grid-column: 8 / span 4;
  max-width: 500px;
}

.home-about-columns-right p {
  margin-bottom: var(--gutter);
}

.home-about-columns-right p:last-of-type {
  margin-bottom: 0;
}

.home-about-columns-right-content-columns {
  display: grid;
  gap: var(--gutter);
  grid-template-columns: repeat(2, 1fr);
}

.home-about-columns-right-content-left {
  grid-column: 1 / span 1;
}

.home-about-columns-right-content-right {
  grid-column: 2 / span 1;
}

@media only screen and (min-width: 1800px) {
  .home-about-top p {
    max-width: 2200px;
  }
}

@media only screen and (max-width: 812px) {
  .home-about-top {
    margin-top: var(--gutter-2);
  }

  .home-about-top p:first-of-type {
    text-indent: 25%;
  }

  .home-about-columns-left,
  .home-about-columns-right {
    grid-column: 1 / span 12;
  }

  .home-about-columns-right {
    margin-bottom: var(--gutter-4);
    margin-top: var(--gutter-3);
    max-width: 100%;
  }

  .home-about-columns-right-content-columns {
    grid-template-columns: repeat(1, 1fr);
  }

  .home-about-columns-right-content-right {
    grid-column: 1 / span 1;
  }
}

/* ==========================================================================
   揭幕式页脚（50vh 裁剪视窗 + 85vh 真实页脚从底部向上平移揭露）
   ========================================================================== */
.footer-wrapper {
  display: block;
  height: 50vh;
  overflow: clip;
  position: relative;
  width: 100%;
}

.global-footer {
  background-color: var(--black);
  bottom: 0;
  color: var(--pink);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  height: 85vh;
  left: 0;
  padding: var(--gutter);
  position: absolute;
  width: 100%;
  z-index: 100;
}

.global-footer a {
  color: var(--pink);
}

.global-footer-left {
  display: flex;
  flex-direction: column;
  grid-column: 1 / span 6;
  justify-content: space-between;
}

.global-footer-left-top p {
  max-width: 380px;
  text-indent: var(--gutter-4);
}

.global-footer-left-top p:first-child {
  text-indent: 0;
}

.global-footer-nav {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(6, 1fr);
  left: 0;
  padding-left: var(--gutter);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50%;
}

.global-footer-nav ul {
  grid-column: 1 / span 3;
  list-style: none;
  margin: 0;
  padding: 0;
}

.global-footer-nav .newsletter-footer {
  grid-column: 4 / span 3;
}

.global-footer-right {
  align-self: flex-start;
  grid-column: 8 / span 5;
}

.footer-wordmark {
  color: var(--pink);
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 6.5vw, 8rem);
  letter-spacing: -0.06em;
  line-height: 0.96;
  margin: 0;
}

@media only screen and (max-width: 1380px) {
  .footer-wrapper {
    height: 85vh;
  }

  .global-footer-left {
    grid-column: 1 / span 4;
  }

  .global-footer-left-top p {
    max-width: 340px;
  }
}

@media only screen and (max-width: 812px) {
  .footer-wrapper {
    height: 80vh;
  }

  .global-footer {
    height: 100%;
    position: relative;
  }

  .global-footer-left {
    grid-column: 1 / span 12;
    grid-row: 2 / span 1;
    justify-content: flex-end;
  }

  .global-footer-left-top {
    display: none;
  }

  .global-footer-right {
    grid-column: 6 / span 7;
    grid-row: 1 / span 1;
  }

  .global-footer-nav {
    position: static;
    transform: none;
    width: 100%;
    padding-left: 0;
    margin-bottom: var(--gutter-3);
  }

  .global-footer-nav .newsletter-footer {
    display: none;
  }
}

/* ==========================================================================
   学习辅助：12 列栅格 X 光透视覆盖层（按 G 键或点击右下角按钮切换）
   ========================================================================== */
.grid-xray-overlay {
  display: grid;
  gap: var(--gutter);
  grid-template-columns: repeat(12, 1fr);
  height: 100%;
  left: 0;
  opacity: 0;
  padding: 0 var(--gutter);
  pointer-events: none;
  position: fixed;
  top: 0;
  transition: opacity 0.2s ease;
  width: 100%;
  z-index: 950;
}

body.show-grid-xray .grid-xray-overlay {
  opacity: 1;
}

.grid-xray-col {
  background: rgba(253, 164, 255, 0.14);
  border-inline: 1px dashed rgba(253, 164, 255, 0.45);
  height: 100%;
}

.study-toolbar {
  align-items: center;
  bottom: var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  justify-content: flex-end;
  left: var(--gutter);
  pointer-events: none;
  position: fixed;
  right: var(--gutter);
  z-index: 960;
}

.study-source,
.xray-toggle {
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(238, 208, 204, 0.45);
  border-radius: 999px;
  color: var(--pink);
  cursor: pointer;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 0.5rem 0.75rem;
  pointer-events: auto;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.study-source:hover,
.xray-toggle:hover {
  background: var(--black);
  transform: translateY(-1px);
}

.xray-toggle[aria-pressed="true"] {
  background: var(--pink);
  border-color: var(--black);
  color: var(--black);
}

.global-footer-nav .home-link,
.global-footer-nav .gallery-link,
.global-footer-nav .about-link {
  color: inherit;
  font: inherit;
  text-align: start;
}
