/* Path: website/public/assets/industry-context.css */

.industry-hero {
  padding-block: clamp(36px, 5vw, 76px);
}

.industry-hero-grid {
  display: grid;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  max-width: 1280px;
}

.industry-hero-copy { min-width: 0; }

.industry-hero h1 {
  font-size: clamp(30px, 4.7vw, 54px);
  letter-spacing: 0.01em;
}

.industry-hero .lead {
  font-size: clamp(17px, 1.5vw, 20px);
  margin-block-start: 20px;
}

.industry-hero .btn-row { margin-block-start: clamp(18px, 2.4vw, 30px); }

.industry-visual {
  --art-cut: clamp(28px, 5vw, 60px);
  --art-base: #E8E9E7;
  --art-line: #667986;
  position: relative;
  min-width: 0;
  width: min(100%, 660px);
  justify-self: center;
  margin: 0;
  padding: clamp(7px, 1.2vw, 16px);
  border: 1px solid var(--line);
  background: var(--art-base);
  clip-path: polygon(0 0, calc(100% - var(--art-cut)) 0, 100% var(--art-cut), 100% 100%, 0 100%);
}

.industry-visual[data-scene="construction"] {
  --art-base: #F1EAE0;
  --art-line: #A15F28;
}

.industry-visual[data-scene="clinic"] {
  --art-base: #E7EDE9;
  --art-line: #55786B;
}

.industry-visual[data-scene="restaurant"] {
  --art-base: #F3E4D8;
  --art-line: #AF6034;
}

.industry-visual::after {
  content: "";
  position: absolute;
  inset-block-start: 5px;
  inset-inline-start: calc(100% - var(--art-cut) - 4px);
  width: calc(var(--art-cut) * 1.34);
  height: 1px;
  transform: rotate(45deg);
  transform-origin: left center;
  background: var(--art-line);
  pointer-events: none;
}

.industry-visual-frame {
  overflow: hidden;
  background: var(--art-base);
  clip-path: polygon(0 0, calc(100% - var(--art-cut)) 0, 100% var(--art-cut), 100% 100%, 0 100%);
}

.industry-visual-frame img,
.industry-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.industry-visual-caption {
  margin-block-start: 2px;
  padding: clamp(14px, 2vw, 24px) clamp(14px, 2vw, 24px) 2px;
  background: var(--surface);
}

.industry-visual-caption p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.industry-visual-caption .industry-visual-title {
  margin-block-end: 7px;
  color: var(--ink);
  font-size: clamp(17px, 1.55vw, 22px);
  font-weight: 600;
  line-height: 1.5;
}

.industry-visual-caption a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-block-start: 4px;
  font-size: 14px;
  font-weight: 600;
}

.industry-visual-caption a span { text-decoration: none; }

.ind-card[id],
.industry-detail-target {
  scroll-margin-top: 96px;
}

.industry-list { gap: clamp(16px, 3vw, 28px); }

.industry-card {
  display: block;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.industry-card img { aspect-ratio: 2 / 1; }
.industry-card-copy { padding: 16px clamp(16px, 3vw, 28px) 22px; }
.industry-card h3 span { color: var(--caramel); }
.industry-card:hover h3 { color: var(--caramel); }
.industry-card:hover { border-color: var(--gold); }

/* 產品頁產業格：7 個產業＋「其他行業」，桌機一排 4 張 */
.industry-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.industry-grid-4 .industry-card img { aspect-ratio: 3 / 2; }
.industry-grid-4 .industry-card-copy { padding: 14px 16px 18px; }
.industry-grid-4 .industry-card h3 { font-size: 18px; }
.industry-grid-4 .industry-card p { margin: 6px 0 0; font-size: 14px; line-height: 1.65; color: var(--muted); }
.industry-card--other { display: flex; align-items: flex-end; background: var(--paper); }
@media (max-width: 1039px) { .industry-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) {
  .industry-grid-4 { gap: 12px; }
  .industry-grid-4 .industry-card p { display: none; }
  .industry-grid-4 .industry-card h3 { font-size: 16px; }
  .industry-grid-4 .industry-card-copy { padding: 10px 12px 12px; }
  .industry-grid-4 .industry-card--other { grid-column: 1 / -1; }
  .industry-grid-4 .industry-card--other p { display: block; }
}

@media (min-width: 980px) {
  .industry-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); }
  .industry-hero h1 { font-size: clamp(33px, 3.55vw, 54px); }
}

@media (max-width: 480px) {
  .industry-hero .btn { padding-inline: 18px; }
}

@media (prefers-reduced-motion: no-preference) {
  .ready .industry-visual-frame img {
    animation: industry-image-enter 2400ms cubic-bezier(.22, .62, .32, 1) both;
    transform-origin: 46% 56%;
  }

  @keyframes industry-image-enter {
    from { opacity: 0.8; transform: translateX(-0.6%) scale(1.015); }
    28% { opacity: 1; }
    to { opacity: 1; transform: scale(1.035); }
  }
}

/* 專業服務、貿易批發、零售門市（2026-12-02 新增） */
.industry-visual[data-scene="professional"] {
  --art-base: #ECEAE5;
  --art-line: #6F6A60;
}

.industry-visual[data-scene="trading"] {
  --art-base: #EDE6DA;
  --art-line: #8A6436;
}

.industry-visual[data-scene="retail"] {
  --art-base: #F4E9DC;
  --art-line: #B0682C;
}

/* 表單分組標題（辦公室型：產業專屬＋辦公室共用） */
.ind-group {
  margin: clamp(32px, 4vw, 44px) 0 14px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.1em;
}

.section-head + .ind-group { margin-top: 0; }
