/* COMPANY — pencil sketchbook on our paper-bg */
html:has(.page-company) {
  background: #f2f0eb url("../images/company/paper-bg.png") center / cover no-repeat fixed;
}

.page-company {
  --paper: #f2f0eb;
  --paper-deep: #e8e4dc;
  --ink: #2a2622;
  --ink-soft: #4a443c;
  --ink-faint: rgba(42, 38, 34, 0.55);
  --graphite: rgba(55, 48, 42, 0.2);
  --hand: "Caveat", "Neucha", cursive;
  --hand-title: "Bad Script", "Caveat", cursive;
  --hand-note: "Neucha", "Caveat", cursive;
  --brand: "Montserrat", sans-serif;
}

.page-shell.page-company {
  --insp-bg: transparent !important;
  --insp-bg-deep: transparent !important;
  --insp-ink: var(--ink);
  --insp-muted: var(--ink-soft);
  background-color: #f2f0eb !important;
  background-image: url("../images/company/paper-bg.png") !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  overflow: hidden;
  color: var(--ink);
}

.page-shell.page-company .insp-shell,
.page-shell.page-company .insp-rail,
.page-shell.page-company .insp-header,
.page-shell.page-company .fq-main,
.page-shell.page-company .fq-main.company-screen,
.page-shell.page-company .insp-pager,
.page-shell.page-company .mobile-nav {
  background: transparent !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
}

.page-shell.page-company .insp-rail {
  border-right: 1px solid rgba(42, 38, 34, 0.14);
}

.page-shell.page-company .insp-rail__num {
  background: transparent;
  font-family: var(--hand-note);
}

.page-shell.page-company .insp-header {
  border-bottom: none;
  backdrop-filter: none;
  position: relative;
}

/* pencil rule under header */
.page-shell.page-company .insp-header::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 0;
  height: 8px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='8' viewBox='0 0 900 8' fill='none'%3E%3Cpath d='M2 4.2C80 2 160 5.5 240 3.2C360 0.5 480 6 600 3.5C720 1 820 5.2 898 3' stroke='%232a2622' stroke-width='1.15' stroke-linecap='round' opacity='0.45'/%3E%3Cpath d='M6 5.1C100 3.4 200 6 300 4C450 1.5 600 6.2 750 4.2C820 3.4 870 5 894 4' stroke='%232a2622' stroke-width='0.55' opacity='0.25'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
}

.page-shell.page-company .insp-pager {
  background: transparent;
  border-top: none;
  position: relative;
}

.page-shell.page-company .insp-pager::before {
  content: "";
  position: absolute;
  left: 2%;
  right: 2%;
  top: 0;
  height: 8px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='8' viewBox='0 0 900 8' fill='none'%3E%3Cpath d='M2 4.5C90 2.2 180 6 280 3.4C400 0.8 520 5.8 640 3.6C760 1.4 840 5.4 898 3.2' stroke='%232a2622' stroke-width='1.1' stroke-linecap='round' opacity='0.4'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
}

.page-shell.page-company .fq-main.company-screen {
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  background: transparent;
}

/* keep paper clean — no extra noise layer on top of paper-bg */

.co-grid {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr 1.3fr 0.95fr;
  grid-template-rows: minmax(0, 1fr) minmax(96px, 0.28fr);
  grid-template-areas:
    "founder story handle process"
    "bottom bottom bottom bottom";
  font-family: var(--hand);
  color: var(--ink);
}

.co-col {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: clamp(8px, 1.1vh, 14px) clamp(10px, 1.1vw, 16px);
  display: flex;
  flex-direction: column;
  /* whole column content centered — inner gaps stay tight */
  justify-content: center;
  position: relative;
}

/* pencil dashed column divider */
.co-col:not(.co-col--process)::after {
  content: "";
  position: absolute;
  top: 4%;
  bottom: 4%;
  right: 0;
  width: 6px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='400' viewBox='0 0 6 400' fill='none'%3E%3Cpath d='M3 2V18M3 28V44M3 56V72M3 84V98M3 110V126M3 138V152M3 164V180M3 192V206M3 218V234M3 246V260M3 272V288M3 300V314M3 326V342M3 354V368M3 380V396' stroke='%232a2622' stroke-width='1.1' stroke-linecap='round' opacity='0.35'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
}

.co-col__inner {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  /* gentle settle-in like a page turn */
  animation: co-ink-in 0.7s ease-out both;
}

.co-col--story .co-col__inner { animation-delay: 0.06s; }
.co-col--handle .co-col__inner { animation-delay: 0.12s; }
.co-col--process .co-col__inner { animation-delay: 0.18s; }

@keyframes co-ink-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .co-col__inner { animation: none; }
}

.co-col--founder { grid-area: founder; }
.co-col--story { grid-area: story; }
.co-col--handle { grid-area: handle; }
.co-col--process { grid-area: process; }

.co-col p,
.co-col li,
.co-spec h3,
.co-spec p,
.co-thanks {
  font-family: var(--hand);
  font-size: clamp(0.8rem, 1.4vh, 1.08rem);
  line-height: 1.3;
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-shadow: 0.35px 0.45px 0 rgba(42, 38, 34, 0.1);
}

/* ——— Founder ——— */
.co-greeting {
  font-family: var(--hand-title) !important;
  font-size: clamp(1.6rem, 3.4vh, 2.4rem) !important;
  line-height: 1 !important;
  margin-bottom: 8px !important;
  transform: rotate(-2.2deg);
  transform-origin: left center;
  text-shadow: 0.6px 0.9px 0 rgba(42, 38, 34, 0.14);
  flex-shrink: 0;
}

.co-letter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 1 auto;
  min-height: 0;
}

.co-letter p {
  transform: rotate(-0.35deg);
}

.co-letter p:nth-child(2n) {
  transform: rotate(0.4deg);
}

.co-letter__accent {
  font-family: var(--hand-title) !important;
  font-size: clamp(1.05rem, 1.85vh, 1.4rem) !important;
  margin-top: 4px !important;
  color: var(--ink-soft);
  position: relative;
  display: inline-block;
  width: fit-content;
}

.co-letter__accent::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -4%;
  bottom: -2px;
  height: 7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='8' viewBox='0 0 120 8' fill='none'%3E%3Cpath d='M1 5.5C18 2.5 35 6 52 4.2C70 2.2 88 6.5 119 3' stroke='%232a2622' stroke-width='1.3' stroke-linecap='round' opacity='0.5'/%3E%3Cpath d='M4 6.2C30 4 60 6.5 90 4.5C105 3.6 115 5.2 118 4.2' stroke='%232a2622' stroke-width='0.6' opacity='0.28'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
}

.co-sign-prefix {
  margin-top: 10px !important;
  font-style: italic;
  opacity: 0.88;
  flex-shrink: 0;
}

.co-sign {
  margin: 2px 0 0;
  max-width: min(150px, 72%);
  transform: rotate(-3.2deg);
  flex-shrink: 0;
}

.co-sign img {
  width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
  filter: contrast(1.08);
}

.co-role {
  font-family: var(--hand-note) !important;
  font-size: clamp(0.82rem, 1.3vh, 0.98rem) !important;
  color: var(--ink-faint) !important;
  margin-top: 2px !important;
  transform: rotate(-0.5deg);
}

.co-brand {
  margin-top: 8px;
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.co-brand__name {
  font-family: var(--brand);
  font-size: clamp(1.05rem, 1.9vh, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.28em;
}

.co-brand__tag {
  font-family: var(--hand-note);
  font-size: clamp(0.72rem, 1.15vh, 0.88rem);
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

/* ——— Story ——— */
.co-title {
  font-family: var(--hand-title);
  font-size: clamp(1.05rem, 1.95vh, 1.35rem);
  font-weight: 400;
  margin: 0 0 8px;
  transform: rotate(-1.1deg);
  line-height: 1.15;
  flex-shrink: 0;
}

.co-col--story .co-col__inner > p + p {
  margin-top: 5px;
}

.co-origami {
  margin: 8px 0 5px;
  max-width: min(100%, 170px);
  flex-shrink: 1;
  min-height: 0;
  transform: rotate(-1.6deg);
  filter: drop-shadow(1px 2px 0 rgba(42, 38, 34, 0.07));
}

.co-origami img,
.co-handle img,
.co-form-search img,
.co-form-extras img,
.co-detail img {
  display: block;
  mix-blend-mode: multiply;
}

.co-origami img {
  max-height: 11vh;
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.co-inspiration {
  max-width: 34ch;
  margin-bottom: 8px !important;
  font-style: italic;
  color: var(--ink-soft);
  transform: rotate(0.45deg);
  flex-shrink: 0;
}

.co-tagline {
  margin: 4px 0 0;
  padding: 9px 11px;
  text-align: center;
  font-family: var(--hand-title);
  font-size: clamp(0.82rem, 1.35vh, 1.05rem);
  line-height: 1.3;
  max-width: 34ch;
  position: relative;
  background: transparent;
  border: none;
  transform: rotate(-0.9deg);
  flex-shrink: 0;
}

.co-tagline::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='90' fill='none'%3E%3Cpath d='M4 8C18 3 40 7 70 5C120 2 180 8 230 4C255 2 272 6 276 12C279 30 274 55 277 72C278 80 270 86 250 87C180 90 100 84 40 87C18 88 5 82 3 70C1 50 6 25 4 8Z' stroke='%232a2622' stroke-width='1.45' opacity='0.72'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
}

/* ——— Handle + side annotations (as mockup) ——— */
.co-col--handle .co-col__inner,
.co-handle-stage {
  display: grid;
  grid-template-columns: minmax(72px, 0.85fr) minmax(0, 1.4fr) minmax(72px, 0.85fr);
  gap: 8px;
  align-items: center;
  width: 100%;
}

.co-handle {
  margin: 0;
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.co-handle img {
  max-height: min(48vh, 420px);
  height: auto;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: contrast(1.04);
}

.co-notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
}

.co-notes--side {
  max-width: none;
  align-self: center;
}

.co-notes li {
  position: relative;
  padding-left: 0;
  font-family: var(--hand-note) !important;
  font-size: clamp(0.72rem, 1.25vh, 0.95rem) !important;
  line-height: 1.25;
  color: var(--ink);
  transform: rotate(-0.35deg);
}

.co-notes--side:first-child li {
  text-align: right;
  transform: rotate(0.35deg);
}

.co-notes--side:first-child li::after {
  content: " →";
  opacity: 0.55;
}

.co-notes--side:last-child li::before {
  content: "← ";
  opacity: 0.55;
}

.co-notes li:nth-child(even) {
  transform: rotate(0.4deg);
}

/* ——— Process ——— */
.co-col--process .co-col__inner {
  gap: 6px;
}

.co-label {
  font-family: var(--hand-title);
  font-size: clamp(0.95rem, 1.7vh, 1.2rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  font-weight: 400;
  color: var(--ink);
  transform: rotate(-0.5deg);
  flex-shrink: 0;
  line-height: 1.2;
}

.co-label--center {
  text-align: center;
  transform: none;
  letter-spacing: 0.08em;
}

.co-form-search {
  margin: 0;
  flex: 0 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.co-form-search img {
  width: 100%;
  height: auto;
  max-height: min(18vh, 140px);
  object-fit: contain;
  object-position: left center;
}

.co-form-extras {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 8px;
  margin: 0;
  align-items: start;
  flex: 0 1 auto;
  min-height: 0;
}

.co-form-extras figure,
.co-detail figure {
  margin: 0;
  padding: 0;
  background: none;
}

.co-form-extras img {
  width: 100%;
  height: auto;
  max-height: min(16vh, 120px);
  object-fit: contain;
  object-position: top left;
}

.co-form-extras__tall img {
  max-height: min(18vh, 135px);
}

.co-form-extras__wide img {
  max-height: min(13vh, 100px);
}

.co-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 1 auto;
  min-height: 0;
  margin-top: 2px;
}

.co-detail {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}

.co-detail figure {
  max-width: min(150px, 70%);
  width: 100%;
}

.co-detail img {
  width: 100%;
  height: auto;
  max-height: min(10vh, 80px);
  object-fit: contain;
  object-position: left center;
}

.co-detail p {
  margin: 0 !important;
  font-family: var(--hand-note) !important;
  font-size: clamp(0.74rem, 1.2vh, 0.92rem) !important;
  color: var(--ink-soft);
  max-width: 28ch;
  transform: rotate(-0.3deg);
}

/* ——— Bottom strip: exactly like mockup ——— */
.co-bottom {
  grid-area: bottom;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(6px, 1vh, 12px) clamp(14px, 2vw, 36px);
  position: relative;
  animation: co-ink-in 0.75s 0.22s ease-out both;
}

/* full-width pencil rules above & below the sheet */
.co-bottom::before,
.co-bottom::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 2%;
  height: 10px;
  pointer-events: none;
}

.co-bottom::before {
  top: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1000' height='10' viewBox='0 0 1000 10' fill='none'%3E%3Cpath d='M2 5.2C90 2.5 180 7 300 4C450 0.5 580 7.5 720 4.5C840 2 930 6.5 998 4' stroke='%232a2622' stroke-width='1.2' stroke-linecap='round' opacity='0.55'/%3E%3Cpath d='M8 6C120 3.5 240 7.2 380 4.8C540 2 700 7 860 5C920 4.2 970 6 992 4.8' stroke='%232a2622' stroke-width='0.55' opacity='0.28'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
}

.co-bottom::after {
  bottom: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1000' height='10' viewBox='0 0 1000 10' fill='none'%3E%3Cpath d='M4 4.8C100 7 200 2.5 340 5C500 8 640 2 780 5C880 7 950 3.5 996 5.2' stroke='%232a2622' stroke-width='1.15' stroke-linecap='round' opacity='0.5'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
}

.co-bottom__sheet {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(6px, 1vh, 10px);
  min-height: 0;
}

/* titles: 5 cols | 3 cols */
.co-bottom__heads {
  display: grid;
  grid-template-columns: 5fr 3fr;
  gap: 8px;
  align-items: end;
}

.co-bottom__title {
  margin: 0;
  justify-self: center;
  width: fit-content;
  max-width: 100%;
  font-family: var(--hand-title);
  font-size: clamp(0.95rem, 1.75vh, 1.25rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
  color: var(--ink);
  position: relative;
  padding-bottom: 8px;
}

.co-bottom__title::after {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: 0;
  height: 8px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='8' viewBox='0 0 240 8' fill='none'%3E%3Cpath d='M2 4.6C30 2 60 6 95 3.5C135 0.8 170 6.2 205 3.8C220 2.6 232 5.2 238 3.5' stroke='%232a2622' stroke-width='1.35' stroke-linecap='round' opacity='0.7'/%3E%3Cpath d='M4 5.5C40 3.5 80 6.5 120 4.5C160 2.5 200 6.5 234 4.2' stroke='%232a2622' stroke-width='0.65' opacity='0.32'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
}

/* 8 equal columns — same as mockup */
.co-bottom__row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: clamp(6px, 1vw, 14px);
  align-items: start;
  min-height: 0;
}

.co-spec {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.co-spec__icon {
  width: clamp(26px, 3vh, 36px);
  height: clamp(26px, 3vh, 36px);
  color: var(--ink);
  opacity: 0.9;
  flex-shrink: 0;
  display: block;
}

.co-spec__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.co-spec h3,
.co-spec p {
  margin: 0 !important;
  font-family: var(--hand-note) !important;
  font-size: clamp(0.72rem, 1.25vh, 0.92rem) !important;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-shadow: 0.25px 0.35px 0 rgba(42, 38, 34, 0.08);
  max-width: 15ch;
}

.co-spec--care p {
  max-width: 18ch;
}

.co-spec:nth-child(odd) { transform: rotate(-0.4deg); }
.co-spec:nth-child(even) { transform: rotate(0.45deg); }

.co-thanks {
  text-align: center;
  font-family: var(--hand-title) !important;
  font-size: clamp(0.88rem, 1.5vh, 1.15rem) !important;
  font-weight: 400;
  margin: 2px 0 0 !important;
  transform: rotate(-0.35deg);
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

@media (max-height: 760px) {
  .co-letter { gap: 4px; }
  .co-origami img { max-height: 8vh; }
  .co-handle img { max-height: min(36vh, 300px); }
  .co-grid {
    grid-template-rows: minmax(0, 1fr) minmax(84px, 0.28fr);
  }
}

@media (max-width: 900px) {
  .co-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "founder story"
      "handle process"
      "bottom bottom";
    overflow: auto;
    height: auto;
  }

  .co-col {
    justify-content: flex-start;
    border-bottom: 1px dashed rgba(42, 38, 34, 0.22);
  }

  .co-col:not(.co-col--process)::after { display: none; }

  .co-col__inner {
    overflow: visible;
    max-height: none;
    animation: none;
  }

  .co-col--handle { min-height: 280px; }

  .page-shell.page-company .fq-main.company-screen {
    overflow: auto;
  }

  .co-bottom { animation: none; }
}

@media (max-width: 640px) {
  .co-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "founder"
      "story"
      "handle"
      "process"
      "bottom";
  }

  .co-bottom__heads {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .co-bottom__row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 12px;
  }
}
