/* Double Dogz — tokens from the Brand Book (plates 12, 13, 14) */

@font-face { font-family: "Sora"; src: url("fonts/Sora-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --obsidian: #101012;
  --bone: #f2f0eb;
  --electric: #5938f5;
  --concrete: #929096;
  --haze: #a99bc7;
  --mist: rgb(208 221 255 / .62);

  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  /* 8-point scale */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px;
  --s6: 64px; --s7: 96px; --s8: 128px; --s9: 160px;

  --gutter: clamp(16px, 6.25vw, 120px);
  --dobra: 192px;
  --max: 1680px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--obsidian);
  color: var(--bone);
  font: 400 18px/28px var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
main, .foot { overflow-x: clip; }
a { color: inherit; }
ul, ol { list-style: none; }
::selection { background: var(--electric); color: var(--bone); }
:focus-visible { outline: 2px solid var(--electric); outline-offset: 4px; }

.skip {
  position: absolute; left: var(--s2); top: -100px; z-index: 20;
  background: var(--electric); color: var(--bone); padding: var(--s1) var(--s2);
}
.skip:focus { top: var(--s2); }

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

/* Line breaks: headings balance their lines, running text avoids a lone last word */
h1, h2, .t3, .t4, .words li { text-wrap: balance; }
p, li { text-wrap: pretty; }

/* Type roles — plate 14 */
.display { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; font: 600 clamp(40px, 7vw, 112px)/0.95 var(--font-display); letter-spacing: -0.045em; }
.statement { font: 600 clamp(48px, 8.4vw, 136px)/0.98 var(--font-display); letter-spacing: -0.045em; max-width: 13ch; }
.t1 { font: 600 clamp(40px, 6.25vw, 96px)/1 var(--font-display); letter-spacing: -0.04em; }
.t3 { font: 600 clamp(24px, 2.6vw, 32px)/1.25 var(--font-display); letter-spacing: -0.02em; }
.t4 { font: 600 24px/32px var(--font-display); letter-spacing: -0.02em; }
.meta, .num {
  font: 500 13px/20px var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.num { color: var(--electric); }
.electric { color: var(--electric); }
.haze { color: var(--haze); }
.mist { color: var(--mist); }

/* Brand marks: SVG as mask, so the color follows `currentColor` */
.mark {
  display: block;
  background: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat;
  mask: var(--src) center / contain no-repeat;
}
.mark-dd { --src: url("img/dd.svg"); aspect-ratio: 814 / 240; }
.mark-seal { --src: url("img/selo.svg"); aspect-ratio: 1; }
.mark-word { --src: url("img/word.svg"); aspect-ratio: 1186 / 67; }

/* Header */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s2) var(--gutter);
  color: var(--bone);
  /* glass surface: translucent Obsidian over a blurred page */
  background: rgb(16 16 18 / .72);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid rgb(242 240 235 / .1);
}
.top-mark { display: block; width: 72px; }
.top-nav { display: flex; gap: var(--s4); }
.top-nav a {
  font: 500 13px/20px var(--font-body); letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; padding: var(--s1) 0;
}
.top-nav a:hover { text-decoration: underline; text-underline-offset: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; min-height: 56px; padding: 0 var(--s4);
  font: 600 16px/1 var(--font-display); text-decoration: none;
  border: 1.5px solid var(--bone);
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn-primary { background: var(--electric); border-color: var(--electric); color: var(--bone); }
.btn-primary:hover { background: var(--bone); border-color: var(--bone); color: var(--obsidian); }

/* Speech balloon: the call to action is a bark, with a tail that wags on hover */
.btn-primary {
  position: relative; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px;
  padding: 14px 24px; gap: 0;
  font-size: 18px; border-radius: 28px;
}
.btn-note { font: italic 400 15px/20px var(--font-body); white-space: nowrap; max-width: 0; max-height: 0; opacity: 0; overflow: hidden; transition: max-width .3s var(--ease), max-height .3s var(--ease), opacity .3s var(--ease), margin-top .3s var(--ease); }
.btn-primary:hover .btn-note, .btn-primary:focus-visible .btn-note { max-width: 240px; max-height: 24px; margin-top: 2px; opacity: .85; }
@media (hover: none) { .btn-note { max-width: 240px; max-height: 24px; margin-top: 2px; opacity: .85; } }
/* the tail is the dog's own: it slides up from behind the balloon on hover and wags */
.btn-primary { --b: var(--electric); background: var(--b); }
.btn-primary:hover { --b: var(--bone); }
.btn-rabo {
  position: absolute; left: 4px; bottom: calc(100% - 24px); z-index: -1;
  width: 15px; height: 45px; fill: var(--b); rotate: -38deg;
  opacity: 0; transform: translate(16px, 28px); transform-origin: 32% 97%;
  transition: transform .35s var(--ease), opacity .2s var(--ease);
}
.btn-primary:hover .btn-rabo, .btn-primary:focus-visible .btn-rabo { opacity: 1; transform: none; animation: wag .5s ease-in-out .35s infinite; }

/* Hero — asymmetric, dogs bleed off the right edge (plate 15) */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid rgb(146 144 150 / .24); /* the floor the dogs stand on */
  min-height: 100svh;
  padding: 80px 0 0;
  display: flex; align-items: center;
}
.hero-copy { position: relative; z-index: 1; }
/* Film grain, the Humandone tile: it lives on each fold's surface (behind the content), so the photos, type and dogs sit above it and read with depth */
.hero, .band, .contrast-side, .foot { position: relative; isolation: isolate; }
.hero::before, .band::before, .contrast-side::before, .foot::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("img/grain.png") repeat; animation: tremor 1.2s steps(3) infinite both;
}
@keyframes tremor {
  0% { background-position: 0 0; } 20% { background-position: -40px 24px; } 40% { background-position: 24px -48px; }
  60% { background-position: -64px 8px; } 80% { background-position: 48px 40px; } 100% { background-position: -24px -16px; }
}
.hero-copy .meta-bar { margin-bottom: var(--s4); }
.meta .dot { color: var(--electric); margin: 0 4px; }
.meta .seg { white-space: nowrap; }
.display + .cta-row { margin-top: var(--s6); }
.cta-row { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); }
.hero-dogs {
  position: absolute; right: -6.7vw; bottom: -2px;
  width: min(33.3vw, 640px);
  pointer-events: none;
}

/* The dogs: tail wags, the motion ticks blink, the left dog sniffs */
.dogs { display: block; width: 100%; height: auto; overflow: visible; fill: var(--bone); }
.dog-tick { fill: var(--electric); }
.dog-tail { transform-box: view-box; transform-origin: 596px 186px; animation: wag .9s ease-in-out infinite; }
.dog-tick { transform-box: view-box; transform-origin: 700px 110px; animation: tick .9s ease-in-out infinite; }
.dog-tick-2 { animation-delay: .12s; }
.dog-left { animation: sniff 2.4s ease-in-out infinite; }
.hero:hover .dog-tail, .hero:hover .dog-tick { animation-duration: .36s; }
@keyframes wag { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(9deg); } }
@keyframes tick { 0%, 100% { opacity: .25; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes sniff { 0%, 60%, 100% { transform: translateX(0); } 70% { transform: translateX(4px); } 80% { transform: translateX(0); } 90% { transform: translateX(3px); } }

/* Bands */
.band { padding: var(--dobra) 0; }
.band-dark { background: var(--obsidian); color: var(--bone); }
.band-light { background: var(--bone); color: var(--obsidian); }
.band-light .meta { color: rgb(16 16 18 / .64); }
.band-electric { background: var(--electric); color: var(--bone); }
.band-electric .meta { color: rgb(242 240 235 / .72); }

.head { display: grid; gap: var(--s3); margin-bottom: var(--s7); }

/* Works — placeholders until real projects arrive */
.works { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
.work {
  position: relative; aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  border: 1px solid rgb(146 144 150 / .32);
  color: rgb(146 144 150 / .5);
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.work:hover { border-color: var(--electric); color: var(--electric); }
.work:nth-child(even) { margin-top: var(--s8); margin-bottom: calc(var(--s8) * -1); }
.work-num, .work-label {
  position: absolute; font: 500 13px/20px var(--font-body); letter-spacing: 0.08em; text-transform: uppercase;
}
.work-num { left: var(--s3); top: var(--s3); color: var(--electric); }
.work-label { left: var(--s3); bottom: var(--s3); color: var(--concrete); }
.work-mark { width: 28%; opacity: .5; }
.work-reco { padding: 0; overflow: hidden; border-color: transparent; border-radius: 4px; }
.work-link { position: absolute; inset: 0; display: block; color: var(--bone); text-decoration: none; }
.work-link > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; display: block; transition: transform .6s var(--ease); }
.work-link::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(16 16 18 / .97) 0%, rgb(16 16 18 / .92) 18%, rgb(16 16 18 / .78) 34%, rgb(16 16 18 / .5) 52%, rgb(16 16 18 / .22) 68%, rgb(16 16 18 / 0) 86%); }
.work-reco .work-num, .work-reco .work-label { z-index: 1; color: var(--bone); }
.work-reco:hover { border-color: transparent; }
.work-reco:hover .work-link > img { transform: scale(1.04); }
.work-logos { position: absolute; z-index: 1; right: var(--s3); bottom: var(--s3); display: flex; gap: var(--s1); align-items: center; }
.work-logos { gap: var(--s2); }
.work-logos img { height: 28px; width: auto; display: block; }
.work-logos img + img { height: 40px; }
/* the recognition page */
.reco-page { padding-top: calc(var(--dobra) - var(--s4)); }
.reco-voltar { display: inline-block; margin-bottom: var(--s5); text-decoration: none; color: var(--concrete); }
.reco-voltar:hover { color: var(--bone); }
.reco-lead { margin-top: var(--s3); max-width: 28ch; }
.reco-fig { margin: 0; }
.reco-fig img { display: block; width: 100%; height: auto; border-radius: 16px; }
.reco-fig figcaption { margin-top: var(--s2); color: var(--concrete); font: 400 16px/24px var(--font-body); }
.reco-logos { margin-top: var(--s5); display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.reco-logos { gap: var(--s4); }
.reco-logos img { height: 56px; width: auto; display: block; }
.reco-logos img + img { height: 96px; }
.reco-fig-grande { margin-top: var(--s7); max-width: 960px; }
.reco-par { margin-top: var(--s6); display: grid; grid-template-columns: 5fr 6fr; gap: var(--s4); align-items: start; }
.reco-nota { margin-top: var(--s6); color: var(--concrete); }
#trabalhos { padding-bottom: calc(var(--s9) + var(--s8)); }

/* Studio */
.estudio-grid { display: grid; grid-template-columns: 1fr auto; gap: var(--s7); align-items: center; }
#estudio .statement { margin: 0; max-width: none; text-align: left; font-size: clamp(28px, 3.8vw, 64px); line-height: 1.3; }
.estudio-media { position: relative; width: 336px; max-width: 100%; }
/* the frame is cropped below the burned-in emoji: 616 px off the top of the 1080 x 1920 source */
.estudio-video { display: block; width: 100%; aspect-ratio: 1080 / 1304; object-fit: cover; object-position: 50% 100%; border-radius: 24px; background: var(--obsidian); }

/* Contrast — plate 05 */
.contrast { display: grid; grid-template-columns: 1fr 1fr; }
.contrast-side { padding: var(--dobra) var(--gutter); display: grid; align-content: start; gap: var(--s3); }
.contrast-light { background: var(--bone); color: var(--obsidian); border-top: 1px solid rgb(16 16 18 / .12); }
.contrast-dark { background: var(--obsidian); color: var(--bone); }
.words { margin-top: var(--s6); font: 600 clamp(24px, 2.5vw, 40px)/1.2 var(--font-display); letter-spacing: -0.02em; display: grid; }
.words li { padding: var(--s3) 0; border-top: 1px solid currentColor; border-top-color: color-mix(in srgb, currentColor 24%, transparent); }

/* Manifesto — plate 07 */
.manifesto-lines { display: grid; gap: var(--s2); font: 400 clamp(20px, 2vw, 28px)/1.4 var(--font-body); }
.manifesto-lines li { border-top: 1px solid rgb(242 240 235 / .32); padding-top: var(--s2); max-width: 40ch; }
#manifesto-title { line-height: 1.25; }
/* the fold is a column: headline on top, phrases at the bottom */
#manifesto { display: flex; min-height: 100svh; padding-bottom: var(--s7); }
#manifesto .wrap { display: flex; flex-direction: column; justify-content: space-between; gap: var(--s8); }

.som {
  position: absolute; left: 16px; bottom: 16px; padding: 8px 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgb(16 16 18 / .72); color: var(--bone); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font: 500 13px/20px var(--font-body); letter-spacing: 0.08em; text-transform: uppercase;
  transition: background .2s var(--ease);
}
.som:hover, .som[aria-pressed="true"] { background: var(--electric); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s7); align-items: center; }
.contact .t1 { margin: 0 0 var(--s3); max-width: 14ch; }
.mail {
  display: inline-flex; align-items: center; margin-top: var(--s5); padding: 16px 32px;
  background: var(--electric); color: var(--bone); border-radius: 999px;
  font: 600 clamp(18px, 1.8vw, 24px)/1.2 var(--font-display); letter-spacing: -0.02em;
  text-decoration: none; overflow-wrap: anywhere;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.mail:hover { background: var(--bone); color: var(--obsidian); }
.seal-wrap { justify-self: end; width: min(100%, 420px); color: var(--bone); }
.seal-wrap .mark-seal { animation: spin 40s linear infinite; }

/* Footer */
.foot { border-top: 1px solid rgb(146 144 150 / .24); padding: var(--s5) 0; color: var(--concrete); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.foot .mark-word { width: 220px; color: var(--bone); }
@keyframes spin { to { transform: rotate(1turn); } }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero::before, .band::before, .contrast-side::before, .foot::before, .dog-tail, .dog-tick, .dog-left, .seal-wrap .mark-seal, .btn-primary:hover .btn-rabo { animation: none; }
  .dog-tick { opacity: 1; }
}

/* Breakpoints */
@media (max-width: 900px) {
  .contrast, .contact-grid, .estudio-grid, .reco-par { grid-template-columns: 1fr; }
  .estudio-media { justify-self: start; }
  .seal-wrap { justify-self: start; width: 240px; }
  :root { --dobra: 144px; }
}

@media (max-width: 640px) {
  .top { padding: var(--s2) var(--gutter); }
  .top-mark { width: 56px; }
  .top-nav { gap: var(--s2); }
  .top-nav a:not(.top-cta) { display: none; }
  .hero { display: block; min-height: 0; padding: var(--s8) 0 0; }
  .hero-dogs { position: relative; right: auto; bottom: auto; width: 85%; margin: var(--s6) 0 -2px 8%; }
  .works { grid-template-columns: 1fr; gap: var(--s2); }
  .work:nth-child(even) { margin: 0; }
  #trabalhos { padding-bottom: var(--s8); }
  .head { margin-bottom: var(--s5); }
  .cta-row .btn { min-width: 200px; justify-content: center; }
}
