/* Começar um projeto: the visitor writes a letter to Bárbara, every answer inline, and gets her reply. The rooms open a picker in place. */
:root {
  --field: rgba(27, 23, 20, .5);
  --hint: rgba(27, 23, 20, .62);
  --tint: rgba(124, 30, 19, .08);
  --tique: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6.5 11.5l3 3 6-6.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --seta: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237C1E13' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
[hidden] { display: none !important; }

body { background: var(--plaster); }
.col { max-width: 920px; margin: 0 auto; padding: 0 var(--pad); }

/* Heading */
.lead { padding: clamp(32px, 6vw, 88px) 0 clamp(28px, 4vw, 48px); }
.resposta .titulo { font-size: var(--t-hero); line-height: 1; letter-spacing: -.035em; margin: 0 0 clamp(22px, 3vw, 36px); }
/* The typed title must fit its longest phrase ("Fale-me das suas ideias.") on one line on desktop. */
.lead h1 { font-size: clamp(2.3rem, 4.4vw, 4rem); line-height: 1; letter-spacing: -.035em; margin: 0 0 clamp(22px, 3vw, 36px); }
.by { display: flex; gap: 18px; align-items: flex-start; }
.by img { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; object-position: 62% 46%; flex: none; }
.by p { margin: 0; font-size: var(--t-body); line-height: 1.55; max-width: 32em; }
.by strong { font-weight: 600; }

/* The letter: a sheet on the plaster */
.folha { background: var(--sheet); box-shadow: var(--elevacao); padding: clamp(24px, 5vw, 64px); margin-bottom: clamp(56px, 8vw, 112px); }
.para { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 20px; font-family: var(--q); font-size: 15px; line-height: 1.4; color: var(--soft); border-bottom: 1px solid var(--rule); padding-bottom: 16px; margin: 0 0 28px; }
.para strong { color: var(--ink); font-weight: 700; }
.carta { font-size: clamp(1.2rem, 1.6vw, 1.36rem); }
.ola { margin-bottom: 1.1em; }
.paragrafo { position: relative; margin: 0 0 1.2em; padding: 0; border: 0; min-width: 0; }
.paragrafo p { margin: 0 0 1em; line-height: 2.15; text-wrap: wrap; }
.nota { display: block; font-family: var(--q); font-size: 15px; line-height: 1.4; color: var(--soft); margin: -.4em 0 1.2em; padding-left: 14px; border-left: 2px solid var(--oxblood); }

/* Blanks: real inputs and selects inside the sentence (at least 16px: they inherit the letter's ~20px) */
.campo { display: inline; white-space: nowrap; }
.campo input, .campo select, .campo textarea {
  font: inherit; font-style: italic; color: var(--oxblood); background: transparent;
  border: 0; border-bottom: 2px dotted var(--field); border-radius: 0; margin: 0;
  padding: .6em .15em .2em; line-height: 1.35; max-width: 100%; /* about 44px tall: a full touch target inside the letter's line */
  transition: border-color .12s ease-out, background-color .12s ease-out;
}
.campo input { width: 8ch; }
.campo select { -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 1.05em; text-overflow: ellipsis; background: var(--seta) right .2em center / .6em no-repeat; }
.campo input::placeholder, .campo textarea::placeholder { color: var(--hint); opacity: 1; }
@media (hover: hover) and (pointer: fine) { .campo input:hover, .campo select:hover, .campo textarea:hover { border-bottom-color: var(--ink); } }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-bottom: 2px solid var(--oxblood); background-color: var(--tint); }
.campo input:focus-visible, .campo select:focus-visible, .campo textarea:focus-visible { box-shadow: 0 3px 0 0 var(--oxblood); }
.campo [aria-invalid="true"] { border-bottom: 2px solid var(--oxblood); background-color: var(--tint); }
.campo.bloco { display: block; white-space: normal; }
.campo textarea { display: block; width: 100%; min-height: 4.4em; padding: .45em .6em; margin-top: .4rem; resize: vertical; line-height: 1.6; border: 1px solid var(--field); padding: .45em .6em; }
.campo textarea:focus { border: 1px solid var(--oxblood); }

.assina { margin-top: 1.6em; }
.assina p { margin: 0; }
.assina .nome { display: block; font-style: italic; font-size: 1.35em; line-height: 1.3; min-height: 1.4em; color: var(--oxblood); margin-top: .2em; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-family: var(--q); font-size: 16px; line-height: 1.5; color: var(--soft); margin: 28px 0 0; max-width: 40em; cursor: pointer; }
.consent input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--oxblood); }

.seguir { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--rule); }
button.btn { cursor: pointer; }
.erro { font-family: var(--q); font-weight: 600; font-size: 16px; color: var(--oxblood); margin: 18px 0 0; }

/* Her reply */
.resposta { padding-top: clamp(32px, 6vw, 88px); }
.resposta:focus { outline: none; }
.resposta .folha { font-size: clamp(1.2rem, 1.6vw, 1.36rem); }
.resposta .folha p { margin: 0 0 1em; max-width: 34em; }
.by.de { margin-bottom: 26px; }
.by.de p { font-family: var(--q); font-size: 16px; color: var(--soft); }
.by.de strong { color: var(--ink); }
.resposta h3 { font-size: var(--t-h3); line-height: 1.08; letter-spacing: -.02em; margin: 1.5em 0 .3em; }
.resposta ol { list-style: none; counter-reset: n; margin: 14px 0 28px; padding: 0; border-top: 1px solid var(--rule); max-width: 36em; }
.resposta ol li { counter-increment: n; position: relative; padding: 14px 0 14px 46px; border-bottom: 1px solid var(--rule); }
.resposta ol li::before { content: counter(n); position: absolute; left: 0; top: 10px; font-family: var(--q); font-weight: 800; font-size: 28px; line-height: 1.2; color: var(--oxblood); }
.sig { font-family: "Mrs Saint Delafield", cursive; font-size: 62px; line-height: 1; margin: 8px 0 0 !important; font-weight: 400; color: var(--ink); }
.who { font-family: var(--q); font-size: 15px; color: var(--soft); margin: 4px 0 1em; }
details { margin-top: 36px; border-top: 1px solid var(--rule); padding-top: 10px; font-family: var(--q); font-size: 16px; }
summary { cursor: pointer; font-weight: 700; padding: 10px 0; min-height: 44px; }
details dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; margin: 10px 0 0; }
details dt { color: var(--soft); }
details dd { margin: 0; overflow-wrap: anywhere; font-family: var(--a); font-style: italic; }
.depois { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 clamp(56px, 8vw, 112px); }

@media (max-width: 640px) {
  .by img { width: 54px; height: 54px; }
  .folha { margin-left: calc(-1 * var(--pad)); margin-right: calc(-1 * var(--pad)); border-left: 0; border-right: 0; }
  .paragrafo p { line-height: 2.05; }
  details dl { grid-template-columns: 1fr; gap: 0; }
  details dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .campo input, .campo select, .campo textarea { transition: none; }
}

/* Where the calendar stands: one plain line under the title, dated. */
.agenda { margin: 0; max-width: 40em; font-family: var(--q); font-size: 17px; line-height: 1.5; color: var(--ink); }
.agenda-ponto { display: inline-block; width: 9px; height: 9px; margin-right: 10px; border-radius: 50%; background: var(--oxblood); vertical-align: 1px; }
.agenda-data { display: block; margin-top: 10px; font-size: 15px; color: var(--soft); }

/* The rooms' blank: a button in the sentence, read as the rooms in words once chosen */
.divs { display: inline; padding: .2em .15em; border-bottom: 2px dotted var(--field); font-style: italic; color: var(--oxblood); cursor: pointer; -webkit-tap-highlight-color: transparent;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: border-color .12s ease-out, background-color .12s ease-out; }
.divs::after { content: ""; display: inline-block; width: .6em; height: .6em; margin: 0 .2em 0 .35em; background: var(--seta) center / contain no-repeat; vertical-align: .05em; transition: transform .2s var(--ease); }
.divs[aria-expanded="true"]::after { transform: rotate(180deg); }
.divs .vazio { color: var(--hint); }
@media (hover: hover) and (pointer: fine) { .divs:hover { border-bottom-color: var(--ink); } }
.divs:focus-visible { outline: none; border-bottom: 2px solid var(--oxblood); background-color: var(--tint); }
.divs[aria-expanded="true"] { border-bottom: 2px solid var(--oxblood); }
.divisoes p { margin: 0 0 1em; line-height: 2.15; }

/* The picker, opened under its sentence: a short height reveal with a fade */
.salas { display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden; margin: -.4em 0 0;
  transition: grid-template-rows .22s var(--ease), opacity .16s ease-out, visibility 0s linear .22s; }
.salas[data-aberto="true"] { grid-template-rows: 1fr; opacity: 1; visibility: visible; transition: grid-template-rows .22s var(--ease), opacity .2s ease-out, visibility 0s; }
.salas-dentro { min-height: 0; overflow: hidden; }
.salas-dentro > :first-child { margin-top: 6px; }
.salas-fim { display: flex; align-items: center; justify-content: flex-end; gap: 12px 20px; padding: 16px 10px 28px; }

/* Room tiles: the picture, a dark fade at the foot, the name in white; chosen ones get an oxblood ring and a tick */
.fotos { list-style: none; margin: 0; padding: 4px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; font-family: var(--q); }
.fotos li { position: relative; }
.foto { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; margin: 0; padding: 0; border: 0; border-radius: 4px; overflow: hidden;
  background: var(--ink); color: #fff; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .12s ease-out; }
.foto picture, .foto img { display: block; width: 100%; height: 100%; }
.foto img { object-fit: cover; opacity: .8; transition: opacity .15s ease-out; }
.foto::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(to top, rgba(27, 23, 20, .55), rgba(27, 23, 20, 0)); pointer-events: none; }
.foto .nome { position: absolute; left: 8px; right: 8px; bottom: 7px; z-index: 1; display: flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 15px; line-height: 1.2; text-wrap: balance; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.foto .nome::before { content: ""; flex: none; width: 0; height: 20px; margin-right: -6px; border-radius: 50%; background: var(--oxblood) var(--tique) center / 20px no-repeat; opacity: 0; transition: opacity .15s ease-out; }
.foto .anel { position: absolute; inset: 0; z-index: 2; border-radius: 4px; box-shadow: inset 0 0 0 0 var(--oxblood); transition: box-shadow .15s ease-out; pointer-events: none; }
.foto.palavra { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.foto.palavra::after { content: none; }
.foto.palavra .nome { text-shadow: none; }
@media (hover: hover) and (pointer: fine) { .foto:hover img { opacity: .92; } .foto.palavra:hover { box-shadow: inset 0 0 0 1px rgba(27, 23, 20, .4); } }
.foto:active { transform: scale(.98); }
.foto:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.fotos li.sim .foto img { opacity: 1; }
.fotos li.sim .anel { box-shadow: inset 0 0 0 3px var(--oxblood), inset 0 0 0 4.5px rgba(255, 255, 255, .85); }
.fotos li.sim .foto .nome::before { width: 20px; margin-right: 0; opacity: 1; }

/* How many: − n + on a chosen tile */
.passo { position: absolute; top: 6px; right: 6px; z-index: 3; display: inline-flex; align-items: center; border-radius: 999px; background: var(--sheet); color: var(--ink); box-shadow: var(--elevacao);
  opacity: 0; visibility: hidden; transform: scale(.96); transform-origin: top right; transition: opacity .16s ease-out, transform .16s var(--ease), visibility 0s linear .16s; }
.fotos li.sim .passo { opacity: 1; visibility: visible; transform: none; transition: opacity .16s ease-out, transform .16s var(--ease), visibility 0s; }
.passo button { display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--oxblood); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color .12s ease-out, transform .12s ease-out; }
.passo button svg { width: 14px; height: 14px; }
.passo button:disabled { color: var(--hint); cursor: default; }
@media (hover: hover) and (pointer: fine) { .passo button:hover:not(:disabled) { background: var(--tint); } }
.passo button:active { transform: scale(.94); }
.passo button:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.passo .n { min-width: 1.2em; text-align: center; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* "Outra divisão": its name */
.outra { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 16px 4px 0; }
.outra-rot { font-family: var(--q); font-size: 16px; font-weight: 600; }
.outra-campo { flex: 1 1 14em; max-width: 24em; font: inherit; font-style: italic; color: var(--oxblood); background: transparent; border: 0; border-bottom: 2px dotted var(--field); border-radius: 0; padding: .3em .15em .2em; }
.outra-campo::placeholder { color: var(--hint); opacity: 1; }
.outra-campo:focus { outline: none; border-bottom: 2px solid var(--oxblood); background-color: var(--tint); }

/* A required blank still empty after a send: marked in oxblood, the reason just under its sentence */
.erro-campo { display: flex; gap: 8px; align-items: flex-start; margin: -.5em 0 1.1em; font-family: var(--q); font-weight: 600; font-size: 16px; line-height: 1.4; color: var(--oxblood); }
.erro-campo::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--oxblood) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M9 4.5v5.5M9 12.6v.4' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.campo input[aria-invalid="true"]::placeholder { color: var(--oxblood); }
.consent:has(input[aria-invalid="true"]) input { outline: 2px solid var(--oxblood); outline-offset: 2px; }
.paragrafo:last-of-type .erro-campo { margin: 12px 0 0; }
@media (max-width: 640px) {
  .fotos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .salas-fim { padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .divs, .divs::after, .foto, .foto img, .foto .nome::before, .foto .anel, .passo, .fotos li.sim .passo, .passo button, .salas, .salas[data-aberto="true"] { transition: none; }
  .foto:active, .passo button:active, .passo { transform: none; }
}
#enviar[aria-disabled="true"] { cursor: progress; }
.divs, .passo button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
