/* ==========================================================================
   意享整合行銷 Delight Marketing Solution — shared stylesheet
   Direction: minimal photography-led portfolio (ref. Pallas), brand pink as
   the only reverse-color accent, navy used strictly as ink — no navy blocks.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Noto+Sans+TC:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #10192a;
  --ink-soft: #4c5566;
  --ink-faint: #8892a0;
  --bg: #ffffff;
  --bg-alt: #faf8f5;
  --pink: #f0a79d;       /* official brand salmon — fills only */
  --pink-hover: #e8917f;
  --pink-text: #a8503d;  /* deepened salmon, safe for text on white */
  --hairline: rgba(16, 25, 42, 0.12);

  --font: 'Manrope', 'Noto Sans TC', -apple-system, sans-serif;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

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

.kicker {
  display: inline-block;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pink-text);
  margin-bottom: 16px;
}

.mark {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.mark::after {
  content: '';
  position: absolute;
  left: 1px; right: 1px; bottom: 3px; height: 30%;
  background: var(--pink);
  z-index: -1;
}

section { padding: 96px 0; }
@media (max-width: 768px) { section { padding: 60px 0; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 30px;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary { background: var(--pink); color: var(--ink); }
.btn-primary:hover { background: var(--pink-hover); }

.link {
  display: inline-flex;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.02em;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
  transition: opacity 0.2s ease;
}
.link:hover { opacity: 0.62; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--hairline);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 78px; }

.wordmark { display: flex; align-items: center; gap: 0px; color: var(--ink); }
.wordmark-mark { height: 58px; width: auto; flex-shrink: 0; }
.wordmark-text { display: flex; flex-direction: column; gap: 1px; }
.wordmark .cn { font-weight: 800; font-size: 17px; letter-spacing: 0.01em; }
.wordmark .en { font-weight: 600; font-size: 9.5px; letter-spacing: 0.2em; color: var(--ink-faint); text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav ul { display: flex; align-items: center; gap: 22px; }
.main-nav li { display: flex; align-items: center; gap: 22px; }
.main-nav li:not(:last-child)::after { content: '·'; color: var(--ink-faint); margin-left: 22px; }
.main-nav a {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.main-nav a.active { color: var(--pink-text); border-color: var(--pink); }
.main-nav a:hover { color: var(--pink-text); }

.nav-toggle {
  display: none;
  background: none; border: none; width: 40px; height: 40px; padding: 0;
  cursor: pointer; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ''; position: absolute; left: 8px; right: 8px; height: 2px;
  background: var(--ink); transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle span { top: 19px; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle.is-open span { background: transparent; }
.nav-toggle.is-open span::before { transform: translateY(7px) rotate(45deg); background: var(--ink); }
.nav-toggle.is-open span::after { transform: translateY(-7px) rotate(-45deg); background: var(--ink); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  /* sticky header is a positioning ancestor, so its fixed-position mobile
     nav needs the header itself stretched to full height while open */
  .site-header:has(.main-nav.is-open) { height: 100vh; }
  .main-nav {
    position: fixed; inset: 78px 0 0 0; background: var(--bg);
    flex-direction: column; align-items: stretch; padding: 24px;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .main-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav li { display: block; }
  .main-nav li::after { display: none; }
  .main-nav a { display: block; padding: 16px 4px; border-bottom: 1px solid var(--hairline); }
  .main-nav .btn { margin-top: 16px; width: 100%; justify-content: center; }
}

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 0.95fr 1.05fr; align-items: stretch; min-height: 640px; position: relative; overflow: hidden; }
.hero-copy { padding-top: 40px; padding-bottom: 40px; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 2; }
h1.display { font-size: clamp(36px, 4.6vw, 56px); line-height: 1.15; margin-bottom: 26px; }
.hero-copy .sub { font-size: 16.5px; color: var(--ink-soft); max-width: 42ch; line-height: 1.8; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; }
.hero-media { position: relative; overflow: hidden; background: var(--pink); }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; display: block; min-height: 360px;
  animation: hero-kenburns 16s ease-in-out infinite alternate;
}

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-media { order: -1; }
  .hero-media img { height: 340px; min-height: 0; }
  .hero-copy { padding-top: 32px; }
}

/* continuous zoom on the hero photo — adds ambient motion without a video asset */
@keyframes hero-kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.14); }
}

/* one-time "settle" on the photo itself: starts zoomed+faded, drops into place */
.hero-media { animation: hero-media-settle 1.1s cubic-bezier(0.16,1,0.3,1) both; animation-delay: 0.15s; }
@keyframes hero-media-settle {
  from { opacity: 0; transform: scale(1.12); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---------- hero entrance (staggered reveal on page load, not scroll) ---------- */
[data-reveal-load] {
  opacity: 0; transform: translateY(34px);
  animation: hero-reveal 1.3s cubic-bezier(0.16,1,0.3,1) forwards;
}
[data-reveal-load="1"] { animation-delay: 0.2s; }
[data-reveal-load="2"] { animation-delay: 0.7s; }
[data-reveal-load="3"] { animation-delay: 1.3s; }
[data-reveal-load="4"] { animation-delay: 1.9s; }
@keyframes hero-reveal {
  to { opacity: 1; transform: translateY(0); }
}

/* headline highlight sweeps in after the H1 itself has landed */
h1.display .mark::after {
  transform: scaleX(0); transform-origin: left;
  animation: mark-sweep 0.7s cubic-bezier(0.65,0,0.35,1) forwards;
  animation-delay: 2.3s;
}
@keyframes mark-sweep { to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  [data-reveal-load] { animation: none; opacity: 1; transform: none; }
  .hero-media, .hero-media img { animation: none; opacity: 1; }
  h1.display .mark::after { animation: none; transform: scaleX(1); }
}

/* ---------- tab switch (services / workflow) — white ground, no navy blocks ---------- */
.tab-switch { background: #fff; }
.tab-list {
  display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  border-bottom: 1px solid var(--hairline);
}
.tab-list::-webkit-scrollbar { display: none; }
.tab-btn {
  flex: 1 1 0; min-width: 190px; display: flex; flex-direction: column; gap: 6px;
  padding: 22px 26px; background: none; border: none; cursor: pointer; text-align: left;
  position: relative; white-space: nowrap; font-family: var(--font);
}
.tab-btn .tab-num { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; color: var(--ink-faint); transition: color 0.25s ease; }
.tab-btn .tab-name { font-size: 15px; font-weight: 700; color: var(--ink-soft); transition: color 0.25s ease; }
.tab-btn::after {
  content: ""; position: absolute; left: 26px; right: 26px; bottom: -1px; height: 2px;
  background: var(--pink); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease;
}
.tab-btn:hover .tab-name { color: var(--ink); }
.tab-btn.is-active .tab-name { color: var(--ink); }
.tab-btn.is-active .tab-num { color: var(--pink-text); }
.tab-btn.is-active::after { transform: scaleX(1); }
.tab-panels { padding: 42px 44px 46px; position: relative; min-height: 220px; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: tab-fade 0.4s ease; }
@keyframes tab-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.tab-panel .tab-eyebrow { display: block; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pink-text); font-weight: 700; margin-bottom: 10px; }
.tab-panel h3 { font-size: 22px; font-weight: 800; color: var(--ink); margin-bottom: 14px; }
.tab-panel p { font-size: 15px; line-height: 1.8; color: var(--ink-soft); margin: 0 0 22px; max-width: 640px; }
.tab-panel .tags { display: flex; flex-wrap: wrap; gap: 9px; margin-top: -4px; }
.tab-panel .tags span {
  display: inline-block; padding: 7px 14px; border-radius: 999px;
  background: rgba(240,167,157,0.16); color: var(--pink-text); font-size: 12.5px; font-weight: 600;
}
@media (max-width: 700px) {
  .tab-btn { min-width: 156px; padding: 18px 20px; }
  .tab-btn::after { left: 20px; right: 20px; }
  .tab-panels { padding: 30px 24px 34px; }
  .tab-panel p { margin-bottom: 18px; }
}

/* ---------- page header (inner pages) ---------- */
.page-header { padding: 56px 0 24px; border-bottom: 1px solid var(--hairline); }
.page-header h1 { font-size: clamp(30px, 4.2vw, 44px); margin-bottom: 12px; }
.page-header p { max-width: 56ch; margin-bottom: 0; }

/* ---------- section headers ---------- */
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px; margin-bottom: 44px; flex-wrap: wrap;
}
.section-head .head-copy { max-width: 640px; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 0; }
.section-head p { margin: 10px 0 0; }

/* ---------- statement (services, no numbered list) ---------- */
.statement { font-size: clamp(22px, 2.6vw, 32px); font-weight: 700; line-height: 1.6; color: var(--ink); max-width: 900px; }
.statement .mark { font-weight: 800; }

/* ---------- manifesto (philosophy), white bg, asymmetric, no color block ---------- */
.manifesto { display: flex; flex-direction: column; gap: 56px; }
.manifesto-item { max-width: 620px; }
.manifesto-item:nth-child(2) { margin-left: auto; text-align: right; }
.manifesto-item .kicker { color: var(--pink-text); }
.manifesto-item h3 { font-size: clamp(22px, 2.8vw, 30px); margin-bottom: 14px; }
.manifesto-item p { font-size: 16px; margin: 0; }
@media (max-width: 700px) {
  .manifesto-item, .manifesto-item:nth-child(2) { margin-left: 0; text-align: left; max-width: none; }
}

/* ---------- masonry grid: photos + pink accent tiles ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 130px;
  grid-auto-flow: dense;
  gap: 18px;
}
.grid .tile { position: relative; overflow: hidden; }
.grid .tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grid .tile.c2 { grid-column: span 2; }
.grid .tile.c1 { grid-column: span 1; }
.grid .tile.r2 { grid-row: span 2; }
.grid .tile.r3 { grid-row: span 3; }
.grid .tile.accent {
  background: var(--pink); color: var(--ink);
  display: flex; flex-direction: column; justify-content: center; padding: 22px;
}
.grid .tile.accent .label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; margin-bottom: 6px; opacity: 0.65; }
.grid .tile.accent .big { font-size: 18px; font-weight: 800; line-height: 1.3; }
.grid .tile figcaption {
  position: absolute; left: 14px; bottom: 12px; font-size: 12.5px; font-weight: 700;
  color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,0.55);
}

@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .grid .tile.c2 { grid-column: span 2; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .grid .tile.c2, .grid .tile.c1 { grid-column: span 1; }
  .grid .tile.r2, .grid .tile.r3 { grid-row: span 1; }
}

/* ---------- team / department photo row ---------- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.team-grid figure { margin: 0; }
.team-grid img { width: 100%; aspect-ratio: 3/3.6; object-fit: cover; display: block; }
.team-grid figcaption { padding-top: 12px; }
.team-grid .name { font-weight: 800; font-size: 15px; }
.team-grid .role { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pink-text); font-weight: 700; margin-top: 3px; }
@media (max-width: 700px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- dual image row (e.g. design showcase pairs) ---------- */
.dual-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; align-items: start; }
.dual-grid figure { margin: 0; }
.dual-grid img { width: 100%; display: block; }
.dual-grid figcaption { padding-top: 10px; font-size: 13.5px; color: var(--ink-soft); font-weight: 600; }
@media (max-width: 640px) { .dual-grid { grid-template-columns: 1fr; } }

/* ---------- case detail (flat-lay style, centered) ---------- */
.case { text-align: center; }
.case-img { margin-bottom: 32px; }
.case-img img { max-width: 760px; width: 100%; margin: 0 auto; display: block; }
.case h3 { font-size: clamp(22px, 2.6vw, 28px); margin-bottom: 8px; }
.case .meta { font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }

/* ---------- split (image + copy) ---------- */
.split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center; }
.split img { width: 100%; }
.split.reverse .split-media { order: 2; }
.split.reverse .split-copy { order: 1; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse .split-media, .split.reverse .split-copy { order: initial; }
}

/* ---------- strategy clusters ---------- */
.cluster-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.cluster { border-top: 2px solid var(--pink); padding-top: 20px; }
.cluster h3 { font-size: 17px; margin-bottom: 16px; font-weight: 800; }
.cluster ul { display: flex; flex-direction: column; gap: 16px; }
.cluster li { color: var(--ink-soft); font-size: 14.5px; }
.cluster li strong { display: block; color: var(--ink); font-weight: 800; margin-bottom: 3px; font-size: 15px; }
@media (max-width: 860px) { .cluster-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- CTA row (no color band — plain, on bg-alt) ---------- */
.cta-row {
  background: var(--bg-alt);
  padding: 64px 0;
}
.cta-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
}
.cta-inner h2 { margin-bottom: 6px; font-size: clamp(22px, 3vw, 30px); }
.cta-inner p { margin: 0; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; }
.contact-info { border-top: 2px solid var(--pink); padding-top: 22px; }
.contact-info h3 { font-size: 18px; margin-bottom: 6px; font-weight: 800; }
.contact-row { margin-top: 26px; }
.contact-row .label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pink-text); font-weight: 700; margin-bottom: 6px; display: block; }
.contact-row a, .contact-row span.value { font-size: 18px; font-weight: 700; color: var(--ink); }
.contact-row a:hover { color: var(--pink-text); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- form ---------- */
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.form-field label { font-size: 14px; font-weight: 700; color: var(--ink); }
.form-field input, .form-field textarea, .form-field select {
  font-family: var(--font); font-size: 15px; padding: 13px 2px;
  border: none; border-bottom: 1px solid var(--hairline); border-radius: 0;
  background: transparent; color: var(--ink);
}
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--ink-faint); }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; border-color: var(--pink-text);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-note { font-size: 13.5px; color: var(--ink-faint); margin-top: -6px; }
.form-status { margin-top: 16px; font-size: 14.5px; color: var(--pink-text); display: none; }
.form-status.is-visible { display: block; }

/* ---------- footer ---------- */
.site-footer { background: var(--bg); color: var(--ink-soft); padding: 48px 0 28px; border-top: 1px solid var(--hairline); }
.footer-top {
  display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
  padding-bottom: 28px; margin-bottom: 20px;
}
.footer-top .wordmark .cn { font-size: 18px; }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer-nav a { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink); }
.footer-nav a:hover { color: var(--pink-text); }
.footer-nav span.dot { color: var(--ink-faint); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-faint); padding-top: 20px; border-top: 1px solid var(--hairline);
}

/* ---------- scroll reveal ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, .link { transition: none; }
}
