/* ============================================================================
   CAVALO MANCO — the studio home
   The desk, seen from above, with each app lying on it in its own material:
   Listinhas is a torn receipt, Pontinhos is a leaf of squared paper. The page
   itself stays quiet (cream type on graphite) so the apps carry the colour.
   Loaded only on "/" — the shared system lives in application.css.
   ========================================================================== */

.studio {
  width: min(1080px, 100% - 2.5rem);
  margin-inline: auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(1rem, 3vw, 1.7rem) 0 clamp(1.6rem, 4vw, 2.6rem);
  color: var(--on-desk);
}

/* ---- header --------------------------------------------------------------- */
.studio-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.studio-top .brand { font-size: 1.5rem; }
.studio-top .brand-by { color: #9c8f75; }

.studio-nav { display: flex; align-items: center; gap: 1.2rem; }
.studio-nav a, .studio-nav-btn {
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .04em;
  color: var(--on-desk-soft); text-decoration: none;
  background: none; border: none; padding: .3rem 0; cursor: pointer;
}
.studio-nav a:hover, .studio-nav-btn:hover { color: var(--on-desk-strong); }
.studio-nav form { margin: 0; }

/* ---- hero ----------------------------------------------------------------- */
/* headline and blurb share a line on a wide screen, so the apps themselves
   stay above the fold — they are what this page is for */
.studio-hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: .6rem 3rem;
  align-items: end;
  padding: clamp(1.8rem, 6vw, 3.4rem) 0 clamp(1.4rem, 4vw, 2.4rem);
}
.studio-hero .kicker { grid-column: 1 / -1; display: block; margin-bottom: .6rem; }
.studio-hero h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2.1rem, 5.2vw, 3.5rem);
  color: var(--on-desk-strong);
}
.studio-hero h1 em { font-style: italic; color: #c9b78f; }
.studio-lede {
  margin: 0 0 .5rem;
  max-width: 42ch;
  color: #bcae91;
  font-size: clamp(1rem, 2.2vw, 1.08rem);
  line-height: 1.65;
}

/* ---- the shelf: one object per app ---------------------------------------- */
.shelf {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-content: start;
}

.app {
  display: grid;
  grid-template-rows: auto auto;
  gap: 1.4rem;
  padding: clamp(1.3rem, 3vw, 2rem) clamp(1.2rem, 3vw, 1.8rem) clamp(1.4rem, 3vw, 1.8rem);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, .022);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.app:hover { background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.app:focus-visible { outline: 2px solid var(--stamp); outline-offset: 3px; }

/* the object sits on the desk at a slight angle, and straightens when you reach
   for it — the one bit of motion on the page */
/* both objects get the same stage, so the two cards' copy starts on the same
   line even though a receipt is tall and a note leaf is squat */
.app-thing { display: flex; justify-content: center; align-items: center; min-height: 12.5rem; }
@media (min-width: 801px) { .app-thing { height: 18rem; } }
.app-thing > * { transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.app--listinhas .app-thing > * { transform: rotate(-2.4deg); }
.app--pontinhos .app-thing > * { transform: rotate(1.9deg); }
.app--roteirinhos .app-thing > * { transform: rotate(-1.4deg); }
.app:hover .app-thing > * { transform: rotate(0) translateY(-4px); }

.app-tag {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .24em;
  text-transform: uppercase; color: #9c8f75;
}
.app-name {
  margin: .35rem 0 .5rem;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  font-weight: 900;
  color: #fbeecb;
}
.app--listinhas .app-name-accent { color: var(--brand); }
.app--pontinhos .app-name-accent { color: var(--pt-blue-lite); }
.app--roteirinhos .app-name-accent { color: #f1b72c; }
.app-say p { margin: 0 0 1rem; color: #b6a98d; font-size: .98rem; line-height: 1.6; max-width: 38ch; }
.app-go {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: .76rem; letter-spacing: .08em; text-transform: uppercase;
  color: #e0d0ab;
}
.app-go em { font-style: normal; transition: transform .2s ease; }
.app:hover .app-go em { transform: translateX(4px); }
.app--listinhas:hover .app-go { color: var(--stamp); }
.app--pontinhos:hover .app-go { color: var(--pt-blue-lite); }
.app--roteirinhos:hover .app-go { color: #f1b72c; }

/* ---- object 1: a torn receipt (Listinhas) --------------------------------- */
.mini-receipt {
  width: 15rem;
  padding: 1.5rem 1.15rem;
  font-size: .82rem;
  box-shadow: var(--lift);
}
.mini-stamp {
  text-align: center;
  font-family: var(--font-mono); font-size: .58rem; letter-spacing: .26em;
  text-transform: uppercase; color: var(--stamp);
}
.mini-receipt .tearline { margin: .8rem 0; }
.mini-line { display: flex; align-items: baseline; gap: .4rem; padding: .22rem 0; color: var(--ink); }
.mini-line i { flex: 1; border-bottom: 1px dotted var(--rule); }
.mini-line .mono { font-size: .72rem; color: var(--ink-soft); }
.mini-line.is-done { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--olive); }
.mini-total {
  display: flex; justify-content: space-between;
  font-size: .72rem; color: var(--ink-soft);
}

/* ---- object 2: a leaf of squared paper (Pontinhos) ------------------------ */
.mini-sheet {
  width: 16.5rem;
  padding: 1rem 1rem 1.4rem;
  border-radius: 2px;
  color: var(--pt-ink);
  background-color: var(--pt-sheet);
  background-image:
    linear-gradient(var(--pt-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--pt-grid) 1px, transparent 1px);
  background-size: 22px 22px;
  box-shadow: var(--lift);
}
.mini-sheet-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: .5rem;
  font-family: var(--font-hand); font-size: 1.1rem;
  padding-bottom: .5rem;
  border-bottom: 1.5px solid rgba(35, 44, 55, .25);
}
.mini-goal {
  font-family: var(--font-mono); font-size: .56rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--pt-ink-soft);
}
.mini-cols { display: grid; grid-template-columns: 1fr 1fr; }
.mini-col { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .8rem .5rem 0; }
.mini-col--b { border-left: 1.5px solid rgba(35, 44, 55, .25); }
.mini-team { font-family: var(--font-hand); font-size: 1.05rem; color: var(--pt-ink); }
.mini-num {
  font-family: "Big Shoulders Display", var(--font-mono), sans-serif;
  font-weight: 700; font-size: 2.1rem; line-height: .9;
  font-variant-numeric: tabular-nums;
}
.mini-col .mini-num { color: var(--pen-grafite); }
.mini-col--b .mini-num { color: var(--pen-vermelha); }
.mini-risks { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem; margin-top: .25rem; }
.mini-risks .risco { width: 24px; height: 24px; stroke-width: 3; }

/* ---- object 3: a piece of strip map (Roteirinhos) ------------------------ */
.mini-strip {
  position: relative;
  width: 15.5rem;
  padding: .9rem 1rem 1.1rem;
  border-radius: 3px;
  color: #1b2622;
  background: #eff0ea;
  font-family: "Overpass", var(--font-body);
  box-shadow: var(--lift);
}
.mini-strip-day {
  display: flex; align-items: center; gap: .6rem;
  padding-bottom: .55rem; margin-bottom: .35rem;
  border-bottom: 1px solid rgba(27, 38, 34, .14);
  font-size: .78rem; font-weight: 800; line-height: 1.15;
}
.mini-strip-day b { font-size: 2rem; font-weight: 900; line-height: .85; letter-spacing: -.04em; width: 2.6rem; text-align: right; }
.mini-strip-day i { font-style: normal; font-weight: 600; color: #4a5751; }
.mini-strip-road {
  position: absolute; left: calc(1rem + 3rem); top: 3.6rem; bottom: .9rem;
  width: 7px; border-radius: 4px;
  background: #f1b72c; box-shadow: 0 0 0 1.5px #1b2622;
}
.mini-strip-done { position: absolute; inset: 0 0 auto; height: 2.6rem; background: #a3aba6; border-radius: 4px 4px 0 0; }
.mini-stop { position: relative; display: flex; align-items: center; gap: .55rem; padding: .42rem 0; font-size: .78rem; font-weight: 600; }
.mini-t { width: 2.6rem; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.mini-pin { position: relative; z-index: 1; flex: none; width: 14px; height: 14px; margin-left: 0; border: 2px solid #1b2622; border-radius: 50%; background: #f8f8f4; translate: 1px 0; }
.mini-stop.is-past { color: #7a857f; }
.mini-stop.is-past .mini-pin { border-color: #a3aba6; }
.mini-here { position: relative; z-index: 2; height: 0; }
.mini-here svg { position: absolute; left: calc(3rem - 7px); top: -5px; width: 17px; height: 19px; fill: #d1392b; stroke: #f8f8f4; stroke-width: 2.4; stroke-linejoin: round; }

/* ---- footer --------------------------------------------------------------- */
.studio-foot {
  display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; justify-content: space-between;
  margin-top: clamp(2.4rem, 6vw, 4rem);
  padding-top: 1.2rem;
  border-top: 1px solid var(--desk-line);
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em;
  color: #8e8268;
}

@media (max-width: 800px) {
  .studio-hero { grid-template-columns: 1fr; gap: 1rem; }
  .studio-hero h1 { max-width: 20ch; }
  .shelf { grid-template-columns: 1fr; }
  .app { grid-template-columns: auto 1fr; grid-template-rows: none; gap: 1.1rem; align-items: center; }
  .app-thing { min-height: 0; }
  .mini-receipt, .mini-sheet, .mini-strip { width: 9.5rem; padding: 1rem .8rem; font-size: .72rem; }
  .mini-strip { width: 11rem; padding: .7rem .6rem; }
  .mini-strip-road { left: calc(.6rem + 3rem); }
  .mini-sheet { background-size: 16px 16px; }
  .mini-num { font-size: 1.5rem; }
  .mini-risks .risco { width: 17px; height: 17px; }
  .mini-sheet-head, .mini-team { font-size: .92rem; }
  .mini-goal { display: none; }
  .app-say p { font-size: .9rem; }
}

@media (max-width: 460px) {
  .studio-hero { padding-top: 2rem; }
  .app { grid-template-columns: 1fr; }
  .app-thing { justify-content: flex-start; }
  .mini-receipt, .mini-sheet, .mini-strip { width: 12rem; }
}

/* ---- the fine print (/termos, /privacidade) ------------------------------- */
.studio-foot a { color: inherit; text-decoration: none; }
.studio-foot a:hover { color: var(--on-desk-strong); }

.legal {
  flex: 1;
  width: 100%;
  max-width: 64ch;
  padding: clamp(1.8rem, 6vw, 3.2rem) 0 0;
  color: #cbbd9f;
  font-size: 1rem;
  line-height: 1.7;
}
.legal .kicker { display: block; margin-bottom: .6rem; }
.legal h1 { margin: 0; font-size: clamp(2rem, 5vw, 3rem); color: var(--on-desk-strong); }
.legal-date { margin: .5rem 0 1.8rem; font-size: .74rem; letter-spacing: .04em; color: #8e8268; }
.legal h2 {
  margin: 2rem 0 .5rem;
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.25rem; color: var(--on-desk);
}
.legal p { margin: 0 0 1rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.legal li { margin-bottom: .7rem; }
.legal b { color: var(--on-desk); font-weight: 600; }
.legal a { color: #e0d0ab; text-underline-offset: 3px; }
.legal a:hover { color: var(--on-desk-strong); }

/* ---- light desk ----------------------------------------------------------- */
.studio-nav .theme-toggle { color: var(--on-desk-soft); }
.studio-nav .theme-toggle:hover { color: var(--on-desk-strong); }

[data-theme="light"] .studio-top .brand-by { color: var(--on-desk-faint); }
[data-theme="light"] .studio-hero h1 em { color: #7d6646; }
[data-theme="light"] .studio-lede { color: var(--on-desk-soft); }
[data-theme="light"] .studio-foot { color: var(--on-desk-faint); }
[data-theme="light"] .legal { color: #3d4149; }
[data-theme="light"] .legal-date { color: var(--on-desk-faint); }
[data-theme="light"] .legal a { color: var(--brand-on-desk); }

/* the app cards: a faint lift off the desk instead of a faint glow */
[data-theme="light"] .app { background: rgba(255, 255, 255, .34); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .07); }
[data-theme="light"] .app:hover { background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
[data-theme="light"] .app-tag { color: var(--on-desk-faint); }
[data-theme="light"] .app-name { color: var(--on-desk-strong); }
[data-theme="light"] .app--listinhas .app-name-accent { color: var(--brand-on-desk); }
[data-theme="light"] .app--pontinhos .app-name-accent { color: var(--pt-on-desk); }
[data-theme="light"] .app-say p { color: var(--on-desk-soft); }
[data-theme="light"] .app-go { color: var(--on-desk); }
[data-theme="light"] .app--listinhas:hover .app-go { color: var(--brand-on-desk); }
[data-theme="light"] .app--pontinhos:hover .app-go { color: var(--pt-on-desk); }

[data-theme="light"] .app--roteirinhos .app-name-accent,
[data-theme="light"] .app--roteirinhos:hover .app-go { color: #9a6b00; }

/* three apps share one row once there is room for three */
@media (min-width: 1000px) {
  .shelf { grid-template-columns: repeat(3, 1fr); }
}

/* ===========================================================================
   COM O JEITINHO — the studio's own colours
   The apps keep their materials; the studio wears the flag. Its name goes
   green and blue (green and yellow on the dark desk), "jeitinho" is painted
   in, and the footer walks over a stretch of calçadão de Copacabana.
   ========================================================================= */
.brand--studio .brand-name { color: var(--br-verde); }
.brand--studio .brand-accent { color: var(--br-azul); }

.studio-hero h1 { max-width: 18ch; }

/* green ink on a stroke of yellow paint, slightly crooked, like it was done by hand */
.jeitinho {
  position: relative;
  display: inline-block;
  padding: 0 .16em .04em;
  margin: 0 -.04em;
  font-style: italic;
  color: var(--br-tinta);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 60' preserveAspectRatio='none'%3E%3Cpath fill='%23ffd60a' d='M6 20c30-9 70-12 120-12 52 0 110 2 166 6 6 1 8 6 6 11l-3 16c-1 6-5 10-11 11-48 5-104 7-160 6-40-1-80-3-114-6-6-1-9-5-9-10l1-14c0-4 2-7 4-8z'/%3E%3Cpath fill='%23f2c200' d='M20 44c60 4 150 5 250 0l-2 5c-90 5-180 5-246 0z' opacity='.7'/%3E%3C/svg%3E") center 58% / 100% 82% no-repeat;
  transform: rotate(-1.5deg);
}
/* the green of the flag underlines the yellow, so it reads as both */
.jeitinho::after {
  content: "";
  position: absolute; left: .12em; right: .2em; bottom: -.06em;
  height: .07em; border-radius: .05em;
  background: #009c3b;
  transform: rotate(.6deg);
}

/* pedra portuguesa: the black-and-white waves of the Copacabana sidewalk */
.calcadao {
  height: 22px;
  margin-top: clamp(2.4rem, 6vw, 4rem);
  background: var(--on-desk);
  opacity: .16;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='22' viewBox='0 0 88 22'%3E%3Cpath d='M0 11C11 0 33 0 44 11S77 22 88 11V22H0z'/%3E%3C/svg%3E") repeat-x left center / 88px 22px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='22' viewBox='0 0 88 22'%3E%3Cpath d='M0 11C11 0 33 0 44 11S77 22 88 11V22H0z'/%3E%3C/svg%3E") repeat-x left center / 88px 22px;
}
.calcadao + .studio-foot { margin-top: 0; border-top: none; }
