/* Section 04: marketing services with stable controls and two-sided cards. */
.marketing-services {
  padding: 112px 0 104px;
  background: var(--page-bg);
  color: var(--text);
}

.marketing-services > .container { text-align: left; }

.marketing-header {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: end;
  gap: 56px;
  margin-bottom: 50px;
}

.marketing-header > * { min-width: 0; }

.marketing-header .eyebrow {
  padding: 0;
  margin: 0 0 26px;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font: 600 11px/1.6 Arial, sans-serif;
  letter-spacing: .1em;
}

.marketing-header .display-title {
  color: var(--text);
  font-size: clamp(34px, 3.25vw, 48px);
  line-height: 1.4;
  letter-spacing: -.055em;
}

.marketing-header .section-lead {
  justify-self: end;
  margin: 0 0 5px;
  color: var(--body-text);
  font-size: clamp(13px, 1.15vw, 17px);
  line-height: 1.9;
  letter-spacing: -.025em;
}

.marketing-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
  gap: 22px;
}

.marketing-card {
  position: relative;
  grid-column: span 2;
  min-width: 0;
  perspective: 1600px;
}

.marketing-card:nth-child(n + 4) { grid-column: span 3; }

/* Each row keeps the largest face's height, so a flip cannot move its neighbours. */
.marketing-card-inner {
  display: grid;
  gap: 20px;
  height: 100%;
}

.marketing-card.is-interactive .marketing-card-inner {
  gap: 0;
  transform-style: preserve-3d;
  transition: transform .65s cubic-bezier(.22, .7, .25, 1);
}

.marketing-card.is-flipped .marketing-card-inner { transform: rotateY(180deg); }

.marketing-card-face {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 31px 28px 86px;
  border: 1px solid rgb(255 255 255 / 9%);
  border-top-color: rgb(255 244 228 / 23%);
  border-left-color: rgb(255 255 255 / 14%);
  border-bottom-color: rgb(0 0 0 / 60%);
  border-radius: 9px;
  /* A lit rim, a shaded lower edge, then contact and ambient shadows. */
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 7%),
    inset 1px 0 0 rgb(255 255 255 / 3%),
    inset -1px -2px 0 rgb(0 0 0 / 24%),
    0 3px 0 #111, 0 4px 0 rgb(255 255 255 / 6%),
    3px 9px 14px rgb(0 0 0 / 28%),
    8px 28px 40px -12px rgb(0 0 0 / 52%);
  transition: box-shadow .24s ease, border-color .24s ease;
}

/* The thin highlight follows the same upper-left light on both faces. */
.marketing-card-face::before {
  content: '';
  position: absolute;
  top: 0;
  right: 14px;
  left: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(255 241 221 / 23%) 18%, rgb(255 255 255 / 4%) 76%, transparent);
  pointer-events: none;
}

.marketing-card.is-interactive .marketing-card-front { transform: translateZ(2px); }

.marketing-card.is-interactive .marketing-card-face {
  grid-area: 1 / 1;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.marketing-card-front {
  background: radial-gradient(ellipse at 8% 0%, rgb(255 243 226 / 7%), transparent 58%),
    linear-gradient(145deg, #292724, #1a1a1a 43%, #101010);
  color: var(--text);
  cursor: pointer;
}

.marketing-card-back {
  border-top-color: rgb(255 196 155 / 29%);
  border-left-color: rgb(255 196 155 / 16%);
  background: radial-gradient(ellipse at 8% 0%, rgb(255 196 151 / 6%), transparent 58%),
    linear-gradient(145deg, #302a25, #202020 40%, #141414);
  color: var(--text);
}

.marketing-card.is-interactive .marketing-card-back { transform: rotateY(180deg) translateZ(2px); }

.marketing-kicker {
  margin: 0;
  color: var(--muted);
  font: 500 10px/1.6 Arial, 'Noto Sans KR', sans-serif;
  letter-spacing: .09em;
}

.marketing-card-back .marketing-kicker { color: var(--muted); }

.marketing-card-title {
  margin: 29px 0 19px;
  color: inherit;
  font-size: clamp(21px, 1.75vw, 27px);
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: -.05em;
  overflow-wrap: anywhere;
}

.marketing-card-title small {
  display: inline-block;
  margin-left: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: -.02em;
}

.marketing-card-lead {
  margin: 0 0 26px;
  color: var(--body-text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: -.035em;
}

.marketing-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  margin-top: auto;
  padding: 5px;
  border: 1px solid rgb(255 255 255 / 13%);
  border-top-color: rgb(255 255 255 / 27%);
  border-left-color: rgb(255 255 255 / 20%);
  border-radius: 6px;
  background: linear-gradient(145deg, #3a3835, #202020 45%, #111);
  object-fit: contain;
  box-shadow: 2px 3px 0 #101010, 2px 4px 0 rgb(255 255 255 / 8%),
    3px 7px 10px rgb(0 0 0 / 32%), 6px 18px 25px -7px rgb(0 0 0 / 44%);
}

.marketing-card:nth-child(n + 4) .marketing-image {
  width: min(100%, 400px);
  margin-inline: auto;
}

.marketing-image-caption {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: -.02em;
}

/* The control remains outside the rotating wrapper and keeps a stable focus target. */
.marketing-flip-toggle {
  position: absolute;
  z-index: 2;
  right: 28px;
  bottom: 22px;
  left: 28px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.marketing-card.is-interactive .marketing-flip-toggle { display: flex; }

.marketing-flip-icon {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 1px solid #555;
  border-radius: 50%;
  font: 400 20px/1 Arial, sans-serif;
  transition: background .2s, border-color .2s, color .2s;
}

.marketing-card.is-flipped .marketing-flip-icon {
  border-color: var(--orange);
  background: var(--orange);
  color: #080808;
}

.marketing-back-title {
  margin: 30px 0 25px;
  color: #fff;
  font-size: clamp(23px, 1.9vw, 30px);
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: -.05em;
}

.marketing-back-copy {
  margin: 0 0 27px;
  color: var(--body-text);
  font-size: 14px;
  line-height: 1.95;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}

.marketing-flow {
  display: grid;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}

.marketing-flow li {
  position: relative;
  padding: 15px 0 15px 17px;
  border-top: 1px solid #444;
  color: var(--text);
  font-size: 13px;
  line-height: 1.75;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

.marketing-flow li:last-child { border-bottom: 1px solid #444; }

.marketing-flow li::before {
  content: '';
  position: absolute;
  top: calc(15px + .7em);
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffab7b;
}

.marketing-back-note {
  margin: 0 0 23px;
  color: var(--body-text);
  font-size: 12px;
  line-height: 1.85;
}

.marketing-inquiry-link {
  display: inline-flex;
  align-items: center;
  align-self: start;
  gap: 10px;
  min-height: 44px;
  margin-top: auto;
  color: #ffb383;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.marketing-creative {
  margin-top: 40px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.marketing-creative-heading { max-width: 570px; }

.marketing-creative-heading h3 {
  margin: 15px 0 17px;
  color: var(--text);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -.05em;
}

.marketing-creative-heading > p:not(.marketing-kicker) {
  margin: 0;
  color: var(--body-text);
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: -.025em;
}

.marketing-creative-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin: 25px 0 20px;
}

.marketing-creative-media {
  flex: 0 1 420px;
  width: min(100%, 420px);
  min-width: 0;
  margin: 0;
  padding: 6px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 7px;
  background: linear-gradient(145deg, #292929, #141414);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 10%), 6px 7px 0 -1px #111, 6px 7px 0 0 rgb(255 255 255 / 8%), 0 16px 28px rgb(0 0 0 / 28%);
}

.marketing-creative-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 3px;
}

.marketing-creative-media figcaption {
  margin: 0;
  padding: 12px 12px 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.marketing-services .marketing-light-button {
  flex: 0 0 auto;
  justify-content: center;
  min-width: 190px;
  max-width: 100%;
  padding: 17px 24px;
  border: 1px solid var(--text);
  border-radius: 5px;
  background: var(--text);
  color: #080808;
  box-shadow: none;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.marketing-cost-note {
  margin: 20px 0 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.85;
  letter-spacing: -.025em;
}

.marketing-terms {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
  letter-spacing: -.015em;
}

.marketing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding-top: 35px;
}

.marketing-footer p {
  margin: 0;
  color: var(--body-text);
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: -.025em;
}

.marketing-flip-toggle:focus-visible,
.marketing-inquiry-link:focus-visible,
.marketing-services .marketing-light-button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 5px;
  border-radius: 3px;
}

@media (hover: hover) {
  .marketing-inquiry-link:hover { color: #ffcaab; text-decoration-thickness: 2px; }
  .marketing-services .marketing-light-button:hover { border-color: #ffd5bb; background: #ffd5bb; }
  .marketing-card.is-interactive:hover .marketing-card-face {
    border-top-color: rgb(255 209 177 / 36%);
    border-left-color: rgb(255 220 196 / 21%);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 10%),
      inset 1px 0 0 rgb(255 255 255 / 4%),
      inset -1px -2px 0 rgb(0 0 0 / 24%),
      0 3px 0 #111, 0 4px 0 rgb(255 255 255 / 7%),
      4px 12px 18px rgb(0 0 0 / 33%),
      10px 34px 46px -12px rgb(0 0 0 / 58%);
  }
}

/* The separate translate leaves both the scroll reveal and inner flip intact. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .marketing-card.is-interactive:not(.motion-item) { transition: translate .24s ease; }
  .marketing-card.is-interactive:not(.motion-item):hover { translate: 0 -4px; }
}

@media (max-width: 1050px) {
  .marketing-header { gap: 34px; margin-bottom: 38px; }
  .marketing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .marketing-card,
  .marketing-card:nth-child(n + 4) { grid-column: auto; }
  .marketing-card:last-child { grid-column: 1 / -1; }
  .marketing-card-face { padding: 29px 26px 86px; }
  .marketing-card-title { font-size: 26px; }
  .marketing-flip-toggle { right: 26px; left: 26px; }
  .marketing-back-title { font-size: 28px; }
  .marketing-card:nth-child(4) .marketing-image { width: 100%; }
  .marketing-creative-media { flex-basis: 360px; }
}

@media (max-width: 760px) {
  .marketing-services { padding: 74px 0 72px; }
  .marketing-services > .container { width: calc(100% - 40px); }
  .marketing-header { grid-template-columns: 1fr; gap: 22px; margin-bottom: 30px; }
  .marketing-header .eyebrow { margin-bottom: 20px; font-size: 10px; letter-spacing: .075em; }
  .marketing-header .display-title { font-size: clamp(28px, 7.9vw, 43px); line-height: 1.42; }
  .marketing-header .section-lead { justify-self: start; margin: 0; font-size: 13px; }
  .marketing-grid { grid-template-columns: 1fr; gap: 18px; }
  .marketing-card:last-child { grid-column: auto; }
  .marketing-card-face { padding: 27px 24px 81px; box-shadow: inset 0 1px 0 rgb(255 255 255 / 7%), inset -1px -2px 0 rgb(0 0 0 / 22%), 0 2px 0 #111, 0 3px 0 rgb(255 255 255 / 5%), 2px 8px 13px rgb(0 0 0 / 26%), 4px 18px 26px -9px rgb(0 0 0 / 44%); }
  .marketing-image { padding: 4px; box-shadow: 1px 2px 0 #111, 1px 3px 0 rgb(255 255 255 / 7%), 2px 5px 8px rgb(0 0 0 / 28%), 4px 12px 18px -6px rgb(0 0 0 / 38%); }
  .marketing-card-title { margin: 27px 0 18px; font-size: clamp(22px, 6.4vw, 30px); }
  .marketing-card-lead { margin-bottom: 24px; font-size: 13px; line-height: 1.9; }
  .marketing-card:nth-child(n + 4) .marketing-image { width: 100%; }
  .marketing-kicker { font-size: 9px; letter-spacing: .075em; }
  .marketing-image-caption { font-size: 9px; line-height: 1.8; }
  .marketing-flip-toggle { right: 24px; bottom: 20px; left: 24px; font-size: 11px; }
  .marketing-back-title { margin: 27px 0 22px; font-size: clamp(23px, 6.6vw, 30px); }
  .marketing-back-copy { margin-bottom: 24px; font-size: 13px; line-height: 1.9; }
  .marketing-flow { margin-bottom: 23px; }
  .marketing-flow li { padding-block: 13px; font-size: 12px; line-height: 1.8; }
  .marketing-flow li::before { top: calc(13px + .72em); }
  .marketing-inquiry-link { font-size: 12px; }
  .marketing-creative { margin-top: 32px; padding: 31px 0; }
  .marketing-creative-heading h3 { margin-top: 13px; font-size: 24px; }
  .marketing-creative-heading > p:not(.marketing-kicker) { font-size: 13px; }
  .marketing-creative-body { flex-direction: column; align-items: start; gap: 24px; margin-block: 24px; }
  .marketing-creative-media { flex: none; width: min(100%, 420px); padding: 5px; box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%), 4px 5px 0 -1px #111, 4px 5px 0 0 rgb(255 255 255 / 7%), 0 10px 20px rgb(0 0 0 / 24%); }
  .marketing-services .marketing-light-button { min-width: 0; padding: 15px 21px; font-size: 12px; }
  .marketing-cost-note { font-size: 12px; line-height: 1.9; }
  .marketing-terms { font-size: 10px; }
  .marketing-footer { flex-direction: column; align-items: start; gap: 23px; padding-top: 29px; }
  .marketing-footer p { font-size: 13px; }
}

@media (max-width: 360px) {
  .marketing-card-face { padding-inline: 20px; }
  .marketing-flip-toggle { right: 20px; left: 20px; }
  .marketing-header .display-title { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .marketing-services *,
  .marketing-services *::before,
  .marketing-services *::after { transition: none !important; animation: none !important; }
}
