@font-face {
  font-family: "PangolinLocal";
  src: url("./assets/fonts/Pangolin-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "ChillKai";
  src: url("./assets/fonts/ChillHuoFangKai_F_Regular.otf") format("opentype");
}

@font-face {
  font-family: "ChillKaiBold";
  src: url("./assets/fonts/ChillHuoFangKai_F_ConBold.otf") format("opentype");
}

@font-face {
  font-family: "ZenKurenaidoLocal";
  src: url("./assets/fonts/ZenKurenaido-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "GaeguLocal";
  src: url("./assets/fonts/Gaegu-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "KalamLocal";
  src: url("./assets/fonts/Kalam-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "MaliLocal";
  src: url("./assets/fonts/Mali-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "NeuchaLocal";
  src: url("./assets/fonts/Neucha-Regular.ttf") format("truetype");
}

:root {
  --paper: #f3eee3;
  --paper-soft: #fbf7ef;
  --ink: #1f1d18;
  --graphite: #4f4b43;
  --moss: #546d4b;
  --grass: #b8dc48;
  --sun: #ffd543;
  --peach: #ff9f79;
  --line: rgba(52, 45, 37, 0.22);
  --shadow: 0 28px 55px rgba(44, 34, 24, 0.14);
  --font-app: "PangolinLocal", "Comic Sans MS", ui-rounded, system-ui, sans-serif;
  --font-bold: "PangolinLocal", ui-rounded, system-ui, sans-serif;
}

body[data-font-profile="chinese"] {
  --font-app: "ChillKai", "PingFang SC", "Microsoft Yahei", sans-serif;
  --font-bold: "ChillKaiBold", "ChillKai", "PingFang SC", sans-serif;
}

body[data-font-profile="japanese"] {
  --font-app: "ZenKurenaidoLocal", "Hiragino Sans", sans-serif;
  --font-bold: "ZenKurenaidoLocal", "Hiragino Sans", sans-serif;
}

body[data-font-profile="korean"] {
  --font-app: "GaeguLocal", "Apple SD Gothic Neo", sans-serif;
  --font-bold: "GaeguLocal", "Apple SD Gothic Neo", sans-serif;
}

body[data-font-profile="kalam"] {
  --font-app: "KalamLocal", sans-serif;
  --font-bold: "KalamLocal", sans-serif;
}

body[data-font-profile="mali"] {
  --font-app: "MaliLocal", sans-serif;
  --font-bold: "MaliLocal", sans-serif;
}

body[data-font-profile="neucha"] {
  --font-app: "NeuchaLocal", sans-serif;
  --font-bold: "NeuchaLocal", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(247, 242, 232, 0.62), rgba(247, 242, 232, 0.62)),
    url("./assets/app/handmade-ivory.png") center top / 620px auto repeat;
  font-family: var(--font-app);
  letter-spacing: 0;
}

main {
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(111, 152, 78, 0.12), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(255, 213, 67, 0.12), transparent 22%),
    radial-gradient(circle at 80% 82%, rgba(255, 159, 121, 0.1), transparent 20%);
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

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

.topbar {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 28px));
  min-height: 74px;
  margin: 12px auto 0;
  padding: 10px 12px;
  border: 2px solid rgba(65, 55, 43, 0.14);
  border-radius: 32px;
  background: rgba(250, 246, 238, 0.82);
  box-shadow: 0 14px 36px rgba(45, 35, 25, 0.1);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-family: var(--font-bold);
  font-size: 22px;
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.language-chip {
  display: none;
}

select,
.small-download {
  min-height: 44px;
  border: 2px solid rgba(65, 55, 43, 0.17);
  border-radius: 999px;
  font-family: var(--font-app);
  font-size: 17px;
}

select {
  max-width: 188px;
  padding: 0 36px 0 16px;
  color: var(--graphite);
  background: rgba(255, 252, 245, 0.8);
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(64, 55, 45, 0.72) 50%),
    linear-gradient(135deg, rgba(64, 55, 45, 0.72) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-repeat: no-repeat;
  background-size: 6px 6px;
}

.small-download {
  display: inline-flex;
  align-items: center;
  padding: 0 20px;
  color: var(--paper-soft);
  background: #243326;
}

.hero,
.story-grid,
.split-section,
.room-paper,
.closing {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.74fr) minmax(390px, 0.86fr);
  align-items: center;
  min-height: calc(100svh - 98px);
  padding: 76px 0 84px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-copy::before,
.story-copy::before,
.room-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  background: rgba(187, 218, 70, 0.18);
}

.hero-copy::before {
  width: 220px;
  height: 220px;
  left: -54px;
  top: 74px;
}

.soft-label {
  margin: 0 0 14px;
  color: var(--moss);
  font-family: var(--font-bold);
  font-size: clamp(18px, 2vw, 24px);
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--font-bold);
  letter-spacing: 0;
}

h1 {
  max-width: 610px;
  margin-bottom: 20px;
  font-size: clamp(76px, 9.6vw, 132px);
  line-height: 0.9;
}

.hero-text {
  max-width: 520px;
  margin-bottom: 30px;
  color: var(--graphite);
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.08;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.app-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 20px 10px 15px;
  border-radius: 18px;
  color: #fff8ec;
  background: #15140f;
  box-shadow: 0 15px 26px rgba(31, 29, 24, 0.16);
}

.app-store svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.app-store small,
.app-store strong {
  display: block;
  line-height: 1;
}

.app-store small {
  font-size: 12px;
}

.app-store strong {
  margin-top: 3px;
  font-size: 25px;
}

.text-link {
  color: #314532;
  font-family: var(--font-bold);
  font-size: 21px;
}

.hero-stage {
  position: relative;
  min-height: 690px;
}

.paper-card {
  border-radius: 36px;
  box-shadow: var(--shadow);
  outline: 8px solid rgba(255, 251, 242, 0.82);
  background: var(--paper);
}

.hero-shot {
  position: absolute;
  width: 295px;
}

.hero-shot-a {
  left: 4%;
  top: 130px;
  transform: rotate(-7deg);
}

.hero-shot-b {
  left: 33%;
  top: 18px;
  z-index: 2;
  width: 330px;
  transform: rotate(2deg);
}

.hero-shot-c {
  right: -2%;
  top: 146px;
  transform: rotate(6deg);
}

.paper-note {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 78px;
}

.paper-note span {
  min-height: 92px;
  padding: 22px 24px;
  border: 2px solid rgba(65, 55, 43, 0.13);
  border-radius: 28px;
  background:
    linear-gradient(rgba(255, 251, 244, 0.68), rgba(255, 251, 244, 0.68)),
    url("./assets/app/room-paper.png") center / cover;
  color: #304330;
  font-family: var(--font-bold);
  font-size: 24px;
  box-shadow: 0 15px 35px rgba(54, 43, 30, 0.08);
}

.story-grid,
.split-section,
.closing {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(330px, 0.72fr);
  align-items: center;
  gap: clamp(42px, 8vw, 110px);
  padding: 86px 0;
}

.story-copy,
.room-copy,
.closing-copy {
  position: relative;
  min-width: 0;
}

.story-copy::before {
  width: 180px;
  height: 180px;
  right: 24px;
  bottom: -44px;
  background: rgba(255, 213, 67, 0.18);
}

h2 {
  max-width: 690px;
  margin-bottom: 18px;
  font-size: clamp(46px, 5.4vw, 82px);
  line-height: 0.96;
}

.story-copy p:not(.soft-label),
.room-copy p:not(.soft-label),
.closing-copy p:not(.soft-label) {
  max-width: 620px;
  color: var(--graphite);
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.16;
}

.screenshot-frame {
  margin: 0;
  justify-self: center;
}

.screenshot-frame img {
  width: min(390px, 72vw);
}

.ribbon-section {
  width: min(1200px, calc(100% - 32px));
  margin: 20px auto 32px;
  padding: 34px 0;
}

.share-footer {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
}

.split-section {
  grid-template-columns: minmax(330px, 0.7fr) minmax(0, 0.9fr);
}

.leaning-left img {
  transform: rotate(-2deg);
}

.room-paper {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(430px, 0.9fr);
  align-items: center;
  gap: clamp(34px, 7vw, 82px);
  margin-top: 70px;
  padding: 64px;
  border: 2px solid rgba(65, 55, 43, 0.14);
  border-radius: 42px;
  background:
    linear-gradient(rgba(255, 250, 241, 0.65), rgba(255, 250, 241, 0.65)),
    url("./assets/app/room-paper.png") center / cover;
  box-shadow: 0 24px 70px rgba(50, 40, 29, 0.11);
}

.room-copy::before {
  width: 140px;
  height: 140px;
  left: -26px;
  bottom: -20px;
  background: rgba(255, 159, 121, 0.14);
}

.room-shots {
  position: relative;
  min-height: 600px;
}

.room-shots img {
  position: absolute;
  width: 300px;
}

.room-shots img:first-child {
  left: 0;
  top: 18px;
  transform: rotate(-6deg);
}

.room-shots img:last-child {
  right: 18px;
  bottom: 18px;
  transform: rotate(6deg);
}

.closing {
  grid-template-columns: minmax(320px, 0.65fr) minmax(0, 0.95fr);
  padding-bottom: 110px;
}

.closing-shot {
  width: min(340px, 72vw);
  justify-self: center;
  transform: rotate(2deg);
}

.closing-store {
  margin-top: 18px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 46px;
  border-top: 2px solid rgba(65, 55, 43, 0.12);
  color: var(--graphite);
  font-size: 20px;
}

@media (max-width: 980px) {
  .hero,
  .story-grid,
  .split-section,
  .room-paper,
  .closing {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 52px;
  }

  .hero-stage {
    min-height: 610px;
  }

  .hero-shot-a {
    left: 0;
  }

  .hero-shot-b {
    left: 50%;
    transform: translateX(-50%) rotate(2deg);
  }

  .hero-shot-c {
    right: 0;
  }

  .paper-note {
    grid-template-columns: 1fr;
  }

  .split-section .screenshot-frame,
  .closing-shot {
    order: 2;
  }

  .split-section .story-copy,
  .closing-copy {
    order: 1;
  }

  .room-paper {
    padding: 44px 24px;
  }
}

@media (max-width: 620px) {
  body {
    width: 100%;
    max-width: 100vw;
  }

  .topbar {
    top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    min-height: 62px;
    margin: 8px 12px 0;
    padding: 8px;
    border-radius: 25px;
    overflow: visible;
  }

  .brand span {
    display: none;
  }

  .brand {
    flex: 0 0 52px;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  .top-actions {
    position: static;
    display: grid;
    flex: 0 0 68px;
    place-items: center;
    width: 68px;
    height: 42px;
    overflow: visible;
  }

  .small-download {
    display: none;
  }

  select {
    position: fixed;
    top: 18px;
    left: 84px;
    z-index: 62;
    display: block;
    width: 68px !important;
    max-width: 68px !important;
    min-width: 0;
    min-height: 42px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    font-size: 15px;
    text-overflow: ellipsis;
    opacity: 0.01;
  }

  .language-chip {
    position: fixed;
    top: 18px;
    left: 84px;
    z-index: 61;
    display: grid;
    place-items: center;
    width: 68px;
    height: 42px;
    border: 2px solid rgba(65, 55, 43, 0.17);
    border-radius: 999px;
    color: var(--graphite);
    background: rgba(255, 252, 245, 0.85);
    font-family: var(--font-app);
    font-size: 15px;
  }

  .hero,
  .story-grid,
  .split-section,
  .room-paper,
  .closing,
  .paper-note,
  footer {
    width: 100%;
    max-width: 100vw;
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero {
    display: block;
    padding-top: 42px;
    padding-bottom: 40px;
  }

  .hero-copy {
    width: 100%;
    max-width: min(100%, 340px);
    min-width: 0;
    text-align: left;
  }

  .soft-label {
    font-size: 18px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(42px, 14vw, 54px);
    line-height: 0.95;
  }

  .hero-text {
    max-width: 330px;
    font-size: 24px;
    line-height: 1.12;
  }

  .button-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .hero-stage {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    min-height: 0;
    margin-top: 34px;
    overflow: hidden;
    padding: 8px 0 10px;
  }

  .paper-card {
    border-radius: 28px;
    outline-width: 6px;
  }

  .hero-shot {
    position: static;
    width: min(232px, 68vw);
    max-width: none;
    transform: none;
  }

  .hero-shot-a {
    order: 2;
    transform: rotate(-3deg);
  }

  .hero-shot-b {
    order: 1;
    width: min(260px, 70vw);
    justify-self: center;
    transform: rotate(1deg);
  }

  .hero-shot-c {
    order: 3;
    transform: rotate(3deg);
  }

  .story-grid,
  .split-section,
  .room-paper,
  .closing {
    overflow: hidden;
  }

  .paper-note span {
    min-height: auto;
    padding: 18px 20px;
    font-size: 22px;
  }

  .story-grid,
  .split-section,
  .closing {
    padding-top: 58px;
    padding-bottom: 58px;
  }

  h2 {
    font-size: 43px;
  }

  .story-copy p:not(.soft-label),
  .room-copy p:not(.soft-label),
  .closing-copy p:not(.soft-label) {
    font-size: 25px;
  }

  .room-paper {
    margin-top: 34px;
    padding-top: 44px;
    padding-bottom: 44px;
    border-radius: 30px;
  }

  .room-shots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    min-height: 0;
  }

  .room-shots img {
    position: static;
    width: 100%;
  }

  .room-shots img:last-child {
    transform: rotate(3deg);
  }

  footer {
    flex-direction: column;
    font-size: 18px;
  }
}
