/* On Joias / Ourivesaria Nascimento: esboço. Ver DESIGN.md */

:root {
  /* Cores oficiais (manual Arcaffo) */
  --marinho: #2C3E4D;
  --creme: #FCFBF7;
  --ouro: #B19D6A;
  --nevoa: #E1E1DF;
  --preto: #0A0A0A;

  --texto: var(--marinho);
  --texto-2: #56636E;          /* marinho suavizado, 5.6:1 sobre creme */
  --linha: #D3D3D0;
  --marinho-2: #344858;        /* espaço reservado sobre marinho */

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;

  /* Escala tipográfica (razão ~1.333) */
  --t-sm: 0.875rem;
  --t-base: 1.0625rem;
  --t-lead: clamp(1.1875rem, 1.05rem + 0.5vw, 1.375rem);
  --t-h3: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
  --t-h2: clamp(2rem, 1.5rem + 2vw, 3.25rem);
  --t-h1: clamp(2.25rem, 1.4rem + 3.6vw, 4.5rem);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(5rem, 10vw, 9rem);
  --header-h: 4.5rem;
  --max: 88rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--creme);
  color: var(--texto);
  font-family: var(--sans);
  font-size: var(--t-base);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video, iframe { display: block; max-width: 100%; }
p { margin: 0 0 1em; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

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

.skip {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--marinho);
  color: var(--creme);
}
.skip:focus { top: 1rem; }

/* ---------- Logos (SVGs oficiais via máscara, cor = currentColor) ---------- */
.logo {
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: var(--src) no-repeat center / contain;
          mask: var(--src) no-repeat center / contain;
}
.logo--monograma  { --src: url("../shared/assets/logo/monograma.svg");  aspect-ratio: 330.9 / 243.6; }
.logo--wordmark   { --src: url("../shared/assets/logo/wordmark.svg");   aspect-ratio: 784.4 / 218.5; }
.logo--assinatura { --src: url("../shared/assets/logo/assinatura-horizontal.svg"); aspect-ratio: 791 / 130.9; }
.logo--selo       { --src: url("../shared/assets/logo/selo.svg");       aspect-ratio: 1; }

/* ---------- Faixa de esboço ---------- */
.sketch-bar {
  background: var(--nevoa);
  color: var(--marinho);
  font-size: var(--t-sm);
  line-height: 1.4;
  padding: 0.6rem var(--gutter);
  text-align: center;
}

/* ---------- Grade ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section); }
.section__head { grid-column: 2 / span 7; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.h2 { font-family: var(--serif); font-size: var(--t-h2); line-height: 1.1; letter-spacing: -0.01em; margin-bottom: 0.6em; }
.h3 { font-family: var(--serif); font-size: var(--t-h3); line-height: 1.2; margin-bottom: 0.5em; }
.lead { font-size: var(--t-lead); line-height: 1.5; max-width: 34em; }
.note {
  font-size: var(--t-sm);
  color: var(--texto-2);
  border-left: 2px solid var(--ouro);
  padding-left: 0.75rem;
  max-width: 40em;
}
.note--light { color: rgba(252, 251, 247, 0.75); }

/* ---------- Botões e links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--marinho);
  background: var(--marinho);
  color: var(--creme);
  font: 500 0.9375rem/1.2 var(--sans);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { background: var(--preto); border-color: var(--preto); }
.btn--light { background: var(--creme); color: var(--marinho); border-color: var(--creme); }
.btn--light:hover { background: transparent; color: var(--creme); }
.btn--small { min-height: 2.5rem; padding: 0.5rem 1.1rem; font-size: 0.875rem; }
.btn--full { width: 100%; }

.link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--ouro);
  transition: text-decoration-color 0.2s ease;
}
.link:hover { text-decoration-color: currentColor; }
.link--light { color: var(--creme); }

/* ---------- Espaços reservados de foto ---------- */
.ph {
  position: relative;
  margin: 0;
  display: grid;
  place-items: center;
  background: var(--nevoa);
  color: var(--texto-2);
  min-height: 12rem;
  overflow: hidden;
}
.ph::before {
  content: "";
  position: absolute;
  inset: 0.75rem;
  border: 1px dashed rgba(44, 62, 77, 0.35);
  pointer-events: none;
}
.ph__label {
  position: relative;
  max-width: 26em;
  padding: 1.5rem;
  font-size: var(--t-sm);
  line-height: 1.45;
  text-align: center;
}
.ph__label::before {
  content: "Espaço para foto real";
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--marinho);
}
.ph--dark { background: var(--marinho-2); color: rgba(252, 251, 247, 0.7); }
.ph--dark::before { border-color: rgba(252, 251, 247, 0.25); }
.ph--dark .ph__label::before { color: var(--creme); }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  margin-bottom: calc(var(--header-h) * -1);
  color: var(--creme);
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-solid {
  background: var(--creme);
  color: var(--marinho);
  box-shadow: 0 1px 0 var(--linha);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
  text-decoration: none;
  margin-right: auto;
}
.brand .logo--monograma { height: 2.1rem; }
.brand .logo--wordmark { height: 1.9rem; }
.site-header .btn--small { background: transparent; color: inherit; border-color: currentColor; }
.site-header .btn--small:hover { background: var(--creme); color: var(--marinho); border-color: var(--creme); }
.site-header.is-solid .btn--small:hover { background: var(--marinho); color: var(--creme); border-color: var(--marinho); }

.nav__list {
  display: flex;
  gap: 1.75rem;
  margin: 0; padding: 0;
  list-style: none;
}
.nav__list a {
  font-size: 0.9375rem;
  text-decoration: none;
  padding-block: 0.4rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav__list a:hover { border-bottom-color: var(--ouro); }
.nav__toggle {
  display: none;
  font: 500 0.9375rem var(--sans);
  color: inherit;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}

@media (max-width: 60rem) {
  .brand .logo--wordmark { display: none; }
  .nav__toggle { display: inline-block; }
  .nav__list {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.5rem;
    background: var(--creme);
    color: var(--marinho);
    box-shadow: 0 1px 0 var(--linha);
    overscroll-behavior: contain;
  }
  .nav__list[hidden] { display: none; }
  .nav__list a { display: block; padding-block: 0.85rem; font-size: 1.125rem; border-bottom: 1px solid var(--linha); }
  .site-header { gap: 1rem; }
  .site-header__inner { gap: 1rem; }
}

/* ---------- Abertura ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  color: var(--creme);
  isolation: isolate;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero__media .ph__label { margin-bottom: 30vh; }
.hero__content {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: 0 var(--gutter) clamp(3rem, 8vh, 6rem);
}
.hero__title {
  font-family: var(--serif);
  font-size: var(--t-h1);
  line-height: 1.06;
  letter-spacing: -0.015em;
  max-width: 15em;
  margin-bottom: 0.5em;
}
.hero__lead { font-size: var(--t-lead); max-width: 30em; opacity: 0.9; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; margin-top: 2rem; }

/* ---------- História ---------- */
.historia__text { grid-column: 2 / span 5; align-self: center; }
.historia__text p:not(.lead):not(.note) { max-width: 34em; }
.historia__retrato { grid-column: 8 / span 4; aspect-ratio: 4 / 5; }

/* ---------- Painel em tela cheia (padrão Artisans) ---------- */
.panel {
  position: relative;
  min-height: min(85vh, 56rem);
  display: grid;
  align-items: end;
  color: var(--creme);
  isolation: isolate;
}
.panel__media { position: absolute; inset: 0; z-index: -1; }
.panel__media .ph__label { margin-bottom: 12rem; }
.panel__content {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: 0 var(--gutter) clamp(2.5rem, 6vh, 4.5rem);
}
.panel__title { font-family: var(--serif); font-size: var(--t-h2); line-height: 1.1; margin-bottom: 0.35em; }
.panel__text { font-size: var(--t-lead); max-width: 28em; margin: 0; }

/* ---------- Ateliê ---------- */
.atelie__grid { row-gap: var(--gutter); }
.atelie__a { grid-column: 1 / span 7; grid-row: span 2; aspect-ratio: 4 / 5; }
.atelie__b { grid-column: 8 / span 5; aspect-ratio: 4 / 3; }
.atelie__c { grid-column: 9 / span 4; aspect-ratio: 1; }
.atelie__text { grid-column: 8 / span 4; font-size: var(--t-lead); line-height: 1.5; }

/* ---------- Processo ---------- */
.processo { background: #F3F2EE; }
.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  list-style: none;
  counter-reset: etapa;
}
.step { counter-increment: etapa; }
.step__media { aspect-ratio: 3 / 4; min-height: 0; margin-bottom: 1.25rem; }
.step__media .ph__label { padding: 1rem; }
.step__title {
  font-family: var(--serif);
  font-size: 1.375rem;
  line-height: 1.25;
  margin-bottom: 0.5rem;
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}
.step__title::before {
  content: counter(etapa);
  font-family: var(--serif);
  font-style: italic;
  color: var(--ouro);
  font-size: 1.125rem;
  font-variant-numeric: lining-nums;
}
.step p { font-size: 0.9875rem; color: var(--texto-2); }
.processo__note { grid-column: 2 / span 8; margin-top: 3rem; }

/* ---------- Projetos ---------- */
.projeto {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 2rem;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto clamp(4rem, 8vw, 7rem);
  padding-inline: var(--gutter);
}
.projeto:last-child { margin-bottom: 0; }
.projeto__media {
  grid-column: 1 / span 7;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--gutter);
  align-items: end;
}
.projeto__main { aspect-ratio: 4 / 5; }
.projeto__detail { aspect-ratio: 3 / 4; min-height: 0; }
.projeto__detail .ph__label { padding: 1rem; }
.projeto__text { grid-column: 9 / span 4; }
.projeto__text p { max-width: 26em; }
.projeto--reverse .projeto__media { grid-column: 6 / span 7; grid-row: 1; }
.projeto--reverse .projeto__text { grid-column: 1 / span 4; grid-row: 1; padding-left: 0; }
@media (min-width: 60.01rem) {
  .projeto--reverse .projeto__text { grid-column: 2 / span 3; }
}

/* ---------- Depoimentos ---------- */
.depoimentos { border-top: 1px solid var(--linha); }
.quotes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.quote { margin: 0; padding-top: 1.5rem; border-top: 1px solid var(--ouro); }
.quote blockquote { margin: 0 0 1.25rem; }
.quote p { font-family: var(--serif); font-size: 1.375rem; line-height: 1.4; }
.quote figcaption { font-size: var(--t-sm); color: var(--texto-2); }
.quote--ph p { font-style: italic; color: var(--texto-2); }

/* ---------- Agendar ---------- */
.agendar {
  background: var(--marinho);
  color: var(--creme);
  padding-top: var(--section);
}
.agendar__grid { row-gap: 3rem; padding-bottom: var(--section); }
.agendar__intro { grid-column: 2 / span 4; }
.agendar__selo { width: clamp(7rem, 12vw, 10rem); color: var(--ouro); margin-bottom: 2.5rem; }
.agendar .h2 { color: var(--creme); }
.agendar .lead { margin-bottom: 2rem; }
.agendar .note { margin-top: 1rem; }
.contato { font-style: normal; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(177, 157, 106, 0.5); }
.contato__social { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

.form { grid-column: 7 / span 5; }
.form .h3 { color: var(--creme); margin-bottom: 1.5rem; }
.field { display: grid; gap: 0.4rem; margin-bottom: 1.25rem; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { font-size: var(--t-sm); color: rgba(252, 251, 247, 0.85); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  font: 400 1rem/1.4 var(--sans);
  color: var(--creme);
  background-color: rgba(252, 251, 247, 0.06);
  border: 1px solid rgba(252, 251, 247, 0.3);
  border-radius: 0;
  color-scheme: dark;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.field select option { background-color: var(--marinho); color: var(--creme); }
.field input::placeholder,
.field textarea::placeholder { color: rgba(252, 251, 247, 0.45); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(252, 251, 247, 0.6); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--ouro);
  outline-offset: 0;
  border-color: var(--ouro);
}
.field input[type="file"] { padding: 0.6rem; font-size: 0.9375rem; }
.field [aria-invalid="true"] { border-color: #E8B4A0; }
.field__error { font-size: var(--t-sm); color: #F1C7B7; margin: 0; }
.form__status { min-height: 1.5em; margin-top: 1rem; font-size: 0.9375rem; }

.mapa iframe { width: 100%; height: clamp(18rem, 40vw, 26rem); border: 0; filter: grayscale(1) contrast(0.95); }

/* ---------- Rodapé ---------- */
.site-footer { padding-block: 3.5rem; background: var(--creme); }
.site-footer__grid { align-items: center; row-gap: 1.5rem; }
.site-footer__logo { grid-column: 1 / span 5; height: 2.5rem; color: var(--marinho); max-width: 100%; justify-self: start; }
.site-footer__meta { grid-column: 8 / span 5; margin: 0; font-size: var(--t-sm); color: var(--texto-2); text-align: right; }

/* ---------- Responsivo ---------- */
@media (max-width: 60rem) {
  .section__head,
  .historia__text,
  .historia__retrato,
  .atelie__a, .atelie__b, .atelie__c, .atelie__text,
  .processo__note,
  .projeto__media, .projeto__text,
  .projeto--reverse .projeto__media, .projeto--reverse .projeto__text,
  .agendar__intro, .form,
  .site-footer__logo, .site-footer__meta { grid-column: 1 / -1; }

  .projeto--reverse .projeto__media { grid-row: auto; }
  .projeto--reverse .projeto__text { grid-row: auto; }
  .historia__retrato { margin-top: 2.5rem; aspect-ratio: 4 / 5; }
  .atelie__a { grid-row: auto; }
  .atelie__c { display: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 3rem; }
  .quotes { grid-template-columns: 1fr; }
  .site-footer__meta { text-align: left; }
}
@media (max-width: 36rem) {
  .steps { grid-template-columns: 1fr; }
  .step__media { aspect-ratio: 4 / 3; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .projeto__media { grid-template-columns: 1fr; }
  .projeto__detail { display: none; }
  .hero__actions .btn { width: 100%; }
}
.sketch-bar a { color: inherit; font-weight: 500; text-underline-offset: .2em; margin-left: .35rem; }
.reel { scrollbar-color: var(--ouro, #B19D6A) transparent; }
a, button, summary { touch-action: manipulation; -webkit-tap-highlight-color: rgba(177, 157, 106, .25); }

/* Fotos ilustrativas (Unsplash), só para mostrar o tipo de imagem; serão trocadas pelas fotos do ateliê */
.ph__img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.ph:has(.ph__img) { background: #1A232C; }
.ph:has(.ph__img) .ph__label {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; max-width: none; margin: 0;
  padding: 2.5rem 1rem .9rem; text-align: left; font-size: .8125rem; line-height: 1.4; color: #FCFBF7;
  background: linear-gradient(transparent, rgba(10, 15, 20, .82));
  opacity: 0; transform: translateY(.5rem); transition: opacity .4s ease, transform .4s ease;
}
.ph:has(.ph__img) .ph__label::before { content: "Sugestão de foto do ateliê"; color: #D9C79A; font-size: .9375rem; }
.ph:has(.ph__img):hover .ph__label { opacity: 1; transform: none; }
.ph__tag {
  position: absolute; top: .6rem; left: .6rem; z-index: 2; pointer-events: none;
  padding: .3rem .6rem; border-radius: 999px; font: 500 .6875rem/1 "Inter Tight", Arial, sans-serif; letter-spacing: .01em;
  background: rgba(10, 15, 20, .55); color: #FCFBF7; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
@media (hover: none) { .ph:has(.ph__img) .ph__label { opacity: 1; transform: none; font-size: .75rem; padding-top: 2rem; } }
.ph[class*="hero"] .ph__tag { top: 6.5rem; }
.ph[class*="hero"] .ph__img { filter: brightness(.6); }
