/* ===========================
   PicksellLogi — Global Styles
   =========================== */

/* Fonts — LINE Seed KR */
@font-face {
  font-family: "LINE Seed KR";
  src:
    url("../fonts/woff2/LINESeedKR-Th.woff2") format("woff2"),
    url("../fonts/woff/LINESeedKR-Th.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "LINE Seed KR";
  src:
    url("../fonts/woff2/LINESeedKR-Rg.woff2") format("woff2"),
    url("../fonts/woff/LINESeedKR-Rg.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "LINE Seed KR";
  src:
    url("../fonts/woff2/LINESeedKR-Bd.woff2") format("woff2"),
    url("../fonts/woff/LINESeedKR-Bd.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Design tokens */
:root {
  --background: #fafafa;
  --white: #ffffff;
  --surface: #0e0f11;
  --label: #202227;
  --label-secondary: #a1a1a1;
  --primary: #00127b;
  --white-subtle: rgba(255, 255, 255, 0.15);

  --header-h: 64px;
  --section-pad-x: 80px;

  /* Fluid typography (clamp with linear interpolation 360px → 1600px)
     Formula: clamp(min, basepx + slope*vw, max) */
  --fs-display: clamp(32px, 20.4px + 3.23vw, 72px); /* hero / cta */
  --fs-h1: clamp(24px, 17px + 1.94vw, 48px); /* section title */
  --fs-h2: clamp(22px, 16.8px + 1.45vw, 40px); /* tour-card title */
  --fs-h3: clamp(20px, 16.5px + 0.97vw, 32px); /* ai card */
  --fs-body-strong: clamp(
    16px,
    14.3px + 0.48vw,
    22px
  ); /* trust body / pcard desc */
  --fs-body: clamp(14px, 13.4px + 0.16vw, 16px); /* labels / desc */
  --fs-caption: clamp(12px, 10.8px + 0.32vw, 16px); /* footer */
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "LINE Seed KR",
    -apple-system,
    BlinkMacSystemFont,
    "Apple SD Gothic Neo",
    "Pretendard Variable",
    system-ui,
    sans-serif;
  font-weight: 400;
  background: var(--background);
  color: var(--label);
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* ===========================
   Header
   =========================== */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 var(--section-pad-x);
}

.site-header__logo {
  display: block;
  width: 149px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
}

.site-header__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===========================
   Section 01 — Hero
   =========================== */
.hero {
  position: relative;
  width: 100%;
  height: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--section-pad-x);
  overflow: hidden;
  background: #000;
  color: var(--background);
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

.hero__fade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000;
  opacity: 0.35;
  pointer-events: none;
  will-change: opacity;
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
  will-change: transform;
}

.hero__title {
  font-weight: 700;
  font-size: var(--fs-display);
  line-height: 1.2;
  color: var(--background);
  max-width: 18ch;
  text-wrap: balance;
}

/* ===========================
   Buttons
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 31px;
  border-radius: 28px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  transition:
    background-color 0.4s ease,
    border-color 0.4s ease,
    color 0.4s ease;
}

.btn:hover {
  background-color: #00cc88;
  border-color: #00cc88;
  color: #fff;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--white-subtle);
}

.btn--dark {
  background: var(--surface);
  color: var(--background);
}

/* ===========================
   Section 02 — Empathy
   =========================== */
.empathy {
  width: 100%;
  background: var(--white);
  padding: 80px 168px;
  display: flex;
  justify-content: center;
}

.tour-card {
  position: relative;
  width: 100%;
  max-width: 1264px;
  height: 480px;
  border-radius: 32px;
  overflow: hidden;
  background: #dbdbdb;
}

.tour-card__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("../images/tour-card.jpg") center / cover no-repeat;
  transform: scale(1.15);
  transform-origin: center center;
  will-change: transform;
}

.tour-card__content {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 clamp(32px, 5vw + 8px, 96px);
  gap: clamp(20px, 1vw + 12px, 32px);
}

.tour-card__title {
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.25;
  color: #00383c;
  max-width: 14ch;
  text-wrap: balance;
}

/* ===========================
   Section 03 — Process
   =========================== */
.process {
  width: 100%;
  background: var(--background);
  padding: 120px 168px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.process__title {
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.2;
  color: var(--label);
  max-width: 20ch;
  text-wrap: balance;
}

.process__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.pcard {
  position: relative;
  aspect-ratio: 298 / 480;
  border-radius: 32px;
  border: 1px solid rgba(14, 15, 17, 0.05);
  overflow: hidden;
  isolation: isolate;
}

.pcard--match {
  background: #e6f1ff;
}
.pcard--inbound {
  background: #f4f3ea;
}
.pcard--sales {
  background: #f5f5f5;
}
.pcard--settlement {
  background: #f8e9ff;
}

.pcard__image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.pcard__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pcard__text {
  position: relative;
  z-index: 1;
  padding: clamp(20px, 1.4vw + 14px, 32px);
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 0.6vw + 5px, 16px);
  color: var(--label);
  font-weight: 700;
}

.pcard__label {
  font-size: var(--fs-body);
  line-height: 1;
}
.pcard__desc {
  font-size: var(--fs-body-strong);
  line-height: 1.3;
  text-wrap: balance;
}

/* ===========================
   Section 04 — AI Solution
   =========================== */
.ai {
  width: 100%;
  background: var(--surface);
  padding: 120px 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
}

.ai__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.ai__title {
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.2;
  color: var(--background);
  text-wrap: balance;
}

.ai__desc {
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--label-secondary);
  max-width: 640px;
  text-wrap: balance;
}

.ai__grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.acard {
  position: relative;
  aspect-ratio: 404 / 520;
  border-radius: 32px;
  border: 1px solid rgba(160, 160, 160, 0.4);
  overflow: hidden;
  isolation: isolate;
}

.acard--down {
  margin-top: 80px;
}
.acard--up {
  margin-top: 0;
}

.acard__image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.acard__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.acard__text {
  position: relative;
  z-index: 1;
  padding: clamp(28px, 1.6vw + 20px, 40px) clamp(20px, 1.4vw + 14px, 32px) 0;
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.25;
  color: var(--background);
  text-wrap: balance;
}

/* ===========================
   Section 05 — Trust
   =========================== */
.trust {
  width: 100%;
  background: var(--background);
  padding: 120px 168px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.trust__title {
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  color: var(--label);
}

.trust__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.trust__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 600px;
  border-radius: 32px;
  overflow: hidden;
  background: #dbdbdb;
}

.trust__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trust__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding-left: 24px;
}

.trust__icon {
  width: 64px;
  height: 64px;
  color: var(--label);
}

.trust__icon img,
.trust__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.trust__body {
  font-size: var(--fs-body-strong);
  font-weight: 700;
  line-height: 1.5;
  color: #9ca3af;
}

.trust__body strong {
  color: #000;
}

/* ===========================
   Section 06 — CTA + Footer
   =========================== */
.cta {
  position: relative;
  width: 100%;
  height: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  color: var(--background);
}

.cta__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.cta__fade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000;
  opacity: 0.35;
  pointer-events: none;
}

.cta__inner {
  position: relative;
  z-index: 2;
  padding: 0 80px;
  text-align: center;
  will-change: transform;
}

.cta__title {
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--background);
  max-width: 22ch;
  text-wrap: balance;
}

.site-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
  font-size: var(--fs-caption);
  color: var(--background);
}

/* ===========================
   Responsive — Tablet (≤1024px)
   =========================== */
@media (max-width: 1024px) {
  :root {
    --section-pad-x: 40px;
  }

  /* Header */
  .site-header {
    padding: 0 40px;
  }

  /* Hero */
  .hero {
    height: 640px;
  }

  /* Empathy */
  .empathy {
    padding: 64px 40px;
  }
  .tour-card {
    height: 420px;
  }
  .tour-card__content {
    padding: 0 56px;
  }

  /* Process */
  .process {
    padding: 96px 40px;
    gap: 48px;
  }
  .process__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* AI */
  .ai {
    padding: 96px 40px;
    gap: 48px;
  }
  .ai__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .acard--down {
    margin-top: 48px;
  }

  /* Trust */
  .trust {
    padding: 96px 40px;
    gap: 48px;
  }
  .trust__content {
    gap: 40px;
  }

  /* CTA */
  .cta {
    height: 520px;
  }
}

/* ===========================
   Responsive — Mobile (≤640px)
   =========================== */
@media (max-width: 640px) {
  :root {
    --section-pad-x: 24px;
    --header-h: 56px;
  }

  /* Header */
  .site-header {
    height: 56px;
    padding: 0 24px;
  }
  .site-header__logo {
    width: 120px;
    height: 32px;
  }

  /* Hero */
  .hero {
    height: 560px;
  }
  .hero__inner {
    gap: 24px;
    padding: 0 24px;
  }
  .btn {
    padding: 16px 24px;
    font-size: 14px;
  }

  /* Empathy — Tour Card swaps to mobile image, bottom-anchored */
  .empathy {
    padding: 48px 16px;
  }
  .tour-card {
    height: calc((100vw - 32px) * 420 / 335);
  }
  .tour-card__bg {
    background-image: url("../images/m-tourcard.jpg");
    background-position: center bottom;
    background-size: cover;
    background-repeat: no-repeat;
  }
  .tour-card__content {
    justify-content: flex-start;
    align-items: center;
    padding: 48px 24px 0;
    gap: 24px;
    text-align: center;
  }
  .tour-card__title {
    text-align: center;
    max-width: 12ch;
  }

  /* Process — horizontal swipe */
  .process {
    padding: 64px 0 64px 24px;
    gap: 32px;
  }
  .process__title {
    padding-right: 24px;
  }
  .process__grid {
    display: flex;
    grid-template-columns: none;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 24px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-right: 24px;
  }
  .process__grid::-webkit-scrollbar {
    display: none;
  }
  .pcard {
    flex: 0 0 75%;
    aspect-ratio: 280 / 360;
    scroll-snap-align: start;
  }

  /* AI — horizontal swipe */
  .ai {
    padding: 64px 0;
    gap: 32px;
  }
  .ai__header {
    padding: 0 24px;
  }
  .ai__grid {
    display: flex;
    grid-template-columns: none;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 24px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 24px;
  }
  .ai__grid::-webkit-scrollbar {
    display: none;
  }
  .acard,
  .acard--down,
  .acard--up {
    margin-top: 0;
  }
  .acard {
    flex: 0 0 75%;
    scroll-snap-align: start;
    aspect-ratio: 280 / 380;
  }

  /* Trust */
  .trust {
    padding: 64px 24px;
    gap: 32px;
  }
  .trust__content {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .trust__media {
    max-height: none;
  }
  .trust__text {
    padding-left: 0;
    gap: 12px;
  }
  .trust__icon {
    width: 48px;
    height: 48px;
  }
  /* CTA */
  .cta {
    height: 440px;
  }
  .cta__inner {
    padding: 0 24px;
  }
  .site-footer {
    height: 64px;
    padding: 16px 0;
  }
}

/* ---------- iOS-style alert ---------- */
.ios-alert {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ios-alert[hidden] {
  display: none;
}
.ios-alert__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.ios-alert__panel {
  position: relative;
  width: 270px;
  max-width: calc(100% - 32px);
  background: rgba(242, 242, 242, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  transform: scale(1.15);
  opacity: 0;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "LINE Seed KR", sans-serif;
}
.ios-alert.is-open .ios-alert__backdrop {
  opacity: 1;
}
.ios-alert.is-open .ios-alert__panel {
  transform: scale(1);
  opacity: 1;
}
.ios-alert__body {
  padding: 20px 16px 18px;
  text-align: center;
}
.ios-alert__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: #000;
  letter-spacing: -0.01em;
}
.ios-alert__actions {
  display: flex;
  border-top: 0.5px solid rgba(0, 0, 0, 0.2);
}
.ios-alert__btn {
  flex: 1;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 11px 8px;
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s ease;
}
.ios-alert__btn:hover,
.ios-alert__btn:focus-visible {
  background: rgba(0, 0, 0, 0.04);
  outline: none;
}
.ios-alert__btn:active {
  background: rgba(0, 0, 0, 0.08);
}
.ios-alert__btn + .ios-alert__btn {
  border-left: 0.5px solid rgba(0, 0, 0, 0.2);
}
