/* Made Portas e Aberturas — landing page
   Paleta e contrastes registrados em briefing.md */

@font-face {
  font-family: "Outfit";
  src: url("/parceiros/made-portas/fonts/outfit-variable-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-stretch: 100%;
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/parceiros/made-portas/fonts/source-serif-4-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --green: #325b49;
  --green-deep: #2a4b3c;
  --ink: #1e332a;
  --cream: #f6f2ec;
  --cream-warm: #efe8de;
  --sand: #eac97e;
  --wood: #7a3f1d;
  --muted: #4a5f54;
  --on-dark: #d8e3dc;
  --hairline: #ddd3c4;

  --display: "Outfit", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 4px;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1rem, 0.97rem + 0.18vw, 1.075rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--sand);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  padding: 12px 20px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 0.78em 1.3em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease;
}

.btn--lg { font-size: 1rem; padding: 1em 1.6em; }

.btn--sand { background: var(--sand); color: var(--ink); }
.btn--sand:hover { background: #f5dca2; transform: translateY(-2px); }

.btn--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn--sand:hover { transform: none; }
}

/* ---------- cabeçalho ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--green);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  min-height: 72px;
  padding-block: 12px;
}

.masthead__brand { display: block; flex: none; }
.masthead__brand img { width: auto; height: 30px; }

.masthead__nav {
  display: flex;
  gap: clamp(16px, 2.4vw, 32px);
  margin-inline-start: auto;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.92rem;
}

.masthead__nav a {
  color: #fff;
  text-decoration: none;
  padding-block: 4px;
  border-bottom: 1px solid transparent;
}
.masthead__nav a:hover { border-bottom-color: var(--sand); }

.masthead__cta { flex: none; }

@media (max-width: 720px) {
  .masthead__nav { display: none; }
  .masthead__cta { margin-inline-start: auto; }
  .masthead__brand img { height: 26px; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  background: var(--green-deep);
  color: #fff;
  overflow: hidden;
}

/* filetes verticais: o ritmo de folhas de porta que dá nome à composição */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    90deg,
    transparent 0 calc(25% - 1px), rgba(255, 255, 255, 0.08) calc(25% - 1px) 25%,
    transparent 25% calc(50% - 1px), rgba(255, 255, 255, 0.08) calc(50% - 1px) 50%,
    transparent 50% calc(75% - 1px), rgba(255, 255, 255, 0.08) calc(75% - 1px) 75%,
    transparent 75%
  );
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(32px, 6vw, 72px);
  padding-block: clamp(56px, 9vw, 104px) var(--hero-floor);
  --hero-floor: clamp(56px, 8vw, 96px);
}

.hero__body { align-self: center; }

.hero__eyebrow {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 1.4rem;
}

.hero__title {
  font-size: clamp(2.5rem, 5.4vw, 4rem);
  line-height: 0.98;
  font-weight: 500;
}

.hero__lead {
  max-width: 34em;
  margin-top: 1.6rem;
  color: var(--on-dark);
  font-size: clamp(1.04rem, 1rem + 0.3vw, 1.2rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 2.2rem;
}

.hero__note {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--sand);
  font-style: italic;
  font-size: 1.02rem;
}

/* moldura deslocada: eco do batente e da dobra da logo */
.hero__figure {
  position: relative;
  margin: 0 0 calc(-1 * var(--hero-floor));
  align-self: end;
  justify-self: end;
  width: 100%;
  max-width: 430px;
}

.hero__figure::before {
  content: "";
  position: absolute;
  inset: -18px -18px 0 18px;
  z-index: 0;
  border: 1px solid var(--sand);
  border-radius: var(--radius);
}

.hero__figure img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--radius);
}

@media (max-width: 960px) {
  .hero::before { opacity: 0.7; }
  .hero__inner { grid-template-columns: 1fr; }
  /* empilhado, a porta continua apoiada na base da seção — agora no canto direito */
  .hero__figure { justify-self: end; max-width: min(360px, 100%); }
  .hero__figure::before { inset: -12px -12px 0 12px; }
}

@media (max-width: 620px) {
  .hero__figure { justify-self: stretch; max-width: 100%; }
}

/* ---------- linhas ---------- */

.lines { background: var(--cream); padding-block: clamp(64px, 9vw, 120px); }

.lines__head { max-width: 46ch; margin-bottom: clamp(40px, 6vw, 68px); }

.lines__title { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }

.lines__lead { margin-top: 1rem; color: var(--muted); }

.line {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  align-items: baseline;
  padding-block: clamp(26px, 3.6vw, 40px);
  border-top: 1px solid var(--hairline);
}
.line:last-child { border-bottom: 1px solid var(--hairline); }

.line__number {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1;
  color: var(--wood);
  font-variant-numeric: tabular-nums;
}

.line__title { font-size: clamp(1.25rem, 2vw, 1.6rem); }

.line__text {
  margin-top: 0.7rem;
  max-width: 60ch;
  color: var(--muted);
}

@media (min-width: 900px) {
  .line { grid-template-columns: 4.5rem minmax(0, 0.62fr) minmax(0, 1fr); }
  .line__body { display: contents; }
  .line__text { margin-top: 0; }
}

@media (max-width: 560px) {
  .line { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- trabalhos ---------- */

.works {
  background: var(--cream-warm);
  padding-block: clamp(64px, 9vw, 120px);
}

.works__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 24px;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.works__title { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.works__lead { color: var(--muted); margin-inline-start: auto; }

.works__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(28px, 4vw, 52px);
}

.work { margin: 0; position: relative; }

.work picture {
  display: block;
  position: relative;
}

/* mesma moldura deslocada do hero, do lado oposto */
.work picture::after {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  z-index: 0;
  border: 1px solid var(--wood);
  border-radius: var(--radius);
}

.work img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--radius);
}

.work figcaption {
  margin-top: 1.6rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- showroom ---------- */

.showroom {
  background: var(--green);
  color: #fff;
  padding-block: clamp(64px, 9vw, 110px);
}

.showroom__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(36px, 6vw, 64px);
  align-items: start;
}

.showroom__eyebrow {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 1.2rem;
}

.showroom__title { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }

.showroom__text {
  margin-top: 1.2rem;
  max-width: 54ch;
  color: var(--on-dark);
}

.showroom__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 2.2rem;
}

.showroom__card {
  background: var(--green-deep);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 34px);
  font-style: normal;
}

.showroom__card-label {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sand);
}

.showroom__card-line {
  margin-block: 0.45rem 1.6rem;
  color: #fff;
}
.showroom__card-line:last-child { margin-bottom: 0; }

.showroom__card a {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 3px;
}
.showroom__card a:hover { text-decoration-color: var(--sand); }

@media (max-width: 860px) {
  .showroom__inner { grid-template-columns: 1fr; }
}

/* ---------- rodapé ---------- */

.footer {
  background: var(--ink);
  color: var(--on-dark);
  padding-block: clamp(48px, 6vw, 72px);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.footer__logo { width: auto; height: 56px; }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.94rem;
}

.footer__links a {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  color: #fff;
  text-decoration: none;
}
.footer__links a:hover { color: var(--sand); }

.footer__note {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.94rem;
}

.footer__note a {
  color: var(--sand);
  text-underline-offset: 3px;
}

/* ---------- revelação em scroll ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js-reveal .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .js-reveal .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}
