/* procoderacademy.com: "we've moved" notice. Sibling of procoderbd.com, built on its tokens. */

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Palette, sampled from the procoder logo (same values as procoderbd.com) */
  --ink: #12122b; /* page ground */
  --ink-raise: #1b1b3c; /* raised surfaces */
  --ink-line: #2c2c55; /* hairlines */
  --coral: #f8afa6;
  --coral-dim: #c97f76;
  --slate: #272d3d; /* text on coral */
  --mist: #a0a0c4; /* body text */
  --mist-soft: #8a8ab2; /* captions; procoderbd.com uses #8585ad, nudged up to pass AA on tinted diff rows */
  --white: #fff;

  --coral-wash: rgba(248, 175, 166, 0.045);
  --coral-wash-strong: rgba(248, 175, 166, 0.11);
  --bar-wash: rgba(255, 255, 255, 0.015);
  --slate-line: rgba(39, 45, 61, 0.16);
  --slate-text: rgba(39, 45, 61, 0.86);
  --eyebrow-on-coral: #5a403c;
  --shadow-card: 0 24px 60px -30px rgba(0, 0, 0, 0.85);
  --shadow-button: 0 14px 30px -14px rgba(248, 175, 166, 0.55);

  /* Type */
  --f-display: 'Outfit', 'Anek Bangla', sans-serif;
  --f-body: 'Outfit', 'Hind Siliguri', sans-serif;
  --f-mono: 'JetBrains Mono', 'Hind Siliguri', monospace;
  --f-brand: 'Outfit', sans-serif;

  --fs-label: 1rem; /* 16px: eyebrows on mobile, meta, code, footer */
  --fs-body: 1.125rem; /* 18px: body copy, cards, rows */
  --fs-lead: 1.25rem; /* 20px: lede, pull quote, h3, eyebrows */
  --fs-title: 1.5rem; /* 24px: closing statement */
  --fs-h2: clamp(1.5rem, 1.2rem + 1.5vw, 2.125rem); /* 24–34px */
  --fs-h1: clamp(2rem, 1.4rem + 3.2vw, 3.5rem); /* 32–56px */

  /* Space */
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --measure: 34rem;
  --band: clamp(3.5rem, 9vw, 6.5rem);
  --band-tight: clamp(2.5rem, 6vw, 4rem);
  --row-pad: 1.25rem 0.25rem;

  /* Shape and motion */
  --radius: 12px;
  --radius-sm: 10px;
  --radius-xs: 5px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background: var(--ink);
  color: var(--mist);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.015em;
  color: var(--white);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
  margin-bottom: 1.75rem;
}

h3 {
  font-size: var(--fs-lead);
  font-weight: 600;
}

p {
  text-wrap: pretty;
}

p + p {
  margin-top: 1.4em;
}

b {
  font-weight: 600;
}

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.wrap {
  width: 100%;
  max-width: 60rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band {
  padding-block: var(--band);
}

.band--tight {
  padding-block: var(--band-tight);
}

.band--ruled {
  border-top: 1px solid var(--ink-line);
}

/* Copy on the left, timeline on the right: the story grid from procoderbd.com */
.split {
  display: grid;
  gap: clamp(2.5rem, 5vw, 3.5rem);
}

@media (min-width: 52rem) {
  .split {
    grid-template-columns: minmax(0, 1fr) 17rem;
    gap: clamp(3rem, 6vw, 5rem);
    align-items: start;
  }
}

/* ==========================================================================
   Components
   ========================================================================== */

/* Masthead ---------------------------------------------------------------- */

.masthead {
  padding-block: clamp(1.25rem, 3vw, 1.75rem);
}

.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.masthead__link {
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  color: var(--mist-soft);
  text-decoration: none;
  transition: color 0.25s;
}

.masthead__link:hover {
  color: var(--coral);
}

/* Brand pill: the "procoder" logo set in type. Sized in em so it shrinks
   just enough for the header to stay on one line from 360px up. */
.brand {
  display: inline-flex;
  align-items: center;
  height: 1.62em;
  padding: 0 0.6em 0.08em;
  border-radius: var(--radius-xs);
  background: var(--coral);
  color: var(--slate);
  font-family: var(--f-brand);
  font-size: clamp(1rem, 0.75rem + 1.2vw, 1.3rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Eyebrow ----------------------------------------------------------------- */

.eyebrow {
  margin-bottom: 1.25rem;
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--coral-dim);
}

.eyebrow--dark {
  color: var(--eyebrow-on-coral);
}

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

/* Tighter than procoderbd.com on phones so the CTA sits above the fold */
.hero {
  padding-block: clamp(1.5rem, 6vw, 5rem) clamp(3rem, 8vw, 5.5rem);
}

.hero__title {
  max-width: 20ch;
}

.hero__quiet {
  display: block;
  font-weight: 300;
  color: var(--mist);
}

.hero__lede {
  max-width: var(--measure);
  margin-top: clamp(1.25rem, 3vw, 1.75rem);
  font-size: var(--fs-lead);
}

.hero__name {
  color: var(--white);
}

.hero__name--old {
  color: var(--coral);
}

.hero__actions {
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
}

.hero__url {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin-top: 1rem;
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  line-height: 1.6;
  color: var(--mist-soft);
}

.hero__url-icon {
  flex: none;
  width: 0.95rem;
  height: 0.95rem;
  margin-top: 0.33rem;
  color: var(--coral-dim);
}

/* scripts.js adds <wbr> after each slash; breaking inside a word is the last resort */
.hero__url-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Button ------------------------------------------------------------------ */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.25rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  background: var(--coral);
  color: var(--slate);
  font-family: var(--f-display);
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  transition:
    transform 0.25s var(--ease-spring),
    box-shadow 0.25s;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-button);
}

.button__arrow {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  transition: transform 0.25s var(--ease-spring);
}

.button:hover .button__arrow {
  transform: translateX(3px);
}

/* Diff card --------------------------------------------------------------- */

.diff {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  overflow: hidden;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  background: var(--ink-raise);
  box-shadow: var(--shadow-card);
}

.diff__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--ink-line);
  background: var(--bar-wash);
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.04em;
  color: var(--mist-soft);
}

.diff__file {
  font-weight: 500;
  color: var(--coral-dim);
}

.diff__body {
  padding-block: 1rem;
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  line-height: 1.95;
}

/* Wraps instead of scrolling, so the new domain is never cut off on phones */
.diff__line {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding-inline: 0.5rem;
  color: var(--mist);
  text-decoration: none;
  white-space: pre-wrap;
}

.diff__gutter {
  flex: none;
  width: 0.75rem;
  text-align: center;
  color: var(--mist-soft);
  user-select: none;
}

.diff__code {
  min-width: 0;
  font: inherit;
  overflow-wrap: anywhere;
}

.diff__key {
  color: var(--mist-soft);
}

.diff__ident {
  color: var(--coral-dim);
}

.diff__line--del {
  background: var(--coral-wash);
  color: var(--mist-soft);
}

.diff__line--del .diff__gutter {
  color: var(--coral-dim);
}

/* A background line instead of text-decoration: it can be drawn in, and it follows wrapped text */
.diff__line--del .diff__val {
  background: linear-gradient(var(--coral-dim), var(--coral-dim)) no-repeat 0 55% / 100% 1px;
}

.diff__line--add {
  background: var(--coral-wash-strong);
  color: var(--white);
}

.diff__line--add .diff__gutter,
.diff__line--add .diff__val {
  color: var(--coral);
}

.diff__line--add .diff__key {
  color: var(--mist);
}

.diff__line--add .diff__val {
  font-weight: 500;
}

.diff__foot {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--ink-line);
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.03em;
  color: var(--mist-soft);
}

.diff__foot b {
  font-weight: 500;
  color: var(--coral);
}

/* Coral band: what did not change ------------------------------------------ */

.kept {
  background: var(--coral);
  color: var(--slate);
}

.kept__heading {
  color: var(--slate);
}

.kept__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  overflow: hidden;
  list-style: none;
  border: 1px solid var(--slate-line);
  border-radius: var(--radius-sm);
  background: var(--slate-line);
}

.kept__item {
  padding: 1.5rem 1.4rem;
  background: var(--coral);
}

.kept__title {
  margin-bottom: 0.4rem;
  color: var(--slate);
}

.kept__text {
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--slate-text);
}

/* Prose and pull quote ------------------------------------------------------ */

.prose {
  max-width: var(--measure);
}

.pull {
  max-width: var(--measure);
  margin-top: 2.5rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--coral);
  font-family: var(--f-display);
  font-size: var(--fs-lead);
  font-weight: 600;
  line-height: 1.6;
  color: var(--white);
}

/* Timeline ---------------------------------------------------------------- */

.timeline {
  display: grid;
  gap: 1.9rem;
  padding-left: 1.75rem;
  border-left: 1px solid var(--ink-line);
  list-style: none;
}

.timeline__item {
  position: relative;
}

/* Dot centred on the 1px rail */
.timeline__item::before {
  content: '';
  position: absolute;
  top: 0.5rem;
  left: calc(-1.75rem - 5px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink-line);
  box-shadow: 0 0 0 4px var(--ink);
}

.timeline__item--now::before {
  background: var(--coral);
}

.timeline__label {
  display: block;
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  color: var(--coral-dim);
}

.timeline__item--now .timeline__label {
  color: var(--coral);
}

.timeline__text {
  margin-top: 0.4rem;
  font-size: var(--fs-body);
  line-height: 1.6;
}

.timeline__text b {
  color: var(--white);
}

/* Inline link ------------------------------------------------------------- */

.link {
  color: var(--coral);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  overflow-wrap: anywhere;
  transition: color 0.25s;
}

.link:hover {
  color: var(--white);
}

/* FAQ: native <details>, drawn like the link rows -------------------------- */

.faq {
  border-top: 1px solid var(--ink-line);
}

.faq__item {
  border-bottom: 1px solid var(--ink-line);
}

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: var(--row-pad);
  list-style: none;
  cursor: pointer;
  font-family: var(--f-display);
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.5;
  color: var(--white);
  transition: color 0.25s;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question:hover {
  color: var(--coral);
}

.faq__icon {
  flex: none;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--coral-dim);
  transition:
    transform 0.3s var(--ease-out),
    color 0.25s;
}

.faq__question:hover .faq__icon,
.faq__item[open] .faq__icon {
  color: var(--coral);
}

.faq__item[open] .faq__icon {
  transform: rotate(45deg);
}

.faq__answer {
  max-width: var(--measure);
  padding: 0 0.25rem 1.5rem;
}

/* Link rows --------------------------------------------------------------- */

.links {
  border-top: 1px solid var(--ink-line);
  list-style: none;
}

.links__row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: var(--row-pad);
  border-bottom: 1px solid var(--ink-line);
  color: var(--white);
  text-decoration: none;
  transition:
    padding-left 0.3s var(--ease-out),
    color 0.25s;
}

.links__row:hover,
.links__row:focus-visible {
  padding-left: 1rem;
  color: var(--coral);
}

.links__icon {
  flex: none;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--coral-dim);
  transition: color 0.25s;
}

.links__row:hover .links__icon {
  color: var(--coral);
}

.links__name {
  font-family: var(--f-display);
  font-size: var(--fs-body);
  font-weight: 600;
}

/* The mono tags only fit once there is room */
.links__meta {
  display: none;
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  color: var(--mist-soft);
}

.links__row:hover .links__meta {
  color: var(--coral-dim);
}

/* Closing ----------------------------------------------------------------- */

.closing {
  text-align: center;
}

.closing__text {
  max-width: 32ch;
  margin-inline: auto;
  font-family: var(--f-display);
  font-size: var(--fs-title);
  font-weight: 600;
  line-height: 1.55;
  color: var(--white);
}

.closing__sign {
  margin-top: 2rem;
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral-dim);
}

/* Second way out for visitors who read to the end, so nobody has to scroll back up */
.closing__action {
  margin-top: 2.25rem;
}

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

.footer {
  padding-block: 2rem;
  border-top: 1px solid var(--ink-line);
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.05em;
  text-align: center;
  color: var(--mist-soft);
}

/* Larger screens ---------------------------------------------------------- */

/* Below 360px the diff rows need every pixel for "alihossainacademy.com" to fit whole */
@media (min-width: 22.5rem) {
  .diff__line {
    gap: 0.6rem;
    padding-inline: 0.8rem;
  }

  /* Hanging indent: a wrapped value lines up under its key, like wrapped code in an editor */
  .diff__code {
    padding-left: 2ch;
    text-indent: -2ch;
  }
}

@media (min-width: 34rem) {
  .eyebrow {
    margin-bottom: 1.5rem;
    font-size: var(--fs-lead);
  }

  .diff__body {
    line-height: 2.1;
  }

  .diff__line {
    gap: 0.85rem;
    padding-inline: 1rem;
  }

  .links__meta {
    display: inline;
  }
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Motion (only for visitors who have not asked for less)
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .hero .wrap > * {
    animation: rise 0.6s var(--ease-out) both;
  }

  .hero .wrap > :nth-child(2) {
    animation-delay: 0.06s;
  }

  .hero .wrap > :nth-child(3) {
    animation-delay: 0.12s;
  }

  .hero .wrap > :nth-child(4) {
    animation-delay: 0.18s;
  }

  .hero .wrap > :nth-child(5) {
    animation-delay: 0.24s;
  }

  /* Diff lines type in, then the old domain gets struck through */
  .diff__line {
    animation: line-in 0.45s var(--ease-out) both;
  }

  .diff__line:nth-child(1) {
    animation-delay: 0.35s;
  }

  .diff__line:nth-child(2) {
    animation-delay: 0.45s;
  }

  .diff__line:nth-child(3) {
    animation-delay: 0.55s;
  }

  .diff__line:nth-child(4) {
    animation-delay: 0.85s;
  }

  .diff__line:nth-child(5) {
    animation-delay: 1.05s;
  }

  .diff__line:nth-child(6) {
    animation-delay: 1.15s;
  }

  .diff__line:nth-child(7) {
    animation-delay: 1.25s;
  }

  .diff__line:nth-child(8) {
    animation-delay: 1.35s;
  }

  .diff__line:nth-child(9) {
    animation-delay: 1.45s;
  }

  .diff__line--del .diff__val {
    animation: strike 0.5s var(--ease-out) 0.75s both;
  }

  .faq__item[open] .faq__answer {
    animation: rise 0.35s var(--ease-out);
  }
}

/* Hover and open states still change, they just snap instead of moving */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

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

@keyframes strike {
  from {
    background-size: 0 1px;
  }
}
