/*
  IMD - Italian Moda Design — new stylesheet
  ------------------------------------------
  Replaces the broken /css/style.less (it fails on a syntax error in
  mixins.less, so the page currently renders unstyled).

  Written as plain CSS that LESS 1.4.1 also compiles unchanged, so it can
  either be saved as /css/style.css (and linked normally) or pasted over
  /css/style.less without touching the HTML.

  Idea: a tailor's workroom. Bodoni Moda (Bodoni was Italian) for the
  voice, Titillium Web (designed in Urbino) for the working text, and one
  motif: a run of red basting stitches — the temporary thread that holds a
  garment together before the final seam — marking the start of every
  section, drawn on the theme's empty .logotypeSign elements.

  Palette
    #FFFFFF  carta         page
    #1B2440  blu notte     headings, mission band, footer
    #343B51  inchiostro    body text
    #5B6275  grigio        secondary text
    #B3263A  filo rosso    basting stitches, list markers, focus
    #E4EDF3  celeste       map placeholder, form fields
    #D8DCE5  linea         rules and borders
*/

@import url("https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..700;1,6..96,400..700&family=Titillium+Web:ital,wght@0,400;0,600;0,700;1,400&display=swap&v=css");

/* ---------- LESS compile errors: never show them to visitors ---------- */

.less-error-message {
  display: none !important;
}

/* ---------- Base (overrides Bootstrap 2 defaults) ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body.page-type-onePage {
  margin: 0;
  padding: 0; /* Bootstrap's responsive file adds 20px side padding on phones */
  background: #ffffff;
  color: #343b51;
  font-family: "Titillium Web", "Segoe UI", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.page-type-onePage h1,
.page-type-onePage h2,
.page-type-onePage h3 {
  margin: 0;
  color: #1b2440;
  font-family: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  font-weight: 500;
  line-height: 1.2;
  text-rendering: optimizeLegibility;
}

.page-type-onePage p {
  margin: 0 0 1em;
}

.page-type-onePage a {
  color: inherit;
}

.page-type-onePage a:hover {
  color: inherit;
}

.page-type-onePage a:focus-visible,
.page-type-onePage button:focus-visible,
.page-type-onePage input:focus-visible,
.page-type-onePage textarea:focus-visible {
  outline: 2px solid #b3263a;
  outline-offset: 2px;
}

.page-type-onePage img {
  display: block;
  max-width: 100%;
  height: auto;
}

::selection {
  background: #e4edf3;
  color: #1b2440;
}

/* Stray spacer <br>s between blocks (line breaks inside text are kept) */
body > br,
section > br,
.container > br,
.bigHeadline > br,
.genericText > br,
.genericText > [class*="span"] > br {
  display: none;
}

/* Jump links land below the sticky menu */
a[name],
section[id] {
  scroll-margin-top: 6rem;
}

/* ---------- Layout: replaces Bootstrap's fixed-width grid ---------- */

.page-type-onePage .container {
  width: auto;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.page-type-onePage [class*="span"] {
  float: none;
  width: auto;
  min-height: 0;
  margin-left: 0;
}

.page-type-onePage .row,
.page-type-onePage .row-fluid {
  margin-left: 0;
}

.page-type-onePage .row::before,
.page-type-onePage .row::after,
.page-type-onePage .row-fluid::before,
.page-type-onePage .row-fluid::after {
  display: none;
}

.page-type-onePage .row > .clearfix:empty,
.page-type-onePage .row > br,
.page-type-onePage .row > div[style*="clear"] {
  display: none;
}

/* ---------- Basting stitches (the theme's empty logo marks) ---------- */

.logotypeSign,
.logotypeSignDark {
  display: block;
  width: 5.75rem;
  height: 3px;
  margin: 0 0 1.5rem;
  background: repeating-linear-gradient(90deg, #b3263a 0, #b3263a 12px, transparent 12px, transparent 19px);
}

#home .logotypeSign {
  background: repeating-linear-gradient(90deg, #ffffff 0, #ffffff 12px, transparent 12px, transparent 19px);
}

/* ---------- Menu ---------- */

#menu {
  position: relative;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid #d8dce5;
}

#menu .pull {
  display: none; /* the toggle needs JavaScript; the menu is always shown instead */
}

#menu .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 2rem;
  row-gap: 0.25rem;
  padding-top: 0.9rem;
  padding-bottom: 0.4rem;
}

#menu .container::before,
#menu .container::after,
#menu .sf-menu::before,
#menu .sf-menu::after {
  display: none;
}

#menu .logotype {
  text-decoration: none;
}

#menu .logotype h1 {
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

#menu .sf-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.25rem;
  margin: 0 -0.5rem 0 0;
  padding: 0.25rem 0 0.5rem;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: thin;
  max-width: 100%;
}

#menu .sf-menu li {
  flex: 0 0 auto;
  margin: 0;
}

#menu .sf-menu a {
  display: block;
  padding: 0.25rem 0;
  color: #1b2440;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

#menu .sf-menu a:hover {
  text-decoration: underline dashed #b3263a;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

/* no display value here: the page's own #aaa/#bbb toggle controls which icon shows */
#menu .sf-menu img {
  width: auto;
  height: 1.5rem;
  cursor: pointer;
  vertical-align: middle;
}

#menu .sf-menu audio {
  display: none;
}

/* ---------- Hero: quotes over photographs, slow crossfade ---------- */

section#home {
  position: relative;
  background: #1b2440;
}

#home .carousel {
  position: relative;
  height: 86vh;
  min-height: 30rem;
  max-height: 62rem;
  margin: 0;
  overflow: hidden;
  line-height: 1.2;
}

#home .item {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0;
  animation: imd-slide 49s linear infinite;
}

#home .item:nth-child(1) { animation-delay: 0s; }
#home .item:nth-child(2) { animation-delay: -42s; }
#home .item:nth-child(3) { animation-delay: -35s; }
#home .item:nth-child(4) { animation-delay: -28s; }
#home .item:nth-child(5) { animation-delay: -21s; }
#home .item:nth-child(6) { animation-delay: -14s; }
#home .item:nth-child(7) { animation-delay: -7s; }

@keyframes imd-slide {
  0% { opacity: 1; }
  12% { opacity: 1; }
  15% { opacity: 0; }
  97% { opacity: 0; }
  100% { opacity: 1; }
}

#home .parallax,
#home .bg-img {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: #1b2440;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

#home .content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: flex-end;
  /* scrim so white type stays readable on any photo */
  background: linear-gradient(180deg, rgba(27, 36, 64, 0) 30%, rgba(27, 36, 64, 0.72) 100%);
}

#home .content-wrapper {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem) clamp(3rem, 9vh, 6rem);
}

#home .content h1 {
  max-width: 17em;
  margin: 0 0 1.25rem;
  color: #ffffff;
  font-size: clamp(2rem, 5.2vw, 4.5rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

#home .content h2 {
  color: #ffffff;
  font-family: "Titillium Web", "Segoe UI", Arial, sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
}

/* ---------- Mission ---------- */

section#mission {
  background: #1b2440;
  color: #ffffff;
}

section#mission .container > div[style] {
  height: clamp(4rem, 10vw, 8rem) !important; /* the inline 200px spacers */
}

#mission .bigHeadline h1 {
  color: #ffffff;
}

#mission .bigHeadline h1:first-of-type {
  margin-bottom: 1rem;
  font-family: "Titillium Web", "Segoe UI", Arial, sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  text-transform: lowercase;
}

#mission .bigHeadline h1:first-of-type::first-letter {
  text-transform: uppercase;
}

#mission .bigHeadline h1 + h1 {
  max-width: none; /* keep the authored line breaks */
  font-size: clamp(1.75rem, 3.8vw, 3.25rem);
  font-weight: 400;
  line-height: 1.22;
}

#mission .extraBold {
  font-style: italic;
  font-weight: 500;
}

/* ---------- Content sections ---------- */

section#services,
section#stile,
section#produzione,
section#materie-prime,
section#qualita {
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(2rem, 4vw, 3rem);
}

section#stile > .container {
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

.bigHeadline {
  margin: 0 0 2rem;
}

.bigHeadline h1 {
  max-width: 22em;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: 500;
  line-height: 1.15;
}

.genericText ~ .bigHeadline {
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
}

.genericText p,
.genericText ul {
  max-width: 42rem;
}

.genericText p:has(img) {
  max-width: none;
  margin: 1.5rem 0 0;
}

.genericText p:empty {
  display: none;
}

.genericText b {
  color: #1b2440;
  font-weight: 700;
}

.genericText ul {
  margin: 0 0 1em;
  padding-left: 1.25rem;
}

.genericText ul ul {
  margin: 0.3rem 0 0.6rem;
}

.genericText li {
  margin: 0 0 0.3rem;
  line-height: 1.55;
}

.genericText li::marker {
  color: #b3263a;
}

/* Photos inside the text sections */
.genericText .span12 img {
  width: 100%;
  aspect-ratio: 1.7778;
  object-fit: cover;
}

.genericText .span6 img {
  width: 100%;
  aspect-ratio: 1.3333;
  object-fit: cover;
}

/* ---------- Galleries (full width, thin gutters) ---------- */

#portfolioitems ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#portfolioitems li {
  margin: 0;
}

#portfolioitems a {
  display: block;
  overflow: hidden;
  background: #e4edf3;
}

#portfolioitems img {
  width: 100%;
  aspect-ratio: 0.8;
  object-fit: cover;
}

#portfolioitems a:hover img {
  opacity: 0.88;
}

#portfolioitems .title:empty {
  display: none;
}

.page-type-onePage > .row-fluid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.page-type-onePage > .row-fluid p {
  margin: 0;
}

.page-type-onePage > .row-fluid img {
  width: 100%;
  aspect-ratio: 1.5;
  object-fit: cover;
}

/* ---------- Contacts ---------- */

section#contacts {
  padding: 0 0 clamp(4rem, 9vw, 7rem);
}

#milwaukeeMap {
  background: #e4edf3;
}

section#contacts > .container {
  padding-top: clamp(3rem, 7vw, 5rem);
}

#contacts .address h1[style] {
  margin: 0 0 1.25rem !important;
  color: #1b2440 !important;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem) !important;
  line-height: 1.15;
}

#contacts .address div[style] {
  padding: 0 !important;
  color: #343b51 !important;
  font-size: 1.125rem !important;
  line-height: 1.65 !important;
}

#contacts .address div[style*="22px"] {
  margin-top: 1.25rem;
  color: #1b2440 !important;
  font-size: 1.25rem !important;
  font-weight: 600;
}

#contacts .address .h1 {
  display: block;
  margin: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
}

#contacts .address .h1 b {
  color: #1b2440;
  font-weight: 700;
}

/* Two copies of the form exist; the one with the privacy consent box is kept */
#contacts .hidden-large {
  display: none;
}

.ajax-form header h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  line-height: 1.15;
}

.ajax-form header div[style] {
  color: #5b6275;
  font-size: 1.125rem !important;
  line-height: 1.6 !important;
}

.ajax-form .form-message:empty {
  display: none;
}

.ajax-form > .span6 {
  margin-top: 1.5rem;
}

.ajax-form > .span6 > br {
  display: none;
}

.ajax-form form[style] {
  margin: 0 !important;
}

.ajax-form .row {
  column-gap: 1.25rem;
}

.ajax-form .row.controls-row {
  display: block;
  margin: 0 0 1.1rem;
}

.ajax-form .controls-row [class*="span"] + [class*="span"] {
  margin-left: 0;
}

.ajax-form label {
  display: block;
  margin: 0 0 0.35rem;
  color: #1b2440;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
}

.page-type-onePage .ajax-form input[type="text"],
.page-type-onePage .ajax-form textarea {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid #d8dce5;
  border-bottom-color: #1b2440;
  border-radius: 0;
  background: #f5f8fa;
  box-shadow: none;
  color: #1b2440;
  font-family: "Titillium Web", "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.4;
}

.page-type-onePage .ajax-form textarea {
  min-height: 9rem;
  resize: vertical;
}

.ajax-form input[type="text"]:focus,
.ajax-form textarea:focus {
  border-color: #1b2440;
  background: #ffffff;
  box-shadow: none;
}

.ajax-form ::placeholder {
  color: #7d8497;
}

.ajax-form textarea + br {
  display: none;
}

.ajax-form label.span6 {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1rem;
  font-weight: 400;
  color: #343b51;
}

.ajax-form input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.2rem 0 0;
  accent-color: #1b2440;
}

.ajax-form .controls {
  margin-top: 0.5rem;
}

.ajax-form .btn.btn-primary {
  display: inline-block;
  width: auto !important;
  margin: 0 !important;
  padding: 0.85rem 1.75rem;
  border: 0;
  border-radius: 0;
  background: #1b2440;
  background-image: none;
  box-shadow: none;
  color: #ffffff;
  font-family: "Titillium Web", "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  text-shadow: none;
  filter: none;
}

.ajax-form .btn.btn-primary:hover,
.ajax-form .btn.btn-primary:active {
  background: #b3263a;
  color: #ffffff;
}

/* ---------- Footer ---------- */

#foot {
  padding: 2.5rem 0 3rem;
  background: #1b2440;
  color: #ffffff;
  font-size: 0.875rem;
  line-height: 1.8;
}

#foot strong {
  font-weight: 700;
}

#foot a {
  color: #ffffff;
  text-underline-offset: 0.2em;
}

#foot .beSocial:empty {
  display: none;
}

/* ---------- Wider screens ---------- */

@media (min-width: 48rem) {
  .page-type-onePage .row {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 2rem;
  }

  .page-type-onePage .row > * {
    grid-column-start: 1;
    grid-column-end: -1;
  }

  .page-type-onePage .row > .span3 { grid-column-start: auto; grid-column-end: span 3; }
  .page-type-onePage .row > .span4 { grid-column-start: auto; grid-column-end: span 4; }
  .page-type-onePage .row > .span5 { grid-column-start: auto; grid-column-end: span 5; }
  .page-type-onePage .row > .span6 { grid-column-start: auto; grid-column-end: span 6; }
  .page-type-onePage .row > .span8 { grid-column-start: auto; grid-column-end: span 8; }
  .page-type-onePage .row > .span12 { grid-column-start: auto; grid-column-end: span 12; }
  .page-type-onePage .row > .span6.offset1 { grid-column-start: 7; grid-column-end: span 6; }

  /* inside the form, rows are six columns wide */
  .ajax-form .row {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  #portfolioitems ul {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  #foot .span8 {
    grid-column-end: span 12;
  }
}

@media (min-width: 64rem) {
  #menu {
    position: sticky;
    top: 0;
  }

  #menu .sf-menu {
    overflow: visible;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 47.99rem) {
  .page-type-onePage .row > * + * {
    margin-top: 1.5rem;
  }

  .ajax-form .row > * + * {
    margin-top: 0;
  }

  #home .carousel {
    height: 78vh;
  }

  /* let the mission statement wrap naturally on narrow screens */
  #mission .bigHeadline h1 br {
    display: none;
  }

  #milwaukeeMap {
    height: 20rem !important;
  }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  #home .item {
    animation: none;
    opacity: 0;
  }

  #home .item:first-child {
    opacity: 1;
  }
}
