:root {
  --paper: #f5ece5;
  --paper-journal: #f1eae2;
  --paper-manifesto: #f0e7de;
  --warm-white: #fcfaf6;
  --ink: #202020;
  --sage: #7c8b67;
  --line: rgba(32, 32, 32, .14);
  --shell: 1080px;
  --page-gutter: 28px;
  --support-indent: 14px;
  --section-space: 96px;
}

* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: hidden; overflow-x: clip; background: var(--paper); scroll-behavior: smooth; }
body { position: relative; width: 100%; min-width: 320px; margin: 0; overflow-x: hidden; overflow-x: clip; background: var(--paper); color: var(--ink); font-family: var(--font-body); }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
.shell { width: min(calc(100% - (var(--page-gutter) * 2)), var(--shell)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header and hero */
.hero-panel { overflow: hidden; padding-bottom: 0; background: var(--paper); }
.site-header { position: relative; z-index: 3; display: flex; height: 118px; align-items: center; gap: clamp(26px, 3vw, 48px); }
.wordmark { display: inline-flex; width: clamp(154px, 12.5vw, 220px); align-items: center; text-decoration: none; transform: translateY(7px); }
.wordmark img { width: 100%; height: auto; }
.site-nav { display: flex; gap: clamp(28px, 3.4vw, 64px); margin-left: auto; }
.site-nav a { position: relative; color: rgba(32, 32, 32, .68); font-family: var(--font-display-latin); font-size: 16px; text-decoration: none; transition: color .2s ease; }
.site-nav a:hover { color: var(--ink); }
.site-nav a::after { position: absolute; right: 0; bottom: -7px; left: 0; height: 1px; content: ""; background: currentColor; transform: scaleX(0); transition: transform .2s ease; }
.site-nav a:hover::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 20px; }
.language-toggle { padding: 4px 0; border: 0; background: transparent; color: rgba(32, 32, 32, .72); font-family: var(--font-formal); font-size: 14px; font-weight: 700; letter-spacing: .05em; cursor: pointer; }
.nav-dot { width: 19px; height: 19px; border-radius: 50%; background: var(--ink); }
.menu-button { display: none; width: 30px; height: 30px; padding: 0; border: 0; background: transparent; color: var(--ink); font-family: var(--font-formal); font-size: 24px; font-weight: 500; line-height: 1; }
.menu-symbol { display: block; transform: translateY(-1px) rotate(0deg); transition: transform .24s ease; }
.menu-button[aria-expanded="true"] .menu-symbol { transform: translateY(-1px) rotate(45deg); }

.hero { display: grid; min-height: 720px; grid-template-columns: 360px minmax(0, 1fr); align-items: center; padding: 18px 0 0; }
.hero-copy { max-width: 300px; margin-left: 56px; }
h1, h2 { font-family: var(--font-display-latin); font-weight: 650; letter-spacing: -.065em; line-height: .96; }
h1 { font-size: clamp(58px, 5.55vw, 84px); font-weight: 500; line-height: 1.05; }
h1 em { color: var(--sage); font-style: normal; }
.hero-everyday { white-space: nowrap; }
.hero-lead { margin-top: 28px; font-family: var(--font-display-cjk); font-size: 16px; font-weight: 500; line-height: 1.8; }
.underline-link { display: inline-flex; gap: 20px; margin-top: 42px; padding-bottom: 8px; border-bottom: 1px solid currentColor; font-family: var(--font-display-latin); font-size: 11px; text-decoration: none; transition: gap .2s ease; }
.underline-link:hover { gap: 28px; }
.hero-scene { position: relative; height: 702px; overflow: visible; pointer-events: none; }
.hero-scene picture { position: absolute; inset: 0; display: block; }
.hero-scene img { position: absolute; right: auto; bottom: -28px; left: -8%; width: 118%; height: 118%; object-fit: contain; object-position: right bottom; }
.hero-sun { display: none; position: absolute; z-index: 1; width: clamp(44px, 5vw, 72px); color: #e1ad3f; transform: rotate(-9deg); }
.hero-squiggle { position: absolute; right: 22px; bottom: 34px; z-index: 1; width: clamp(72px, 8vw, 112px); color: #dca83f; transform: rotate(-8deg); }

/* Three-piece manifesto */
.philosophy { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 0; padding-bottom: var(--section-space); overflow: hidden; }
.reference-crop, .manifesto { min-height: 0; aspect-ratio: 255 / 280; }
.reference-crop { overflow: hidden; background-color: #e9dfd1; background-image: url("uqqk-codex-site-kit/assets/reference/desktop/02-philosophy.jpg"); background-repeat: no-repeat; background-size: 300% 100%; }
.reference-crop--left { border-radius: 28px 0 0 28px; background-image: url("product/a304897e8c4e13eedf36e3b4b7439461.png"); background-position: center; background-size: cover; }
.reference-crop--right { border-radius: 0 28px 28px 0; background-image: url("product/微信图片_20260813174038_480_13.png"); background-position: center; background-size: cover; }
.manifesto { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; overflow: hidden; padding: 28px 30px; background: var(--paper-manifesto); }
.manifesto h2 { width: max-content; max-width: 100%; margin: 0 0 0 10px; font-family: var(--font-hand); font-size: 39px; font-weight: 500; line-height: 1.27; letter-spacing: -.09em; text-align: left; transform: rotate(-2.4deg); }
.manifesto-line { display: flex; align-items: baseline; white-space: nowrap; }
.manifesto-line--one, .manifesto-line--three { gap: .48em; }
.manifesto-line--two, .manifesto-line--four { gap: .62em; }
.manifesto .dont { letter-spacing: -.16em; }
.manifesto h2 em { font-style: normal; }
.manifesto-signature { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; align-self: flex-end; margin: 28px 0 0; padding-top: 12px; font-family: var(--font-display-latin); font-size: 11px; transform: none; }
.manifesto-signature::before { position: absolute; top: 0; width: 150px; height: 2px; border-radius: 50%; content: ""; background: var(--ink); transform: rotate(-2deg); }
.manifesto-signature img { width: 48px; }

/* Categories */
.collection { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: center; gap: 58px; padding-bottom: var(--section-space); }
.section-heading { padding-left: 22px; }
.section-heading h2 { font-family: var(--font-hand); font-size: 57px; font-weight: 500; letter-spacing: -.055em; line-height: .98; }
.section-heading h2 em { font-family: inherit; font-style: normal; font-weight: inherit; letter-spacing: inherit; }
.collection .section-heading h2 em { display: inline-block; font-size: .8em; }
.section-heading .underline-link { margin: 34px 0 0 var(--support-indent); }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.category { display: grid; min-height: 256px; grid-template-rows: 1fr auto; place-items: center; padding: 8px 0 22px; font-family: var(--font-formal); text-decoration: none; transition: background-color .2s ease; }
.category:hover { background: rgba(32, 32, 32, .035); }
.category-art { display: grid; width: 100%; height: 100%; place-items: center; }
.category-art img { width: min(100%, 190px); height: auto; }
.category strong { margin-top: 9px; font-size: 13px; font-weight: 700; }

/* Journal: fixed card ratio, no shrinking card width at desktop/tablet */
.journal { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: center; gap: 58px; width: 100vw; margin-left: calc(50% - 50vw); padding: 82px max(28px, calc((100vw - var(--shell)) / 2)) 104px; background: var(--paper-journal); }
.journal .section-heading { transform: translateY(22px); }
.journal-browse { display: none; }
.journal-sub { margin: 24px 0 0 var(--support-indent); font-family: var(--font-display-cjk); font-size: 13px; line-height: 1.8; }
.journal-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.journal-card { position: relative; display: flex; width: 100%; max-width: 180px; aspect-ratio: 13 / 16; align-items: end; justify-content: space-between; justify-self: center; overflow: hidden; padding: 10px; border-radius: 10px; color: var(--warm-white); background-image: url("uqqk-codex-site-kit/assets/reference/desktop/04-process.jpg"); background-repeat: no-repeat; background-size: 500% 100%; font-family: var(--font-display-latin); font-size: 10px; text-decoration: none; }
.journal-card::after { position: absolute; inset: 0; content: ""; background: linear-gradient(transparent 55%, rgba(0, 0, 0, .28)); }
.journal-card span, .journal-card b { position: relative; z-index: 1; }
.journal-card b { opacity: .72; }
.journal-card--sketch { background-position: 33% center; }
.journal-card--color { background-position: 56% center; }
.journal-card--material { background-position: 78% center; }
.journal-card--life { background-position: right center; }
.journal-card--sketch { background-image: url("product/3c925692-d975-433e-999a-c31871213660.png"); background-position: center; background-size: cover; }
.journal-card--color { background-image: url("product/202b5488-8278-4641-8274-e110c74efdd7.png"); background-position: center; background-size: cover; }
.journal-card--material { background-image: url("product/7410941d-3ae0-44b0-a4d9-ac618bc46d91.png"); background-position: center; background-size: cover; }
.journal-card--life { background-image: url("product/6ddd876a47b9a2c2feea24403bf2f179.png"); background-position: center; background-size: cover; }
.mobile-scroll-hint { display: none; }
.scroll-dot { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: rgba(32, 32, 32, .28); cursor: pointer; }
.scroll-dot.is-active { background: var(--ink); }

/* Product feature */
.feature-product { position: relative; display: flex; height: clamp(440px, 36vw, 530px); min-height: 0; align-items: center; margin-bottom: clamp(72px, 7vw, 100px); overflow: hidden; background: #eadfce url("uqqk-codex-site-kit/assets/product-backgrounds/story-blank-desktop.webp") calc(50% + 8px) calc(50% - 42px) / cover no-repeat; }
.feature-copy { position: relative; z-index: 1; padding-left: clamp(18px, 2.3vw, 46px); }
.feature-product-image { position: absolute; z-index: 0; top: 50%; right: max(24px, calc((100vw - var(--shell)) / 2 + 56px)); width: min(40vw, 470px); height: 92%; object-fit: contain; transform: translateY(-50%); }
.feature-copy h2 { margin-left: clamp(56px, 7.2vw, 142px); font-family: var(--font-formal); font-size: clamp(42px, 4.1vw, 62px); font-weight: 500; letter-spacing: -.065em; line-height: 1.1; }
.feature-copy h2 em { font-family: inherit; font-style: normal; font-weight: inherit; letter-spacing: inherit; }
.feature-copy .underline-link { margin-left: clamp(56px, 7.2vw, 142px); }

/* Chinese display type needs more breathing room than the Latin letterforms. */
html[lang="zh-CN"] h1 { font-size: clamp(46px, 4.35vw, 65px); font-weight: 500; letter-spacing: -.035em; line-height: 1.14; }
html[lang="zh-CN"] .manifesto h2 { font-size: 35px; letter-spacing: -.045em; line-height: 1.34; }
html[lang="zh-CN"] .section-heading h2 { font-size: 51px; letter-spacing: -.03em; line-height: 1.06; }
html[lang="zh-CN"] .feature-copy h2 { font-size: 52px; letter-spacing: -.03em; line-height: 1.08; }

/* Footer */
.site-footer { display: grid; grid-template-columns: 1.6fr .85fr .75fr 1.2fr .4fr; gap: 28px; padding-block: 31px 38px; border-top: 1px solid var(--line); font-family: var(--font-display-latin); }
.footer-brand p { margin-top: 13px; font-size: 10px; line-height: 1.55; }
.footer-links { display: contents; }
.footer-links > div, .footer-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 10px; }
.footer-links > div:first-child { padding-left: 30px; }
.site-footer b { margin-bottom: 6px; font-size: 10px; }
.site-footer a:not(.wordmark) { opacity: .68; text-decoration: none; }
.footer-smile { width: 45px; align-self: center; justify-self: end; }

@media (max-width: 1120px) {
  :root { --page-gutter: clamp(26px, 4vw, 48px); }
  .site-header { height: 98px; }
  .wordmark { width: clamp(142px, 14vw, 176px); }
  .site-nav { gap: clamp(22px, 3vw, 40px); }
  .hero { min-height: clamp(520px, 58vw, 650px); grid-template-columns: minmax(260px, .75fr) minmax(0, 1.35fr); gap: clamp(32px, 4.5vw, 62px); padding-top: 20px; }
  .hero-copy { margin-left: clamp(28px, 4vw, 52px); }
  .hero-scene { height: clamp(520px, 58vw, 650px); }
  .hero-scene img { bottom: -22px; left: -6%; width: 114%; height: 114%; }
  .collection, .journal { grid-template-columns: minmax(175px, .58fr) minmax(0, 1.7fr); gap: clamp(30px, 4vw, 56px); }
  .journal-cards { gap: clamp(10px, 1.15vw, 16px); }
}

@media (max-width: 900px) {
  .site-header { height: 84px; }
  .site-nav { gap: 22px; }
  .site-nav a { font-size: 14px; }
  .header-actions { gap: 14px; }
  .language-toggle { font-size: 12px; }
  .nav-dot { width: 16px; height: 16px; }
  .hero { min-height: 470px; grid-template-columns: minmax(220px, .65fr) minmax(0, 1.18fr); gap: 30px; }
  .hero-copy { margin-left: 0; }
  h1 { font-size: clamp(50px, 6.2vw, 64px); }
  .hero-scene { height: clamp(470px, 62vw, 570px); }
  .hero-scene img { bottom: -16px; left: -4%; width: 110%; height: 110%; }
  .manifesto h2 { font-size: clamp(29px, 3.7vw, 39px); }
  .manifesto-signature { gap: 12px; margin-top: 36px; font-size: 11px; }
  .manifesto-signature img { width: 48px; }
  .collection, .journal { grid-template-columns: minmax(145px, .54fr) minmax(0, 1.46fr); gap: 28px; }
  .section-heading { padding-left: 10px; }
  .section-heading h2 { font-size: clamp(41px, 5.8vw, 55px); }
  .category { min-height: 230px; }
  .journal { padding-block: 62px 78px; }
  .journal-card { padding: 9px; font-size: 9px; }
}

@media (max-width: 767px) {
  :root { --page-gutter: 16px; --support-indent: 0px; }
  .shell { width: calc(100% - 32px); }
  .hero-panel { padding-bottom: 40px; }
  .site-header { height: 76px; }
  .wordmark { width: 138px; transform: translateY(4px); }
  .site-header { justify-content: space-between; gap: 0; }
  .site-nav { position: absolute; z-index: 10; top: 66px; right: 16px; left: auto; display: grid; width: max-content; gap: 6px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; opacity: 0; pointer-events: none; text-align: right; transform: translateY(-6px); transition: .2s ease; }
  .site-nav.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .site-nav a { padding: 0; color: var(--ink); border-radius: 0; font-size: 14px; line-height: 1.35; }
  .site-nav a:hover { background: transparent; }
  .menu-button { display: block; width: 38px; height: 38px; font-size: 33px; }
  .nav-dot { display: none; }
  .header-actions { gap: 9px; }
  .language-toggle { color: var(--ink); font-size: 13px; font-weight: 500; letter-spacing: 0; }

  .hero { display: block; min-height: 0; padding: 38px 5px 0; }
  .hero-copy { margin-left: 12px; }
  .hero h1 { max-width: 300px; font-size: clamp(49px, 14vw, 67px); }
  html[lang="zh-CN"] .hero h1 { max-width: 360px; font-size: clamp(54px, 14vw, 64px); line-height: 1.14; letter-spacing: -.05em; white-space: normal; }
  html[lang="zh-CN"] .hero-last-line { display: inline-block; white-space: nowrap; }
  .hero-lead { margin-top: 22px; }
  .underline-link { margin-top: 31px; }
  .hero-scene { height: auto; min-height: 0; margin-top: 28px; overflow: visible; aspect-ratio: .82; }
  .hero-scene img { top: -62%; right: auto; bottom: auto; left: -25%; width: 162%; height: 162%; max-width: none; object-position: center bottom; transform: none; }
  .hero-sun { display: block; top: -14%; right: 61%; width: 52px; }
  .hero-squiggle { right: 12px; bottom: 18px; width: 72px; }

  .philosophy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding-bottom: 68px; }
  .reference-crop { display: block; min-height: 0; aspect-ratio: 255 / 280; }
  .reference-crop--left { grid-column: 1; grid-row: 2; border-radius: 0 0 0 24px; }
  .reference-crop--right { grid-column: 2; grid-row: 2; border-radius: 0 0 24px 0; }
  .manifesto { grid-column: 1 / -1; grid-row: 1; min-height: 286px; aspect-ratio: auto; align-items: center; padding: 30px 24px; border-radius: 24px 24px 0 0; }
  .manifesto h2 { align-self: center; margin: 24px 0 0 12px; font-size: clamp(31px, 9vw, 41px); text-align: left; }
  .manifesto-signature { align-self: flex-end; margin: 36px 0 -4px; }

  .collection, .journal { display: block; padding-bottom: 76px; }
  .section-heading { padding-left: 0; }
  .collection .section-heading, .journal .section-heading { display: flex; width: 100%; align-items: baseline; justify-content: center; gap: 8px; white-space: nowrap; }
  .journal .section-heading { position: relative; justify-content: center; gap: 0; }
  .collection .section-heading h2, .journal .section-heading h2 { min-width: 0; font-family: var(--font-formal); font-size: 8px; font-weight: 500; letter-spacing: 0; line-height: 1.2; word-spacing: .24em; }
  .collection .section-heading h2, .journal .section-heading h2 { font-size: 27px; word-spacing: 0; }
  html[lang="zh-CN"] .collection .section-heading h2,
  html[lang="zh-CN"] .journal .section-heading h2 { font-size: 27px; letter-spacing: 0; line-height: 1.2; word-spacing: 0; }
  .collection .section-heading h2 br, .journal .section-heading h2 br { display: none; }
  .collection .section-heading h2 em { font-size: inherit; }
  .collection .section-heading .underline-link { flex: 0 0 auto; margin: 0; font-size: 8px; }
  .collection .section-heading .collection-browse { display: none; }
  .journal .section-heading .journal-browse { position: absolute; top: 50%; right: 0; display: inline-flex; margin: 0; font-size: 8px; transform: translateY(-50%); }
  .category-grid { grid-template-columns: 1fr; margin-top: 30px; }
  .category { min-width: 0; min-height: 0; grid-template-columns: minmax(0, 196px) max-content; grid-template-rows: 1fr; justify-content: center; justify-items: center; column-gap: 22px; padding: 0; max-width: 100%; }
  .category-art { width: 100%; max-width: 196px; height: 196px; place-items: center; }
  .category-art img { width: min(186px, 100%); }
  .category strong { margin: 0; font-size: 27px; font-weight: 700; }

  .journal { width: 100%; max-width: 100%; margin-right: 0; margin-left: 0; padding-top: 66px; padding-right: 16px; padding-left: 16px; }
  .journal .section-heading { transform: none; }
  .journal-sub { display: none; }
  .journal-cards { display: flex; width: 100%; gap: 12px; margin-top: 28px; overflow-x: auto; overscroll-behavior-x: contain; padding: 0 0 8px 26px; scrollbar-width: none; scroll-snap-type: x mandatory; }
  .journal-cards::-webkit-scrollbar { display: none; }
  .journal-card { flex: 0 0 180px; width: 180px; max-width: 180px; min-height: 0; aspect-ratio: 13 / 16; padding: 13px; font-size: 11px; scroll-snap-align: center; }
  .mobile-scroll-hint { display: flex; justify-content: center; gap: 8px; margin-top: 14px; padding: 0; }
  .scroll-dot { flex: 0 0 6px; }

  .feature-product { min-height: 678px; align-items: flex-start; margin-bottom: 78px; background-image: url("uqqk-codex-site-kit/assets/product-backgrounds/story-blank-mobile.webp"); background-position: center; }
  .feature-product-image { top: 270px; right: 0; width: 78%; height: 430px; transform: none; }
  .feature-copy { padding: 80px 0 0 15px; }
  .feature-copy h2 { margin-left: 18px; }
  .feature-copy .underline-link { margin-left: 42px; font-family: var(--font-hand); font-size: 11px; }
  .feature-copy h2 { font-size: clamp(48px, 12.5vw, 60px); line-height: 1.24; }
  html[lang="zh-CN"] .feature-copy h2 { font-size: clamp(42px, 10.8vw, 52px); font-weight: 500; letter-spacing: .025em; line-height: 1.36; }

  .site-footer { grid-template-columns: 1fr 1fr; column-gap: 10px; row-gap: 30px; padding-top: 30px; }
  .footer-brand { display: flex; grid-column: 1 / -1; flex-direction: column; align-items: center; }
  .footer-brand .wordmark { display: flex; margin-inline: auto; }
  .footer-brand p { margin-top: 13px; font-size: 12px; text-align: center; }
  .footer-links { display: grid; grid-column: 1 / -1; grid-template-columns: 1fr 1fr; width: calc(100% - 96px); margin-left: 96px; column-gap: 10px; }
  .footer-links > div, .footer-contact { font-size: 12px; }
  .footer-links > div:first-child { padding-left: 64px; }
  .footer-contact { display: grid; grid-column: 1 / -1; grid-template-columns: 1fr auto 1fr; align-items: baseline; width: 100%; column-gap: 6px; row-gap: 8px; }
  .footer-contact b { grid-column: 1 / -1; text-align: center; }
  .footer-contact a { min-width: 0; white-space: nowrap; }
  .footer-contact a:nth-child(2) { justify-self: end; }
  .footer-contact a:nth-child(3) { justify-self: center; }
  .footer-contact a:nth-child(4) { justify-self: start; }
  .site-footer b { font-size: 12px; }
  .footer-smile { display: none; }
}

@media (max-width: 374px) {
  .footer-links { width: calc(100% - 80px); margin-left: 80px; }
  .footer-links > div:first-child { padding-left: 56px; }
}
