@font-face {
  font-family: "Kanit";
  src: url("../assets/kanit-900.ttf") format("truetype");
  font-weight: 900;
  font-display: swap;
}

.pocket-case {
  --ink: #211d2a;
  --muted: #5b5466;
  --purple: #563aba;
  --mint: #b4f2d2;
  --dark: #161519;
  --paper: #faf9fc;
  --rule: #ded9e7;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

.pocket-case ::selection { background: #d8cdfd; color: var(--ink); }
.pocket-case a:focus-visible,
.pocket-case [role="tabpanel"]:focus-visible { outline: 2px solid #8e67f6; outline-offset: 5px; }
.pocket-case a { text-underline-offset: .24em; }
.skip-link { position: fixed; top: 8px; left: 12px; z-index: 40; padding: 12px 18px; background: white; color: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.pocket-case .project-nav {
  height: 64px;
  background: var(--dark);
  color: #f4f0f9;
  border-bottom-color: #35313b;
  backdrop-filter: none;
}
.pocket-case .project-nav a:hover { color: var(--mint); }
.pocket-case .project-nav .project-name span { color: #b9afc5; }
.pocket-wrap { width: min(1180px, calc(100% - clamp(40px, 10vw, 144px))); margin-inline: auto; }

.pocket-hero { overflow: hidden; background: var(--dark); color: #faf7ff; }
.hero-layout {
  min-height: clamp(555px, 49vw, 730px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.33fr);
  align-items: center;
  column-gap: clamp(16px, 4vw, 56px);
}
.hero-copy { position: relative; z-index: 2; padding-block: 58px; }
.hero-copy h1 { margin: 0; font-size: clamp(60px, 7vw, 96px); line-height: 1.02; font-weight: 800; letter-spacing: -.04em; }
.hero-copy h1 span {
  display: block;
  margin-top: 7px;
  color: #c4afff;
  font-family: "Kanit", sans-serif;
  font-size: clamp(56px, 7vw, 96px);
  font-weight: 900;
  line-height: .91;
  letter-spacing: -.035em;
}
.hero-position { margin: 27px 0 10px; font-size: clamp(18px, 2vw, 24px); line-height: 1.4; font-weight: 650; }
.hero-summary { max-width: 34ch; margin: 0; color: #c1b8cb; font-size: 16px; line-height: 1.8; }
.hero-link { display: inline-flex; align-items: center; gap: 30px; min-height: 46px; margin-top: 30px; padding: 0 16px; color: var(--dark); background: var(--mint); border-radius: 6px; font-size: 14px; font-weight: 650; text-decoration: none; }
.hero-link:hover { background: #d0f9e3; }
.hero-link span { font-size: 19px; }

.hero-art {
  position: relative;
  align-self: stretch;
  isolation: isolate;
  min-height: 500px;
  margin-block: 24px;
}
.hero-art::before {
  position: absolute;
  inset: 10% -12% 4% -4%;
  z-index: -1;
  background: radial-gradient(ellipse at 53% 60%, #504378 0, #332a45 37%, transparent 70%), radial-gradient(ellipse at 81% 39%, #263c35 0, transparent 65%);
  content: "";
}
.hero-phone { position: absolute; width: clamp(178px, 22vw, 292px); border-radius: 12% / 6%; overflow: hidden; box-shadow: 0 24px 56px #0007; }
.hero-phone img { display: block; width: 100%; height: auto; }
.hero-phone-home { z-index: 1; top: 53%; left: 36%; transform: translate(-50%, -50%) rotate(-9deg); }
.hero-phone-pk { top: 44%; left: 72%; transform: translate(-50%, -50%) rotate(10deg) scale(.86); }

.pocket-overview,
.pocket-desktop { padding-block: clamp(64px, 9vw, 126px); }
.section-intro { display: grid; grid-template-columns: 1.2fr minmax(0, 1fr); gap: 24px 7%; align-items: end; margin-bottom: clamp(24px, 4vw, 50px); }
.pocket-case h2 { margin: 0; font-size: clamp(34px, 5.1vw, 68px); font-weight: 750; line-height: 1.1; letter-spacing: -.04em; text-wrap: balance; }
.section-intro p,
.mobile-heading > p,
.screen-copy p { margin: 0; font-size: 16px; line-height: 1.85; color: var(--muted); }
.pocket-case figure { margin: 0; }
.navigation-art img, .desktop-art img { display: block; width: 100%; height: auto; border-radius: 14px; }
.navigation-art img { background: white; border: 1px solid var(--rule); }
.pocket-case figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 18px; padding-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.text-link { display: inline-flex; gap: .6em; align-items: baseline; padding-block: 8px; color: var(--purple); font-size: 14px; font-weight: 650; text-decoration-thickness: 1px; }
.text-link:hover { color: #34227e; }

.pocket-mobile { background: #efebfa; padding-block: clamp(56px, 8vw, 110px); }
.mobile-layout { display: grid; grid-template-columns: minmax(220px, .75fr) minmax(0, 1.45fr); gap: clamp(28px, 6vw, 88px); }
.mobile-heading { align-self: start; }
.mobile-heading > p { margin-block: 20px 28px; max-width: 38ch; }
.mobile-nav { display: flex; gap: clamp(15px, 2.5vw, 30px); border-bottom: 1px solid #c9bfdc; }
.mobile-nav a { display: inline-flex; align-items: center; min-height: 46px; padding-inline: 2px; border-bottom: 2px solid transparent; color: #514664; font-size: 14px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.mobile-nav a:hover,
.mobile-nav a[aria-selected="true"] { border-bottom-color: var(--purple); color: var(--purple); }
.screen-panel { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr); align-items: center; gap: clamp(18px, 3vw, 45px); min-height: 520px; }
.screen-panel[hidden] { display: none; }
.screen-panel + .screen-panel { margin-top: 30px; }
[data-screens].is-enhanced .screen-panel { margin-top: 0; }
.screen-visual { min-width: 0; display: grid; justify-items: center; }
.screen-image { display: block; width: min(100%, 240px); max-height: 520px; height: auto; object-fit: contain; border-radius: 11% / 6%; }
.screen-copy h3 { margin: 0 0 12px; font-size: clamp(22px, 2.8vw, 32px); line-height: 1.25; letter-spacing: -.03em; text-wrap: balance; }
.screen-copy .text-link { margin-top: 10px; }
.desktop-art > a { display: block; border-radius: 14px; }
.desktop-art > a img { border: 1px solid var(--rule); }
.pocket-archive { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: baseline; justify-content: space-between; padding-block: 24px 40px; border-top: 1px solid var(--rule); }
.pocket-archive h2 { font-size: 23px; letter-spacing: -.02em; }
.pocket-case .project-footer { border-top: 1px solid var(--rule); background: var(--paper); }
.pocket-case .project-footer-content { color: var(--muted); }
.pocket-case .project-footer a { color: var(--purple); }

@media (max-width: 950px) {
  .screen-panel { grid-template-columns: 1fr; align-content: start; gap: 20px; min-height: 600px; }
  .screen-copy { max-width: 40ch; }
}

@media (max-width: 680px) {
  .pocket-case .project-nav { height: 58px; }
  .pocket-case .project-nav nav { display: none; }
  .hero-layout { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { padding-block: 38px 2px; }
  .hero-copy h1 { font-size: clamp(53px, 11vw, 73px); }
  .hero-copy h1 span { display: inline-block; margin: 0 0 0 .22em; font-size: clamp(36px, 9vw, 64px); }
  .hero-position { margin-top: 17px; }
  .hero-summary { font-size: 15px; }
  .hero-link { margin-top: 18px; }
  .hero-art { width: min(100%, 500px); min-height: 0; height: clamp(330px, 94vw, 490px); margin: 2px auto 15px; }
  .hero-phone { width: clamp(136px, 40vw, 220px); }
  .hero-phone-home { left: 37%; }
  .hero-phone-pk { left: 70%; }
  .section-intro, .mobile-layout { grid-template-columns: 1fr; gap: 15px; }
  .mobile-heading > p { margin-block: 14px 18px; }
  .screen-panel { min-height: 0; padding-top: 16px; }
  .screen-image { width: min(76%, 226px); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-phone-home { animation: pocket-home-enter .75s cubic-bezier(.2,.7,.2,1) both; }
  .hero-phone-pk { animation: pocket-pk-enter .85s .05s cubic-bezier(.2,.7,.2,1) both; }
  .screen-panel.is-switching .screen-image { animation: pocket-screen-enter .28s ease-out; }
  @keyframes pocket-home-enter {
    from { opacity: .72; transform: translate(-51%, -43%) rotate(-4deg); }
  }
  @keyframes pocket-pk-enter {
    from { opacity: .55; transform: translate(-54%, -40%) rotate(3deg) scale(.83); }
  }
  @keyframes pocket-screen-enter {
    from { opacity: .78; transform: translateY(8px); }
  }
}
