/* YourIPLawyer.in website. Same paper, board and ink as the desktop app. */

@font-face {
  font-family: 'Plex';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Eczar';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/eczar-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  --paper: #f6f1e6;
  --paper-raised: #fffcf5;
  --paper-sunk: #ede5d4;
  --board: #d9c9a2;
  --board-rule: #bfaa7b;
  --board-ink: #3a3120;
  --board-soft: #5a4e36;
  --ink: #1b2130;
  --ink-strong: #10141d;
  --ink-body: #414b5b;
  --ink-soft: #5d6676;
  --rule: #ddd2bd;
  --rule-strong: #c4b494;
  --tape: #a02334;
  --tape-ink: #7d1a28;
  --due-soon: #855f0f;
  --waiting: #2c5468;
  --settled: #2f5d4a;
  --serif: 'Eczar', Georgia, 'Times New Roman', serif;
  --sans: 'Plex', 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --measure: 38rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-body);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr);
  min-height: 100vh;
}

a { color: var(--tape-ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--tape); }
:focus-visible { outline: 2px solid var(--tape); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper-raised); padding: 0.5rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

/* ------------------------------------------------------------ the board rail */
.rail {
  background: var(--board);
  border-right: 1px solid var(--board-rule);
  color: var(--board-ink);
  padding: 2.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: sticky;
  top: 0;
  height: 100vh;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink-strong);
  text-decoration: none;
  padding: 0 0.5rem;
}
.wordmark span { font-size: 0.62em; font-weight: 500; color: var(--board-soft); }
.rail nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.rail nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 5px;
  color: var(--board-ink);
  text-decoration: none;
  font-size: 0.975rem;
}
.rail nav a:hover { background: #cfbd91; }
.rail nav a[aria-current='page'] { background: var(--ink); color: var(--paper-raised); }
.rail__foot {
  margin-top: auto;
  border-top: 1px solid var(--board-rule);
  padding: 1rem 0.5rem 0;
  font-size: 0.85rem;
  color: var(--board-soft);
  line-height: 1.45;
}

/* ------------------------------------------------------------------ page */
main {
  padding: 4.5rem clamp(1.25rem, 5vw, 5rem) 3rem;
  max-width: 62rem;
  width: 100%;
}
h1, h2, h3 { font-family: var(--serif); color: var(--ink-strong); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.4rem); line-height: 1.05; margin: 0 0 1rem; }
h2 { font-size: 1.55rem; line-height: 1.2; margin: 3rem 0 0.75rem; }
h3 { font-size: 1.15rem; line-height: 1.3; margin: 1.75rem 0 0.4rem; }
p, li { max-width: var(--measure); }
p { margin: 0 0 1rem; }
.lede { font-size: 1.2rem; color: var(--ink-body); max-width: 34rem; }
.page-head { border-bottom: 2px solid var(--ink); padding-bottom: 1.25rem; margin-bottom: 2rem; }
.page-head p { margin: 0; color: var(--ink-soft); }
.updated { font-size: 0.9rem; color: var(--ink-soft); }

/* -------------------------------------------------------------- home hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  padding-bottom: 3.5rem;
  border-bottom: 2px solid var(--ink);
}
.hero h1 { max-width: 13ch; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 5px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid var(--ink);
}
.btn--ink { background: var(--ink); color: var(--paper-raised); }
.btn--ink:hover { background: var(--ink-strong); color: var(--paper-raised); }
.btn--plain { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--plain:hover { border-color: var(--ink); color: var(--ink); }

/* The one memorable thing: a matter file, as it sits on the app's board. */
.file {
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-left: 6px solid var(--tape);
  border-radius: 3px 8px 8px 3px;
  padding: 1.4rem 1.5rem 1.25rem;
  box-shadow: 0 1px 0 var(--rule), 0 14px 30px -18px rgba(58, 49, 32, 0.45);
  transform: rotate(-1.2deg);
}
.file__court { font-size: 0.85rem; color: var(--ink-soft); margin: 0; }
.file__title { font-family: var(--serif); font-size: 1.25rem; color: var(--ink-strong); margin: 0.15rem 0 1rem; line-height: 1.25; font-weight: 600; }
.clock { border-top: 1px solid var(--rule); padding: 0.8rem 0; }
.clock__row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.95rem; }
.clock__name { color: var(--ink); font-weight: 500; }
.clock__count { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.clock__bar { height: 6px; background: var(--paper-sunk); border-radius: 99px; margin-top: 0.5rem; overflow: hidden; }
.clock__bar span { display: block; height: 100%; border-radius: 99px; }
.is-soon .clock__count { color: var(--due-soon); } .is-soon .clock__bar span { background: var(--due-soon); }
.is-wait .clock__count { color: var(--waiting); } .is-wait .clock__bar span { background: var(--waiting); }
.is-done .clock__count { color: var(--settled); } .is-done .clock__bar span { background: var(--settled); }

/* ------------------------------------------------------------- home body */
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; margin-top: 0.5rem; max-width: 46rem; }
.points h3 { margin-top: 1.5rem; }
.points p { font-size: 1rem; }

.price {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.25rem 2rem;
  align-items: baseline;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  margin-top: 1rem;
  max-width: 44rem;
}
.price dt { font-family: var(--serif); font-size: 1.6rem; color: var(--ink-strong); font-weight: 600; white-space: nowrap; }
.price dd { margin: 0; padding: 0.4rem 0 0.9rem; }
.price dd:last-of-type { padding-bottom: 0; }
.note { font-size: 0.95rem; color: var(--ink-soft); }

/* ------------------------------------------------------------ legal text */
.legal ol { padding-left: 1.4rem; }
.legal li { margin-bottom: 0.6rem; }
.legal li::marker { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.legal strong { color: var(--ink); }

.contact { display: grid; gap: 0; margin: 0; max-width: 40rem; border-top: 1px solid var(--rule); }
.contact div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.contact dt { color: var(--ink-soft); }
.contact dd { margin: 0; color: var(--ink); font-weight: 500; }

/* ---------------------------------------------------------------- footer */
.foot {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule-strong);
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.foot p { max-width: 48rem; margin-bottom: 0.5rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-bottom: 0.9rem; }

/* ---------------------------------------------------------------- narrow */
@media (max-width: 860px) {
  body { display: block; }
  .rail {
    position: static; height: auto; flex-direction: column; gap: 1rem;
    padding: 1.25rem 1rem; border-right: 0; border-bottom: 1px solid var(--board-rule);
  }
  .rail nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem; }
  .rail nav a { padding: 0.35rem 0.65rem; font-size: 0.9rem; }
  .rail__foot { display: none; }
  main { padding-top: 2.5rem; }
  .hero { grid-template-columns: 1fr; }
  .file { transform: none; }
  .contact div { grid-template-columns: 1fr; gap: 0.15rem; }
  .price { grid-template-columns: 1fr; }
  .points { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .file { animation: settle 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  @keyframes settle { from { transform: rotate(-4deg) translateY(10px); opacity: 0; } }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 860px) {
  .file { animation: none; }
}
