/* Poco a Poco: the Azulejos intro, for the web. Palette and type from MFLSocialProduction/branding/poco-a-poco.html. */
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap; src: url(/fonts/fraunces-italic.woff2) format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 600; font-display: swap; src: url(/fonts/caveat-600.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 400; font-display: swap; src: url(/fonts/dm-sans-400.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 600; font-display: swap; src: url(/fonts/dm-sans-600.woff2) format("woff2"); }

:root {
  --paper: #F6F0E4; --tile: #F4EFE6; --grout: #d8cfbd;
  --clay: #8A3B23; --terra: #B9573A; --blue: #1E4C8F; --ochre: #D99A2B;
  --ink: #2b2420; --muted: #6b5d52;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 400 18px/1.55 "DM Sans", system-ui, sans-serif;
  background: url(/img/plaster.svg), url(/img/wash.svg) center top / cover no-repeat, var(--paper);
}
a { color: var(--blue); text-underline-offset: .15em; overflow-wrap: anywhere; }
a:hover { color: var(--clay); }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; }
.small { font-size: .85rem; color: var(--muted); }

/* The wall: tiles go down poco a poco, faster and faster, then the card lands. */
.hero { position: relative; display: grid; place-items: center; overflow: hidden; border-bottom: 8px solid var(--blue); box-shadow: 0 4px 0 var(--ochre); }
.wall { display: grid; grid-template-columns: repeat(8, 1fr); width: 100%; aspect-ratio: 8 / 5; }
.wall i { aspect-ratio: 1; background: url(/img/tile.svg) center / 100% 100%; }
.wall i:nth-child(n+41) { display: none; }
@media (min-width: 760px) {
  .wall { grid-template-columns: repeat(16, 1fr); aspect-ratio: 16 / 4; }
  .wall i:nth-child(n+41) { display: block; }
}
.cartouche {
  position: absolute; text-align: center; background: var(--paper);
  border: 4px solid var(--blue); box-shadow: 0 0 0 7px var(--paper), 0 14px 30px rgba(0, 0, 0, .25);
  padding: .9em 1.6em 1em; max-width: calc(100% - 48px);
}
.title { margin: 0; font: italic 600 clamp(44px, 12vw, 112px)/1 "Fraunces", Georgia, serif; font-variation-settings: "opsz" 144; color: var(--clay); white-space: nowrap; }
.with { margin: .12em 0 0; font: 600 clamp(24px, 6.4vw, 52px)/1.1 "Caveat", cursive; color: var(--blue); }
.tag { margin: .7em 0 0; font: 600 clamp(10px, 2.6vw, 15px)/1 "DM Sans", sans-serif; letter-spacing: .35em; text-transform: uppercase; color: var(--terra); }

@media (prefers-reduced-motion: no-preference) {
  .wall i { animation: settle .24s cubic-bezier(.2, .7, .3, 1) both; }
  .wall .g1 { animation-delay: .3s; } .wall .g2 { animation-delay: .55s; } .wall .g3 { animation-delay: .75s; }
  .wall .g4 { animation-delay: .9s; } .wall .g5 { animation-delay: 1.02s; }
  .cartouche { animation: land .36s cubic-bezier(.2, .7, .3, 1) 1.15s both; }
}
@keyframes settle { from { opacity: 0; transform: scale(.6); } }
@keyframes land { from { transform: scale(1.12); } }

/* Sections */
/* One centred column for text, cards and videos, so the left edges line up under the hero. */
main, footer { max-width: 712px; margin: 0 auto; padding: 0 16px; }
section { padding: 40px 0 8px; }
h2 { margin: 0 0 .2em; font: italic 600 clamp(30px, 7vw, 44px)/1.1 "Fraunces", Georgia, serif; font-variation-settings: "opsz" 144; color: var(--clay); }
h3 { margin: 0 0 .3em; font: italic 600 1.45rem/1.2 "Fraunces", Georgia, serif; color: var(--clay); }
.lede { margin: 0 0 1.4em; color: var(--muted); }
.intro { padding-top: 36px; font-size: 1.15rem; }
.intro p { margin: 0; }
.soon { font: 600 clamp(26px, 6vw, 36px)/1.2 "Caveat", cursive; color: var(--blue); margin: 0; }

/* Videos: a thumbnail and a play button; YouTube loads only on press. */
.videos { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.videos .latest { grid-column: 1 / -1; }
.video h3 { margin-top: .55em; font-size: 1.25rem; }
.video .latest-label { display: block; font: 600 .75rem "DM Sans", sans-serif; letter-spacing: .25em; text-transform: uppercase; color: var(--terra); margin-top: .8em; }
.player { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #1b1b1b; border: 4px solid var(--blue); box-shadow: 0 0 0 4px var(--paper), 0 10px 24px rgba(0, 0, 0, .18); }
.player img { width: 100%; height: 100%; object-fit: cover; display: block; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .play { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; background: var(--clay); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); transition: transform .15s; }
.player .play::after { content: ""; position: absolute; left: 29px; top: 22px; border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent var(--paper); }
.player:hover .play { transform: scale(1.08); background: var(--terra); }
.video time { color: var(--muted); font-size: .9rem; }

/* Socials */
.socials { list-style: none; margin: 1em 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.socials a { display: inline-block; padding: .45em 1em; border: 2px solid var(--blue); border-radius: 999px; background: var(--paper); text-decoration: none; font-weight: 600; }
.socials a:hover { background: var(--blue); color: var(--paper); }

/* What we're making, and things we use */
.brands, .recs { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.brand, .rec { background: var(--paper); border: 3px solid var(--blue); border-radius: 6px; padding: 18px 20px; box-shadow: 0 0 0 5px var(--paper); }
.brand p, .rec p { margin: 0 0 .5em; }
.brand h3 a, .rec h3 a { color: var(--clay); text-decoration-color: var(--ochre); }
.rec .aff { display: inline-block; font: 600 .7rem "DM Sans", sans-serif; letter-spacing: .15em; text-transform: uppercase; color: var(--terra); }

footer { padding-top: 48px; padding-bottom: 40px; margin-top: 40px; border-top: 2px solid var(--grout); text-align: center; }
footer .socials { justify-content: center; margin-bottom: 1.2em; }
.sign { margin: 0; font: italic 600 1.6rem "Fraunces", Georgia, serif; color: var(--clay); }
.sign span { display: block; font: 600 1.3rem "Caveat", cursive; color: var(--blue); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* EN / ES, top corner of the header */
.langs { position: absolute; top: 12px; right: 12px; display: flex; gap: 2px; background: var(--paper); border: 2px solid var(--blue); border-radius: 999px; padding: 3px; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }
.langs a { font: 600 .8rem/1 "DM Sans", sans-serif; letter-spacing: .12em; text-decoration: none; padding: .5em .8em; border-radius: 999px; color: var(--blue); }
.langs a[aria-current] { background: var(--blue); color: var(--paper); }
.title a { color: inherit; text-decoration: none; }

/* Inner pages: a shorter wall on wide screens (phones keep the full wall so the card fits) */
.hero-small .title { font-size: clamp(36px, 9vw, 72px); }
@media (min-width: 760px) {
  .hero-small .wall { aspect-ratio: 16 / 3; }
  .hero-small .wall i:nth-child(n+49) { display: none; }
}
.prose h1 { margin: 0 0 .4em; font: italic 600 clamp(32px, 8vw, 48px)/1.1 "Fraunces", Georgia, serif; font-variation-settings: "opsz" 144; color: var(--clay); }
.prose h2 { font-size: 1.6rem; margin-top: 1.4em; }
.prose li { margin-bottom: .5em; }

/* Contact form */
.contact { display: grid; gap: 14px; margin-top: 1.2em; }
.contact[hidden] { display: none; }
.contact label { display: grid; gap: 4px; font-weight: 600; }
.contact input, .contact textarea { font: 400 1rem/1.4 "DM Sans", sans-serif; color: var(--ink); background: #fffdf8; border: 2px solid var(--grout); border-radius: 6px; padding: .6em .7em; width: 100%; }
.contact input:focus, .contact textarea:focus { border-color: var(--blue); outline: none; }
.contact button { justify-self: start; font: 600 1rem "DM Sans", sans-serif; color: var(--paper); background: var(--clay); border: 0; border-radius: 999px; padding: .7em 1.6em; cursor: pointer; }
.contact button:hover { background: var(--terra); }
.contact button:disabled { opacity: .6; cursor: wait; }
.contact .status { margin: 0; font-weight: 600; color: var(--blue); }
.contact .status:empty { display: none; }
