.about-tag {
  position: fixed;
  right: 40px;
  --nudge: -5px;
}

.about-tag .drag-tag-text {
  transform: none; /* mirrored side reads top to bottom */
}

/* Hover prompt: the tag tugs toward its drag direction and a "Drag" cue slides out beside it */
.about-tag {
  --tug: -10px;
}

.about-tag .drag-tag-hint {
  left: auto;
  right: calc(100% + 12px);
  flex-direction: row-reverse; /* line points left, the way this tag drags */
  transform: translate(8px, -50%);
}

/* --- ABOUT PAGE (about.html) --- dark room, cream paper: a drawer of folders under a warm lamp */
.about-page {
  --paper: #efe7d6;
  --paper-dark: #e2d6bd;
  --ink: #2a2320;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(244, 163, 0, 0.12), transparent),
    radial-gradient(ellipse 40% 40% at 100% 100%, rgba(122, 28, 52, 0.25), transparent),
    rgb(10, 12, 20);
  color: #f5f0e1;
}

/* picks up from the dark veil on the home page (on the content, not body: a transform on body would
   unpin the fixed drag tag) */
.about-top,
.about {
  animation: about-in 0.8s ease both;
}

@keyframes about-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.about-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
}

.about-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: "Cormorant Garamond", serif;
  font-size: 26px;
  color: #f5f0e1;
}

.about-logo img {
  width: 48px;
  height: 48px;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 55% 45% 45% 55% / 45% 55% 45% 55%;
  background: var(--logo-bg, #fff); /* Admin > Settings > Logo */
  object-fit: contain;
}

.about-back {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #f5f0e1;
  text-decoration: none;
  transition: color 0.3s ease;
}

.about-back:hover {
  color: #f4a300;
}

.about {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 40px 100px;
}

.about-head h6 {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #f4a300;
}

.about-head h6::before {
  content: "";
  width: 40px;
  height: 1px;
  background: #f4a300;
}

.about-head h1 {
  margin: 14px 0 12px;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.95;
}

.about-head h1 em {
  color: #f4a300;
}

.about-head p {
  max-width: 34rem;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(245, 240, 225, 0.65);
}

/* ---------- the drawer ---------- */
.cabinet {
  position: relative;
  display: grid;
  margin-top: 70px; /* room for the tabs above */
}

/* every folder in the same spot; the back one sits a little higher and darker, its tab showing */
.folder {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  translate: 0 -18px;
  scale: 0.985;
  filter: brightness(0.82);
  transition:
    translate 0.6s cubic-bezier(0.34, 1.3, 0.64, 1),
    scale 0.6s cubic-bezier(0.34, 1.3, 0.64, 1),
    filter 0.5s ease;
}

.folder.is-front {
  z-index: 2;
  translate: 0 0;
  scale: 1;
  filter: none;
}

/* pulled out of the drawer: up, a little tilt, and down again in front */
.folder.is-pulled {
  animation: folder-pull 0.75s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes folder-pull {
  0% {
    translate: 0 -18px;
    rotate: 0deg;
  }
  45% {
    translate: 0 -70px;
    rotate: -1.2deg;
  }
  100% {
    translate: 0 0;
    rotate: 0deg;
  }
}

/* the back folder's page content fades while it's behind */
.folder:not(.is-front) .folder-body > * {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.folder.is-front .folder-body > * {
  opacity: 1;
  transition: opacity 0.5s ease 0.2s;
}

.folder-tab,
.folder-tab:hover {
  position: absolute;
  bottom: 100%;
  left: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px 10px;
  border-radius: 14px 14px 0 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.25rem;
  letter-spacing: normal;
  text-transform: none;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.25);
  transition:
    padding-bottom 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 0.3s ease;
}

.folder-tab b {
  font-family: "JetBrains Mono", monospace;
  font-style: normal;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #b36b00;
}

#team .folder-tab {
  left: 280px;
}

/* hovering a back tab: it grows taller upward (still joined to its folder), rather than lifting off it */
.folder:not(.is-front) .folder-tab:hover {
  padding-bottom: 16px; /* the extra height goes under the text, so the text rises with the tab */
  filter: brightness(1.08);
}

.folder.is-front .folder-tab {
  cursor: default;
}

.folder-body {
  min-height: 520px;
  padding: 48px 48px 44px;
  border-radius: 0 18px 18px 18px;
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(42, 35, 32, 0.035) 31px 32px),
    radial-gradient(ellipse 80% 60% at 0% 0%, rgba(255, 255, 255, 0.35), transparent),
    var(--paper);
  color: var(--ink);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.55),
    0 2px 0 rgba(255, 255, 255, 0.4) inset;
}

.folder-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #b36b00;
}

/* ---------- portraits: a photo, or a stitched monogram ---------- */
.portrait {
  position: relative;
  margin: 0;
  padding: 10px 10px 0;
  background: #fbf8f1;
  border-radius: 3px;
  box-shadow:
    0 18px 40px rgba(42, 35, 32, 0.25),
    0 2px 6px rgba(42, 35, 32, 0.2);
  rotate: var(--tilt, -1.5deg);
}

.portrait-frame {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 2px;
  background: #d9cfbc;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* no photo: the initials in a gold ring of stitches, on linen */
.portrait-frame.is-monogram {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, rgba(42, 35, 32, 0.035) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(-45deg, rgba(42, 35, 32, 0.035) 0 2px, transparent 2px 6px),
    linear-gradient(160deg, #e9dfca, #d8c9ab);
}

.monogram {
  display: grid;
  place-items: center;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px dashed rgba(179, 107, 0, 0.75);
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.25), inset 0 0 0 7px rgba(255, 255, 255, 0.2);
  animation: stitch-turn 40s linear infinite;
}

.monogram span {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: var(--ink);
  animation: stitch-turn 40s linear infinite reverse; /* the letters stay upright while the stitches turn */
}

@keyframes stitch-turn {
  to {
    rotate: 360deg;
  }
}

.portrait figcaption {
  display: grid;
  gap: 2px;
  padding: 12px 4px 14px;
}

.portrait figcaption b {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--ink);
}

.portrait figcaption span {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(42, 35, 32, 0.68);
}

/* a paperclip holding the founder's portrait to the folder */
.paperclip {
  position: absolute;
  top: -18px;
  left: 28px;
  z-index: 2;
  width: 16px;
  height: 52px;
  border: 3px solid #9aa0a6;
  border-radius: 10px;
  rotate: 8deg;
}

.paperclip::after {
  content: "";
  position: absolute;
  inset: 6px 2px 10px 2px;
  border: 3px solid #9aa0a6;
  border-top: none;
  border-radius: 0 0 8px 8px;
}

/* ---------- the founder ---------- */
.founder {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 56px;
  align-items: start;
}

.founder-portrait {
  --tilt: -2.5deg;
  margin-top: 8px;
}

/* the story: sheets stacked in one spot; the current one on top, the others slid away */
.story {
  display: grid;
  gap: 24px;
}

.story-sheets {
  display: grid;
  min-height: 340px;
  touch-action: pan-y;
}

.sheet {
  grid-area: 1 / 1;
  align-self: start;
  padding: 34px 38px 38px;
  background: #fbf8f1;
  border-radius: 4px;
  box-shadow:
    0 20px 50px rgba(42, 35, 32, 0.18),
    6px 6px 0 -1px #f3ecdd,
    6px 6px 0 0 rgba(42, 35, 32, 0.12),
    12px 12px 0 -1px #efe6d3,
    12px 12px 0 0 rgba(42, 35, 32, 0.1); /* a couple of pages peeking out behind */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sheet.is-on {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.sheet.from-right {
  animation: sheet-in-right 0.6s cubic-bezier(0.19, 1, 0.22, 1) both;
}

.sheet.from-left {
  animation: sheet-in-left 0.6s cubic-bezier(0.19, 1, 0.22, 1) both;
}

.sheet.is-out-left,
.sheet.is-out-right {
  visibility: visible;
  z-index: 2;
}

.sheet.is-out-left {
  animation: sheet-out-left 0.5s cubic-bezier(0.55, 0, 0.8, 0.4) both;
}

.sheet.is-out-right {
  animation: sheet-out-right 0.5s cubic-bezier(0.55, 0, 0.8, 0.4) both;
}

@keyframes sheet-in-right {
  from {
    opacity: 0;
    translate: 40px 8px;
    rotate: 2deg;
  }
}

@keyframes sheet-in-left {
  from {
    opacity: 0;
    translate: -40px 8px;
    rotate: -2deg;
  }
}

@keyframes sheet-out-left {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    translate: -80px -20px;
    rotate: -6deg;
  }
}

@keyframes sheet-out-right {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    translate: 80px -20px;
    rotate: 6deg;
  }
}

.sheet-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #b36b00;
}

.sheet h3 {
  margin: 10px 0 14px;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1.05;
}

.sheet p {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(42, 35, 32, 0.82);
}

/* the last page: her words, signed */
.sheet.is-quote blockquote {
  margin: 18px 0 20px;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.3;
  color: var(--ink);
}

.sheet.is-quote blockquote::before {
  content: "\201C";
  display: block;
  height: 0.55em;
  font-size: 3em;
  line-height: 1;
  color: #f4a300;
}

.signature {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.4rem;
  color: #b36b00;
}

.signature::before {
  content: "";
  display: inline-block;
  width: 36px;
  height: 1px;
  margin-right: 12px;
  vertical-align: middle;
  background: #b36b00;
}

.story-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.story-step,
.story-step:hover {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(42, 35, 32, 0.25);
  color: var(--ink);
  font-size: 16px;
  letter-spacing: 0;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.story-step:hover {
  background: #f4a300;
  border-color: #f4a300;
}

.story-dots {
  display: flex;
  gap: 8px;
}

.story-dots button,
.story-dots button:hover {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  background: rgba(42, 35, 32, 0.2);
  transition:
    width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.3s ease;
}

.story-dots button[aria-selected="true"] {
  width: 26px;
  background: #f4a300;
}

.story-count {
  margin-left: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: rgba(42, 35, 32, 0.68);
}

.story-count b {
  font-weight: 500;
  color: var(--ink);
}

.story-count i {
  font-style: normal;
}

/* ---------- the team ---------- */
.team {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.team-intro h2 {
  margin: 12px 0 18px;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.2rem, 3.6vw, 3rem);
  line-height: 1;
}

.team-intro h2 em {
  color: #b36b00;
}

.team-text {
  display: grid;
  gap: 14px;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(42, 35, 32, 0.8);
}

.team-people {
  display: grid;
  gap: 26px;
}

/* one photo of everyone, taped to the folder */
.team-group {
  position: relative;
  margin: 0;
  padding: 10px;
  background: #fbf8f1;
  border-radius: 3px;
  rotate: 1.2deg;
  box-shadow: 0 20px 44px rgba(42, 35, 32, 0.28);
}

.team-group img {
  display: block;
  width: 100%;
  border-radius: 2px;
}

.tape {
  position: absolute;
  top: -12px;
  left: 50%;
  z-index: 1;
  width: 110px;
  height: 26px;
  translate: -50% 0;
  rotate: -3deg;
  background: rgba(244, 163, 0, 0.55);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.team-members {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 28px 22px;
}

.team-members:empty {
  display: none;
}

.member {
  transition:
    rotate 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    translate 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.member:hover {
  rotate: 0deg;
  translate: 0 -6px;
}

.member .monogram span {
  font-size: 2rem;
}

/* no one pictured yet: what the team stands for, as stitched name tags */
.team-values {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: start;
  padding-top: 20px;
}

.team-values li {
  padding: 14px 22px;
  border-radius: 999px;
  background: #fbf8f1;
  outline: 1.5px dashed rgba(179, 107, 0, 0.6);
  outline-offset: -6px;
  box-shadow: 0 10px 24px rgba(42, 35, 32, 0.14);
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink);
  position: relative;
  rotate: var(--r, 0deg);
  cursor: default;
  animation: tag-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards; /* backwards: hover can then move it freely */
  transition:
    translate 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.3s ease,
    color 0.3s ease,
    outline-color 0.3s ease,
    box-shadow 0.4s ease;
}

/* picked up by its thread: a gold thread draws in above it, the tag lifts, straightens and swings on it,
   then settles, filled gold with its stitching darkened */
.team-values li::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 1.5px;
  height: 0;
  translate: -50% 0;
  background: #b36b00;
  transition: height 0.35s cubic-bezier(0.19, 1, 0.22, 1);
}

.team-values li:hover {
  rotate: 0deg; /* stays straight once the swing settles */
  translate: 0 -8px;
  background-color: #f4a300;
  outline-color: rgba(42, 35, 32, 0.55);
  box-shadow: 0 18px 30px rgba(42, 35, 32, 0.22);
  transform-origin: 50% -22px; /* swings from the top of the thread */
  animation: tag-swing 1.1s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.team-values li:hover::before {
  height: 22px;
}

@keyframes tag-swing {
  0% {
    rotate: var(--r, 0deg);
  }
  20% {
    rotate: 6deg;
  }
  40% {
    rotate: -4deg;
  }
  60% {
    rotate: 2.5deg;
  }
  80% {
    rotate: -1deg;
  }
  100% {
    rotate: 0deg;
  }
}

.team-values li:nth-child(odd) { --r: -1.5deg; }
.team-values li:nth-child(3n) { --r: 2deg; }
.team-values li:nth-child(1) { animation-delay: 0.05s; }
.team-values li:nth-child(2) { animation-delay: 0.12s; }
.team-values li:nth-child(3) { animation-delay: 0.19s; }
.team-values li:nth-child(4) { animation-delay: 0.26s; }
.team-values li:nth-child(5) { animation-delay: 0.33s; }
.team-values li:nth-child(6) { animation-delay: 0.4s; }

@keyframes tag-in {
  from {
    opacity: 0;
    translate: 0 14px;
    scale: 0.9;
  }
}

@media (max-width: 860px) {
  .about,
  .about-top {
    padding-left: 16px;
    padding-right: 16px;
  }

  .folder-body {
    padding: 32px 22px 28px;
  }

  .founder,
  .team {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .founder-portrait {
    max-width: 240px;
  }

  #team .folder-tab {
    left: auto;
    right: 20px;
  }

  .folder-tab,
  .folder-tab:hover {
    left: 20px;
    padding: 10px 16px 8px;
    font-size: 1.05rem;
  }

  .sheet {
    padding: 26px 22px 28px;
  }
}

/* ---------- snap between the top and the folders ---------- */
html:has(.about-page) {
  scroll-snap-type: y mandatory;
}

.about-head {
  scroll-snap-align: start;
  scroll-margin-top: 110px; /* snapping here lands at the very top */
}

.cabinet {
  scroll-snap-align: start;
  scroll-margin-top: 110px; /* the tabs stay in view above the folder */
}

/* ---------- the scroll rail, down the left ---------- */
.about-rail {
  position: fixed;
  left: 22px;
  top: 50%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  translate: 0 -50%;
}

.about-rail-ticks {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 6px 0;
  cursor: pointer;
}

.about-rail-ticks span {
  display: block;
  height: 2px;
  width: 3px;
  border-radius: 2px;
  background: #f4a300;
  animation: rail-tick-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) calc(0.35s + var(--i) * 0.04s) backwards;
}

@keyframes rail-tick-in {
  from {
    opacity: 0;
    scale: 0 1;
  }
}

.about-rail-stop,
.about-rail-stop:hover {
  padding: 4px 0;
  background: none;
  color: rgba(245, 240, 225, 0.62);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  translate: -6px 0;
  transition:
    opacity 0.3s ease,
    translate 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    color 0.25s ease;
}

.about-rail:hover .about-rail-stop,
.about-rail-stop:focus-visible {
  opacity: 1;
  translate: 0 0;
}

.about-rail-stop:hover {
  color: #f4a300;
}

@media (max-width: 860px) {
  .about-rail {
    display: none;
  }

}

/* The return tag uses the same bottom, horizontal mobile treatment as Home. */
@media (max-width: 700px) {
  .about-tag {
    top: auto;
    right: auto;
    bottom: max(18px, env(safe-area-inset-bottom));
    left: 50%;
    flex-direction: row;
    gap: 10px;
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 12px 18px;
    transform: translate(calc(-50% + var(--drag, 0px)), 0);
    /* it floats over the cream folders: a dark pill keeps it readable */
    border-radius: 999px;
    background: rgba(10, 12, 20, 0.85);
    border: 1px solid rgba(244, 163, 0, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  /* phones scroll freely, like the rest of the site (the desktop snap above felt grabby on touch) */
  html:has(.about-page) {
    scroll-snap-type: none;
  }

  /* room at the end of the page so the pill never covers the last of the folder */
  .about {
    padding-bottom: 96px;
  }

  .about-tag .drag-tag-text {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 9px;
    letter-spacing: 0.18em;
  }

  .about-tag .drag-tag-line {
    width: 30px;
    height: 1px;
  }

  .about-tag .drag-tag-hint {
    display: none;
  }

  .about-tag .drag-tag-text em {
    animation: about-house-pulse 3.6s ease-in-out infinite;
  }
}

@keyframes about-house-pulse {
  0%,
  68%,
  100% {
    color: #f5f0e1;
    text-shadow: none;
  }
  10% {
    color: #f4a300;
    text-shadow: 0 0 10px rgba(244, 163, 0, 0.75);
  }
  18% {
    color: #f5f0e1;
  }
}
