/* OfficeCycle homepage. Type: Montserrat for headlines and buttons, Inter for everything else.
   Layout: one long page, big type, a printer that prints its own test page.
   Sage green from the logo is the brand; CMYK toner colors are a small accent. */

:root {
  /* Sage palette taken from the OfficeCycle logo */
  --bg: #f7f9f5;
  --tint: #e9efe6;
  --ink: #1f2c25;
  --ink-2: #4d5c53;
  --line: #d9e2d5;
  --sage: #7fa085;
  --sage-light: #b9cdb7;
  --sage-deep: #2f4a3b;
  --sage-text: #557a5c;
  --cyan: #00a3e0;
  --magenta: #e2007a;
  --yellow: #ffd400;

  --display: "Montserrat", "Arial Black", "Helvetica Neue", sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1200px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--body); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

.wrap { max-width: calc(var(--wrap) + 80px); margin: 0 auto; padding-left: max(var(--gutter), 40px); padding-right: max(var(--gutter-r), 40px); }
.display { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; text-wrap: balance; }

/* The four toner colors, used as a small signature mark */
.toner { display: inline-flex; gap: 4px; }
.toner i { width: 18px; height: 6px; border-radius: 2px; display: block; }
.toner i:nth-child(1) { background: var(--cyan); }
.toner i:nth-child(2) { background: var(--magenta); }
.toner i:nth-child(3) { background: var(--yellow); }
.toner i:nth-child(4) { background: var(--ink); }

/* ---------- Buttons (adapted from youneslaaroussi/ui-buttons, MIT) ---------- */
.btn {
  -webkit-tap-highlight-color: transparent;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 800 14.5px/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; border: 0; background: none; color: var(--ink); isolation: isolate;
}

/* "Offset" (#55): outlined pill with a sage shadow that slides in under it */
.btn-offset { border-radius: 999px; padding: 20px 40px; }
.btn-offset::before, .btn-offset::after { content: ""; position: absolute; inset: 0; border-radius: 999px; z-index: -1; }
.btn-offset::before { background: var(--sage); transform: translate(8px, 8px); transition: transform 0.2s; }
.btn-offset::after { border: 3px solid var(--ink); }
.btn-offset:hover::before, .btn-offset:focus-visible::before { transform: translate(0, 0); }
.btn-offset.on-dark { color: var(--ink); }
.btn-offset.on-dark::before { background: var(--sage-light); }
.btn-offset.on-dark::after { border-color: var(--bg); }

/* "Slide Right" (#14): a fill sweeps across on hover */
.btn-slide { border: 2px solid var(--ink); border-radius: 999px; padding: 18px 34px; overflow: hidden; }
.btn-slide span { position: relative; z-index: 1; transition: color 0.2s; }
.btn-slide::before {
  content: ""; position: absolute; inset: 0; background: var(--ink);
  transform: translateX(var(--progress, -101%)); transition: transform 0.2s ease;
}
.btn-slide:hover::before, .btn-slide:focus-visible::before { --progress: 0; }
.btn-slide:hover span, .btn-slide:focus-visible span { color: var(--bg); }

/* "Pill Halo" (#39): a ring snaps in around the pill */
.btn-halo { background: var(--ink); color: var(--bg); border-radius: 999px; padding: 13px 24px; font-size: 13.5px; }
.btn-halo::before {
  --t: 3px; content: ""; position: absolute; inset: calc(var(--t) * -2); border: var(--t) solid var(--sage);
  border-radius: 999px; opacity: 0; transform: scale(1.25); transition: transform 0.2s, opacity 0.2s; pointer-events: none;
}
.btn-halo:hover::before, .btn-halo:focus-visible::before { opacity: 1; transform: scale(1); }

/* "Progress Fill Right" (#81): hovering runs a print-job progress bar */
.btn-progress { border: 2px solid var(--ink); border-radius: 999px; padding: 20px 40px; overflow: hidden; background: var(--bg); }
.btn-progress span { position: relative; z-index: 1; }
.btn-progress::before { content: ""; position: absolute; left: 0; top: 0; height: 100%; width: 0; background: var(--sage-light); }
.btn-progress:hover::before, .btn-progress:focus-visible::before { animation: print-progress 1.2s forwards; }
@keyframes print-progress {
  0% { width: 0; } 10% { width: 15%; } 25% { width: 25%; } 40% { width: 35%; } 55% { width: 75%; } 70%, 100% { width: 100%; }
}

/* "Cover Over" (#3): underline rises to cover the link text */
.link-cover { position: relative; font-weight: 700; text-decoration: none; padding: 1px 2px; isolation: isolate; }
.link-cover::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; background: var(--sage);
  transition: height 0.2s ease, bottom 0.2s ease; z-index: -1;
}
.link-cover:hover::before, .link-cover:focus-visible::before { height: calc(100% + 4px); bottom: -2px; background: var(--sage-light); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(247, 249, 245, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { width: 40px; height: auto; }
.logo span { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -0.02em; }
.logo b { color: var(--sage-text); font-weight: 800; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) { font-weight: 600; font-size: 15px; text-decoration: none; }
.nav a:not(.btn):hover { color: var(--sage-deep); }

/* ---------- Hero ---------- */
.hero { overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 80px; }
.kicker { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 22px; }
.hero h1 { font-size: clamp(38px, 5.2vw, 76px); margin: 0 0 26px; }
.hero h1 .hl { color: var(--sage-text); }
.hero .lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 32em; margin: 0 0 36px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 18px 16px; align-items: center; }
.trust { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 0; margin: 40px 0 0; font-weight: 600; font-size: 15px; }
.trust li { display: flex; align-items: center; gap: 9px; }
.trust svg { width: 20px; height: 20px; color: var(--sage); flex: none; }

/* The printer that prints its own test page */
.printer-art { position: relative; }
.printer-art svg { width: 100%; height: auto; }
.printer-art .sheet { animation: feed 2.6s cubic-bezier(0.35, 0.8, 0.25, 1) 0.9s both; }
.printer-art .led { animation: blink 0.5s steps(2) 0.9s 5 both; }
.printer-art .shadow { fill: var(--tint); }
@keyframes feed {
  0% { transform: translateY(190px); }
  30% { transform: translateY(140px); }
  38% { transform: translateY(140px); }
  100% { transform: translateY(0); }
}
@keyframes blink { 0% { fill: var(--sage-light); } 100% { fill: var(--sage); } }
.printer-art:hover .sheet { animation: feed-again 1.6s cubic-bezier(0.35, 0.8, 0.25, 1) both; }
@keyframes feed-again { 0% { transform: translateY(190px); } 100% { transform: translateY(0); } }

/* ---------- Photo strip ---------- */
.photos { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; padding: 0 12px; }
.photo { position: relative; margin: 0; aspect-ratio: 4 / 3; max-width: 100%; border-radius: 18px; overflow: hidden; background: var(--tint) url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20480%20300%22%20fill%3D%22none%22%20stroke%3D%22%23b9cdb7%22%20stroke-width%3D%224%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M96%2040h288l26%2040H70z%22/%3E%3Crect%20x%3D%2250%22%20y%3D%2278%22%20width%3D%22380%22%20height%3D%22180%22%20rx%3D%2218%22/%3E%3Crect%20x%3D%2280%22%20y%3D%22160%22%20width%3D%22320%22%20height%3D%2272%22%20rx%3D%2210%22/%3E%3Crect%20x%3D%22300%22%20y%3D%22100%22%20width%3D%22104%22%20height%3D%2240%22%20rx%3D%228%22/%3E%3C/svg%3E") center / min(46%, 260px) no-repeat; }
.photo:first-child { aspect-ratio: auto; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.photo:hover img { transform: scale(1.04); }
.photo figcaption { position: absolute; left: 14px; bottom: 14px; background: var(--bg); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13.5px; }
img.img-missing { visibility: hidden; }

/* ---------- Sections ---------- */
.section { padding-top: 112px; padding-bottom: 112px; }
.section-title { font-size: clamp(34px, 4.4vw, 60px); margin: 0 0 18px; max-width: 14em; }
.section-intro { color: var(--ink-2); font-size: 19px; max-width: 34em; margin: 0 0 56px; }

/* How it works: a real three-step sequence, so it gets numbers */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { background: var(--tint); border-radius: 22px; padding: 30px 28px 34px; position: relative; counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  font-family: var(--display); font-weight: 800; font-size: 22px; margin-bottom: 26px;
  background: var(--c, var(--sage)); color: var(--bg);
}
.steps li:nth-child(2) { --c: var(--sage-deep); }
.steps li:nth-child(3) { --c: var(--ink); }
.steps h3 { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.15; margin: 0 0 10px; }
.steps p { margin: 0; color: var(--ink-2); }

/* Printers we carry: one card per type, each links to that search in the eBay store */
.printers { background: var(--bg); }
.printer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.ptype { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 22px 22px 24px; text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s; }
.ptype:hover, .ptype:focus-visible { transform: translateY(-4px); box-shadow: 0 14px 0 -6px var(--sage-light); border-color: var(--sage); }
.ptype .art { background: var(--tint); border-radius: 16px; aspect-ratio: 4 / 3; display: grid; place-items: center; margin-bottom: 20px; }
.ptype .art svg { width: 100%; height: auto; }
.ptype h3 { font-family: var(--display); font-weight: 800; font-size: 20px; margin: 0 0 6px; }
.ptype p { margin: 0 0 18px; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.ptype .go { margin-top: auto; font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sage-deep); display: inline-flex; gap: 8px; align-items: center; }
.ptype .go i { font-style: normal; transition: transform 0.2s; }
.ptype:hover .go i { transform: translateX(4px); }

/* eBay store connection */
.store { background: var(--sage-deep); color: var(--bg); border-radius: 32px; margin: 0 12px; overflow: hidden; position: relative; }
.store .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 56px; align-items: center; padding-top: 96px; padding-bottom: 96px; }
.store .section-title { color: var(--bg); }
.store .section-intro { color: #d3dfd1; margin-bottom: 40px; }
.store-card { background: var(--bg); color: var(--ink); border-radius: 24px; padding: 28px; box-shadow: 10px 10px 0 var(--sage-light); }
.store-card .row { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.store-card .avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--tint); display: grid; place-items: center; flex: none; }
.store-card .avatar img { width: 40px; height: auto; }
.store-card h3 { margin: 0; font-size: 20px; line-height: 1.2; }
.store-card .sub { color: var(--ink-2); font-size: 14.5px; }
.store-card ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.store-card li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; }
.store-card li svg { width: 20px; height: 20px; color: var(--sage); flex: none; margin-top: 3px; }
.store-card .note { margin: 20px 0 0; font-size: 13.5px; color: var(--ink-2); }
.store .toner { position: absolute; top: 28px; right: 32px; }
.store .toner i:nth-child(4) { background: var(--bg); }

/* Sell to us */
.sell .wrap > div { max-width: 760px; }
.sell .photo { aspect-ratio: 5 / 4; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 40px; }
.facts div { border: 2px solid var(--ink); border-radius: 16px; padding: 16px 18px; }
.facts dt { font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; }
.facts dd { margin: 4px 0 0; color: var(--ink-2); font-size: 15.5px; }
.fill { background: var(--sage-light); color: var(--ink); padding: 0 5px; border-radius: 4px; font-weight: 600; }

/* Impact: e-waste numbers and what happens to every unit */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.stat { background: var(--sage-deep); color: #e9efe6; border-radius: 22px; padding: 30px 28px 32px; }
.stat b { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(48px, 5.4vw, 76px); line-height: 1; color: var(--sage-light); margin-bottom: 14px; }
.stat span { font-size: 16.5px; }
.stat.mine { background: var(--tint); color: var(--ink); }
.stat.mine b { color: var(--ink); font-size: clamp(36px, 4vw, 56px); }
.source { color: var(--ink-2); font-size: 13.5px; margin: 14px 0 72px; }
.pledge { display: block; }
.pledge .photo { aspect-ratio: 5 / 4; }
.pledge-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 48px; }
.pledge-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 14px; color: var(--sage); }
.pledge-list svg { width: 26px; height: 26px; margin-top: 2px; }
.pledge-list h3 { color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 21px; margin: 0 0 4px; }
.pledge-list p { color: var(--ink-2); margin: 0; }

/* About us */
.about { background: var(--tint); }
.team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.member { background: var(--bg); border-radius: 22px; padding: 30px 28px; }
.avatar-lg { width: 76px; height: 76px; border-radius: 50%; background: var(--sage); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 26px; margin-bottom: 20px; box-shadow: 6px 6px 0 var(--sage-deep); }
.member:nth-child(2) .avatar-lg { background: var(--sage-deep); box-shadow: 6px 6px 0 var(--sage-light); }
.member:nth-child(3) .avatar-lg { background: var(--sage-text); }
.member h3 { font-family: var(--display); font-weight: 800; font-size: 23px; margin: 0 0 6px; }
.member p { color: var(--ink-2); margin: 0 0 14px; }
.member .role { font-weight: 600; color: var(--ink); }

/* Footer */
.site-footer { background: var(--ink); color: #c5d0c8; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; padding-top: 48px; padding-bottom: 48px; }
.site-footer .logo span { color: var(--bg); }
.site-footer .logo b { color: var(--sage-light); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--sage-light); }
.site-footer small { width: 100%; font-size: 13px; color: #8d958f; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid #2a302c; padding-top: 22px; }

/* Scroll reveal: only hidden once JS has marked it, so nothing is lost without JS */
.js [data-animate]:not(.animate__animated) { opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap, .store .wrap, .sell .wrap, .pledge { grid-template-columns: minmax(0, 1fr); }
  .stats, .team, .pledge-list { grid-template-columns: minmax(0, 1fr); }
  .printer-art { max-width: 460px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .printer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photos { grid-template-columns: 1fr 1fr; }
  .photos .photo:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .section { padding-top: 80px; padding-bottom: 80px; }
}
@media (max-width: 720px) {
  .nav a:not(.btn) { display: none; }
  .wrap { padding-left: var(--gutter); padding-right: var(--gutter-r); }
  .hero .wrap { padding-top: 40px; padding-bottom: 56px; gap: 32px; }
  .btn-offset, .btn-slide, .btn-progress { padding: 17px 28px; }
  .store { margin: 0 8px; border-radius: 24px; }
  .store .wrap { padding-top: 64px; padding-bottom: 64px; }
  .facts { grid-template-columns: 1fr; }
  .printer-grid { gap: 12px; }
  .ptype { padding: 14px 14px 18px; border-radius: 18px; }
  .ptype h3 { font-size: 17px; }
  .ptype p { font-size: 14px; }
  .photos { padding: 0 8px; gap: 8px; }
  .photo { border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .printer-art .sheet, .printer-art .led, .printer-art:hover .sheet { animation: none; }
  .js [data-animate]:not(.animate__animated) { opacity: 1; }
}
