/* Diman Group Advisory — site styles
   Direction: a doctor's notebook beside a well-kept ledger.
   Paper surfaces, ink text, one deep ink-green accent. No external requests. */

@font-face {
  font-family: "Lora";
  src: url("fonts/lora.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("fonts/dmsans.woff") format("woff");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Neutral ramp, tinted warm toward paper */
  --paper: #f7f3ea;
  --paper-raised: #fffdf8;
  --rule: rgba(31, 36, 33, 0.09);
  --rule-strong: rgba(31, 36, 33, 0.16);
  --ink: #1f2421;
  --ink-2: #474e49;
  --ink-3: #636a65;

  /* One accent: ledger ink green */
  --green: #1f4d3a;
  --green-hover: #173b2c;
  --green-tint: #e6ece4;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-control: 8px;
  --radius-card: 12px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --fast: 150ms;

  --page: 1120px;
  --text: 680px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--green); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--green-hover); }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 12px;
  background: var(--paper-raised);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-control);
  z-index: 10;
}
.skip-link:focus { top: 16px; }

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0;
}
.wordmark:hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-control);
  background: var(--green);
  color: #fdfcf7;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid var(--green);
  transition: background-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn:hover { background: var(--green-hover); color: #fdfcf7; }
.btn:active { transform: scale(0.98); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--quiet {
  height: 40px;
  padding: 0 16px;
  font-size: 15px;
}

/* Signature: ink check mark */
.check { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Hero */
.hero {
  padding: 96px 0 88px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1fr;
}
.hero-text {
  max-width: 760px;
  padding-left: 28px;
  border-left: 1px solid rgba(31, 77, 58, 0.35); /* notebook margin rule */
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 5.2vw, 60px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 24px;
}
.hero h1 .second { color: var(--ink-2); }
.hero .lede {
  font-size: 19px;
  color: var(--ink-2);
  max-width: 600px;
  margin: 0 0 32px;
}

/* Wide hero: headline across the page, supporting line and button on one row */
.hero--wide .hero-text { max-width: none; }
.hero--wide h1 { font-size: clamp(36px, 6vw, 76px); max-width: 1040px; text-wrap: balance; }
.hero-row {
  display: flex;
  gap: 48px;
  align-items: flex-end;
  justify-content: space-between;
}
.hero-row .lede { margin: 0; text-wrap: pretty; }
.hero-row .btn { flex: none; }

/* Sections */
.section { padding: 88px 0; border-top: 1px solid var(--rule); }
.section h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

/* Margin to Market */
.m2m {
  background-color: var(--paper-raised);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 31px,
    var(--rule) 31px,
    var(--rule) 32px
  );
}
.m2m .wrap { position: relative; }
.m2m .wrap::before {
  /* notebook margin line, matching the hero */
  content: "";
  position: absolute;
  top: -88px;
  bottom: -88px;
  left: 24px;
  border-left: 1px solid rgba(31, 77, 58, 0.35);
}
.m2m .wrap > div,
.m2m .wrap > ol { padding-left: 28px; }

.m2m-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 56px;
}
.scope {
  max-width: 640px;
  margin: 0;
  padding: 16px 20px;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-card);
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
}
.scope strong { color: var(--ink); font-weight: 500; }

.path {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  position: relative;
}
.step:not(:last-child)::after {
  /* the ink line from one step to the next */
  content: "";
  position: absolute;
  top: 20px;
  left: 48px;
  width: calc(100% + 24px - 56px);
  border-top: 1.5px dashed rgba(31, 77, 58, 0.45);
}
.step { position: relative; }
.marker {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper-raised);
  border: 1.5px solid var(--green);
  color: var(--green);
  margin-bottom: 20px;
}
.marker svg { width: 18px; height: 18px; }
.step--first .marker { border-style: dashed; }
.step--last .marker { background: var(--green); color: #fdfcf7; }
.step-num {
  display: block;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.step h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.3;
  margin: 0 0 8px;
}
.step p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.5; }

/* Margin note on step 1, order slip on step 5 */
.note {
  margin-top: 16px;
  font-family: var(--serif);
  font-style: normal;
  font-size: 15px;
  color: var(--ink-3);
  padding-left: 12px;
  border-left: 1px solid rgba(31, 77, 58, 0.35);
}
.slip {
  margin-top: 16px;
  max-width: 200px;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  padding: 12px 14px 12px;
  position: relative;
  box-shadow: 0 1px 2px rgba(31, 36, 33, 0.06);
}
.slip::before {
  /* perforated top edge */
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: -1px;
  border-top: 2px dotted var(--paper-raised);
}
.slip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}
.slip-row svg { width: 16px; height: 16px; color: var(--green); }
.slip-line {
  height: 1px;
  background: var(--rule-strong);
  margin: 10px 0 8px;
}
.slip-meta { font-size: 13px; color: var(--ink-3); }

/* About */
.about .wrap {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 48px;
  align-items: start;
}
.photo-link {
  display: block;
  width: 180px;
  height: 180px;
  border-radius: 50%;
}
.photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rule-strong);
  background: var(--paper-raised);
}
.photo-link:hover .photo { border-color: var(--green); }

/* Full photo, opened without scripts */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  place-items: center;
  padding: 24px;
}
.lightbox:target { display: grid; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 36, 33, 0.72);
}
.lightbox-frame {
  position: relative;
  margin: 0;
  width: min(560px, 100%);
  background: var(--paper-raised);
  border-radius: var(--radius-card);
  padding: 12px;
}
.lightbox-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
}
.lightbox-close {
  display: inline-block;
  margin: 12px 4px 4px;
  font-size: 15px;
}
.about p { font-size: 18px; color: var(--ink-2); max-width: 600px; margin: 0; }

/* CTA */
.cta { background: var(--paper-raised); }
.cta .wrap { text-align: left; }
.cta p { margin: 0 0 28px; color: var(--ink-2); font-size: 18px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 32px 0 40px;
  font-size: 14px;
  color: var(--ink-3);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
}
.site-footer a { color: var(--ink-2); }
.site-footer nav { display: flex; gap: 20px; }

/* Legal pages */
.legal { padding: 72px 0 96px; }
.legal .wrap { max-width: calc(var(--text) + 48px); }
.legal h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.15;
  margin: 0 0 8px;
}
.legal .updated { color: var(--ink-3); font-size: 15px; margin: 0 0 48px; }
.legal h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.3;
  margin: 40px 0 12px;
}
.legal p { margin: 0 0 16px; color: var(--ink-2); }
.back { display: inline-block; margin-bottom: 32px; font-size: 15px; }

/* Tablet */
@media (max-width: 960px) {
  .hero-row { flex-direction: column; align-items: flex-start; gap: 24px; }
  .path { grid-template-columns: 1fr; gap: 32px; }
  .step:not(:last-child)::after {
    top: 48px;
    bottom: -24px;
    left: 19px;
    width: 0;
    border-top: 0;
    border-left: 1.5px dashed rgba(31, 77, 58, 0.45);
  }
  .step { display: grid; grid-template-columns: 40px 1fr; column-gap: 20px; }
  .marker { margin-bottom: 0; grid-row: span 4; }
}

/* Phone */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .site-header .wrap { height: 64px; }
  .wordmark { font-size: 17px; }
  .btn--quiet { display: none; }
  .hero { padding: 64px 0 64px; }
  .hero-text { padding-left: 20px; }
  .hero .lede { font-size: 17px; }
  .section { padding: 64px 0; }
  .m2m-head { margin-bottom: 40px; }
  .about .wrap { grid-template-columns: 1fr; gap: 24px; }
  .m2m .wrap::before { left: 20px; top: -64px; bottom: -64px; }
  .m2m .wrap > div,
  .m2m .wrap > ol { padding-left: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
