/* Shared SALMAST controls. Load after the page-specific stylesheets.
   The brand palette is exact; translucent states vary alpha only. */

:root {
  --control-height: 52px;
  --control-motion: 180ms;
  --control-ease: cubic-bezier(.22, 1, .36, 1);
}

/* Internal-page headers retain their layout and share the same action shape. */
body .site-header:not([data-dynamic-island]) .header-cta {
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 999px;
  color: #000000;
  font-size: 12px;
  line-height: 1.4;
}
body .site-header:not([data-dynamic-island]) .header-cta::after {
  content: "\2192";
  font-size: 18px;
}

/* One action size and a stable arrow position across public pages. */
body :is(.primary-btn, .secondary-btn):not(.offer-cloud__cta) {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: var(--control-height) !important;
  height: auto;
  padding: 6px 60px 6px 22px !important;
  border-radius: 999px !important;
  font-family: var(--font-body);
  font-size: 14px !important;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .045em;
  text-align: center;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
  isolation: isolate;
  overflow: hidden;
  touch-action: manipulation;
  transition: transform var(--control-motion) var(--control-ease),
    background-color var(--control-motion) ease,
    color var(--control-motion) ease,
    border-color var(--control-motion) ease,
    box-shadow var(--control-motion) ease !important;
}

body :is(.primary-btn, .secondary-btn):not(.offer-cloud__cta)::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: auto;
  right: 5px;
  width: 40px;
  height: 40px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: rgba(253, 244, 227, .12);
  opacity: .7;
  transform: translateY(-50%);
  transition: opacity var(--control-motion) ease, transform var(--control-motion) var(--control-ease);
}

body :is(.primary-btn, .secondary-btn):not(.offer-cloud__cta)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 1;
  transform: translateY(-50%);
  transition: transform var(--control-motion) var(--control-ease);
}

body :is(.primary-btn, .secondary-btn):not(.offer-cloud__cta):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

body :is(.primary-btn, .secondary-btn):not(.offer-cloud__cta):active {
  transform: translateY(1px) scale(.99);
  box-shadow: none;
}

body button:is(.primary-btn, .secondary-btn):disabled {
  cursor: not-allowed;
  opacity: .58;
  transform: none;
  box-shadow: none;
}

body button:is(.primary-btn, .secondary-btn):disabled::after {
  transform: translateY(-50%);
}

/* Root accent tokens must not turn dark-button text dark during hover. */
.primary-btn:hover,
.primary-btn:focus-visible { color: #fdf4e3; }

/* Small copy on gold needs black to retain contrast within the approved palette. */
body .hero-actions .primary-btn,
body .hero-actions .primary-btn:hover,
body .hero-actions .primary-btn:focus-visible,
body .reviews-section .section-cta .primary-btn,
body .portfolio-section .primary-btn,
body .process-cta .primary-btn,
body .calculator-form > .primary-btn,
body .catalog-filter-submit { color: #000000; }

/* The form has a dark surface, so label and input foregrounds are separate. */
.calculator-form label,
.calculator-form .attachment-field,
.calculator-form .attachment-field__title {
  color: rgba(253, 244, 227, .9);
}

.calculator-form .form-field-heading {
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: .015em;
}

.calculator-form .form-heading-icon { color: #b59357; opacity: 1; }

#calculatorForm input:is([type="text"], [type="tel"], [type="email"]),
#calculatorForm textarea,
#calculatorForm select {
  width: 100%;
  min-width: 0;
  min-height: var(--control-height);
  padding: 13px 15px;
  color: #2e3e44;
  background: #fdf4e3;
  border: 1px solid rgba(253, 244, 227, .4);
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

.calculator-form :is(input, textarea)::placeholder {
  color: rgba(46, 62, 68, .7);
  opacity: 1;
}

.calculator-form input:is([type="text"], [type="tel"], [type="email"]):focus,
.calculator-form textarea:focus,
.calculator-form select:focus {
  outline: 2px solid #b59357;
  outline-offset: 3px;
  border-color: #fdf4e3;
  box-shadow: none;
}

.calculator-form input:user-invalid,
.calculator-form textarea:user-invalid {
  border-color: #b59357;
  box-shadow: inset 4px 0 0 #b59357;
}

.calculator-form .attachment-field__control {
  min-height: 56px;
  padding: 7px;
  gap: 12px !important;
  color: #2e3e44;
  background: #fdf4e3;
}

.calculator-form .attachment-field__button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 9px 12px;
  color: #000000;
  background: #b59357;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: .01em;
  white-space: normal;
}

.calculator-form .attachment-field__name {
  color: rgba(46, 62, 68, .85);
  font-size: 14px;
  line-height: 1.5;
}

.calculator-form .attachment-field small {
  color: rgba(253, 244, 227, .76);
  font-size: 13px;
  line-height: 1.5;
}

.calculator-form .attachment-field__control:focus-within {
  outline: 2px solid #b59357;
  outline-offset: 3px;
  box-shadow: none;
}

.calculator-form .contact-preference__card {
  min-height: 56px;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0;
}

.calculator-form .contact-preference__option input:checked + .contact-preference__card { color: #000000; }

.calculator-form .privacy-consent {
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
}

.calculator-form .privacy-consent a {
  color: #fdf4e3;
  border-color: rgba(253, 244, 227, .5);
  white-space: normal;
}

.calculator-form .privacy-consent input[type="checkbox"] {
  accent-color: #b59357;
  cursor: pointer;
}

.calculator-form .form-status {
  color: #fdf4e3;
  font-size: 16px;
  line-height: 1.5;
}

.calculator-form .form-status:not(:empty) {
  padding: 12px 14px;
  border-left: 2px solid #b59357;
  background: rgba(253, 244, 227, .06);
}

.calculator-form .form-result { color: #2e3e44; background: #fdf4e3; }

/* Keep the mobile conversion bar legible after palette normalization. */
.mobile-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  line-height: 1.35;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: .01em;
  touch-action: manipulation;
}
.mobile-cta a:first-child { color: #2e3e44; border-color: rgba(46, 62, 68, .32); }
.mobile-cta a:last-child { color: #000000; background: #b59357; }
.catalog-mobile-cta a:first-child { color: #fdf4e3; background: #2e3e44; border-color: #2e3e44; }
.mobile-cta a:focus-visible { outline: 2px solid #2e3e44; outline-offset: 3px; }
.mobile-cta a:active { transform: translateY(1px); }

/* Portfolio utilities use the same readable type and comfortable hit areas. */
.portfolio-card-v07__body strong,
.catalog-project-zones h3,
.catalog-project-zone-card strong { font-family: var(--font-display); font-weight: 600; }

.portfolio-card-v07__body strong { line-height: 1.2; }
.portfolio-card-v07__body small,
.catalog-project-zone-card small { color: #2e3e44; }
.catalog-card--project .portfolio-card-v07__body small { color: #b59357; }
.portfolio-card-v07__body > span { color: rgba(46, 62, 68, .78); line-height: 1.5; }
.catalog-card--project .portfolio-card-v07__body > span { color: rgba(253, 244, 227, .78); }

.catalog-search input,
.catalog-sort select { font-size: 16px; }

.catalog-chip,
.catalog-filter-trigger,
.catalog-filter-option,
.catalog-mobile-option { min-height: 44px; font-size: 14px; line-height: 1.4; }

/* The live category renderer creates plain buttons, not .catalog-chip nodes. */
.catalog-categories > button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 9px 14px;
  color: #2e3e44;
  background: rgba(255, 255, 255, .68);
  border: 1px solid rgba(46, 62, 68, .2);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  transition: background-color var(--control-motion) ease, border-color var(--control-motion) ease;
}
.catalog-categories > button.is-active { color: #000000; background: #b59357; border-color: #b59357; }
.catalog-categories > button:hover { border-color: #b59357; }

.catalog-sort select { min-height: 44px; min-width: 148px; max-width: 100%; }
.catalog-view-switch button { width: 44px; min-width: 44px; min-height: 44px; }
.catalog-filter-option span:nth-last-child(1) { font-size: 12px; }
.catalog-mobile-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 9px 6px;
  border-radius: 6px;
  color: #2e3e44;
  cursor: pointer;
}
.catalog-mobile-option input { width: 18px; height: 18px; margin: 0; accent-color: #b59357; }
.catalog-mobile-option > span { min-width: 0; line-height: 1.4; }
.catalog-mobile-option > small { font-size: 12px; color: rgba(46, 62, 68, .76); }
.catalog-mobile-option:has(input:checked) { background: rgba(181, 147, 87, .14); }
.catalog-mobile-option:focus-within { outline: 2px solid #2e3e44; outline-offset: 1px; }
#catalogMobileApply { min-height: 52px; border-radius: 999px; color: #000000; font-size: 14px; }
.catalog-filter-group legend { font-size: 14px; }
.catalog-toolbar > p { font-size: 14px; line-height: 1.5; }
.catalog-project-info__facts dt { font-size: 12px; letter-spacing: .075em; color: rgba(46, 62, 68, .78); }
.catalog-project-info__facts dd { font-size: 16px; }
.catalog-project-info .project-info-card p,
.catalog-project-info .project-info-card li { font-size: 16px; line-height: 1.6; }
.catalog-project-info__actions { align-items: stretch; }
.catalog-project-info__actions a { min-height: 52px; font-size: 14px; }
.catalog-project-page__back { min-height: 44px; font-size: 14px; }

/* The consultation lives inside the results column, not the full viewport. */
.catalog-consultation { grid-template-columns: 46px minmax(0, 1fr); gap: 16px; }
.catalog-consultation__copy { min-width: 0; }
.catalog-consultation__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.catalog-consultation__actions a { flex: 1 1 220px; }
.catalog-consultation__facts { grid-column: 1 / -1; flex-wrap: wrap; gap: 12px; }
.catalog-consultation__facts div { padding-inline: 0 18px; border-left: 0; }
.catalog-consultation__facts dd { font-size: 12px; line-height: 1.45; }

/* Internal pages: comfortable reading, quiet surfaces, clear disclosure. */
.v07-card h3 { line-height: 1.2; }
.v07-card p,
.v07-card li,
.v07-list details p { color: rgba(46, 62, 68, .88); font-size: 17px; line-height: 1.65; }
.v07-card > p + p { margin-top: 18px; }
.v07-card > .primary-btn { margin-top: 24px; }

.v07-list summary {
  min-height: 72px;
  padding-block: 20px;
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1.35;
  transition: background-color var(--control-motion) ease;
}

.v07-list summary::after {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #2e3e44;
  font-size: 26px;
}

.v09-process-faq__list details p { color: rgba(253, 244, 227, .85); }
.v09-process-faq__list summary::after { color: #b59357; }
.v09-process-faq__list summary span { flex: 0 0 auto; }
.v07-list summary:focus-visible { outline-offset: -3px; border-radius: 4px; }

.v07-contact-grid { align-items: start; }
.v07-contact-grid > div > .v07-card {
  margin-bottom: 16px;
  padding: 24px;
  border: 1px solid rgba(46, 62, 68, .14);
}
.v07-contact-grid .v07-card a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  text-decoration: underline;
  text-decoration-color: rgba(46, 62, 68, .35);
  text-underline-offset: 5px;
  overflow-wrap: anywhere;
}

@media (hover: hover) and (pointer: fine) {
  body :is(.primary-btn, .secondary-btn):not(.offer-cloud__cta):not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .14);
  }
  body :is(.primary-btn, .secondary-btn):not(.offer-cloud__cta):not(:disabled):hover::before { opacity: 1; }
  body :is(.primary-btn, .secondary-btn):not(.offer-cloud__cta):not(:disabled):hover::after { transform: translate(2px, -50%); }
  .v07-list summary:hover { background: rgba(181, 147, 87, .06); }
  .v07-contact-grid .v07-card a:hover { text-decoration-color: #b59357; }
}

@media (max-width: 767px) {
  body :is(.primary-btn, .secondary-btn):not(.offer-cloud__cta) {
    padding: 6px 58px 6px 18px !important;
    font-size: 13px !important;
    letter-spacing: .025em;
  }
  .calculator-form .privacy-consent { grid-template-columns: 22px minmax(0, 1fr); }
  .calculator-form .privacy-consent a { grid-column: 2; justify-self: start; }
  .calculator-form .contact-preference__options { gap: 8px; }
  .calculator-form .contact-preference__card { gap: 6px; padding-inline: 7px; font-size: 13px; }
  .calculator-form .attachment-field__control { flex-wrap: wrap; }
  .calculator-form .attachment-field__name { flex: 1 1 120px; }
  .catalog-quick-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .catalog-categories {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    width: 100%;
    min-width: 0;
    gap: 6px;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  .catalog-categories > button {
    min-width: 0;
    padding: 9px 10px;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: balance;
  }
  .catalog-quick-row > .catalog-filter-trigger { justify-self: end; }
  .catalog-toolbar { flex-wrap: wrap; gap: 12px; }
  .catalog-toolbar > p { flex-basis: 100%; }
  .catalog-toolbar__actions { width: 100%; justify-content: space-between; gap: 10px; }
  .catalog-sort { flex: 1; min-width: 0; }
  .catalog-sort select { width: 100%; max-width: none; }
  .catalog-search input { font-size: 16px; }
  .catalog-intro p { font-size: 16px; line-height: 1.55; }
  .catalog-project-info__actions { grid-template-columns: 1fr; }
  .catalog-consultation { grid-template-columns: 1fr; }
  .catalog-consultation__actions a { flex-basis: 100%; }
  body .media-modal__actions .secondary-btn {
    width: 54px;
    padding: 0 !important;
    flex-shrink: 0;
  }
  body .media-modal__actions .secondary-btn::before,
  body .media-modal__actions .secondary-btn::after { display: none; }
  .v07-list summary { min-height: 68px; font-size: 20px; }
  .v07-card p,
  .v07-card li,
  .v07-list details p { font-size: 16px; }
  .v07-contact-grid { gap: 28px; }
}

@media (max-width: 420px) {
  :root[lang="hy"] .catalog-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :root[lang="hy"] .catalog-categories > button:first-child { grid-column: 1 / -1; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  body :is(.primary-btn, .secondary-btn):not(.offer-cloud__cta),
  body :is(.primary-btn, .secondary-btn):not(.offer-cloud__cta)::before,
  body :is(.primary-btn, .secondary-btn):not(.offer-cloud__cta)::after,
  .v07-list summary,
  .catalog-categories > button { transition: none !important; }
}
