/* 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;
  align-items: center;
  padding: var(--gutter);
  background: var(--ash);
  font-size: var(--type-l);
  line-height: 1.05;
  letter-spacing: -0.015em;
  pointer-events: none;
}

/* Over the hero the header is see-through, so the net shows behind it;
   site.js drops this class once the page scrolls past the top. */
.top.is-over-hero { background: transparent; }

.top a {
  pointer-events: auto;
  text-decoration: none;
}

.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);
}

.top nav {
  display: flex;
  gap: 0.6em;
}

.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 {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: var(--gutter);
  /* Room for the wordmark in the fixed header above. */
  padding-top: calc(var(--gutter) + var(--type-l) * 1.05);
  font-weight: 400;
  font-size: var(--type-l);
  line-height: 1.05;
  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 .s1 { padding-left: 1.4em; }
.hero h1 .s2 { padding-left: 2.8em; }

/* Sections: a small label on the left, the text on the right. */
.part {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(0, 3fr);
  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;
}

.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);
}

.foot svg {
  display: block;
  width: clamp(4.5rem, 3rem + 5vw, 7rem);
  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 .s1 { padding-left: 0.9em; }
  .hero h1 .s2 { padding-left: 1.8em; }
}
