/* ═══════════════════════════════════════════════════════════════════════
   Escalante Barbearia
   Palette sampled from their own material: the shopfront sign is white on
   near-black, and the warm gold recurs across their posters. The red/white/blue
   band between sections is the helix of the barber pole at their door.
   ═══════════════════════════════════════════════════════════════════════ */

@font-face { font-family: 'Barlow'; src: url('assets/fonts/barlow-400-latin.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow'; src: url('assets/fonts/barlow-400-latin-ext.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow'; src: url('assets/fonts/barlow-500-latin.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow'; src: url('assets/fonts/barlow-500-latin-ext.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow'; src: url('assets/fonts/barlow-600-latin.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow'; src: url('assets/fonts/barlow-600-latin-ext.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; }

@font-face { font-family: 'Barlow Condensed'; src: url('assets/fonts/barlowcond-600-latin.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; src: url('assets/fonts/barlowcond-600-latin-ext.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; src: url('assets/fonts/barlowcond-700i-latin.woff2') format('woff2'); font-weight: 700; font-style: italic; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; src: url('assets/fonts/barlowcond-700i-latin-ext.woff2') format('woff2'); font-weight: 700; font-style: italic; font-display: swap; unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --ink:    #0E0E10;
  --ink-2:  #16161A;
  --ink-3:  #1F1F25;
  --bone:   #F4F1EA;
  --mute:   #A6A29B;
  --amber:  #D99A3C;
  --amber-d:#B87C24;
  --rule:   #2C2C33;

  --wrap:   1180px;
  --pad:    24px;
  --disp:   'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --body:   'Barlow', system-ui, -apple-system, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font: 400 17px/1.62 var(--body);
  /* No overflow-x:hidden here — it would make body a scroll container and every
     view() animation would silently snap to its end state (SKILL 9). */
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--disp);
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  line-height: 0.94;
  letter-spacing: 0.005em;
  margin: 0;
}

p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

.sep { color: var(--rule); padding: 0 0.35em; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--amber); color: #14100A; padding: 12px 18px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { left: 12px; top: 12px; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* ── buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  font-family: var(--disp); font-weight: 600; font-style: normal;
  font-size: 19px; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; border-radius: 2px;
  transition: background-color .18s, color .18s, border-color .18s;
}
.btn-amber { background: var(--amber); color: #17120A; }
.btn-amber:hover { background: #E8AC53; }
.btn-ghost { border-color: var(--rule); color: var(--bone); }
.btn-ghost:hover { border-color: var(--bone); }
.btn-lg { min-height: 56px; padding: 0 34px; font-size: 21px; }

/* ── brand marks (their real logo, keyed to alpha and painted with currentColor) ── */

.brand-mark, .foot-mark {
  display: block;
  background-color: currentColor;
  -webkit-mask: url('assets/img/mark.png') no-repeat center / contain;
          mask: url('assets/img/mark.png') no-repeat center / contain;
}
.brand-mark { width: 30px; height: 30px; flex: none; }
.foot-mark  { width: 44px; height: 44px; margin: 0 auto 18px; }

/* ── header ──────────────────────────────────────────────────────────── */

.head {
  position: sticky; top: 0; z-index: 50;
  background: transparent;
  transition: background-color .25s, border-color .25s;
  border-bottom: 1px solid transparent;
}
.head.solid {
  /* Solid, not translucent: no backdrop-filter to re-blur every scroll frame,
     and no page text ghosting through the bar. */
  background: var(--ink);
  border-bottom-color: var(--rule);
}

.head-in {
  max-width: var(--wrap); margin-inline: auto;
  padding: 14px var(--pad);
  display: flex; align-items: center; gap: 22px;
}

.brand {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; color: var(--bone);
  margin-right: auto;
}
.brand-txt {
  font-family: var(--disp); font-weight: 600; font-size: 20px;
  letter-spacing: 0.13em; text-transform: uppercase; line-height: 1;
}
.brand-txt b { display: none; }

.nav { display: flex; gap: 26px; }
.nav a {
  font-family: var(--disp); font-weight: 600; font-size: 18px;
  letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; color: var(--mute);
  transition: color .16s;
}
.nav a:hover { color: var(--bone); }

/* Only one CTA visible at a time: the header button stays hidden until the
   header goes solid, so a phone never shows two (SKILL 6). */
.head-cta {
  min-height: 40px; padding: 0 18px; font-size: 17px;
  /* visibility, not just opacity: an invisible button that is still in the tab
     order is a trap for anyone navigating by keyboard */
  opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.head.solid .head-cta { opacity: 1; visibility: visible; }

.burger {
  display: none;
  width: 44px; height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 6px; align-items: center;
}
.burger span { display: block; width: 22px; height: 2px; background: var(--bone); transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child  { transform: translateY(-4px) rotate(-45deg); }

.menu { display: none; }

/* ── hero ────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: flex; align-items: center;
  padding: 120px 0 96px;
  overflow: hidden;            /* contains the photo bleed without touching body */
}

.hero-photo {
  position: absolute; inset: 0 0 0 auto;
  width: min(46vw, 620px);
  z-index: 0;
}
.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 62% 45%;
  /* feathered into the page on two axes rather than framed — one gradient per
     nested element, because mask-composite:intersect erases it (SKILL 9). */
  -webkit-mask: linear-gradient(to right, transparent, #000 46%);
          mask: linear-gradient(to right, transparent, #000 46%);
}
.hero-photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, var(--ink) 0%, transparent 22%, transparent 74%, var(--ink) 100%);
}

.hero-in {
  position: relative; z-index: 1;
  max-width: var(--wrap); margin-inline: auto; width: 100%;
  padding-inline: var(--pad);
}

.hero-lock { margin: 0 0 22px; }

/* The mark is solid, so it cannot be drawn on with stroke-dashoffset. It gets the
   other move instead: a narrow paler band crossing slowly, the way light moves over
   a sign outside (SKILL 5.A). Every stop is --bone except the band, so if the
   gradient never resolves the lockup is simply solid and correct. */
.lockup {
  display: block;
  width: min(74vw, 290px);
  aspect-ratio: 1400 / 437;
  background-color: var(--bone);
  background-image: linear-gradient(101deg,
    var(--bone) 0 41%, #FFFCF3 47%, var(--bone) 53% 100%);
  background-size: 280% 100%;
  background-repeat: no-repeat;
  animation: sheen 8s linear infinite;
  -webkit-mask: url('assets/img/lockup.png') no-repeat left center / contain;
          mask: url('assets/img/lockup.png') no-repeat left center / contain;
}
@keyframes sheen {
  from { background-position: 170% 0; }
  to   { background-position: -70% 0; }
}

.hero-line {
  display: block;
  margin-top: 24px;
  font-size: clamp(38px, 7.2vw, 76px);
  max-width: 12ch;
  text-wrap: balance;
}

.hero-sub {
  color: var(--mute);
  max-width: 34ch;
  margin: 0 0 30px;
}

.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }

.hero-hrs { margin: 0; color: var(--mute); font-size: 15.5px; }
.hero-hrs b { color: var(--bone); font-weight: 600; }

/* ── the pole: their own object as the band between sections ──────────
   Their pole is black and white — no red, no blue (p130). The band is those
   two colours and that stripe angle, turning at the speed the real one does. */

.pole {
  height: 15px;
  /* At exactly 45° the pattern's horizontal period is (a+b)/cos45 = 42.426px,
     so a 42.426px tile repeats seamlessly and can be translated by exactly one
     tile without a seam. Any other angle leaves visible joins. */
  background-image: repeating-linear-gradient(
    -45deg,
    #101014 0 26px,
    var(--bone) 26px 52px
  );
  background-size: 73.539px 100%;
  animation: pole-turn 3.4s linear infinite;
}
@keyframes pole-turn { to { background-position: -73.539px 0; } }

/* ── sections ────────────────────────────────────────────────────────── */

/* padding-block, never the shorthand: these elements are also .wrap, and
   `padding: 88px 0` would silently reset the gutter .wrap just set (SKILL 9). */
.sec { padding-block: 88px; }

/* Heading left, note right: at desktop widths a single narrow column left the
   whole right half of the section empty. */
.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px 48px;
  align-items: end;
  margin-bottom: 44px;
}
.sec-head h2 { font-size: clamp(32px, 5.2vw, 56px); }
.sec-note { color: var(--mute); margin: 0; max-width: 46ch; }
.sec-head:not(:has(.sec-note)) { grid-template-columns: minmax(0, 1fr); }

/* ── serviços: a board, not cards ────────────────────────────────────── */

.board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 40px;
  border-top: 1px solid var(--rule);
}
.board-col { padding: 26px 0 8px; }
.board-col + .board-col { border-top: 1px solid var(--rule); }

.board-col h3 {
  font-size: 15px; font-style: normal; font-weight: 600;
  letter-spacing: 0.18em; color: var(--amber);
  margin-bottom: 14px;
}
.board-col ul { list-style: none; margin: 0; padding: 0; }
.board-col li {
  font-family: var(--disp); font-weight: 600; font-size: 22px;
  letter-spacing: 0.01em;
  padding: 9px 0; border-bottom: 1px solid var(--rule);
}
.board-link {
  display: inline-block; margin-top: 16px;
  color: var(--amber); font-weight: 500; font-size: 15.5px;
}

.board-cta {
  margin-top: 40px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px;
}
.board-cta p { margin: 0; color: var(--mute); font-size: 15.5px; }
.board-cta a:not(.btn) { color: var(--bone); text-underline-offset: 3px; }

/* ── galeria: columns keep every frame at the aspect it was shot ─────── */

.gal { columns: 3; column-gap: 18px; }
.gal figure { margin: 0 0 18px; break-inside: avoid; }
.gal img { width: 100%; border-radius: 2px; }

/* ── prótese ─────────────────────────────────────────────────────────── */

.protese { background: var(--ink-2); padding: 92px 0; }
.protese-in {
  display: grid; gap: 48px;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
}
.protese-txt h2 { font-size: clamp(32px, 5.2vw, 56px); margin-bottom: 22px; }
.protese-txt .lede { font-size: 20px; color: var(--bone); }
.protese-txt p { color: var(--mute); max-width: 54ch; }
.protese-txt .lede { color: var(--bone); }
.protese-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.protese-fig { margin: 0; }
.protese-fig img { width: 100%; max-width: 420px; border-radius: 2px; margin-inline: auto; }

/* ── produtos ────────────────────────────────────────────────────────── */

.prods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.prods figure { margin: 0; }
.prods img { width: 100%; border-radius: 2px; }
.prods figcaption {
  margin-top: 12px;
  font-family: var(--disp); font-weight: 600; font-size: 19px;
  letter-spacing: 0.03em; color: var(--mute);
}
.prods figcaption b { color: var(--bone); font-weight: 600; }

/* ── a casa ──────────────────────────────────────────────────────────── */

.casa { background: var(--ink-2); padding: 92px 0; }
.casa-in {
  display: grid; gap: 48px;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
}
.casa-fig { margin: 0; }
.casa-fig img { width: 100%; max-width: 460px; border-radius: 2px; }
.casa-txt h2 { font-size: clamp(32px, 5.2vw, 56px); margin-bottom: 22px; }
.casa-txt p { color: var(--mute); max-width: 50ch; }
.casa-quote {
  font-family: var(--disp); font-style: italic; font-weight: 700;
  text-transform: uppercase; font-size: 28px; line-height: 1.1;
  color: var(--amber); margin-top: 28px;
}

/* ── onde ────────────────────────────────────────────────────────────── */

.onde {
  display: grid; gap: 48px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
}
.onde-fig { margin: 0; }
.onde-fig img { width: 100%; max-width: 540px; border-radius: 2px; }

.facts { margin: 0 0 32px; }
.facts dt {
  font-family: var(--disp); font-weight: 600; font-size: 14px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--amber);
  margin-top: 24px;
}
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 6px 0 0; }
.facts a { color: var(--bone); text-underline-offset: 3px; }

/* ── footer ──────────────────────────────────────────────────────────── */

.foot { border-top: 1px solid var(--rule); padding: 56px 0 64px; text-align: center; }
.foot-in { color: var(--mute); }
.foot-name {
  font-family: var(--disp); font-weight: 600; font-size: 20px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--bone);
  margin: 0 0 8px;
}
.foot-addr { margin: 0 0 14px; font-size: 15.5px; }
.foot-links { margin: 0; font-size: 15.5px; }
.foot-links a { text-decoration: none; color: var(--bone); }
.foot-links a:hover { text-decoration: underline; }

/* ── scroll-driven reveals ───────────────────────────────────────────── */

@supports (animation-timeline: view()) {
  .js .rise {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 4% cover 26%;
  }
}
@keyframes rise {
  from { opacity: 0; translate: 0 22px; }
  to   { opacity: 1; translate: 0 0; }
}

/* Same choreography where view() is missing, driven by the observer in app.js. */
.js.no-sdt .rise { opacity: 0; translate: 0 22px; transition: opacity .5s ease, translate .5s ease; }
.js.no-sdt .rise.seen { opacity: 1; translate: 0 0; }

/* A view() timeline on a document with no scroll range sits at progress 0 for
   every element, which would leave the whole page hidden on a very tall window.
   app.js measures that case and switches the reveals off entirely. */
.js.no-reveal .rise {
  animation: none !important;
  transition: none;
  opacity: 1;
  translate: none;
}

/* ── anchors clear the sticky header ─────────────────────────────────── */

#servicos, #trabalho, #protese, #produtos, #onde { scroll-margin-top: 84px; }

/* ═════════════════════════════ responsive ═════════════════════════════ */

@media (max-width: 1080px) {
  .hero-photo { width: 44vw; }
}

@media (max-width: 900px) {
  .sec-head { grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
  .protese-in, .casa-in, .onde { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .casa-in .casa-fig { order: 2; }
  /* Capped rather than full-bleed: these three masters top out around 1240-1440px,
     so a full-width tablet slot could not be covered at 2x. A smaller sharp image
     beats a bigger soft one (SKILL 2.A). */
  .protese-fig img, .casa-fig img, .onde-fig img { max-width: 540px; margin-inline: auto; }
  .gal { columns: 2; }
  .prods { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .burger { display: flex; }
  .head-cta { display: none; }

  .menu {
    display: none;
    padding: 6px var(--pad) 26px;
    border-top: 1px solid var(--rule);
    background: rgba(14, 14, 16, 0.98);
  }
  .head.open .menu { display: flex; flex-direction: column; gap: 4px; }
  .menu a:not(.btn) {
    font-family: var(--disp); font-weight: 600; font-size: 24px;
    letter-spacing: 0.06em; text-transform: uppercase;
    text-decoration: none; padding: 12px 0;
    border-bottom: 1px solid var(--rule);
  }
  .menu .btn { margin-top: 18px; }
  .head.open { background: rgba(14, 14, 16, 0.98); border-bottom-color: var(--rule); }
}

@media (max-width: 760px) {
  body { font-size: 16.5px; }

  .hero {
    min-height: 0;
    padding: 24px 0 72px;
    display: block;
  }
  /* On a phone the photo is a band above the words rather than a side panel,
     so nothing sits on top of the pole. */
  .hero-photo {
    position: relative; inset: auto; width: auto;
    /* capped at 700px: the master is 1440px, so a wider slot could not be
       covered at 2x and the pole would go soft exactly where it matters */
    max-width: 700px; margin-inline: auto;
    height: 46vh; max-height: 380px; margin-bottom: 30px;
  }
  .hero-photo img {
    object-position: 60% 42%;
    -webkit-mask: linear-gradient(to bottom, #000 52%, transparent);
            mask: linear-gradient(to bottom, #000 52%, transparent);
  }
  .hero-photo::after {
    background: linear-gradient(to bottom, rgba(14,14,16,.55) 0%, transparent 30%);
  }
  .hero-line { font-size: clamp(34px, 10vw, 52px); max-width: none; }
  .hero-btns .btn { flex: 1 1 auto; }

  .sec { padding-block: 68px; }
  .protese, .casa { padding: 68px 0; }
  .prods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The gutter and the column counts drop together at one breakpoint, so the
   `sizes` arithmetic has a single seam to describe instead of three. */
@media (max-width: 560px) {
  :root { --pad: 20px; }
  .gal { columns: 1; }
}

@media (max-width: 440px) {
  .prods { grid-template-columns: minmax(0, 1fr); }
}

/* ── reduced motion ──────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .pole { animation: none; }
  .lockup { animation: none; background-image: none; }
  .js .rise, .js.no-sdt .rise {
    animation: none; transition: none;
    opacity: 1; translate: none;
  }
  html { scroll-behavior: auto; }
}
