/* tarrafa.club: one flat colour, one typeface, two sizes. The net is the
   only picture until there are photos of real sessions. */

:root {
  --ash: #17403a;
  --cream: #fbf3e7;
  --cream-soft: rgba(251, 243, 231, 0.64);
  --rule: rgba(251, 243, 231, 0.2);
  /* the tarrafa's strands, one flat colour a shade off the page (net.js) */
  --net-fill: #2a5a52;

  --gutter: clamp(1rem, 0.6rem + 1.6vw, 2rem);
  --type-l: clamp(1.75rem, 1.05rem + 2.7vw, 3.4rem);
  --type-m: clamp(1.0625rem, 0.98rem + 0.4vw, 1.3125rem);
  --type-s: 0.875rem;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  background: var(--ash);
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--ash);
  color: var(--cream);
  font: 400 var(--type-m) / 1.4 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

/* Header: the wordmark and the pre-sale link stay put while the page
   moves under them, as Sink's do. */
.top {
  position: fixed;
  z-index: 10;
  inset: 0 0 auto 0;
  display: flex;
  justify-content: space-between;
  /* top, not centre: the wordmark grows into the ring (ring.js) and the link stays put */
  align-items: flex-start;
  padding: var(--gutter);
  font-size: var(--type-l);
  line-height: 1.05;
  letter-spacing: -0.015em;
  pointer-events: none;
}

.top a {
  position: relative;
  isolation: isolate;
  pointer-events: auto;
  text-decoration: none;
}

/* No band across the page: the text scrolls up past the header, as on Sink.
   Only the wordmark (left) and the menu (right) sit on a patch of the page
   colour, so the text slides under them and never over them (founder,
   9 Nov 2026). The patch reaches the screen's edge and fades on its inner
   sides. */
.top__mark::before,
.top nav::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(-1 * var(--gutter));
  bottom: -0.45em;
  background: var(--ash);
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 0.45em), transparent), var(--patch-side);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, #000 calc(100% - 0.45em), transparent), var(--patch-side);
  mask-composite: intersect;
}

.top__mark::before {
  left: calc(-1 * var(--gutter));
  right: -0.9em;
  --patch-side: linear-gradient(to right, #000 calc(100% - 0.9em), transparent);
}

.top nav::before {
  right: calc(-1 * var(--gutter));
  left: -0.9em;
  --patch-side: linear-gradient(to left, #000 calc(100% - 0.9em), transparent);
}

.top__mark svg {
  display: block;
  /* one line of the header, so the sentence under it starts where it did */
  height: calc(var(--type-l) * 1.05);
  width: auto;
  fill: var(--cream);
  /* the letters swing out of the box on their way to the ring */
  overflow: visible;
}

/* The menu, stacked on the right (founder, 9 Nov 2026): saunas, reservas, membros, sessões. */
.top nav {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.12em;
  font-size: 0.6em;
  line-height: 1.15;
}

.top nav a {
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

/* Hero: the sentence that starts with the name in the header, set in
   steps under it, and the net behind. */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 30rem;
  overflow: hidden;
}

.loyly {
  /* Fixed like Sink's rock: net.js shrinks it into the top of the header
     and opens it as the page scrolls. Above everything so it stays over the
     header's band; it takes no clicks, the hero under it does. */
  position: fixed;
  z-index: 11;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  pointer-events: none;
  transform-origin: 50% 50%;
  will-change: transform;
}

.tarrafa-net {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  animation: rise 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* The net is turned and thrown from the hero, under the fixed layer.
   A phone still scrolls the page over it; sideways turns it. */
.has-net .hero {
  cursor: grab;
  touch-action: pan-y;
}

.has-net .hero.is-dragging { cursor: grabbing; }

@keyframes rise {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero h1 {
  /* The subtitle sits at the foot of the first screen, in lower case like
     the menu, centred under the net (9 Nov 2026). */
  position: absolute;
  text-align: center;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: var(--gutter);
  padding-bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px));
  font-weight: 400;
  font-size: var(--type-l);
  line-height: 1.3;
  letter-spacing: -0.015em;
  pointer-events: none;
}

.hero h1 span { display: block; }
.hero h1 .name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.hero h1 .s2 { padding-left: 4.8em; }

/* Sections: a small label on the left, the text on the right. */
.part {
  display: grid;
  /* The label column is only as wide as the longest label ("Entrar na rede"), not a quarter of the page. */
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem var(--gutter);
  padding: clamp(3.5rem, 2rem + 6vw, 7rem) var(--gutter);
  border-top: 1px solid var(--rule);
}

.part > h2 {
  margin: 0;
  font-weight: 400;
  font-size: var(--type-s);
  letter-spacing: 0.02em;
  color: var(--cream-soft);
}

.part__body { max-width: 46rem; }

.lead {
  margin: 0 0 1.4em;
  font-size: var(--type-l);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

/* A smaller lead, between the body text and --type-l (the rede line, founder 9 Nov 2026). */
.lead--s { font-size: clamp(1.3rem, 1rem + 1.3vw, 2.1rem); }

.part__body p { margin: 0 0 1em; }

.facts {
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 0.6em 0;
  border-top: 1px solid var(--rule);
}

/* Pre-sale: a plain list of what you can ask for, no prices yet. */
.prices {
  margin: 0 0 1.6em;
  padding: 0;
  list-style: none;
}

.price {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.2em 1rem;
  padding: 1.1em 0;
  border-top: 1px solid var(--rule);
}

.price:last-child { border-bottom: 1px solid var(--rule); }

.price__name {
  font-size: var(--type-l);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.price__note {
  color: var(--cream-soft);
  font-size: var(--type-s);
}

.price__buy {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

.button {
  display: inline-block;
  padding: 0.55em 1.1em;
  border: 1px solid var(--cream);
  border-radius: 999px;
  background: transparent;
  color: var(--cream);
  font: inherit;
  font-size: var(--type-s);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.button--solid {
  background: var(--cream);
  color: var(--ash);
}

.button--solid:hover {
  background: transparent;
  color: var(--cream);
}

.small {
  color: var(--cream-soft);
  font-size: var(--type-s);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.6em;
}

/* Questions. */
.faq details {
  border-top: 1px solid var(--rule);
}

.faq details:last-child { border-bottom: 1px solid var(--rule); }

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9em 0;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  color: var(--cream-soft);
}

.faq details[open] summary::after { content: "−"; }

.faq details p {
  margin: 0 0 1em;
  color: var(--cream-soft);
}

/* Footer: the ring and the year. */
.foot {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: var(--gutter);
  padding: clamp(3rem, 2rem + 4vw, 5rem) var(--gutter) var(--gutter);
  border-top: 1px solid var(--rule);
  font-size: var(--type-s);
  color: var(--cream-soft);
}

/* The wordmark straight in the footer; the ring is the header's, once the page scrolls. */
.foot svg {
  display: block;
  width: clamp(9rem, 6rem + 10vw, 16rem);
  height: auto;
  fill: var(--cream);
}

.foot__links {
  display: grid;
  gap: 0.2rem;
  justify-items: end;
}


@media (max-width: 720px) {
  .part {
    grid-template-columns: 1fr;
  }


  .price {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 420px) {
  :root { --type-l: 1.6rem; }
  .hero h1 .s2 { padding-left: 3.2em; }
}

/* Numbered steps (Para empresas, on the home and on /espacos/). */
.steps {
  margin: 1.4em 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 2.2em 1fr;
  padding: 0.6em 0;
  border-top: 1px solid var(--rule);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  color: var(--cream-soft);
}

.steps li:last-child { border-bottom: 1px solid var(--rule); }

.foot__links a { text-decoration-thickness: 1px; text-underline-offset: 0.14em; }

/* The two ways in (home), then the steps: one rule between them, not two. */
.prices + .steps li:first-child { border-top: 0; }

/* Sessões: the next redes, read from Banya when the page opens (events.js). */
.events { margin: 0 0 1.4em; padding: 0; list-style: none; }
.event {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.2em 1rem;
  padding: 0.9em 0;
  border-top: 1px solid var(--rule);
}
.event:last-child { border-bottom: 1px solid var(--rule); }
.event__when { font-size: var(--type-m); }
.event__note { grid-column: 1; color: var(--cream-soft); font-size: var(--type-s); }
.event .button { grid-column: 2; grid-row: 1 / span 2; }
.events__empty { color: var(--cream-soft); }

/* The content keeps a centred column clear of the ring on the left and the menu on the right,
   so nothing scrolls under either (founder, 9 Nov 2026). --side is wider than both: the ring is
   2.4 header lines across (ring.js), the menu about as wide at 0.6em. */
:root { --side: calc(var(--gutter) * 2 + var(--type-l) * 2.6); }

.part,
.foot {
  --pad: max(var(--side), calc((100% - 62rem) / 2));
  padding-left: var(--pad);
  padding-right: var(--pad);
  /* the rule between sections spans the column only, not under the ring or the menu */
  border-top: 0;
  background: linear-gradient(var(--rule), var(--rule)) center top / calc(100% - 2 * var(--pad)) 1px no-repeat;
}

/* A phone has no room for both margins: the header takes a band of the page colour and the
   content scrolls behind it. */
@media (max-width: 720px) {
  .part,
  .foot {
    --pad: var(--gutter);
  }

  .top { background: var(--ash); }
  .top__mark::before,
  .top nav::before { display: none; }
}

/* Playlist: the menu's "playlist" opens the card (playlist.js), so its own
   pill is not shown; the card takes the page's colours. */
.listen { display: none !important; }
.player {
  --playlist-page-color: var(--ash);
  --playlist-ink-color: var(--cream);
}

/* A small square in the bottom-right corner (founder, 9 Nov 2026): Spotify's own square
   layout (cover, title, play), drawn at 352px and scaled down by playlist.js to fit, so it is
   never the cropped in-between layout. No card around it: Próxima and Parar sit above. */
html .player {
  top: auto;
  left: auto;
  right: var(--gutter);
  bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px));
  translate: none;
  /* Small: it fits the margin beside the text column (.part's --pad) and never covers the
     text; a phone has no margin, so there it stays at its smallest. */
  width: clamp(7.5rem, calc(max(var(--side), (100vw - 62rem) / 2) - 2 * var(--gutter)), 13rem);
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-family: inherit;
  transform: translateY(0.75rem);
  transform-origin: 100% 100%;
}
html .player.is-open { transform: none; }
html .player__title,
html .player__toggle { display: none; }
html .player__bar {
  justify-content: flex-end;
  margin: 0 0 0.45rem;
}
html .player__actions { gap: 0.9rem; }
html .player__next,
html .player__close {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  font-size: var(--type-s);
  letter-spacing: 0;
  text-transform: none;
  color: var(--cream-soft);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}
html .player__next:hover,
html .player__close:hover { color: var(--cream); }
html .player__next[hidden] { display: none; }
html .player__stage,
html .player.is-expanded .player__stage {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #121212;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
html .player__stage iframe {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
}
