/* Nello Home — design layer
   Clarity, deference, depth. Sits on top of the page markup's inline layout styles. */

:root {
  --hg-font: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --hg-ease: cubic-bezier(.25, .1, .25, 1);
  --hg-bg: #F5F3EF;
  --hg-surface: #FFFFFF;
  --hg-ink: #121110;
  --hg-ink2: #3A3732;
  --hg-ink3: #5E5A53;
  --hg-copper: #8A5A3C;
  --hg-copper-hi: #7A4E33;
  --hg-line: rgba(18, 17, 16, .1);
  --hg-fill: #E9E5DD;
  --hg-r-card: 22px;
  --hg-r-media: 20px;
  --hg-pad: clamp(20px, 3vw, 40px);
  --hg-shadow: 0 1px 2px rgba(18, 17, 16, .04), 0 8px 28px rgba(18, 17, 16, .06);
  --hg-shadow-hi: 0 2px 4px rgba(18, 17, 16, .05), 0 16px 40px rgba(18, 17, 16, .1);
}

/* San Francisco on iPhone, iPad and Safari; the brand face everywhere else */
@supports (font: -apple-system-body) {
  :root { --hg-font: -apple-system, "SF Pro Text", "Instrument Sans", "Helvetica Neue", sans-serif; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--hg-bg); color: var(--hg-ink);
  font-family: var(--hg-font); text-transform: none;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: var(--hg-copper); text-decoration: none; transition: color .2s var(--hg-ease); }
a:hover { color: var(--hg-ink); }
::selection { background: rgba(138, 90, 60, .22); }
input, textarea, select, button { font: inherit; max-width: 100%; min-width: 0; }
[id] { scroll-margin-top: 84px !important; }

/* ---------- Clarity: one typeface, sentence case ---------- */
[style*="IBM Plex Mono"] { font-family: var(--hg-font) !important; letter-spacing: 0 !important; }
[style*="IBM Plex Mono"][style*="font-size:12px"] { font-size: 13px !important; }

h1, h2, h3 { font-weight: 600 !important; text-wrap: balance; }
h1 { font-size: clamp(36px, 5vw, 66px) !important; line-height: 1.05 !important; letter-spacing: -.03em !important; }
h2 { font-size: clamp(24px, 2.8vw, 34px) !important; line-height: 1.12 !important; letter-spacing: -.022em !important; border-bottom: 0 !important; padding-bottom: 0 !important; }
h2[style*="3.4vw"] { font-size: clamp(30px, 3.8vw, 48px) !important; line-height: 1.08 !important; letter-spacing: -.026em !important; }
h3 { letter-spacing: -.012em !important; }
.hg-home h1 { font-size: clamp(40px, 5.2vw, 74px) !important; line-height: 1.03 !important; letter-spacing: -.035em !important; }
.hg-post h1 { font-size: clamp(32px, 4.4vw, 52px) !important; line-height: 1.08 !important; letter-spacing: -.028em !important; }
.hg-post h2 { font-size: clamp(24px, 2.6vw, 30px) !important; margin-top: 30px !important; }
.hg-post article { max-width: 780px !important; }

.hg-eyebrow { font-size: 14px !important; font-weight: 600; }
.hg-noborder { border-bottom: 0 !important; padding-bottom: 0 !important; }
figcaption { font-size: 13px !important; }
.hg-byline { border-color: var(--hg-line) !important; }

.hg-link { border-bottom: 0 !important; text-decoration: underline !important; text-decoration-color: rgba(138, 90, 60, .38) !important; text-decoration-thickness: 1px !important; text-underline-offset: 3px; }
.hg-link:hover { text-decoration-color: currentColor !important; }
.hg-more { display: inline-flex !important; align-items: center; min-height: 44px; margin: -8px 0 -12px; padding: 0 !important; border-bottom: 0 !important; font-size: 16px !important; font-weight: 500; }
.hg-more:hover { text-decoration: underline; text-underline-offset: 4px; }

h3.hg-num { grid-template-columns: 30px 1fr !important; gap: 8px !important; font-size: 20px !important; }
h3.hg-num > span:first-child { font-size: 13px !important; font-weight: 600 !important; font-variant-numeric: tabular-nums; padding-top: 6px !important; }

/* ---------- Navigation bar ---------- */
.hg-nav {
  background: rgba(245, 243, 239, .8) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
  backdrop-filter: saturate(180%) blur(20px) !important;
  border-bottom: 1px solid rgba(18, 17, 16, .08) !important;
}
.hg-navin { min-height: 60px; padding: 8px var(--hg-pad) !important; flex-wrap: nowrap !important; gap: 16px !important; }
.hg-logo { flex: none; min-height: 44px; gap: 11px !important; }
.hg-logo svg { width: 36px; height: 36px; flex: none; }
.hg-logo span { text-transform: uppercase; white-space: nowrap; }
.hg-logo > span > span:first-child { font-size: 20px !important; }
.hg-logo [style*="IBM Plex Mono"] { font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace !important; font-size: 11px !important; letter-spacing: .3em !important; }
.hg-mainnav { align-items: center; gap: 4px 26px !important; overflow: visible !important; font-size: 14px !important; }
.hg-navlink { display: inline-flex; align-items: center; min-height: 44px; padding: 0 !important; color: rgba(18, 17, 16, .8) !important; }
.hg-navlink:hover { color: var(--hg-ink) !important; }
.hg-navlink.hg-current { color: var(--hg-copper) !important; font-weight: 600; }

#menubtn { display: none; }
@media (max-width: 1040px) {
  #menubtn {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: var(--hg-ink); cursor: pointer;
  }
  #menubtn span, #menubtn span::before { display: block; width: 18px; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform .3s var(--hg-ease); }
  #menubtn span { position: relative; transform: translateY(-3.5px); }
  #menubtn span::before { content: ""; position: absolute; left: 0; top: 0; transform: translateY(7px); }
  #menubtn[aria-expanded="true"] span { transform: rotate(45deg); }
  #menubtn[aria-expanded="true"] span::before { transform: rotate(-90deg); }
  .hg-mainnav { display: none !important; }
  .hg-mainnav.nav-open {
    display: flex !important; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch !important; gap: 0 !important; white-space: normal !important;
    padding: 6px var(--hg-pad) 28px; max-height: calc(100vh - 60px); max-height: calc(100dvh - 60px); overflow-y: auto !important;
    background: #F5F3EF;
    border-bottom: 1px solid rgba(18, 17, 16, .08); box-shadow: 0 24px 40px rgba(18, 17, 16, .1);
  }
  .hg-mainnav.nav-open > .hg-navlink { min-height: 54px; font-size: 19px !important; font-weight: 500; color: var(--hg-ink) !important; border-bottom: 1px solid var(--hg-line); }
  .hg-mainnav.nav-open > .hg-navlink.hg-current { color: var(--hg-copper) !important; }
  .hg-mainnav.nav-open > .hg-btn { margin-top: 22px; min-height: 50px; font-size: 17px !important; }
}

/* ---------- Controls ---------- */
.hg-btn {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 22px !important;
  border: 0 !important; border-radius: 980px !important;
  font-family: var(--hg-font) !important; font-size: 16px !important; font-weight: 500 !important;
  letter-spacing: 0 !important; line-height: 1.2; text-transform: none !important; text-align: center; white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s var(--hg-ease), color .2s var(--hg-ease), box-shadow .2s var(--hg-ease), transform .15s var(--hg-ease);
}
.hg-btn:active { transform: scale(.97); }
.hg-btn-sm { min-height: 36px; padding: 8px 16px !important; font-size: 14px !important; }
.hg-btn-dark { background: var(--hg-ink) !important; color: #F5F3EF !important; }
.hg-btn-dark:hover { background: #33302C !important; color: #F5F3EF !important; }
.hg-btn-light { background: #F5F3EF !important; color: var(--hg-ink) !important; }
.hg-btn-light:hover { background: #fff !important; color: var(--hg-ink) !important; }
.hg-btn-ghost-l { background: transparent !important; color: var(--hg-ink) !important; box-shadow: inset 0 0 0 1px rgba(18, 17, 16, .28); }
.hg-btn-ghost-l:hover { background: rgba(18, 17, 16, .06) !important; box-shadow: inset 0 0 0 1px rgba(18, 17, 16, .6); }
.hg-btn-ghost-d { background: transparent !important; color: #F5F3EF !important; box-shadow: inset 0 0 0 1px rgba(245, 243, 239, .45); }
.hg-btn-ghost-d:hover { background: rgba(245, 243, 239, .12) !important; box-shadow: inset 0 0 0 1px rgba(245, 243, 239, .8); }

.hg-skip { border-radius: 980px; font-size: 15px; font-weight: 500; }
.hg-skip:focus { left: 12px !important; top: 8px !important; }

a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(138, 90, 60, .7); outline-offset: 3px; border-radius: 8px;
}
.hg-btn:focus-visible { border-radius: 980px !important; }
.hg-contact a:focus-visible, .hg-contact button:focus-visible, .hg-cta a:focus-visible, .hg-band a:focus-visible, .hg-cta-dark a:focus-visible { outline-color: #F5F3EF; }

/* ---------- Deference: let the photographs speak ---------- */
.hg-frame { aspect-ratio: 3 / 2 !important; border-radius: var(--hg-r-media); overflow: hidden; background: var(--hg-fill) !important; }
.hg-slide { object-fit: cover !important; }
.hg-photo { border-radius: var(--hg-r-media); object-fit: cover !important; background: var(--hg-fill) !important; }
.hg-post article figure img { border-radius: var(--hg-r-media); }

/* ---------- Depth: surfaces instead of hairlines ---------- */
/* home: recent transactions — inset list on phones, card grid on wider screens */
.hg-txgrid { margin-top: 26px; padding: 4px 16px; background: var(--hg-surface); border-radius: var(--hg-r-card); box-shadow: var(--hg-shadow); }
.hg-tx { position: relative; grid-template-columns: 92px minmax(0, 1fr) !important; padding: 14px 0 !important; border-bottom: 1px solid var(--hg-line) !important; }
.hg-tx:last-child { border-bottom: 0 !important; }
.hg-tximg { aspect-ratio: 4 / 3 !important; border-radius: 12px; object-fit: cover !important; background: var(--hg-fill) !important; }
.hg-txlink { border-bottom: 0 !important; }
.hg-txlink::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
@media (min-width: 760px) {
  .hg-txgrid { grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 18px; padding: 0; background: none; border-radius: 0; box-shadow: none; }
  .hg-tx {
    display: flex !important; flex-direction: column; align-items: stretch !important; gap: 0 !important; padding: 0 !important;
    border: 0 !important; border-radius: var(--hg-r-card); overflow: hidden; background: var(--hg-surface); box-shadow: var(--hg-shadow);
    transition: transform .35s var(--hg-ease), box-shadow .35s var(--hg-ease);
  }
  .hg-tx:hover { transform: translateY(-3px); box-shadow: var(--hg-shadow-hi); }
  .hg-tximg { aspect-ratio: 3 / 2 !important; border-radius: 0; }
  .hg-tx > div { flex: 1; flex-direction: column; flex-wrap: nowrap !important; align-items: flex-start !important; justify-content: space-between !important; gap: 12px !important; padding: 16px 18px 18px; }
}

/* inset grouped lists */
.hg-list { padding: 2px 20px; border: 0 !important; border-radius: 18px; background: var(--hg-surface); box-shadow: var(--hg-shadow); }
.hg-row { min-height: 54px; align-items: center !important; padding: 14px 0 !important; border-bottom: 1px solid var(--hg-line) !important; }
.hg-row:last-child { border-bottom: 0 !important; }
nav.hg-list > .hg-row { display: flex; font-size: 16px !important; font-weight: 500; }
.hg-row:hover { color: var(--hg-copper) !important; }
.hg-dl { padding: 2px 20px; border: 0 !important; border-radius: 18px; background: var(--hg-surface); box-shadow: var(--hg-shadow); }
.hg-dlrow { align-items: baseline; border-bottom: 1px solid var(--hg-line) !important; }
.hg-dlrow:last-child { border-bottom: 0 !important; }
.hg-faq { border-color: var(--hg-line) !important; }
.hg-faq h3 { font-size: 19px !important; }
.hg-faq p { font-size: 16px !important; }
.hg-faqwrap { border-top-color: var(--hg-line) !important; }

/* cards */
.hg-pcard, .hg-jcard {
  border: 0 !important; border-radius: var(--hg-r-card); overflow: hidden; background: var(--hg-surface) !important; color: var(--hg-ink) !important;
  box-shadow: var(--hg-shadow); transition: transform .35s var(--hg-ease), box-shadow .35s var(--hg-ease);
}
.hg-pcard:hover, .hg-jcard:hover { transform: translateY(-3px); box-shadow: var(--hg-shadow-hi); color: var(--hg-ink) !important; }
.hg-jcard { border-radius: 26px; }
.hg-jcard img { height: 100% !important; min-height: 220px; object-fit: cover; }
.hg-jcard > span > span:nth-child(2) { letter-spacing: -.02em; }

/* panels */
.hg-cta { border-radius: var(--hg-r-card); }
.hg-cta-dark { border-radius: 26px; }
.hg-contact { border-radius: 30px; }
.hg-band {
  max-width: 1360px; margin-left: max(var(--hg-pad), calc((100% - 1360px) / 2)) !important; margin-right: max(var(--hg-pad), calc((100% - 1360px) / 2)) !important;
  padding: clamp(40px, 7vh, 88px) clamp(24px, 4vw, 64px) !important; border-radius: 30px;
}
.hg-contactlink { display: inline-flex; align-items: center; align-self: flex-start; min-height: 44px; margin: -6px 0 !important; font-size: 17px !important; }
.hg-contactlink:hover { color: #fff !important; text-decoration: underline; text-underline-offset: 4px; }
.hg-under { border-bottom: 0 !important; padding-bottom: 0 !important; font-size: 15px !important; text-decoration: underline; text-underline-offset: 4px; }
.hg-contact address { font-size: 15px !important; margin-top: 6px; }

/* ---------- Form ---------- */
.hg-flabel { font-size: 14px !important; font-weight: 500; }
.hg-field {
  min-height: 48px; padding: 12px 14px !important;
  background: rgba(255, 255, 255, .14) !important; color: #F5F3EF !important;
  border: 1px solid rgba(245, 243, 239, .42) !important; border-radius: 12px !important;
  font-family: var(--hg-font) !important; font-size: 17px !important; line-height: 1.35; outline: none;
  transition: background-color .2s var(--hg-ease), border-color .2s var(--hg-ease), box-shadow .2s var(--hg-ease);
}
.hg-field::placeholder { color: rgba(245, 243, 239, .72); opacity: 1; }
.hg-field:hover { background: rgba(255, 255, 255, .19) !important; }
.hg-field:focus { background: rgba(255, 255, 255, .22) !important; border-color: #F5F3EF !important; box-shadow: 0 0 0 4px rgba(245, 243, 239, .3); }
textarea.hg-field { min-height: 132px; }
select.hg-field {
  -webkit-appearance: none !important; appearance: none !important; padding-right: 42px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23F5F3EF' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 16px center !important;
}

/* ---------- Footer ---------- */
.hg-footer { border-top: 1px solid var(--hg-line) !important; padding-top: 36px !important; line-height: 1.5; }
.hg-footer a { color: var(--hg-ink3); }
.hg-footer a:hover { color: var(--hg-ink); }
.hg-footer nav > span:first-child, .hg-footer > span > span[style*="color:#121110"] { font-weight: 600; }
.hg-crumb a:hover { color: var(--hg-ink) !important; }

/* ---------- Lightbox ---------- */
#lb { -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
#lbimg { border-radius: 14px; }
#lbclose {
  position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(245, 243, 239, .16); color: #F5F3EF; font-size: 24px; line-height: 1; cursor: pointer;
}
#lbclose:hover { background: rgba(245, 243, 239, .28); }
#lbclose:focus-visible { outline-color: #F5F3EF; border-radius: 50%; }

/* ---------- Touch: 44pt targets ---------- */
@media (pointer: coarse), (max-width: 1040px) {
  .hg-footer a, .hg-crumb a { display: inline-flex; align-items: center; min-height: 44px; }
  .hg-footer nav, .hg-footer > span { gap: 0 !important; }
  .hg-footer nav > span:first-child, .hg-footer > span > span { padding: 4px 0; }
  .hg-crumb { align-items: center; padding-top: 10px !important; }
  .hg-eyebrow a { display: inline-flex; align-items: center; min-height: 44px; }
  .hg-inline-tap a { display: inline-block; padding: 10px 0; }
}

/* ---------- Small screens ---------- */
@media (max-width: 620px) {
  h1, h2, h3, p, span, a, dd, dt { overflow-wrap: anywhere; }
  .hg-home h1 { font-size: clamp(38px, 11.4vw, 52px) !important; }
  h1 { font-size: clamp(33px, 9.6vw, 44px) !important; }
  .hg-post h1 { font-size: clamp(30px, 8.4vw, 40px) !important; }
  .hg-contact { padding: 28px 22px !important; border-radius: 26px; }
  .hg-hero-cta .hg-btn { flex: 1 1 auto; min-height: 50px; font-size: 17px !important; }
  .hg-jcard img { min-height: 0; aspect-ratio: 16 / 10; }
  input.hg-field, select.hg-field, textarea.hg-field { font-size: 17px !important; }
}

/* ---------- Motion respects the system setting ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .hg-nav, #lb, #menubtn { display: none !important; }
  body { background: #fff; }
}

/* the inquiry form must be allowed to shrink inside its panel */
#inquiry { min-width: 0 !important; flex: 1 1 min(420px, 100%) !important; }
.hg-post article p a:not(.hg-btn), .hg-post article li a { text-decoration: underline; text-decoration-color: rgba(138, 90, 60, .38); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.hg-post article p a:not(.hg-btn):hover, .hg-post article li a:hover { text-decoration-color: currentColor; }
@media (max-width: 620px) {
  main > section:not(.hg-band), main > nav, main > article, .hg-journal main, .hg-footer { padding-left: 20px !important; padding-right: 20px !important; }
  .hg-band { margin-left: 12px !important; margin-right: 12px !important; padding: 36px 22px !important; border-radius: 26px; }
}

/* home: journal tiles */
.hg-jgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; margin-top: 26px; }
.hg-jtile { display: flex; flex-direction: column; border-radius: var(--hg-r-card); overflow: hidden; background: var(--hg-surface); color: var(--hg-ink); box-shadow: var(--hg-shadow); transition: transform .35s var(--hg-ease), box-shadow .35s var(--hg-ease); }
.hg-jtile:hover { transform: translateY(-3px); box-shadow: var(--hg-shadow-hi); color: var(--hg-ink); }
.hg-jtile img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--hg-fill); }
.hg-jtile-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 24px; }
.hg-jtile-meta { font-size: 13px; font-weight: 600; color: var(--hg-copper); }
.hg-jtile h3 { margin: 0; font-size: 21px; line-height: 1.2; letter-spacing: -.018em !important; }
.hg-jtile-text { font-size: 16px; line-height: 1.55; color: var(--hg-ink2); }
.hg-jcard h2 { font-size: clamp(22px, 2.6vw, 34px) !important; line-height: 1.15 !important; }
.hg-byline a { position: relative; }
.hg-byline a::after { content: ""; position: absolute; left: -6px; right: -6px; top: -14px; bottom: -14px; }
