/* Full-bleed artwork behind a readable, interactive introduction. */
.hero.launch-hero {
  position: relative;
  isolation: isolate;
  display: block;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #070b17;
}

.launch-scene, .launch-art, .launch-scene::after, .launch-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.launch-scene { z-index: -1; overflow: hidden; }

.launch-art {
  inset: -2.5%;
  background: radial-gradient(ellipse at 71% 34%, #21456a, transparent 62%), #070b17;
  background-image: url("launch-planet.webp"), radial-gradient(ellipse at 71% 34%, #21456a, transparent 62%);
  background-size: cover;
  background-position: center 52%;
  transform: translate3d(var(--launch-x, 0px), var(--launch-y, 0px), 0);
  transition: transform 180ms ease-out;
}

.launch-scene::after {
  content: "";
  background:
    linear-gradient(0deg, #070b17 0%, #070b17df 14%, transparent 48%),
    linear-gradient(90deg, #070b17ed 1%, #070b17b8 34%, #070b1720 64%, transparent);
}

.launch-grid {
  inset: 45% 0 0;
  background: linear-gradient(90deg, #8acaff16 1px, transparent 1px),
              linear-gradient(#8acaff16 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(ellipse at 72% 90%, #000 8%, transparent 63%);
}

.launch-inner {
  min-height: min(840px, calc(100svh - 45px));
  display: grid;
  align-content: space-between;
  gap: clamp(46px, 8vh, 90px);
  padding-block: clamp(58px, 10vh, 120px) 35px;
}

.launch-hero .hero-copy { max-width: 650px; }
.launch-hero .hero-copy .eyebrow {
  color: #bde9ff;
  font-size: 12px;
  letter-spacing: .14em;
  margin: 0;
}

.launch-hero .hero-copy h1 {
  font-size: clamp(52px, 7vw, 112px);
  font-weight: 700;
  line-height: 1.01;
  letter-spacing: -.055em;
  margin: 19px 0 21px;
  color: #f4f8ff;
  text-shadow: 0 4px 48px #020614a0;
}

html[lang="th"] .launch-hero .hero-copy h1 {
  font-size: clamp(42px, 6vw, 92px);
  line-height: 1.16;
  letter-spacing: -.045em;
}

.launch-hero .accent-word {
  color: #baf2ff;
  text-shadow: 0 0 36px #7fdaff58;
}

.launch-hero .underline { display: none; }
.launch-hero .hero-name { font-size: 17px; color: #e1edff; }
.launch-hero .hero-description {
  font-size: 16px;
  line-height: 1.75;
  max-width: 440px;
  color: #cad8ee;
}

.launch-hero .hero-buttons { gap: 10px; margin-top: 24px; }
.launch-hero .hero-buttons .button {
  font-size: 14px;
  min-height: 48px;
  border-radius: 8px;
  padding: 12px 20px;
}
.launch-hero .hero-buttons .primary { background: #bbf0ff; color: #081a2c; }
.launch-hero .hero-buttons .resume-button {
  border: 1px solid #c1ddff5e;
  color: #e0edff;
  background: #0a1327b8;
}
.launch-hero :is(.hero-buttons .button, .launch-card):focus-visible {
  outline: 2px solid #bff4ff;
  outline-offset: 4px;
}
.launch-hero .availability {
  display: flex;
  align-items: flex-start;
  padding: 0;
  border: 0;
  background: none;
  margin-top: 22px;
  gap: 10px;
  box-shadow: none;
}
.launch-signal {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  margin-top: 7px;
  border-radius: 50%;
  background: #9cf6d4;
  box-shadow: 0 0 12px #9cf6d49c;
}
.launch-hero .availability div > strong { font-size: 13px; color: #d3f3ff; }
.launch-hero .availability div > span { font-size: 12px; color: #9fafca; }

.launch-featured { border: 0; padding-top: 0; }
.launch-featured h2 {
  margin: 0 0 10px;
  color: #e4efff;
  font-size: 14px;
  font-weight: 600;
}
.launch-projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.launch-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 8px 14px 8px 8px;
  border: 1px solid #b8ddff33;
  border-radius: 12px;
  background: linear-gradient(105deg, #15283ae8, #101b2ccf);
  transition: background .2s ease, border-color .2s ease, translate .2s ease;
}
.launch-card:hover { background: #182f48; border-color: #a0e2ff9c; translate: 0 -3px; }
.launch-card img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; }
.launch-card strong, .launch-card small { display: block; overflow-wrap: anywhere; }
.launch-card strong { color: #f1f7ff; font-size: 15px; line-height: 1.25; }
.launch-card small { color: #b9cbe2; font-size: 12px; line-height: 1.45; margin-top: 4px; }

@keyframes launch-focus {
  from { opacity: .35; scale: 1.08; }
  to { opacity: 1; scale: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  .launch-art { animation: launch-focus 1.4s cubic-bezier(.16,.82,.23,1) both; }
}

@media (max-width: 760px) {
  .launch-inner { min-height: 0; padding-block: 46px 25px; gap: 28px; }
  .launch-scene { bottom: auto; height: min(690px, 100%); }
  .launch-art { background-position: 65% top; }
  .launch-scene::after {
    background: linear-gradient(0deg, #070b17 1%, #070b1777 48%, transparent),
                linear-gradient(90deg, #070b17df, #070b176e 65%, #070b1721);
  }
  .launch-hero .hero-copy h1 { font-size: clamp(40px, 9vw, 70px); }
  html[lang="th"] .launch-hero .hero-copy h1 { font-size: clamp(38px, 8.6vw, 64px); }
  .launch-hero .hero-description { max-width: 340px; }
  .launch-card { grid-template-columns: minmax(0, 1fr); padding: 7px; gap: 8px; }
  .launch-card > div { padding: 0 3px 3px; }
  .launch-card strong { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .launch-art, .launch-card { transition: none; }
  .launch-card:hover { translate: none; }
}

/* Each layer moves at its own depth. The orbit plane is projected in 3D. */
.launch-depth {
  position: absolute;
  inset: 0;
  perspective: 950px;
  pointer-events: none;
  transform: translate3d(
    calc(var(--launch-x, 0px) * 1.7),
    calc(var(--launch-y, 0px) * 1.7),
    0
  );
  transition: transform 180ms ease-out;
}

.launch-stars {
  position: absolute;
  inset: 0;
}
.launch-stars {
  background:
    radial-gradient(circle at 58% 17%, #b7eaff 0 1px, transparent 3px),
    radial-gradient(circle at 79% 9%, #d5f5ff 0 1px, transparent 3px),
    radial-gradient(circle at 94% 35%, #aebcff 0 1px, transparent 3px),
    radial-gradient(circle at 64% 64%, #b7eaff 0 1px, transparent 3px),
    radial-gradient(circle at 87% 71%, #d5f5ff 0 1px, transparent 3px);
}
.launch-orbits {
  position: absolute;
  left: 76%;
  top: 45%;
  width: clamp(350px, 47vw, 730px);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transform: translate3d(-50%, -50%, 12px) rotateZ(-24deg) rotateX(61deg);
}
.launch-orbit {
  position: absolute;
  inset: 3%;
  border: 1px solid #b8edff39;
  border-radius: 50%;
}
.launch-orbit-outer {
  inset: -9%;
  border-color: #9eaeff30;
}
.launch-orbit i {
  position: absolute;
  inset: 0;
  display: block;
  transform-style: preserve-3d;
}
.launch-orbit b {
  position: absolute;
  left: 50%;
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e3faff;
  box-shadow: 0 0 8px 3px #7edeff, 0 0 26px 9px #6bbdff66;
  transform: translate(-50%, -50%) rotateX(-61deg);
}
.launch-orbit-outer b {
  width: 5px;
  height: 5px;
  background: #e5e0ff;
  box-shadow: 0 0 9px 3px #af9aff99;
}
.launch-card {
  position: relative;
  isolation: isolate;
  transform-style: preserve-3d;
  transform: perspective(700px) rotateX(var(--card-x, 0deg)) rotateY(var(--card-y, 0deg));
  transition: transform 180ms ease-out, background .2s ease, border-color .2s ease, translate .2s ease;
}
.launch-card > img { transform: translateZ(var(--card-depth, 0px)); }
.launch-card > div { transform: translateZ(calc(var(--card-depth, 0px) * .55)); }

@keyframes launch-orbit { to { rotate: 1turn; } }
@keyframes launch-twinkle {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}
@keyframes launch-reveal {
  from { opacity: 0; translate: 0 15px; }
  to { opacity: 1; translate: 0 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .launch-orbit-inner i { animation: launch-orbit 17s linear infinite; }
  .launch-orbit-outer i { animation: launch-orbit 25s linear infinite reverse; }
  .launch-stars { animation: launch-twinkle 5.5s ease-in-out infinite; }
  .launch-hero .hero-copy > * { animation: launch-reveal .7s cubic-bezier(.2,.75,.25,1) both; }
  .launch-hero .hero-copy h1 { animation-delay: .1s; }
  .launch-hero .hero-copy :is(.hero-name, .hero-description) { animation-delay: .18s; }
  .launch-hero .hero-copy :is(.hero-buttons, .availability) { animation-delay: .25s; }
  .launch-featured { animation: launch-reveal .7s .3s cubic-bezier(.2,.75,.25,1) both; }
  .launch-hero:focus-within .hero-copy > *, .launch-hero:focus-within .launch-featured { animation: none; }
  .launch-hero:not(.is-in-view) :is(.launch-orbit i, .launch-stars) { animation-play-state: paused; }
}
@media (max-width: 760px) {
  .launch-orbits { left: 83%; top: 32%; width: clamp(260px, 77vw, 570px); opacity: .65; }
}
@media (prefers-reduced-motion: reduce) {
  .launch-depth, .launch-card { transition: none; transform: none; }
  .launch-card > img, .launch-card > div { transform: none; }
}

/* Floating project screens: actual work presented at different depths. */
@media (min-width: 1000px) {
  .launch-inner { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 42px; min-height: 780px; }
  .launch-featured { min-width: 0; perspective: 1400px; padding: 35px 0; }
  .launch-projects { grid-template-columns: 1fr; gap: 30px; transform-style: preserve-3d; }
  .launch-card { width: 94%; grid-template-columns: 1fr; padding: 9px; gap: 12px; position: relative; transform-style: preserve-3d; transform: rotateX(var(--card-x, 5deg)) rotateY(var(--card-y, -15deg)) translateZ(var(--card-depth, 0px)); box-shadow: 16px 22px 0 -8px #152c42, 25px 34px 0 -15px #5489a64a, 0 35px 70px #0008; transition: transform .35s ease-out, box-shadow .35s, border-color .3s; }
  .launch-card:nth-child(2) { width: 82%; margin-left: 16%; --card-y: 12deg; }
  .launch-card img { max-height: 220px; object-fit: cover; object-position: top; transform: translateZ(18px); }
  .launch-card > div { padding: 0 12px 10px; transform: translateZ(25px); }
  .launch-card:hover { border-color: #b2efff; box-shadow: 16px 22px 0 -8px #21405a, 25px 34px 0 -15px #6bb4dd66, 0 40px 80px #0009; }
}
@media (prefers-reduced-motion: reduce) {
  .launch-card { transform: none !important; transition: none !important; }
}

/* Atmospheric light and depth for the featured work. */
.launch-hero .hero-copy { position: relative; z-index: 2; }
.launch-hero .hero-copy h1 { text-wrap: balance; }
.launch-hero .accent-word { background: linear-gradient(110deg,#e4fbff 5%,#8ae3ff 45%,#bca8ff 85%); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.launch-featured { position: relative; }
.launch-featured::before { content: ''; position: absolute; inset: 10% -8%; background: radial-gradient(ellipse,#528cff32,transparent 66%); filter: blur(35px); pointer-events: none; }
.launch-card { overflow: visible; }
.launch-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(125deg,#ffffff17,transparent 38%,#9beaff0c); }
.launch-card img { box-shadow: 0 15px 35px #02081790; }
.launch-hero .button.primary { box-shadow: 0 8px 36px #79d9ff33; transition: transform .25s, box-shadow .25s; }
.launch-hero .button.primary:hover { transform: translateY(-3px); box-shadow: 0 12px 45px #79d9ff66; }
@media (min-width:1000px) and (prefers-reduced-motion:no-preference) {
  .launch-card:first-child { animation: project-float 7s ease-in-out infinite; }
  .launch-card:nth-child(2) { animation: project-float 8s -3s ease-in-out infinite; }
  .launch-card:hover, .launch-card:focus-visible { animation-play-state: paused; }
  @keyframes project-float { 0%,100% { translate: 0 0; } 50% { translate: 0 -9px; } }
}
@media (prefers-reduced-motion:reduce) { .launch-hero .button.primary { transition: none; } }

/* Overlapping screens form a single dimensional showcase. */
@media (min-width: 1000px) {
  .launch-featured { border: 0; padding: 0; align-self: center; }
  .launch-projects { position: relative; display: block; height: clamp(330px, 29vw, 440px); perspective: 1500px; }
  .launch-card { position: absolute; margin: 0; animation: none !important; transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s, border-color .3s; box-shadow: 0 30px 65px #0009, 4px 7px 0 #1b334b; }
  .launch-card:first-child { width: 72%; left: -3%; top: 12%; z-index: 3; transform: rotateZ(-7deg) rotateY(var(--card-y,-7deg)) rotateX(var(--card-x,3deg)); }
  .launch-card:nth-child(2) { width: 72%; left: 31%; top: 12%; z-index: 2; transform: rotateZ(9deg) rotateY(var(--card-y,8deg)) rotateX(var(--card-x,3deg)); }
  .launch-card:hover, .launch-card:focus-visible { z-index: 5; transform: translateY(-14px) rotateZ(0deg) rotateY(var(--card-y,0deg)) rotateX(var(--card-x,0deg)); border-color: #c4f1ff; box-shadow: 0 42px 85px #000b, 4px 7px 0 #345774; }
  .launch-card img { max-height: none; aspect-ratio: 16/9; }
  .launch-card:nth-child(2) small { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .launch-card { transform: none !important; transition: none !important; } }

/* Composite each screen as one surface so child layers cannot cross screens. */
@media (min-width: 1000px) {
  .launch-projects { transform-style: flat; isolation: isolate; }
  .launch-projects .launch-card { transform-style: flat; isolation: isolate; background: #111f33; overflow: hidden; }
  .launch-projects .launch-card > img,
  .launch-projects .launch-card > div { transform: none; }
  .launch-projects .launch-card::after { z-index: 1; }
}
.rate-panel { padding: 22px clamp(16px,4vw,44px); color: #edf5ff; background: linear-gradient(118deg,#14213c,#102b36); }
.rate-row { display: grid; grid-template-columns: minmax(72px,auto) 1fr 65px; align-items: center; gap: 14px; margin: 7px 0; font-size: 14px; }
.rate-row i { height: 8px; border-radius: 8px; background: #ffffff14; overflow: hidden; }
.rate-row b { display: block; height: 100%; background: #a6b5d2; border-radius: inherit; }
.rate-row + .rate-row b { background: linear-gradient(90deg,#6dbcf3,#84f1d5); }
.rate-row strong { text-align: right; font-variant-numeric: tabular-nums; }
#rate-insight { margin: 12px 0 0; color: #c6f5ec; font-size: 14px; }
.project-role { margin: 18px 0; border-left: 2px solid #8acded; padding: 3px 14px; }
.project-role p { margin: 4px 0 0; }
.detail-overview.role-moved { display: block; }
@media (min-width:1000px) {
  .launch-projects .launch-card:nth-child(2) { margin-left: 0; left: 29%; width: 69%; }
  .launch-card:nth-child(2) > div { text-align: right; }
  .launch-projects .launch-card:hover, .launch-projects .launch-card:focus-visible { z-index: 6; }
}
@media (prefers-reduced-motion:no-preference) { .rate-row b { transition: width .38s ease-out; } }

/* Reading position sits directly beneath the navigation. */
.reading-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  pointer-events: none;
  background: #91cfff0b;
}
.reading-progress > span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #79e4ff, #99b9ff 55%, #c4a2ff);
  box-shadow: 0 0 9px #99c8ff88;
  border-radius: 0 3px 3px 0;
}
@media print { .reading-progress { display: none; } }

/* Keep wheel, touch and keyboard scrolling while hiding the page scrollbar. */
html {
  scrollbar-width: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}
@media (prefers-reduced-motion: no-preference) {
  .reading-progress > span {
    background-image: linear-gradient(100deg,
      #79e4ff 0%, #99b9ff 25%, #c4a2ff 42%,
      #e7faff 50%, #c4a2ff 58%, #99b9ff 75%, #79e4ff 100%);
    background-size: 250% 100%;
    animation: reading-light 7s ease-in-out infinite;
  }
  @keyframes reading-light {
    0%, 18% { background-position: 100% 50%; }
    55%, 100% { background-position: 0% 50%; }
  }
}

.contact-form {
  box-sizing: border-box;
  width: 100%;
  max-width: 440px;
  margin: 0;
  padding: 20px;
  background: linear-gradient(135deg, #142038e8, #101a30e8);
  border: 1px solid #b2d9ff30;
  border-radius: 16px;
}
.contact-form h3 { margin: 0 0 14px; font-size: 17px; color: #f1f6ff; }
.contact-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; }
.contact-form label { display: grid; min-width: 0; gap: 4px; color: #e0eaff; font-size: 12px; }
.contact-form-wide { grid-column: 1 / -1; }
.contact-form input:not([type="hidden"]), .contact-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid #9bbce54d;
  border-radius: 10px;
  background: #080f20;
  color: #f1f6ff;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
}
.contact-form textarea { resize: vertical; min-height: 76px; }
.contact-form :is(input, textarea, button):focus-visible { outline: 2px solid #9de5ff; outline-offset: 3px; }
.contact-form .contact-honey { display: none !important; }
.contact-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.contact-form-footer p { color: #becce3; font-size: 11px; line-height: 1.6; margin: 0; max-width: 230px; }
.contact-form-footer button { flex-shrink: 0; min-height: 38px; padding: 8px 14px; font-size: 12px; cursor: pointer; border: 0; }

.contact-form-success:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid #9fe3c62e;
  border-radius: 12px;
  background: #9fe3c608;
  color: #e0f5ec;
  font-size: 14px;
  line-height: 1.7;
}
.contact-success-icon {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  background: #9fe3c617;
  color: #9fe3c6;
  font-size: 16px;
}
@media (prefers-reduced-motion: no-preference) {
  .contact-form-success:not([hidden]) { animation: contact-success-enter .25s ease-out; }
  @keyframes contact-success-enter {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media(max-width:480px) {
  .contact-form-footer { align-items: flex-start; flex-direction: column; }
  .contact-form-footer button { width: auto; align-self: flex-start; }
}
@media(max-width:480px) {
  .contact-form-grid { grid-template-columns: 1fr; }
}

/* Fit the form into the contact section alongside its introduction. */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.contact-layout .contact-heading { display: block; min-width: 0; }
.contact-layout .contact-heading h2 { font-size: clamp(34px, 4.5vw, 54px); }
.contact-layout .contact-heading > div { max-width: 360px; margin-top: 24px; }
.contact-layout .contact-heading .contact-star { font-size: .85em; }
.contact-layout .contact-form-success:not([hidden]) { margin-top: 14px; padding: 10px 12px; font-size: 12px; gap: 8px; }
@media (max-width: 840px) {
  .contact-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .contact-layout .contact-form { justify-self: start; }
  .contact-layout .contact-heading > div { margin-top: 16px; }
}
@media (max-width: 480px) {
  .contact-layout .contact-form { padding: 16px; }
  .contact-layout .contact-form input:not([type="hidden"]),
  .contact-layout .contact-form textarea { font-size: 16px; }
}
