/* ===== Base ===== */
:root {
  --accent: #3D5EF0;
  --ink: #0F1222;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  overflow-x: hidden;
}

::-webkit-scrollbar { display: none; }

img { max-width: 100%; }

a { color: inherit; }

button { font-family: inherit; }

/* ===== Hero ===== */
#hero-section {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  background: #DCDDD7;
}

#pixel-trail-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: linear-gradient(180deg, #D5D5D5, #FFFFFF);
}

.pixel-trail-dot {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.4);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

#hero-nav {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 26px 40px;
  width: 100%;
}

#hero-nav .brand {
  font-family: 'Amoria', 'Pretendard Variable', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  justify-self: start;
}

#hero-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  justify-self: center;
}

#hero-nav .nav-links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  opacity: 0.75;
}

#hero-nav .nav-cta {
  justify-self: end;
}

#hero-nav .nav-cta a {
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  padding: 12px 24px;
  border-radius: 100px;
  white-space: nowrap;
}

#hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(48px, 7vw, 90px) clamp(24px, 6vw, 90px) 0;
  pointer-events: none;
}

#hero-content .hero-inner {
  max-width: 1200px;
  width: 100%;
  position: relative;
  z-index: 2;
  color: var(--ink);
  pointer-events: none;
}

#hero-title {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 127px;
  letter-spacing: -0.01em;
  line-height: 0.82;
  font-variation-settings: 'wght' 100;
  animation: titleWeightLoad 2s ease-out forwards;
  text-align: left;
  font-weight: 300;
  font-style: normal;
  text-transform: lowercase;
}

#hero-subtitle {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 40px;
  opacity: 0.55;
  margin-top: 18px;
  font-weight: 100;
  font-style: italic;
  text-align: left;
}

#hero-tagline {
  position: absolute;
  right: 16px;
  bottom: 16px;
  font-size: 14px;
  opacity: 0.55;
  pointer-events: none;
}

@media (max-width: 900px) {
  #hero-title { font-size: 64px; }
  #hero-subtitle { font-size: 24px; }
  #hero-nav .nav-links { display: none; }
}

/* ===== Sections ===== */
.section-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 32px 24px;
}

.section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.section-heading {
  font-family: 'Pretendard Variable', sans-serif;
  font-size: clamp(24px, 3.4vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-top: 10px;
  font-variation-settings: 'wght' 400;
}

/* ===== Filters ===== */
#filters-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 32px 0;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.chip {
  border: none;
  cursor: pointer;
  padding: 9px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  background: #f4f4f6;
  color: #555;
  transition: background 0.15s, color 0.15s;
}

.chip.active {
  background: var(--ink);
  color: #fff;
}

.sub-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -20px 0 28px;
}

.sub-chip {
  border: 1px solid #ddd;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  background: #fff;
  color: #888;
  transition: background 0.15s, color 0.15s;
}

.sub-chip.active {
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  color: var(--accent);
}

/* ===== Project Grid ===== */
#project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  padding-bottom: 80px;
}

.project-card {
  cursor: pointer;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0px 4px 16px rgba(15, 18, 34, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0px 10px 24px rgba(15, 18, 34, 0.1);
}

.project-card .thumb-wrap {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
  background: #f4f4f6;
}

.project-card .tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  padding: 5px 11px;
  border-radius: 100px;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.project-card .card-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-card .card-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.project-card .card-client {
  font-size: 12.5px;
  color: #888;
}

.placeholder-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px dashed #ddd;
}

.placeholder-card .thumb-wrap {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
}

.placeholder-card .thumb-wrap span {
  font-size: 12px;
  color: #aaa;
}

.placeholder-card .card-info {
  padding: 16px;
}

.placeholder-card .card-title {
  font-size: 15px;
  font-weight: 700;
  color: #aaa;
}

/* ===== Contact grid ===== */
#contact-grid-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 32px 90px;
}

#contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 720px) {
  #contact-grid { grid-template-columns: repeat(2, 1fr); }
}

.contact-cell {
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
}

.contact-cell.span-2 { grid-column: span 2; }

.cell-notice {
  background: var(--accent);
}

.cell-press {
  background: #FF6B7A;
}

.cell-faq {
  grid-column: span 2;
  background: #f4f4f6;
  gap: 10px;
  min-height: auto;
}

.faq-bubble {
  align-self: flex-start;
  font-size: 12.5px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 8px 12px;
  color: #333;
}

.contact-link-cell {
  grid-column: span 2;
  text-decoration: none;
  border-radius: 18px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100px;
}

.contact-link-cell.mail { background: #FFD400; }
.contact-link-cell.biz { background: var(--ink); }

@media (max-width: 720px) {
  .cell-faq, .contact-link-cell { grid-column: span 2; }
}

/* ===== Footer ===== */
#site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 0 32px 60px;
}

#site-footer img {
  width: 110px;
  height: 110px;
  border-radius: 12px;
  border: 1px solid #eee;
}

#site-footer .qr-link {
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  background: #f4f4f6;
  padding: 8px 16px;
  border-radius: 100px;
}

#site-footer .copyright {
  font-size: 12px;
  color: #aaa;
  margin-top: 10px;
}

/* ===== Weight Gauge HUD ===== */
#weight-gauge {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  background: var(--ink);
  color: #fff;
  border-radius: 100px;
  padding: 10px 18px;
  font-family: 'Pretendard Variable', monospace;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0px 8px 20px rgba(15, 18, 34, 0.25);
}

#weight-gauge .label {
  color: var(--accent);
  font-weight: 700;
}

#weight-gauge .value {
  min-width: 32px;
  display: inline-block;
}

/* ===== Modal ===== */
#project-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 18, 34, 0.6);
  backdrop-filter: blur(4px);
  overflow-y: auto;
  padding: 40px 20px;
  display: none;
}

#project-modal-overlay.open { display: block; }

#project-modal-box {
  max-width: 880px;
  margin: 0 auto;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}

#modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 18, 34, 0.8);
  color: #fff;
  border: none;
  font-size: 16px;
  cursor: pointer;
}

#modal-header {
  padding: 44px 44px 10px;
}

#modal-header .tag-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

#modal-header .tag {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  padding: 5px 14px;
  border-radius: 100px;
}

#modal-header .client {
  font-size: 13px;
  color: #888;
}

#modal-header .title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

#modal-header .title-en {
  font-size: 13.5px;
  color: #888;
  margin-bottom: 20px;
}

#modal-header .desc {
  font-size: 15.5px;
  line-height: 1.7;
  color: #444;
  max-width: 620px;
  margin-bottom: 30px;
}

#modal-case-study {
  margin: 0 44px 32px;
  background: #f6f7fb;
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 600px) {
  .case-grid { grid-template-columns: 1fr; }
  #modal-header, #modal-case-study, #modal-images { margin-left: 20px; margin-right: 20px; padding-left: 20px; padding-right: 20px; }
}

.case-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.case-col .case-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.case-col .case-text {
  font-size: 15px;
  line-height: 1.6;
  color: #222;
}

.effect-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.effect-chip {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  padding: 8px 14px;
  border-radius: 100px;
}

.process-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-top: 6px;
}

.process-step {
  background: var(--ink);
  border-radius: 16px;
  padding: 20px;
  min-width: 170px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.process-step .num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.process-step .step-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
}

.process-step .step-desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: #aaa;
}

#modal-images {
  padding: 0 44px 48px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* image frame variants */
.frame-insta {
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0px 8px 24px rgba(15, 18, 34, 0.12);
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
}

.frame-insta .insta-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 16px;
}

.frame-insta .insta-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.frame-insta .insta-name {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
}

.frame-insta .insta-sub {
  font-size: 10px;
  color: #999;
  line-height: 1.2;
}

.frame-phone {
  border-radius: 34px;
  background: var(--ink);
  padding: 12px;
  box-shadow: 0px 8px 24px rgba(15, 18, 34, 0.16);
  max-width: 340px;
  margin: 0 auto;
  width: 100%;
}

.frame-phone .phone-screen {
  position: relative;
  width: 100%;
  max-height: 640px;
  overflow-y: auto;
  border-radius: 24px;
  background: #f4f4f6;
}

.frame-phone .phone-notch {
  position: sticky;
  top: 8px;
  margin: 0 auto;
  width: 60px;
  height: 7px;
  border-radius: 6px;
  background: var(--ink);
  z-index: 2;
}

.frame-phone img {
  width: 100%;
  display: block;
  margin-top: -7px;
}

.frame-plain {
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0px 8px 24px rgba(15, 18, 34, 0.1);
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}

.frame-none {
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
}
