/* INSTROFINE homepage (draft) — Elementor Free containers + native widgets.
   Scoped to .if-home; loaded only on pages flagged _if_home_layout. Does not restyle the Shop or WooCommerce.
   Brand: Graphite / White / Paper, restrained Vermilion, IBM Plex (fonts are loaded by the header plugin). */
.if-home {
  --ink: #1D2226; --white: #FFFFFF; --paper: #F7F6F2; --steel: #4A535B; --muted: #5C656D; --subtle: #ECEEEF;
  --control: #7E878F; --line: #D5D9DC; --accent: #E4572E; --accent-text: #A93A16;
  --sans: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1200px; --gutter: 24px; --section: 96px; --radius: 16px;
  /* Tokens used by the header's shared components (e.g. the pill search field) when they appear on this page. */
  --if-ink: #1D2226; --if-white: #FFFFFF; --if-paper: #F7F6F2; --if-steel: #4A535B; --if-muted: #5C656D; --if-subtle: #ECEEEF;
  --if-control: #7E878F; --if-line: #D5D9DC; --if-accent: #E4572E; --if-sans: var(--sans);
  font-family: var(--sans); color: var(--ink); background: var(--white);
}
@media (max-width: 767px) { .if-home { --gutter: 16px; --section: 56px; } }
.if-home *, .if-home *::before, .if-home *::after { box-sizing: border-box; }

/* Neutralise Elementor container/widget spacing; components below set their own. */
.if-home, .if-home .e-con { --padding-top: 0px; --padding-right: 0px; --padding-bottom: 0px; --padding-left: 0px; --gap: 0px; --row-gap: 0px; --column-gap: 0px; --container-widget-width: auto; }
.if-home.e-con, .if-home .e-con { padding: 0; gap: 0; min-height: 0; }
.if-home .elementor-element.elementor-widget { margin-block: 0; }
.if-home .elementor-widget-container { margin: 0; padding: 0; }
.if-home p { margin: 0; }
.if-home .elementor-heading-title { margin: 0; }

/* Focus and motion: visible keyboard ring, no ring after mouse clicks, no animated outline. */
.if-home :focus-visible { outline: 2px solid var(--accent) !important; outline-offset: 2px; box-shadow: none; }
.if-home :is(a, button):focus:not(:focus-visible) { outline: none !important; }
.if-home :is(a, button) { transition-property: color, background-color, border-color, text-decoration-thickness; transition-duration: .16s; transition-timing-function: linear; }

.if-home .if-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.if-home .if-home__section { padding: var(--section) 0; }
.if-home .if-surface-paper { background: var(--paper); }
.if-home .if-surface-ink { background: var(--ink); color: var(--white); }

/* ---------- Draft markers (remove these widgets when the page is approved) ---------- */
.if-home .if-home__banner { padding: 10px var(--gutter); background: var(--subtle); border-bottom: 1px solid var(--line); text-align: center; }
.if-home .if-home__banner p { font: 400 14px/20px var(--sans); color: var(--ink); }
.if-home .if-draft p { display: inline-flex; margin-top: 24px; padding: 5px 12px; border-radius: 999px; background: var(--subtle); color: var(--ink); font: 500 12px/16px var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.if-home .if-ph__tag { font: 500 12px/16px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }

/* ---------- Hero ---------- */
.if-home .if-home__hero { position: relative; padding: 72px 0 96px; background: var(--white); }
/* Decorative measuring edge (optional brand motif); not a calibrated scale. */
.if-home .if-home__hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; pointer-events: none;
  background: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px 8px) left bottom / 100% 6px no-repeat,
              repeating-linear-gradient(to right, var(--control) 0 1px, transparent 1px 40px) left bottom / 100% 12px no-repeat; }
.if-home .if-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.if-home .if-hero__text { display: flex; flex-direction: column; align-items: flex-start; max-width: 580px; }
.if-home .if-eyebrow .elementor-heading-title { display: inline-flex; align-items: center; gap: 10px; color: var(--accent-text); font: 500 14px/20px var(--sans); letter-spacing: .02em; }
.if-home .if-eyebrow .elementor-heading-title::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--accent); }
.if-home .if-hero__title { padding-top: 20px; }
.if-home .if-hero__title .elementor-heading-title { color: var(--ink); font: 600 clamp(36px, 2.3vw + 23px, 56px)/1.1 var(--sans); letter-spacing: -.015em; text-wrap: balance; }
.if-home .if-hero__lede { padding-top: 20px; }
.if-home .if-hero__lede p { max-width: 30em; color: var(--steel); font: 400 19px/30px var(--sans); }
.if-home .if-actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 12px; padding-top: 32px; }
.if-home .if-actions > .elementor-widget { width: auto; }

/* Image placeholder (replace the container's content with an Image widget once the approved photograph exists). */
.if-home .if-hero__media { width: 100%; aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px; border: 1px dashed var(--control); border-radius: 24px; background: var(--paper); text-align: center; }
.if-home .if-ph__title { padding-top: 8px; color: var(--ink); font: 600 20px/28px var(--sans); }
.if-home .if-ph__spec { padding-top: 8px; max-width: 28em; color: var(--steel); font: 400 14px/22px var(--sans); }

/* ---------- Buttons (Graphite, rounded) ---------- */
.if-home .if-btn .elementor-button,
.if-home .if-btn .elementor-button:hover,
.if-home .if-btn .elementor-button:focus { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px; border: 1px solid var(--ink); border-radius: 999px; box-shadow: none; font: 500 16px/22px var(--sans); letter-spacing: 0; text-transform: none; text-decoration: none; }
.if-home .if-btn--primary .elementor-button, .if-home .if-btn--primary .elementor-button:focus { background: var(--ink); color: var(--white); fill: var(--white); }
.if-home .if-btn--primary .elementor-button:hover { background: var(--steel); border-color: var(--steel); color: var(--white); }
.if-home .if-btn--secondary .elementor-button, .if-home .if-btn--secondary .elementor-button:focus { background: var(--white); color: var(--ink); fill: var(--ink); }
.if-home .if-btn--secondary .elementor-button:hover { background: var(--subtle); border-color: var(--ink); color: var(--ink); }
.if-home .elementor-button-content-wrapper { display: inline-flex; align-items: center; gap: 10px; }
/* Icons drawn with CSS masks so labels stay plain, editable text. */
.if-home .if-btn--primary .elementor-button-text::after,
.if-home .if-textlink .elementor-button-text::after,
.if-home .if-tile .elementor-button::after { content: ""; display: inline-block; flex: none; width: 18px; height: 18px; background: currentColor; vertical-align: -3px; margin-left: 10px;
  -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.6' stroke-linecap='square'%3E%3Cpath d='M5 12h13M13 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.6' stroke-linecap='square'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; }
.if-home .if-btn--secondary .elementor-button-text::before { content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 10px; vertical-align: -3px; 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.6' stroke-linecap='square'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%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.6' stroke-linecap='square'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Underlined text link (Graphite) */
.if-home .if-textlink .elementor-button,
.if-home .if-textlink .elementor-button:hover,
.if-home .if-textlink .elementor-button:focus { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--ink); fill: var(--ink); font: 500 16px/22px var(--sans); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.if-home .if-textlink .elementor-button:hover { text-decoration-thickness: 2px; }
.if-home .if-textlink .elementor-button-text::after { width: 16px; height: 16px; margin-left: 8px; }

/* ---------- Section headings ---------- */
.if-home .if-section-head { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 32px; padding-bottom: 32px; }
.if-home .if-section-head__text { width: auto; max-width: 720px; }
.if-home .if-section-head > .elementor-widget { width: auto; }
.if-home .if-h2 .elementor-heading-title { color: var(--ink); font: 600 clamp(26px, 1vw + 19px, 34px)/1.2 var(--sans); letter-spacing: -.01em; }
.if-home .if-h3 .elementor-heading-title { color: var(--steel); font: 600 13px/18px var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.if-home .if-intro p { max-width: 40em; padding-top: 12px; color: var(--steel); font: 400 17px/28px var(--sans); }
.if-home .if-note p { padding-top: 16px; color: var(--muted); font: 400 14px/22px var(--sans); }

/* ---------- Tiles (instrument types, specialties, help) ---------- */
.if-home .if-tiles { display: grid; gap: 12px; }
.if-home .if-tiles--types { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.if-home .if-tiles--specialties { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.if-home .if-tiles--help { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.if-home .if-tiles > .elementor-widget, .if-home .if-tile .elementor-button-wrapper { width: 100%; height: 100%; }
.if-home .if-tile .elementor-button,
.if-home .if-tile .elementor-button:hover,
.if-home .if-tile .elementor-button:focus { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: 100%; min-height: 76px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: none; color: var(--ink); fill: var(--ink); font: 500 17px/24px var(--sans); letter-spacing: 0; text-align: left; text-decoration: none; text-transform: none; white-space: normal; }
.if-home .if-tile .elementor-button:hover { border-color: var(--ink); background: var(--white); }
.if-home .if-surface-paper .if-tile .elementor-button { background: var(--white); }
.if-home .if-tile .elementor-button-content-wrapper { display: block; min-width: 0; hyphens: auto; overflow-wrap: break-word; }
.if-home .if-tile .elementor-button::after { margin-left: 0; }
.if-home .if-tile-ph { display: flex; flex-direction: column; justify-content: center; min-height: 76px; padding: 14px 20px; border: 1px dashed var(--control); border-radius: var(--radius); background: var(--white); }
.if-home .if-tile-ph__title { padding-top: 4px; color: var(--ink); font: 500 16px/22px var(--sans); }
.if-home .if-tile-ph__spec { padding-top: 2px; color: var(--steel); font: 400 14px/20px var(--sans); }

/* ---------- Find by the details ---------- */
.if-home .if-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.if-home .if-split__main, .if-home .if-split__side { width: auto; }
.if-home .if-home-search { padding-top: 28px; }
.if-home .if-home-search .if-search-field { max-width: 520px; min-height: 52px; padding: 0 20px; box-shadow: none; }
/* Theme button states (Astra colours every button on hover/focus); keep the pill field white with a Steel border. */
.if-home .if-search-field:is(:hover, :focus, :active) { background-color: var(--white); background-image: none; color: var(--steel); border-color: var(--steel); box-shadow: none; }
.if-home .if-chips { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; padding-top: 16px; }
.if-home .if-chips > .elementor-widget { width: auto; flex: 0 0 auto; }
.if-home .if-chip .elementor-button,
.if-home .if-chip .elementor-button:hover,
.if-home .if-chip .elementor-button:focus { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--control); border-radius: 999px; background: var(--white); box-shadow: none; color: var(--ink); fill: var(--ink); font: 500 15px/20px var(--sans); letter-spacing: 0; text-decoration: none; text-transform: none; }
.if-home .if-chip .elementor-button:hover { border-color: var(--ink); background: var(--paper); }

/* ---------- Brand introduction (Graphite field) ---------- */
.if-home .if-split--brand { align-items: end; }
.if-home .if-eyebrow--inverse .elementor-heading-title { color: var(--subtle); }
.if-home .if-h2--display { padding-top: 16px; }
.if-home .if-h2--display .elementor-heading-title { color: var(--white); font-size: clamp(30px, 1.9vw + 19px, 46px); line-height: 1.12; letter-spacing: -.015em; text-wrap: balance; }
.if-home .if-brand-copy p { max-width: 32em; color: var(--subtle); font: 400 19px/31px var(--sans); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .if-home .if-tiles--types, .if-home .if-tiles--specialties { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .if-home .if-tiles--help { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .if-home .if-hero, .if-home .if-split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .if-home .if-hero__text { max-width: 640px; }
}
@media (max-width: 767px) {
  .if-home .if-home__hero { padding: 32px 0 56px; }
  .if-home .if-hero { gap: 32px; }
  .if-home .if-hero__lede p { font-size: 17px; line-height: 27px; }
  .if-home .if-actions { flex-direction: column; align-items: stretch; padding-top: 28px; }
  .if-home .if-actions > .elementor-widget, .if-home .if-actions .elementor-button-wrapper, .if-home .if-actions .elementor-button { width: 100%; }
  .if-home .if-hero__media { padding: 24px; border-radius: 16px; }
  .if-home .if-section-head { padding-bottom: 24px; }
  .if-home .if-tiles { gap: 8px; }
  .if-home .if-tiles--types, .if-home .if-tiles--specialties, .if-home .if-tiles--help { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .if-home .if-tile .elementor-button,
  .if-home .if-tile .elementor-button:hover,
  .if-home .if-tile .elementor-button:focus { min-height: 64px; padding: 14px 16px; font-size: 16px; line-height: 22px; border-radius: 14px; }
  .if-home .if-tile .elementor-button::after { display: none; }
  .if-home .if-tile-ph { grid-column: 1 / -1; min-height: 0; border-radius: 14px; }
  .if-home .if-split { gap: 40px; }
  .if-home .if-brand-copy p { font-size: 17px; line-height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .if-home *, .if-home *::before, .if-home *::after { transition: none !important; animation: none !important; }
}
