/* Industry pages share the SYRIVA palette, typography and document actions. */

.industry-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 10px;
  margin-block: 4px 8px;
  color: var(--muted);
  font-size: var(--text-ui);
}

.industry-breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--rose);
}

.industry-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 3.5vw, 48px);
  padding: clamp(24px, 3.6vw, 52px);
  border: 1px solid var(--glass-rim);
  border-radius: var(--panel-radius);
  background: var(--glass-surface);
  box-shadow: var(--glass-panel-depth);
}

.industry-hero-with-photo {
  grid-template-columns: minmax(0, 1fr) clamp(235px, 28vw, 360px);
  padding: clamp(16px, 2.1vw, 30px);
}

.industry-hero-with-photo .industry-hero-copy {
  padding-inline-start: clamp(0px, 1.65vw, 24px);
}

.industry-hero h1 {
  color: var(--rose-deep);
  font-size: clamp(2rem, 3.5vw, 3.4rem);
  line-height: 1.22;
  text-wrap: pretty;
}

.industry-hero-description {
  max-width: 46ch;
  margin-top: 13px;
  color: var(--muted);
  font-size: var(--text-body);
}
.industry-hero .button { margin-top: 18px; }

.industry-hero .industry-photo {
  position: relative;
  grid-column: auto;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--card-radius);
  background: var(--tint);
  box-shadow: 0 5px 19px #53263824;
  --photo-y: 0%;
}

.industry-hero .industry-photo::after,
.application-photo-frame::after {
  position: absolute;
  inset: 0;
  border: 1px solid var(--glass-rim);
  border-radius: inherit;
  box-shadow: var(--glass-photo-rim);
  pointer-events: none;
  content: '';
}

.industry-hero :is(.industry-photo-plant, .industry-photo-dairy, .industry-photo-sauces) {
  --photo-y: 100%;
}

.industry-photo-image {
  position: absolute;
  inset: 0;
  background: url('../assets/industry-applications.webp') var(--photo-x) var(--photo-y) / 300% 200% no-repeat;
}

.industry-photo-formulation .industry-photo-image {
  background: url('../assets/application-examples/emulsion.webp') center / cover no-repeat;
}

.industry-switcher {
  margin-block: 20px 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.industry-switcher ul, .industry-product-list, .industry-product-examples ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.industry-switcher ul { display: flex; flex-wrap: wrap; gap: 8px; }
.industry-switcher a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass-control);
  box-shadow: var(--glass-control-depth);
  color: var(--rose-deep);
  font-size: var(--text-meta);
  font-weight: 650;
  text-decoration: none;
}
.industry-switcher a:hover { border-color: var(--rose); text-decoration: underline; }
.industry-switcher a[aria-current="page"] {
  border-color: var(--rose);
  background: var(--rose);
  color: var(--white);
  box-shadow: inset 0 1px 1px #fff4;
}

.industry-products { padding-block: clamp(25px, 3.4vw, 49px) clamp(42px, 5vw, 72px); }
.industry-products:focus { outline: none; }
.industry-products-intro {
  padding: clamp(20px, 3.2vw, 45px);
  border: 1px solid #965c75;
  border-radius: var(--panel-radius);
  background: radial-gradient(ellipse at 89% 112%, #a75d7d70, transparent 56%),
    linear-gradient(121deg, #7e2c4a, #591f39 61%, #45162e);
  box-shadow: 0 16px 28px -23px #4b2138c9;
  color: var(--white);
}
.industry-products-kicker { margin-bottom: 9px; color: #ffe0ec; font-size: var(--text-meta); font-weight: 720; }
.industry-products-intro h2 { font: 400 clamp(1.95rem, 4.35vw, 3.85rem)/1.04 var(--type-display); letter-spacing: -.047em; }
.industry-products-intro h2 em { color: #ffdce8; }
.industry-example-help { margin-top: 11px; color: #fff4f8; font-size: var(--text-ui); }
.industry-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 13px;
  padding: clamp(11px, 1.65vw, 20px);
  border: 1px solid var(--glass-rim);
  border-radius: 17px;
  background: var(--glass-popover);
  box-shadow: var(--glass-panel-depth);
}
.industry-tools .search-field { flex: 0 1 540px; }
.industry-tools .spec-filter { padding-inline: 0; }
.industry-products .result-bar { margin-block: 9px 7px; border-bottom: 0; color: var(--rose-deep); font-size: var(--text-ui); font-weight: 750; }
#industry-clear {
  min-height: 44px;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: var(--rose);
  font-size: var(--text-ui);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.industry-product-list { display: grid; gap: 11px; }

.industry-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.36fr) fit-content(200px);
  align-items: center;
  gap: clamp(13px, 2.15vw, 31px);
  min-width: 0;
  padding: clamp(13px, 1.6vw, 23px);
  border: 1px solid var(--glass-rim);
  border-radius: 16px;
  background: linear-gradient(151deg, #fffcfd, #fbf1f5);
  box-shadow: 0 0 0 1px #c59aaf57, 0 11px 19px -19px #63314ca6;
  scroll-margin-top: 20px;
}
.industry-product:target { border-color: #bc7d9a; background: linear-gradient(140deg, #fff8fb, #fae7f0); box-shadow: 0 0 0 1px #9d5e7c87; }
.industry-product-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.industry-product-heading { min-width: 0; }
.industry-product-thumbnail {
  display: block;
  flex: 0 0 auto;
  width: clamp(53px, 6vw, 84px);
  height: auto;
  aspect-ratio: 21 / 16;
  object-fit: contain;
  padding: 4px;
  border: 1px solid #fff;
  border-radius: 12px;
  background: radial-gradient(ellipse at 50% 70%, #efdce4, #fff7fa 75%);
  box-shadow: inset 0 -1px 2px #af7b942b, 0 0 0 1px #d8b4c458;
}
.industry-product-main h3 { color: var(--display-ink); font-size: clamp(1.01rem, 1.45vw, 1.25rem); line-height: 1.22; font-weight: 760; text-wrap: pretty; overflow-wrap: anywhere; }
.industry-product-category {
  margin-bottom: 5px;
  color: var(--rose);
  font-size: .71rem;
  font-weight: 780;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.industry-product-example-label { color: var(--rose-deep); font-size: var(--text-meta); font-weight: 760; }
.industry-product-examples ul { display: flex; flex-wrap: wrap; gap: 6px 7px; margin-top: 6px; }
.industry-product-examples li {
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--rose-silk);
  color: var(--ink);
  font-size: var(--text-ui);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.industry-product:target .industry-product-examples li { background: var(--paper); }
.industry-product-examples .application-example.is-interactive {
  max-width: 100%;
  padding: 0;
  background: transparent;
}

.application-example-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 32px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: linear-gradient(160deg, #fff, #faedf3);
  color: var(--rose-deep);
  line-height: 1.45;
  text-align: left;
  transition: background-color var(--speed), border-color var(--speed);
}

.application-example-button:hover {
  border-color: var(--rose);
  background: var(--rose-silk);
}

.application-example-button > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.application-example-symbol {
  position: relative;
  display: grid;
  flex: 0 0 16px;
  place-items: center;
  height: 16px;
  border-radius: 50%;
  background: #ebcedd;
  color: var(--rose-deep);
}

.application-example-symbol::before,
.application-example-symbol::after {
  position: absolute;
  width: 7px;
  height: 1px;
  background: currentColor;
  content: '';
}

.application-example-symbol::after { transform: rotate(90deg); }

#application-dialog {
  width: min(820px, calc(100% - 28px));
  border: 2px solid var(--glass-rim);
  background: var(--glass-surface);
  background-color: var(--paper);
  box-shadow: var(--glass-depth), 0 16px 45px #2b111d3d;
}
.application-panel {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 244px), 1fr));
  align-items: center;
  gap: clamp(16px, 3vw, 30px);
  padding: clamp(17px, 3vw, 28px);
}

.application-panel .detail-close { z-index: 1; }
.application-intro { grid-column: 1 / -1; padding-inline-end: 44px; }
.application-intro p { max-width: 66ch; margin-top: 6px; color: var(--muted); font-size: var(--text-ui); }
.application-figure { margin: 0; }
.application-photo-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: var(--card-radius);
  background: var(--rose-silk);
}

.application-photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.application-figure figcaption { margin-top: 7px; color: var(--muted); font-size: var(--text-meta); }
.application-copy { padding-block: 0 16px; }
#application-title { font-size: clamp(1.25rem, 2.7vw, 1.85rem); line-height: 1.18; overflow-wrap: anywhere; }
.application-ingredient {
  margin: 10px 0 17px;
  color: var(--rose);
  font-size: var(--text-ui);
  font-weight: 700;
}

#application-description { color: var(--ink); font-size: var(--text-body); }
.application-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 6px;
  margin-top: 22px;
}
.application-actions .button { gap: 8px; padding-inline: 11px; }

.industry-product-action { align-self: center; justify-self: end; }
.industry-product-action .spec-link { min-width: 0; border-color: var(--rose); background: var(--rose); color: var(--white); box-shadow: inset 0 1px 1px #fff4; }
.industry-product-action .spec-link:hover { border-color: var(--rose-hover); background: var(--rose-hover); }
.industry-spec-request { padding-inline: 6px; }
#industry-empty { margin-top: 12px; }

@media (max-width: 980px) {
  .industry-tools .search-field { flex: 1 1 300px; }
  .industry-product { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); column-gap: 16px; }
  .industry-product-action { grid-column: 2; justify-self: start; }
}

@media (max-width: 620px) {
  .industry-breadcrumb { margin-top: 0; font-size: var(--text-meta); }
  .industry-hero-with-photo { grid-template-columns: minmax(0, 1fr); }
  .industry-hero-with-photo .industry-hero-copy { padding: 5px 4px 0; }
  .industry-hero .industry-photo {
    justify-self: center;
    max-width: 360px;
  }
  .industry-switcher { margin-top: 14px; padding-bottom: 14px; }
  .industry-switcher ul { gap: 5px; }
  .industry-switcher a { padding-inline: 10px; }
  .industry-tools .search-field { flex-basis: 100%; }
  .industry-tools input[type='search'] { font-size: 1rem; }
  .industry-product { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .industry-product-action { grid-column: auto; }
  .industry-spec-request { padding-inline: 0; }
}

@media (max-width: 560px) {
  .application-panel { padding-top: 60px; }
  .application-intro { padding-inline-end: 0; }
  .application-photo-frame { aspect-ratio: 4 / 3; max-height: min(42dvh, 300px); }
  .application-copy { padding: 0 0 4px; }
  .application-ingredient { margin-bottom: 12px; }
  .application-actions { margin-top: 18px; }
}

@media (max-width: 620px), (pointer: coarse) {
  .application-example-button { min-height: 44px; }
}

:where(html[data-theme='dark']) .industry-products-intro {
  border-color: var(--glass-rim);
  background: radial-gradient(ellipse at 89% 112%, #bd526665, transparent 56%),
    linear-gradient(121deg, #71283c, #461623 62%, #32101c);
  box-shadow: var(--glass-panel-depth);
}
:where(html[data-theme='dark']) .industry-tools .search-field { background: var(--paper); }
:where(html[data-theme='dark']) .industry-product {
  border-color: var(--glass-rim);
  background: var(--glass-control);
  box-shadow: var(--glass-panel-depth);
}
:where(html[data-theme='dark']) .industry-product:target {
  border-color: var(--rose);
  background: linear-gradient(139deg, #663243, #421925);
  box-shadow: var(--glass-depth);
}
:where(html[data-theme='dark']) .industry-product-main h3 { color: var(--ink); }
:where(html[data-theme='dark']) .industry-product-thumbnail {
  border-color: var(--rose-rule);
  background: radial-gradient(ellipse at 49% 69%, #9b6b70, #5c2f3b 78%);
  box-shadow: var(--glass-control-depth);
}
:where(html[data-theme='dark']) .application-example-button { background: var(--glass-control); }
:where(html[data-theme='dark']) .application-example-button:hover { background: var(--tint); }
:where(html[data-theme='dark']) .application-example-symbol { background: var(--tint); color: var(--rose-deep); }
:where(html[data-theme='dark']) .industry-switcher a[aria-current='page'] { color: var(--canvas); }
:where(html[data-theme='dark']) .industry-product-action .spec-link { border-color: var(--rose-rule); background: var(--glass-accent); }
:where(html[data-theme='dark']) .industry-product-action .spec-link:hover { background: var(--glass-accent-hover); }

@media (forced-colors: active) {
  .industry-hero, #application-dialog { border-color: CanvasText; }
  .industry-products-intro, .industry-product { border-color: CanvasText; }
  .industry-switcher a[aria-current="page"] { outline: 1px solid Highlight; }
  .industry-product:target { outline: 2px solid Highlight; }
  .application-example-button { color: ButtonText; border-color: ButtonText; }
}
