/* ============================================================
   Ritika Sharma — case study 03 · IDone HRMS dashboard redesign

   Same design system as case studies 01 and 02: a 1160px content
   column on 120px margins, a numbered heading rail, prose starting
   on the 474px line. Widths, card sizes and colours are lifted from
   the 1400px-wide design file for this case study.
   ============================================================ */

:root {
  --ink:       #171717;   /* headings                        */
  --body:      #525252;   /* section prose                   */
  --muted:     #737373;   /* secondary copy                  */
  --line:      #eaeaea;   /* section dividers                */
  --paper:     #ffffff;
  --tint:      #ecf4ff;   /* pale blue plate behind shots     */
  --blue:      #1d4ed8;   /* CTA                             */
  --blue-deep: #2b3a55;   /* serif card headlines            */
  --blue-mist: #bed3f0;   /* solution card numbers           */
  --rose:      #ffb6b6;   /* problem bullets                 */

  --slate:     #262d38;   /* before/after comparison plate    */
  --dark-2:    #2b2b2b;   /* footer plate, same as the landing page */

  --nav-h: 62px;
  --rail:  354px;         /* numbered heading column + gutter */
  --head-w: 325px;        /* the heading text box itself      */
  --num-w:  19px;         /* the hanging "1." / "2." column   */

  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', 'Iowan Old Style', Georgia, serif;
  --font-mono:  'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

.arr { font-size: .85em; }

/* 1160px of content plus the gutters, so the column lands on the same
   120px margins the design file uses at 1400px wide */
.wrap {
  max-width: 1208px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─────────────────────────  NAV  ─────────────────────────
   Identical to the landing page and case studies 01 and 02: same
   frosted glass, same sizes, same hover behaviour.              */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 22px;
  background: rgba(16, 16, 16, .66);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
          backdrop-filter: blur(28px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 6px 30px rgba(0, 0, 0, .18);
  color: #fff;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
}

.nav__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

.nav__links {
  display: flex;
  gap: 34px;
  font-size: 13.5px;
  font-weight: 400;
  color: #eaeaea;
}

.nav__links a { opacity: .85; transition: opacity .2s; }
.nav__links a:hover { opacity: 1; }

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 12.5px;
  font-weight: 500;
  transition: transform .2s, box-shadow .2s;
}
.nav__cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.35); }

/* ─────────────────────────  HERO  ───────────────────────── */
.hero { padding: calc(var(--nav-h) + 68px) 0 0; }

.hero__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(30px, 4.4vw, 60px);
  line-height: 1.06;
}

/* four labelled columns, widths taken from the design file */
.meta {
  display: grid;
  grid-template-columns: 251px 291px 321px 1fr;
  margin: 65px 0 0;
}

.meta__col { min-width: 0; }

.meta dt {
  margin: 0 0 11px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--body);
}

.meta dd {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  color: var(--ink);
}

/* the periwinkle plate carrying the new dashboard, lifted off the
   page by the same soft shadow the other case studies use */
.hero__shot {
  margin: 71px 0 0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(19, 19, 19, .12);
}

.hero__shot img { width: 100%; }

/* ───────────────────  SECTION SCAFFOLD  ───────────────────
   Every numbered section shares one grid: a rail holding the
   numbered heading, then prose on a fixed line. The number hangs
   into the left margin, so wrapped heading lines sit under the
   first word rather than under the number.                      */
.sec {
  padding: 56px 0 72px;
  border-top: 1px solid var(--line);
}

.sec--first { border-top: 0; padding-top: 71px; }
.sec--last  { padding-bottom: 106px; }

/* section 7 carries a wider heading, so its rail is wider too */
.sec--rail7 { --rail: 400px; --head-w: 376px; }

.sec__grid {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  align-items: start;
}

.sec__head {
  display: flex;
  gap: 16px;
  width: var(--head-w);
  margin: 0;
  padding-left: 10px;
  font-size: 28px;
  font-weight: 600;
  line-height: 45px;
  color: var(--ink);
}

.sec__num { flex: none; width: var(--num-w); }

/* sections 2, 5, 6 and 8 run their heading across the full column */
.sec__head--wide { width: auto; }

.sec__body { min-width: 0; }

.sec__body > p {
  margin: 0 0 20px;
  font-size: 18px;
  line-height: 28px;
  color: var(--body);
}
.sec__body > p:last-child { margin-bottom: 0; }
.sec__body strong { font-weight: 600; color: var(--ink); }

/* ─────────────────  FULL-WIDTH SCREENSHOTS  ───────────────── */
.shot { margin: 55px 0 0; }
.shot img { width: 100%; border-radius: 24px; }

/* the iteration board already carries its own pale blue plate */
.shot--tint img { border-radius: 20px; }

/* the finished dashboard sits inside a hairline frame, as in the file */
.shot--frame {
  margin-top: 60px;
  padding: 8px;
  border: 1px solid #ededed;
  border-radius: 26px;
  box-shadow: 0 14px 40px rgba(19, 32, 71, .07);
}
.shot--frame img { border-radius: 20px; }

/* ────────────────────  2 · THE PROBLEM  ────────────────────
   The legacy screen on the left, the five failings on the right. */
.problem {
  display: grid;
  grid-template-columns: 622px 1fr;
  column-gap: 74px;
  align-items: start;
  margin-top: 50px;
}

.problem__shot { margin: 0; }

.problem__shot figcaption {
  margin: 0 0 25px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
  color: var(--ink);
}

.problem__shot img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 26px rgba(19, 32, 71, .10);
}

/* ─────────────────────  BULLET LISTS  ───────────────────── */
.bullets {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bullets li { position: relative; }
.bullets li::before {
  content: "";
  position: absolute;
  border-radius: 50%;
}

/* the problem list: rose dots hanging off the left of each item */
.bullets--rose li {
  padding-left: 34px;
  margin-bottom: 28px;
}
.bullets--rose li:last-child { margin-bottom: 0; }
.bullets--rose li::before {
  left: 0;
  top: 5px;
  width: 15px;
  height: 15px;
  background: var(--rose);
}

.bullets--rose h3 {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 600;
  line-height: 27px;
  color: var(--ink);
}

.bullets--rose p {
  margin: 0;
  font-size: 17px;
  line-height: 27px;
  color: var(--body);
}

/* ────────────────  RESEARCH & INSIGHTS CARDS  ────────────────
   Three equal cards, headline pinned to the top,
   body copy resting on the bottom edge.                    */
.rcards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 55px;
}

.rcard {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;
  min-height: 405px;
  padding: 30px 30px 38px;
  border: 1px solid #f5f5f5;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 6px 22px rgba(19, 32, 71, .05);
}

.rcard h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 26px;
  line-height: 34px;
  color: var(--blue-deep);
}


.rcard p {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
  color: #262626;
}

/* ────────────  UX STRATEGY & DESIGN SOLUTION CARDS  ────────────
   Four numbered cards: what was built, then its UX impact.       */
.solutions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 44px;
}

.scard {
  position: relative;
  padding: 30px 30px 36px;
  border: 1px solid #f5f5f5;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 6px 22px rgba(19, 32, 71, .05);
}

.scard__num {
  position: absolute;
  top: 22px;
  right: 22px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  color: var(--blue-mist);
}

.scard h3 {
  padding-right: 22px;   /* keeps the first line clear of the number */
  margin: 0 0 20px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 23px;
  line-height: 32px;
  color: var(--blue-deep);
}

.scard h4 {
  margin: 34px 0 10px;
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
  color: var(--ink);
}

.scard p {
  margin: 0;
  font-size: 17px;
  line-height: 24px;
  color: #262626;
}

/* ──────────  6 · BEFORE & AFTER COMPARISON PLATE  ──────────
   A dark slate plate: category on the left, the old behaviour in
   the middle, the redesigned behaviour picked out in white.      */
.compare {
  margin-top: 50px;
  padding: 40px 44px 46px;
  border-radius: 24px;
  background: var(--slate);
}

.compare__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.compare__table th,
.compare__table td {
  vertical-align: top;
  text-align: left;
  font-weight: 400;
}

/* the three column labels */
.compare__table thead th {
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(212, 208, 197, .45);
  font-size: 13px;
  letter-spacing: .04em;
  line-height: 20px;
  text-transform: uppercase;
  color: #b7bcc4;
}
.compare__table thead th:nth-child(2),
.compare__table thead th:nth-child(3) { text-align: center; }

.compare__table col-group { display: none; }

.compare__table tbody th,
.compare__table tbody td {
  padding: 26px 26px 0 0;
  font-size: 16px;
  line-height: 26px;
}

.compare__table tbody tr:first-child th,
.compare__table tbody tr:first-child td { padding-top: 31px; }

/* category · old · redesigned, each a step brighter than the last */
.compare__table tbody th        { width: 31%; color: #9ba1ab; }
.compare__table tbody td        { color: #c6cad1; }
.compare__table tbody td + td   { color: #ffffff; padding-right: 0; }

.compare__table tbody td:first-of-type { padding-left: 32px; }

/* the stacked phone version of the same table */
.compare__stack { display: none; }

/* ─────────────────────  IMPACT CARDS  ───────────────────── */
.impact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 55px;
}

.icard {
  position: relative;
  overflow: hidden;
  min-height: 329px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;
  padding: 33px 30px 36px;
  border: 1px solid #f5f5f5;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 6px 22px rgba(19, 32, 71, .05);
}

/* the middle card sits on a light plate, as in the design file */
.icard:nth-child(even) { background: #f6f6f6; }

/* the pale ring watermark tucked into the top-right corner, its open
   side rotated up into the corner so the card crops it away */
.icard::after {
  content: "";
  position: absolute;
  top: -29px;
  right: -21px;
  width: 98px;
  height: 98px;
  border: 19px solid #ebf4ff;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(-38deg);
}

.icard h3 {
  position: relative;
  z-index: 1;
  max-width: 250px;
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 25px;
  line-height: 36px;
  color: var(--blue-deep);
}

.icard p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 18px;
  line-height: 24px;
  color: #262626;
}

/* ──────────────────  LESSONS LEARNED  ────────────────── */
.lessons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 44px;
}

.lcard {
  min-height: 222px;
  padding: 30px 30px 34px;
  border: 1px solid #f5f5f5;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 6px 22px rgba(19, 32, 71, .05);
}

.lcard h3 {
  margin: 0 0 26px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 24px;
  line-height: 29px;
  color: var(--blue-deep);
}

.lcard p {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
  color: #262626;
}

/* ─────────────────────────  FOOTER  ─────────────────────────
   Identical to the landing page and case studies 01 and 02.     */
.footer {
  background: var(--dark-2);
  color: #f2f2f2;
  text-align: center;
  padding: 46px 24px 26px;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
}

.footer__title {
  margin: 16px auto 14px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(21px, 2.8vw, 30px);
  line-height: 1.3;
  letter-spacing: .01em;
}

.footer__copy {
  margin: 0 0 26px;
  font-size: 12.5px;
  color: #b9b9b9;
}
.footer__copy a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.socials { display: flex; justify-content: center; gap: 12px; }

.socials a {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #efefef;
  color: #1c1c1c;
  transition: transform .2s, background .2s;
}
.socials a:hover { background: #fff; transform: translateY(-2px); }

.socials svg { width: 17px; height: 17px; }

.footer__legal {
  margin: 30px 0 0;
  font-size: 10.5px;
  color: #8a8a8a;
}

/* ─────────────────────────  RESPONSIVE  ───────────────────────── */

@media (max-width: 1240px) {
  :root { --rail: 310px; --head-w: 290px; }
  .sec--rail7 { --rail: 340px; --head-w: 320px; }

  .meta { grid-template-columns: repeat(4, 1fr); column-gap: 20px; }

  .problem { grid-template-columns: 1.05fr 1fr; column-gap: 44px; }

  .rcards, .impact { gap: 18px; }
  .rcard, .icard { padding-left: 26px; padding-right: 26px; }

  /* headings use the full card width, but keep clear of the icon and
     the ring watermark sitting in the top-right corner */
    .icard h3 { max-width: none; padding-right: 62px; }

  .solutions { gap: 12px; }
  .scard { padding: 26px 20px 30px; }
  .scard h3 { font-size: 21px; line-height: 30px; }

  .compare { padding: 34px 30px 40px; }
  .compare__table tbody td:first-of-type { padding-left: 20px; }
}

@media (max-width: 1000px) {
  .sec__grid { grid-template-columns: 1fr; gap: 24px; }
  .sec__head, .sec--rail7 .sec__head { width: auto; line-height: 1.3; }

  /* the legacy screen moves above the list of failings */
  .problem { grid-template-columns: 1fr; row-gap: 40px; }
  .problem__shot img { max-width: 640px; margin: 0 auto; }

  .rcards, .impact { grid-template-columns: repeat(2, 1fr); }
  .rcard { min-height: 340px; }
  .icard { min-height: 290px; }

  /* the four solutions become a 2 × 2 grid */
  .solutions { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .scard h4 { margin-top: 26px; }
}

@media (max-width: 860px) {
  .nav { padding: 0 16px; }
  .nav__links { gap: 20px; font-size: 12.5px; }
  .nav__cta { padding: 8px 13px; font-size: 12px; }

  .hero { padding-top: calc(var(--nav-h) + 42px); }
  .meta { grid-template-columns: repeat(2, 1fr); gap: 26px 20px; margin-top: 44px; }
  .hero__shot { margin-top: 48px; }

  .sec { padding: 48px 0 58px; }
  .sec--first { padding-top: 52px; }
  .sec--last { padding-bottom: 80px; }
  .sec__head { font-size: 24px; gap: 12px; padding-left: 0; }
  :root { --num-w: 17px; }

  .sec__body > p { font-size: 17px; line-height: 27px; }

  .shot { margin-top: 40px; }
  .shot--frame { margin-top: 44px; padding: 6px; border-radius: 20px; }
  .shot--frame img { border-radius: 16px; }

  .problem { margin-top: 38px; }
  .rcards, .impact, .lessons, .solutions { margin-top: 40px; }
  .compare { margin-top: 40px; }
  .lessons { grid-template-columns: 1fr; }
  .lcard { min-height: 0; }

  /* the comparison turns into one stacked block per row */
  .compare { padding: 26px 22px 28px; border-radius: 20px; }
  .compare__table thead { display: none; }
  .compare__table,
  .compare__table tbody,
  .compare__table tr,
  .compare__table th,
  .compare__table td { display: block; width: auto; }

  .compare__table tbody tr {
    padding: 22px 0;
    border-bottom: 1px solid rgba(212, 208, 197, .22);
  }
  .compare__table tbody tr:first-child { padding-top: 4px; }
  .compare__table tbody tr:last-child { padding-bottom: 4px; border-bottom: 0; }

  .compare__table tbody th {
    width: auto;
    padding: 0 0 14px;
    font-size: 17px;
    font-weight: 600;
    line-height: 25px;
    color: #ffffff;
  }

  .compare__table tbody td,
  .compare__table tbody td:first-of-type,
  .compare__table tbody tr:first-child th,
  .compare__table tbody tr:first-child td {
    padding: 0 0 12px 0;
    font-size: 15.5px;
    line-height: 24px;
  }

  /* the row heading keeps its own weight once the columns collapse */
  .compare__table tbody tr:first-child th { padding-bottom: 14px; font-size: 17px; }
  .compare__table tbody tr td:last-child { padding-bottom: 0; }

  /* each cell names the column it came from */
  .compare__table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    font-size: 11.5px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #8d939d;
  }
}

@media (max-width: 620px) {
  :root { --nav-h: 56px; }

  .nav__brand span { display: none; }
  .nav__links { gap: 15px; font-size: 12px; }
  .nav__cta { padding: 7px 11px; font-size: 11.5px; }

  .hero__title { font-size: 30px; line-height: 1.14; }
  .meta { grid-template-columns: 1fr; gap: 20px; }
  .meta dt { font-size: 13px; margin-bottom: 6px; }
  .meta dd { font-size: 16px; }
  .hero__shot { margin-top: 34px; border-radius: 16px; }

  .sec__head { font-size: 22px; }
  .sec__body > p { font-size: 16px; line-height: 26px; }

  .shot img, .shot--tint img { border-radius: 12px; }
  .shot--frame { padding: 5px; border-radius: 16px; }
  .shot--frame img { border-radius: 12px; }

  .problem { row-gap: 30px; }
  .problem__shot figcaption { margin-bottom: 16px; font-size: 16px; }
  .problem__shot img { border-radius: 8px; }

  .bullets--rose li { padding-left: 28px; margin-bottom: 22px; }
  .bullets--rose li::before { width: 13px; height: 13px; top: 6px; }
  .bullets--rose h3 { font-size: 17px; line-height: 25px; }
  .bullets--rose p { font-size: 16px; line-height: 25px; }

  /* one card per row, each sized by its own copy */
  .rcards, .impact, .solutions { grid-template-columns: 1fr; gap: 16px; }
  .rcard, .icard {
    min-height: 0;
    gap: 22px;
    padding: 26px 24px 28px;
  }
  .rcard h3 { font-size: 22px; line-height: 31px; }
  .icard h3 { font-size: 22px; line-height: 31px; }

  /* a phone card is about as wide as a desktop one, so the watermark
     keeps its full size and stays the same corner accent */
  .rcard p, .icard p, .lcard p, .scard p { font-size: 16px; line-height: 24px; }

  .scard { padding: 26px 24px 28px; border-radius: 14px; }
  .scard h3 { font-size: 21px; line-height: 30px; padding-right: 32px; }
  .scard h4 { margin-top: 24px; font-size: 16px; }

  .compare { padding: 22px 18px 24px; }
  .compare__table tbody th { font-size: 16px; }
  .compare__table tbody td,
  .compare__table tbody td:first-of-type { font-size: 15px; line-height: 23px; }

  .lcard { padding: 26px 24px 28px; }
  .lcard h3 { font-size: 22px; margin-bottom: 20px; }

  .footer { padding: 38px 20px 22px; }
  .footer__copy { font-size: 12px; line-height: 1.7; }
}

/* ── small phones ────────────────────────────────────────────── */
@media (max-width: 420px) {
  .nav { padding: 0 12px; }
  .nav__links { gap: 11px; font-size: 11px; }
  .nav__cta { padding: 6px 9px; font-size: 11px; }

  .wrap { padding: 0 18px; }
  .hero__title { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
