/* LuckyHan Studio. One stylesheet for every page.
   The app icons carry the colour; the page is a quiet cool-grey stage around them,
   with clover green reserved for the studio's own marks and links. */

:root {
  --paper: #f3f5f7;
  --raised: #ffffff;
  --ink: #17202b;
  --muted: #55606c;
  --line: #d9dee4;
  --clover: #1f7a4a;
  --clover-soft: #e2efe7;
  --wallpaper: #dfe9e3;

  --display: 'Bricolage Grotesque', 'Pretendard Variable', Pretendard, system-ui, sans-serif;
  --text: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;

  --gutter: clamp(16px, 4vw, 40px);
  --measure: 68ch;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0f1419;
    --raised: #161d24;
    --ink: #e7ecf0;
    --muted: #9ba6b2;
    --line: #27313b;
    --clover: #63c792;
    --clover-soft: #173026;
    --wallpaper: #182a22;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #0f1419;
  --raised: #161d24;
  --ink: #e7ecf0;
  --muted: #9ba6b2;
  --line: #27313b;
  --clover: #63c792;
  --clover-soft: #173026;
  --wallpaper: #182a22;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: 'ss06';
  -webkit-font-smoothing: antialiased;
}

:lang(ko) body,
body:lang(ko) {
  word-break: keep-all;
  overflow-wrap: break-word;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--clover);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--clover);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--raised);
  padding: 8px 12px;
  z-index: 10;
}
.skip:focus {
  top: 12px;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 650;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand img {
  width: 30px;
  height: 30px;
}

.top nav ul {
  display: flex;
  align-items: center;
  gap: 4px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}
.top nav a {
  color: var(--muted);
  text-decoration: none;
}
.top nav a:hover {
  color: var(--ink);
}
.top nav .lang a {
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
}

@media (max-width: 760px) {
  .top nav .section {
    display: none;
  }
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  padding-top: clamp(24px, 6vw, 72px);
  padding-bottom: clamp(56px, 9vw, 112px);
}

.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(2.5rem, 5.6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-variation-settings: 'opsz' 96;
  max-width: 13ch;
}
.hero h1:lang(ko) {
  font-family: var(--text);
  font-weight: 750;
  font-size: clamp(2.05rem, 4.2vw, 3.4rem);
  line-height: 1.18;
  letter-spacing: -0.04em;
  max-width: 15em;
}

.hero .lead {
  margin: 28px 0 0;
  max-width: 34em;
  font-size: 1.16rem;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--ink);
}
.button.primary {
  background: var(--ink);
  color: var(--paper);
}
.button.secondary {
  color: var(--ink);
}
.button:hover {
  text-decoration: none;
}
.button.primary:hover {
  background: var(--clover);
  border-color: var(--clover);
}
.button.secondary:hover {
  border-color: var(--clover);
  color: var(--clover);
}

/* The home screen: the studio's apps laid out the way people meet them. */
.screen {
  margin: 0;
  background: var(--wallpaper);
  border-radius: 40px;
  padding: clamp(28px, 5vw, 52px) clamp(20px, 4vw, 44px);
}
.screen ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 4vw, 40px) clamp(10px, 3vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.screen a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.3;
  text-align: center;
}
.screen img {
  width: clamp(64px, 9vw, 96px);
  aspect-ratio: 1;
  border-radius: 24%;
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.06), 0 6px 16px -6px rgb(23 32 43 / 0.35);
}
.screen span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-width: 100%;
}
.screen figcaption {
  margin-top: clamp(24px, 4vw, 40px);
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Apps land one after another, the way a new phone fills up. The only motion on the page. */
@media (prefers-reduced-motion: no-preference) {
  .screen li {
    animation: install 520ms cubic-bezier(0.2, 0.9, 0.3, 1.25) both;
    animation-delay: calc(180ms + var(--i) * 90ms);
  }
}
@keyframes install {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- sections ---------- */

section {
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 12px;
}

h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variation-settings: 'opsz' 72;
}
h2:lang(ko) {
  font-family: var(--text);
  font-weight: 750;
  letter-spacing: -0.035em;
}

.section-lead {
  margin: 14px 0 0;
  max-width: var(--measure);
  color: var(--muted);
}

h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 650;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h3:lang(ko) {
  font-family: var(--text);
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* ---------- apps ---------- */

.apps {
  margin: clamp(32px, 5vw, 56px) 0 0;
  padding: 0;
  list-style: none;
}

.app {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 220px;
  gap: 8px clamp(20px, 3.5vw, 44px);
  padding: 36px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 12px;
}
.app:first-child {
  border-top: 0;
  padding-top: 0;
}

.app > img {
  width: 88px;
  height: 88px;
  border-radius: 24%;
}

.app .store-title {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.app .summary {
  margin: 14px 0 0;
  font-size: 1.1rem;
  max-width: 40em;
}

.app .points {
  margin: 14px 0 0;
  padding-left: 1.1em;
  max-width: 44em;
  color: var(--muted);
}
.app .points li + li {
  margin-top: 6px;
}
.app .points li::marker {
  color: var(--clover);
}

.app aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 0.92rem;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.facts li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  color: var(--muted);
  font-size: 0.84rem;
}
.facts .ai {
  border-color: transparent;
  background: var(--clover-soft);
  color: var(--clover);
  font-weight: 600;
}
.facts .downloads {
  border-color: var(--ink);
  color: var(--ink);
  font-weight: 600;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- how we build ---------- */

.build {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  margin-top: clamp(32px, 5vw, 56px);
}

.build p {
  margin: 12px 0 0;
  max-width: var(--measure);
}

.steps {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.2em minmax(0, 1fr);
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  font-family: var(--display);
  font-weight: 650;
  color: var(--clover);
}

.next {
  align-self: start;
  background: var(--clover-soft);
  border-radius: 20px;
  padding: 24px 26px;
}
.next h3 {
  color: var(--clover);
}

/* ---------- company ---------- */

.company {
  margin: clamp(28px, 4vw, 44px) 0 0;
  max-width: 820px;
}
.company div {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.6fr);
  gap: 4px 24px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.company div:last-child {
  border-bottom: 1px solid var(--line);
}
.company dt {
  color: var(--muted);
}
.company dd {
  margin: 0;
}

/* ---------- contact ---------- */

.contact p {
  margin: 14px 0 0;
  max-width: var(--measure);
  color: var(--muted);
}
.email {
  display: inline-block;
  margin-top: 22px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.45rem, 4.4vw, 2.6rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding-top: 32px;
  padding-bottom: 48px;
  font-size: 0.88rem;
  color: var(--muted);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 40px;
}
footer p {
  margin: 0;
}
footer .legal {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
footer .brand {
  font-size: 1rem;
  margin-bottom: 6px;
}
footer .brand img {
  width: 22px;
  height: 22px;
}

/* ---------- 404 ---------- */

.missing {
  padding-top: 12vh;
  padding-bottom: 20vh;
}
.missing p {
  color: var(--muted);
}

/* ---------- narrow screens ---------- */

@media (max-width: 900px) {
  .hero,
  .build {
    grid-template-columns: minmax(0, 1fr);
  }
  .screen {
    max-width: 520px;
  }
  .app {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .app > img {
    width: 64px;
    height: 64px;
  }
  .app aside {
    grid-column: 2;
    flex-direction: column;
    margin-top: 10px;
  }
  .links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 18px;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }
  .app {
    grid-template-columns: minmax(0, 1fr);
  }
  .app aside {
    grid-column: 1;
  }
  .app > img {
    width: 56px;
    height: 56px;
    margin-bottom: 10px;
  }
  .company div {
    grid-template-columns: minmax(0, 1fr);
  }
  .button {
    width: 100%;
    justify-content: center;
  }
}

@media print {
  .top nav,
  .actions {
    display: none;
  }
  section {
    break-inside: avoid;
  }
}
