/* Buckets marketing site — shared styles
   Concept: glass vessels holding light. Parchment and ink, water and glass. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;1,9..144,500&family=Outfit:wght@300;400;500;600&display=swap');

:root {
  --parchment: #F3EEE6;
  --ink: #26221B;
  --subtle: #8B8578;
  --glass: #DCE7DC;
  --violet: #C9C3E3;
  --hairline: rgba(38, 34, 27, 0.14);

  --ground: var(--parchment);
  --text: var(--ink);
  --tint-glass: var(--glass);
  --tint-violet: var(--violet);
  --tint-glass-glyph: var(--tint-glass);
  --tint-violet-glyph: var(--tint-violet);
  --line: var(--hairline);

  --chip-bg: #FBF8F2;
  --chip-shadow: rgba(38, 34, 27, 0.14);
  --chip-work: #8FA3C0;
  --chip-run: #A9C0A5;
  --chip-read: #B9B2D8;

  --font-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #171512;
    --text: #EDE8DE;
    /* Dark water must stay water: saturated hue, not white at low
       alpha, which over a near-black ground can only ever make concrete. */
    --tint-glass: rgba(116, 160, 126, 0.85);
    --tint-violet: rgba(122, 110, 178, 0.85);
    --tint-glass-glyph: rgba(150, 196, 160, 1);
    --tint-violet-glyph: rgba(150, 138, 208, 1);
    --line: rgba(237, 232, 222, 0.2);
    --subtle: #93897A;
    --chip-bg: #26221C;
    --chip-shadow: rgba(0, 0, 0, 0.5);
    /* The dots brighten in the dark rather than dim: they are the only
       color the chip has, and the chip is the only actor on stage. */
    --chip-work: #9FB4D2;
    --chip-run: #B4CDAF;
    --chip-read: #C6BFE6;
  }
}

:root[data-theme="dark"] {
  --ground: #171512;
  --text: #EDE8DE;
    /* Dark water must stay water: saturated hue, not white at low
     alpha, which over a near-black ground can only ever make concrete. */
  --tint-glass: rgba(116, 160, 126, 0.85);
  --tint-violet: rgba(122, 110, 178, 0.85);
  --tint-glass-glyph: rgba(150, 196, 160, 1);
  --tint-violet-glyph: rgba(150, 138, 208, 1);
  --line: rgba(237, 232, 222, 0.2);
  --subtle: #93897A;
  --chip-bg: #26221C;
  --chip-shadow: rgba(0, 0, 0, 0.5);
    /* The dots brighten in the dark rather than dim: they are the only
     color the chip has, and the chip is the only actor on stage. */
  --chip-work: #9FB4D2;
  --chip-run: #B4CDAF;
  --chip-read: #C6BFE6;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.06rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1.75rem;
}

/* ---------- Header ---------- */

.site-header {
  padding: 2rem 0 1rem;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.wordmark svg {
  flex: none;
  display: block;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
  font-size: 0.92rem;
  font-weight: 400;
}

.site-nav a {
  text-decoration: none;
  color: var(--subtle);
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: color 0.2s ease, background-size 0.2s ease-out;
}

.site-nav a:hover {
  color: var(--text);
  background-size: 100% 1px;
}

/* ---------- Kicker / headings ---------- */

.kicker {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--subtle);
  margin: 0 0 1.1rem;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
}

.section-head {
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  margin-bottom: 1.1rem;
}

p {
  margin: 0 0 1.1rem;
  max-width: 62ch;
}

/* ---------- Hero ---------- */

.hero {
  padding: 4.5rem 0 3rem;
}

.hero .wrap {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  max-width: 12ch;
}

.hero .sub {
  margin-top: 1.4rem;
  font-size: 1.14rem;
  color: var(--text);
  opacity: 0.82;
  max-width: 42ch;
}

.hero-figure {
  display: flex;
  justify-content: center;
}

@media (min-width: 900px) {
  .hero .wrap {
    display: grid;
    grid-template-columns: 55fr 45fr;
    gap: 4rem;
    align-items: center;
  }
}

/* On a phone the pour scene IS the pitch, and it must be visible without
   scrolling: kicker, headline, scene, then the supporting copy. The copy
   wrapper dissolves so its children can be ordered around the figure. */
@media (max-width: 899px) {
  .hero-copy { display: contents; }
  .hero-copy .kicker { order: 1; }
  .hero-copy h1 { order: 2; }
  .hero-figure { order: 3; }
  .hero-copy .sub { order: 4; margin-top: 0.2rem; }
  .hero .wrap { gap: 1.2rem; }
  .hero { padding-top: 2.6rem; }
  .hero h1 { font-size: clamp(2.1rem, 6vw, 4.6rem); }
}

/* ---------- Vessel ---------- */

.vessel-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.vessel-stage {
  position: relative;
  width: 100%;
  max-width: 230px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .vessel-stage {
    max-width: 280px;
  }
}

/* ---------- Block chips / pour scene ---------- */

.vessel-chips {
  --chip-drop: 60px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  z-index: 2;
}

.block-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--chip-bg);
  box-shadow: 0 1px 2px var(--chip-shadow);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
}

.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.chip-work .chip-dot { background: var(--chip-work); }
.chip-run .chip-dot { background: var(--chip-run); }
.chip-read .chip-dot { background: var(--chip-read); }

.pour-drop {
  /* The app's own droplet, borrowed exactly: it starts under the chip,
     accelerates into the water, and is absorbed the instant its nose
     touches - the level only rises after the impact. */
  position: absolute;
  top: 0;
  left: 50%;
  width: 18px;
  height: 26px;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  will-change: transform, opacity;
}

.pour-stream.chip-0 { --stream-color: var(--chip-work); }
.pour-stream.chip-1 { --stream-color: var(--chip-run); }
.pour-stream.chip-2 { --stream-color: var(--chip-read); }

.ripple-ring {
  /* Rides ON the surface, not the floor of the glass. */
  /* Lies ON the water plane, seen at the glass's shallow angle: a hard
     foreshortened ellipse that expands across the surface, never a ring
     standing up in the air. */
  position: absolute;
  top: calc(100% - var(--level, 30%));
  left: 50%;
  z-index: 2;
  width: 64px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  transform: translate(-50%, -50%) scaleX(0.2);
  opacity: 0;
  pointer-events: none;
}

/* Once JS confirms motion is allowed, the chips collapse into a single
   cycling slot: one chip visible at a time, falling toward the rim. */
.js-active .vessel-chips {
  height: 34px;
  margin-bottom: 0.6rem;
}

.js-active .block-chip {
  position: absolute;
  top: 0;
  left: 50%;
  opacity: 0;
  will-change: transform, opacity;
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(38, 34, 27, 0.14);
}

.vessel-caption {
  margin: 0.9rem 0 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--subtle);
  font-variant-numeric: tabular-nums;
  max-width: none;
}

.vessel-ground {
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 68%;
  height: 22px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(38, 34, 27, 0.18), rgba(38, 34, 27, 0) 70%);
  filter: blur(3px);
  pointer-events: none;
}

.vessel {
  position: relative;
  width: 100%;
  aspect-ratio: 148 / 320;
  z-index: 1;
}

.vessel-glass {
  position: absolute;
  inset: 0;
  border-radius: 34px;
  border: 1.5px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 30px 60px -30px rgba(38,34,27,0.25);
}

.vessel-liquid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52%;
  overflow: hidden;
  background: linear-gradient(180deg, var(--tint-glass), var(--tint-violet));
}

.liquid-wave {
  position: absolute;
  top: -6px;
  left: -12%;
  width: 124%;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.liquid-wave-b {
  top: -3px;
  height: 8px;
  background: rgba(255, 255, 255, 0.22);
}

.liquid-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.22) 50%, transparent 58%);
  background-size: 260% 260%;
  background-position: 0% 0%;
  opacity: 0.4;
  pointer-events: none;
}

.liquid-wave-a {
  animation: wave-drift-a 13s ease-in-out infinite;
}

.liquid-wave-b {
  animation: wave-drift-b 15.5s ease-in-out infinite;
}

.liquid-shimmer {
  animation: shimmer-drift 20s linear infinite;
}

@keyframes wave-drift-a {
  0%, 100% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
}

@keyframes wave-drift-b {
  0%, 100% { transform: translateX(4px); }
  50% { transform: translateX(-4px); }
}

/* A pour landing briefly swaps in a wider wobble for ~1s. */
.vessel-liquid.is-splashing .liquid-wave-a {
  animation: wave-drift-a-strong 0.9s ease-in-out infinite;
}

.vessel-liquid.is-splashing .liquid-wave-b {
  animation: wave-drift-b-strong 1.05s ease-in-out infinite;
}

@keyframes wave-drift-a-strong {
  0%, 100% { transform: translateX(-9px); }
  50% { transform: translateX(9px); }
}

@keyframes wave-drift-b-strong {
  0%, 100% { transform: translateX(9px); }
  50% { transform: translateX(-9px); }
}

@keyframes shimmer-drift {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

:root:not([data-theme="light"]) .liquid-shimmer {
  opacity: 0.32;
}
:root[data-theme="dark"] .liquid-shimmer {
  opacity: 0.32;
}

.vessel-highlight {
  position: absolute;
  top: 14px;
  left: 16px;
  width: 12px;
  bottom: 14px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0.05));
}

@media (prefers-reduced-motion: reduce) {
  .vessel-liquid {
    height: 52%;
  }
  .liquid-wave-a,
  .liquid-wave-b,
  .liquid-shimmer {
    animation: none;
  }
  .vessel-chips {
    height: auto;
  }
  .block-chip {
    position: static;
    opacity: 1;
    transform: none;
  }
  .pour-stream,
  .ripple-ring {
    display: none;
  }
}

/* ---------- Sections ---------- */

.section {
  padding: 7rem 0;
  border-top: 1px solid var(--line);
}

.section:first-of-type {
  border-top: none;
}

.flow-item {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1.75rem;
  margin-bottom: 4.5rem;
}

.flow-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 44px;
  bottom: -72px;
  width: 1px;
  background: var(--line);
}

.flow-item:last-child {
  margin-bottom: 0;
}

.flow-glyph {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.3rem;
}

.flow-glyph svg {
  display: block;
}

.flow-item h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
}

.flow-item p {
  color: var(--text);
  opacity: 0.82;
}

/* ---------- Pull quote ---------- */

.pull-quote {
  padding: 6rem 0;
  text-align: center;
}

.pull-quote blockquote {
  position: relative;
  margin: 0 auto;
  max-width: 30ch;
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
}

.quote-mark {
  position: absolute;
  z-index: -1;
  top: -2.75rem;
  left: -1.5rem;
  font-family: var(--font-display);
  font-style: normal;
  font-size: 7rem;
  line-height: 1;
  color: var(--tint-glass);
  pointer-events: none;
  user-select: none;
}

/* ---------- Buttons / links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--ink);
  color: var(--parchment);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.98rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

:root:not([data-theme="light"]) .btn {
  background: var(--text);
  color: var(--ground);
}
:root[data-theme="dark"] .btn {
  background: var(--text);
  color: var(--ground);
}

.btn:hover {
  opacity: 0.86;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -14px rgba(38, 34, 27, 0.4);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px -6px rgba(38, 34, 27, 0.3);
}

.text-link {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  color: var(--text);
}

/* ---------- Focus ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 4rem 0 4.5rem;
  border-top: 1px solid var(--line);
}

.site-footer .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.75rem 2.25rem;
  align-items: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-wordmark {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text);
}

.footer-wordmark svg {
  flex: none;
  display: block;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.92rem;
  color: var(--subtle);
}

.footer-links a {
  text-decoration: none;
  color: var(--subtle);
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: color 0.2s ease, background-size 0.2s ease-out;
}

.footer-links a:hover {
  color: var(--text);
  background-size: 100% 1px;
}

.footer-meta {
  font-size: 0.85rem;
  color: var(--subtle);
}

.footer-pill-col {
  display: flex;
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  color: var(--subtle);
  background: transparent;
}

@media (max-width: 700px) {
  .site-footer .wrap {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand {
    align-items: center;
  }

  .footer-pill-col {
    justify-content: center;
  }
}

/* ---------- Simple page (privacy / terms / support) ---------- */

.page-head {
  padding: 4.5rem 0 1rem;
}

.page-head h1 {
  font-size: clamp(2.1rem, 5vw, 3rem);
}

.page-head .sub {
  margin-top: 1rem;
  color: var(--subtle);
}

.doc {
  padding: 1rem 0 5rem;
}

.doc h2 {
  font-size: 1.25rem;
  margin-top: 3rem;
  margin-bottom: 0.9rem;
}

.doc h2:first-child {
  margin-top: 0;
}

.doc p, .doc li {
  color: var(--text);
  opacity: 0.86;
}

.doc ul {
  padding-left: 1.2rem;
}

.center-page {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 5rem 0;
}

.center-page::before {
  content: "";
  flex: 38 0 0;
}

.center-page::after {
  content: "";
  flex: 62 0 0;
}

.center-page .wrap {
  flex: none;
}

.center-page h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 1rem;
}

.center-page p {
  color: var(--subtle);
  margin-bottom: 2rem;
}

/* ---------- Shortcut cards ---------- */

.sc-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin-bottom: 2.25rem;
}

@media (min-width: 760px) {
  .sc-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.sc-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.75rem 1.6rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--chip-bg);
  box-shadow: 0 1px 2px var(--chip-shadow);
}

.sc-card h3 {
  font-size: 1.2rem;
  margin: 0 0 0.75rem;
}

.sc-card p {
  font-size: 0.96rem;
  line-height: 1.62;
  color: var(--text);
  opacity: 0.82;
  max-width: none;
}

.sc-card .btn {
  margin-top: auto;
  padding: 0.72rem 1.3rem;
  font-size: 0.94rem;
}

.sc-glyph {
  margin-bottom: 1rem;
}

.sc-glyph svg {
  display: block;
}

/* The trigger line is the recipe, so it reads as a label, not as prose. */
.sc-trigger {
  display: block;
  font-size: 0.86rem !important;
  line-height: 1.5 !important;
  color: var(--subtle) !important;
  opacity: 1 !important;
  margin-bottom: 0.85rem !important;
}

.sc-trigger span {
  display: block;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.sc-card em {
  font-style: normal;
  font-weight: 500;
  opacity: 1;
}

/* The honest line: what the automation still cannot do for you. Set apart
   from the description so it reads as a caveat, not as more selling. */
.sc-manual {
  font-size: 0.86rem !important;
  line-height: 1.55 !important;
  color: var(--subtle) !important;
  opacity: 1 !important;
  margin-top: 0.9rem !important;
  margin-bottom: 1.35rem !important;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  width: 100%;
}

.sc-foot {
  font-size: 0.92rem;
  color: var(--subtle);
  max-width: 62ch;
}

.sc-steps {
  counter-reset: sc;
  list-style: none;
  padding: 0;
  margin: 2rem 0 2.5rem;
  max-width: 62ch;
}

.sc-steps li {
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: 1rem;
  opacity: 0.86;
}

.sc-steps li::before {
  counter-increment: sc;
  content: counter(sc);
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.7rem;
  height: 1.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--subtle);
}

.sc-honest {
  padding-left: 1.1rem;
  border-left: 2px solid var(--tint-glass);
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.5;
  max-width: 46ch;
}

/* ---------- Responsive ---------- */

@media (max-width: 800px) {
  .flow-item {
    gap: 1.25rem;
  }

  .section {
    padding: 4.5rem 0;
  }

  .site-nav {
    gap: 1.1rem;
  }

  .vessel-stage {
    max-width: 180px;
  }

  .vessel-stage {
    max-width: 150px;
  }
  .vessel-chips {
    --chip-drop: 44px;
  }

  .block-chip {
    font-size: 0.76rem;
    padding: 0.36rem 0.6rem;
  }
}

/* ---------- Entrance animations ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
