/* Home sign-off: "thank you for visiting" is signed with the கிரி mark, which then
   travels down into the footer. Loaded by the home page only. State lives in classes
   on <html>: .signoff (script active), .so-go (sequence started), .so-signed,
   .so-travel, .so-landed, .so-skip (jump straight to the finished page). */

.signoff {
  flex: 1;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px 0;
}

.signoff-note {
  margin: 0;
  text-align: center;
  font-size: clamp(20px, 3.1vw, 25px);
  color: var(--text);
  opacity: 0;
  transform: translateY(10px);
}

html.so-go .signoff-note { animation: so-rise 0.8s ease 0.35s forwards; }

@keyframes so-rise {
  to { opacity: 1; transform: none; }
}

.signoff-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* the dash carries the same ink weight as the pen line at the signature's rendered size */
.signoff-dash {
  width: clamp(26px, 4vw, 36px);
  height: clamp(1.9px, 0.344vw, 2.4px);
  border-radius: 1.2px;
  background: var(--text);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
}

html.so-go .signoff-dash { animation: so-dash 0.55s cubic-bezier(0.25, 0.6, 0.3, 1) 1.48s forwards; }

@keyframes so-dash {
  from { opacity: 1; transform: scaleX(0); }
  to { opacity: 1; transform: scaleX(1); }
}

.signoff-mark {
  width: clamp(140px, 26vw, 176px);
  position: relative;
  will-change: transform;
}

.signoff-mark svg {
  display: block;
  width: 100%;
  height: auto;
}

.sig {
  fill: none;
  stroke: var(--text);
  stroke-width: 5.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 2;
  stroke-dashoffset: 1.002;
}

.signoff-translit {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -30px;
  font-size: 18px;
  color: var(--secondary);
  opacity: 0;
  transition: opacity 0.7s ease;
}

html.so-signed .signoff-translit { opacity: 1; }

html.so-travel .signoff-note,
html.so-travel .signoff-dash,
html.so-travel .signoff-translit {
  opacity: 0 !important;
  transition: opacity 0.5s ease;
  animation: none;
}

html.so-landed .signoff-mark {
  opacity: 0 !important;
  transition: opacity 0.3s ease;
}

html.so-skip .signoff { visibility: hidden; }

/* the footer mark stays hidden until the signature lands on it */
html.signoff .home-signoff img { opacity: 0; }
html.signoff.so-landed .home-signoff img { opacity: 0.72; transition: opacity 0.3s ease; }

/* generated pen schedule: one stroke per line, hand-paced */
@keyframes sg0 {0.0%{stroke-dashoffset:1.0020}8.3%{stroke-dashoffset:0.9617}16.7%{stroke-dashoffset:0.9176}25.0%{stroke-dashoffset:0.8682}33.3%{stroke-dashoffset:0.8111}41.7%{stroke-dashoffset:0.7436}50.0%{stroke-dashoffset:0.6634}58.3%{stroke-dashoffset:0.5704}66.7%{stroke-dashoffset:0.4680}75.0%{stroke-dashoffset:0.3617}83.3%{stroke-dashoffset:0.2540}91.7%{stroke-dashoffset:0.1394}100.0%{stroke-dashoffset:0.0000}}
html.so-go .sg0 { animation: sg0 0.083s linear 2.200s both; }
@keyframes sg1 {0.0%{stroke-dashoffset:1.0020}8.3%{stroke-dashoffset:0.8871}16.7%{stroke-dashoffset:0.7903}25.0%{stroke-dashoffset:0.7025}33.3%{stroke-dashoffset:0.6180}41.7%{stroke-dashoffset:0.5341}50.0%{stroke-dashoffset:0.4503}58.3%{stroke-dashoffset:0.3675}66.7%{stroke-dashoffset:0.2871}75.0%{stroke-dashoffset:0.2102}83.3%{stroke-dashoffset:0.1373}91.7%{stroke-dashoffset:0.0677}100.0%{stroke-dashoffset:0.0000}}
html.so-go .sg1 { animation: sg1 0.056s linear 2.315s both; }
@keyframes sg2 {0.0%{stroke-dashoffset:1.0020}8.3%{stroke-dashoffset:0.9334}16.7%{stroke-dashoffset:0.8635}25.0%{stroke-dashoffset:0.7914}33.3%{stroke-dashoffset:0.7165}41.7%{stroke-dashoffset:0.6388}50.0%{stroke-dashoffset:0.5588}58.3%{stroke-dashoffset:0.4771}66.7%{stroke-dashoffset:0.3937}75.0%{stroke-dashoffset:0.3078}83.3%{stroke-dashoffset:0.2170}91.7%{stroke-dashoffset:0.1166}100.0%{stroke-dashoffset:0.0000}}
html.so-go .sg2 { animation: sg2 0.046s linear 2.373s both; }
@keyframes sg3 {0.0%{stroke-dashoffset:1.0020}8.3%{stroke-dashoffset:0.8889}16.7%{stroke-dashoffset:0.7897}25.0%{stroke-dashoffset:0.6999}33.3%{stroke-dashoffset:0.6160}41.7%{stroke-dashoffset:0.5356}50.0%{stroke-dashoffset:0.4570}58.3%{stroke-dashoffset:0.3794}66.7%{stroke-dashoffset:0.3024}75.0%{stroke-dashoffset:0.2257}83.3%{stroke-dashoffset:0.1495}91.7%{stroke-dashoffset:0.0741}100.0%{stroke-dashoffset:0.0000}}
html.so-go .sg3 { animation: sg3 0.042s linear 2.443s both; }
@keyframes sg4 {0.0%{stroke-dashoffset:1.0020}8.3%{stroke-dashoffset:0.8509}16.7%{stroke-dashoffset:0.7624}25.0%{stroke-dashoffset:0.6834}33.3%{stroke-dashoffset:0.6080}41.7%{stroke-dashoffset:0.5353}50.0%{stroke-dashoffset:0.4622}58.3%{stroke-dashoffset:0.3859}66.7%{stroke-dashoffset:0.3083}75.0%{stroke-dashoffset:0.2344}83.3%{stroke-dashoffset:0.1591}91.7%{stroke-dashoffset:0.0781}100.0%{stroke-dashoffset:0.0000}}
html.so-go .sg4 { animation: sg4 0.422s linear 2.486s both; }
@keyframes sg5 {0.0%{stroke-dashoffset:1.0020}8.3%{stroke-dashoffset:0.9505}16.7%{stroke-dashoffset:0.8980}25.0%{stroke-dashoffset:0.8436}33.3%{stroke-dashoffset:0.7862}41.7%{stroke-dashoffset:0.7242}50.0%{stroke-dashoffset:0.6553}58.3%{stroke-dashoffset:0.5770}66.7%{stroke-dashoffset:0.4862}75.0%{stroke-dashoffset:0.3805}83.3%{stroke-dashoffset:0.2603}91.7%{stroke-dashoffset:0.1306}100.0%{stroke-dashoffset:0.0000}}
html.so-go .sg5 { animation: sg5 0.081s linear 2.911s both; }
@keyframes sg6 {0.0%{stroke-dashoffset:1.0020}8.3%{stroke-dashoffset:0.8761}16.7%{stroke-dashoffset:0.7976}25.0%{stroke-dashoffset:0.7276}33.3%{stroke-dashoffset:0.6589}41.7%{stroke-dashoffset:0.5941}50.0%{stroke-dashoffset:0.5325}58.3%{stroke-dashoffset:0.4720}66.7%{stroke-dashoffset:0.4107}75.0%{stroke-dashoffset:0.3476}83.3%{stroke-dashoffset:0.2792}91.7%{stroke-dashoffset:0.1735}100.0%{stroke-dashoffset:0.0000}}
html.so-go .sg6 { animation: sg6 0.342s linear 2.992s both; }
@keyframes sg7 {0.0%{stroke-dashoffset:1.0020}8.3%{stroke-dashoffset:0.9122}16.7%{stroke-dashoffset:0.8536}25.0%{stroke-dashoffset:0.7924}33.3%{stroke-dashoffset:0.7296}41.7%{stroke-dashoffset:0.6668}50.0%{stroke-dashoffset:0.6018}58.3%{stroke-dashoffset:0.5302}66.7%{stroke-dashoffset:0.4622}75.0%{stroke-dashoffset:0.3977}83.3%{stroke-dashoffset:0.2782}91.7%{stroke-dashoffset:0.1118}100.0%{stroke-dashoffset:0.0000}}
html.so-go .sg7 { animation: sg7 0.588s linear 3.390s both; }
@keyframes sg8 {0.0%{stroke-dashoffset:1.0020}8.3%{stroke-dashoffset:0.9617}16.7%{stroke-dashoffset:0.9076}25.0%{stroke-dashoffset:0.8281}33.3%{stroke-dashoffset:0.7295}41.7%{stroke-dashoffset:0.6280}50.0%{stroke-dashoffset:0.5264}58.3%{stroke-dashoffset:0.4277}66.7%{stroke-dashoffset:0.3420}75.0%{stroke-dashoffset:0.2601}83.3%{stroke-dashoffset:0.1658}91.7%{stroke-dashoffset:0.0753}100.0%{stroke-dashoffset:0.0000}}
html.so-go .sg8 { animation: sg8 0.205s linear 4.226s both; }
@keyframes sg9 {0.0%{stroke-dashoffset:1.0020}8.3%{stroke-dashoffset:0.9361}16.7%{stroke-dashoffset:0.8681}25.0%{stroke-dashoffset:0.7974}33.3%{stroke-dashoffset:0.7236}41.7%{stroke-dashoffset:0.6467}50.0%{stroke-dashoffset:0.5673}58.3%{stroke-dashoffset:0.4856}66.7%{stroke-dashoffset:0.4016}75.0%{stroke-dashoffset:0.3144}83.3%{stroke-dashoffset:0.2216}91.7%{stroke-dashoffset:0.1188}100.0%{stroke-dashoffset:0.0000}}
html.so-go .sg9 { animation: sg9 0.044s linear 4.435s both; }
@keyframes sg10 {0.0%{stroke-dashoffset:1.0020}8.3%{stroke-dashoffset:0.8845}16.7%{stroke-dashoffset:0.7873}25.0%{stroke-dashoffset:0.6910}33.3%{stroke-dashoffset:0.5947}41.7%{stroke-dashoffset:0.5028}50.0%{stroke-dashoffset:0.4282}58.3%{stroke-dashoffset:0.3658}66.7%{stroke-dashoffset:0.2991}75.0%{stroke-dashoffset:0.2268}83.3%{stroke-dashoffset:0.1584}91.7%{stroke-dashoffset:0.0928}100.0%{stroke-dashoffset:0.0000}}
html.so-go .sg10 { animation: sg10 0.205s linear 4.501s both; }
@keyframes sg11 {0.0%{stroke-dashoffset:1.0020}8.3%{stroke-dashoffset:0.9157}16.7%{stroke-dashoffset:0.8607}25.0%{stroke-dashoffset:0.8022}33.3%{stroke-dashoffset:0.7431}41.7%{stroke-dashoffset:0.6872}50.0%{stroke-dashoffset:0.6308}58.3%{stroke-dashoffset:0.5724}66.7%{stroke-dashoffset:0.5143}75.0%{stroke-dashoffset:0.4572}83.3%{stroke-dashoffset:0.3741}91.7%{stroke-dashoffset:0.2313}100.0%{stroke-dashoffset:0.0000}}
html.so-go .sg11 { animation: sg11 0.507s linear 4.793s both; }

@media (prefers-reduced-motion: reduce) {
  .signoff { display: none; }
  html.signoff .home-signoff img { opacity: 0.72; }
}
