/* ---- Tokens: palette drawn from the logo (cream / ink / duck-bill charcoal) ---- */
:root {
  --cream: #faf6e8;
  --cream-deep: #f3edd8;
  --ink: #2b2926;
  --ink-soft: #55524b;
  --yellow: #f5c542;
  --yellow-deep: #e0a81c;
  --white: #ffffff;
  --border: #e4ddc6;

  --font-display: "Fredoka", "Noto Sans KR", sans-serif;
  --font-body: "Nunito", "Noto Sans KR", sans-serif;

  --radius: 20px;
  --container: 1080px;
}

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

html {
  scroll-behavior: smooth;
  /* fluid base size: 14px at 320px viewport → 16px (default) from ~860px up.
     every rem-based font-size on the page (i.e. all text; logo images are
     unaffected) scales off this, so mobile line-wraps get breathing room
     without hand-tuning each element. */
  font-size: clamp(14px, calc(12.81px + 0.37vw), 16px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  /* Korean text otherwise wraps between any two characters, so a trailing
     particle (오리(Ugly Duckling)는 → "는" alone) or a hyphenated code
     (202-86-03849) can split at an ugly spot. keep-all only allows breaks
     at spaces, keeping such runs intact. */
  word-break: keep-all;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.25;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
}

/* keep-all doesn't stop breaks at a CJK↔Latin boundary or after a hyphen,
   so a handful of spots (a particle glued to an English word, a hyphenated
   registration number) need an explicit no-split zone. */
.nowrap {
  white-space: nowrap;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--cream);
  padding: 12px 20px;
  border-radius: 0 0 12px 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 232, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  flex-wrap: wrap;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  padding: 8px 0;
}
.nav-brand img {
  border-radius: 10px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  padding: 10px;
  cursor: pointer;
  border-radius: 10px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  display: inline-block;
  padding: 10px 14px;
  min-height: 44px;
  text-decoration: none;
  font-weight: 700;
  border-radius: 12px;
  transition: background-color 200ms ease;
}
.nav-menu a:hover {
  background: var(--cream-deep);
}

.nav-cta {
  background: var(--ink);
  color: var(--cream);
}
.nav-menu a.nav-cta:hover {
  background: #46433d;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  min-height: 48px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 200ms ease,
    background-color 200ms ease,
    box-shadow 200ms ease;
}
.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 4px 0 rgba(43, 41, 38, 0.25);
}
.btn-primary:hover {
  background: #46433d;
}

.btn-ghost {
  border: 2px solid var(--ink);
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--cream-deep);
}

.btn-lg {
  padding: 18px 36px;
  font-size: 1.2rem;
}

/* ---- Hero ---- */
.hero {
  padding: 72px 0 40px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 48px;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--yellow-deep);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--ink-soft);
  max-width: 34em;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-logo img {
  width: min(380px, 80vw);
  margin: 0 auto;
  /* filter: drop-shadow(0 16px 32px rgba(43, 41, 38, 0.12)); */
}

/* ---- Sections ---- */
.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  margin-bottom: 40px;
}

.section-eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--yellow-deep);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.section h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
}

/* About */
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.team-lead {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.6;
}
.team-lead strong {
  color: var(--yellow-deep);
}

.team-body {
  color: var(--ink-soft);
}

/* Services cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition:
    transform 250ms ease,
    box-shadow 250ms ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(43, 41, 38, 0.1);
}

/* Phone-frame mockup slideshow (7 slides + duplicate of #1 for a seamless loop) */
.phone-frame {
  width: min(240px, 100%);
  margin: 0 auto 24px;
  padding: 10px;
  background: var(--ink);
  border-radius: 36px;
  box-shadow: 0 12px 28px rgba(43, 41, 38, 0.18);
}

.phone-screen {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 390 / 856;
  background: #000;
}

/* frame-rendered iOS status bar (images are cropped 47px below it) */
.phone-statusbar {
  position: absolute;
  top: 1.4%; /* breathing room between the bezel and the clock/icons */
  left: 0;
  right: 0;
  height: 5.57%; /* 47 / 844 */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7.5%;
  color: #fff;
  z-index: 2;
}

.ps-time {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.ps-icons {
  width: 40px;
  height: auto;
}

/* home indicator (images are cropped 34px above the bottom edge) */
.phone-indicator {
  position: absolute;
  bottom: 1.1%;
  left: 50%;
  transform: translateX(-50%);
  width: 36%;
  height: 3px;
  background: #fff;
  border-radius: 999px;
  z-index: 2;
}

.phone-track {
  position: absolute;
  top: 6.97%; /* status bar zone (47 / 844) + the 1.4% offset above it */
  bottom: 4.03%; /* indicator zone: 34 / 844 */
  left: 0;
  display: flex;
  width: 800%;
  animation: phone-slides 21s ease-in-out infinite;
}

.phone-track img {
  width: 12.5%;
  height: 100%;
  object-fit: cover;
}

/* each slide holds, then glides one screen to the left; 100% shows the
   duplicated first slide so the jump back to 0% is invisible */
@keyframes phone-slides {
  0%,
  11.43% {
    transform: translateX(0);
  }
  14.29%,
  25.71% {
    transform: translateX(-12.5%);
  }
  28.57%,
  40% {
    transform: translateX(-25%);
  }
  42.86%,
  54.29% {
    transform: translateX(-37.5%);
  }
  57.14%,
  68.57% {
    transform: translateX(-50%);
  }
  71.43%,
  82.86% {
    transform: translateX(-62.5%);
  }
  85.71%,
  97.14% {
    transform: translateX(-75%);
  }
  100% {
    transform: translateX(-87.5%);
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  vertical-align: 0.15em;
  margin-left: 6px;
  height: 1.9em;
  padding: 1px 10px 0; /* Noto Sans KR glyphs ride high in the em box; 1px optical correction */
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.card h3 {
  font-size: 1.2rem;
}
.card p {
  color: var(--ink-soft);
  margin: 0;
}

/* Company info */
.info-list {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

.info-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 18px 28px;
}
.info-row + .info-row {
  border-top: 1px solid var(--border);
}

.info-row dt {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink-soft);
}
.info-row dd {
  margin: 0;
}

/* Contact */
.section-contact {
  background: var(--ink);
  color: var(--cream);
  text-align: center;
}
.section-contact h2 {
  color: var(--cream);
}
.section-contact p {
  color: #cfc9b8;
  margin-bottom: 28px;
}
.section-contact .btn-primary {
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
}
.section-contact .btn-primary:hover {
  background: var(--yellow-deep);
}
.section-contact :focus-visible {
  outline-color: var(--yellow);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--ink);
  color: #b8b2a2;
  border-top: 1px solid #46433d;
  padding: 40px 0;
  font-size: 0.9rem;
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--cream);
  margin-bottom: 16px;
}
.footer-brand img {
  border-radius: 8px;
}

.biz {
  margin-bottom: 8px;
}
.copyright {
  margin: 0;
  color: #8a8474;
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 600ms ease,
    transform 600ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .card {
    transition: none;
  }
  .btn:hover,
  .card:hover {
    transform: none;
  }
  .phone-track {
    animation: none; /* rests on slide 1 */
  }
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-logo {
    order: -1;
  }
  .hero-logo img {
    width: min(260px, 70vw);
  }
  .team-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .cards {
    grid-template-columns: 1fr;
    place-items: center;
  }
  .card {
    width: 100%;
    max-width: 328px;
  }
  .info-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .nav-toggle {
    display: block;
  }
  .nav-menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding-bottom: 16px;
  }
  .nav-menu.is-open {
    display: flex;
  }
  .nav-menu a {
    display: block;
    text-align: center;
  }
}
