/* VioLaw — royal purple on white, hand-drawn sketch accents with formal serif typography */

@font-face { font-family: "Cormorant Garamond"; src: url(fonts/cormorant.woff2) format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url(fonts/cormorant-italic.woff2) format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Lora"; src: url(fonts/lora.woff2) format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url(fonts/lora-italic.woff2) format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Caveat"; src: url(fonts/caveat.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --purple: #5b2a86;        /* royal purple */
  --purple-deep: #3f1a63;
  --purple-soft: #7851a9;
  --lilac: #efe7f7;
  --lilac-2: #f9f6fc;
  --line: #ddd1ea;
  --ink: #241d2e;
  --ink-soft: #564d62;
  --paper: #ffffff;
  --radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --radius-2: 15px 225px 15px 255px / 255px 15px 225px 15px;
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --body: "Lora", Georgia, "Times New Roman", serif;
  --hand: "Caveat", "Segoe Print", cursive;
  --wrap: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.75;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--purple); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--purple-deep); }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 4px; border-radius: 4px; }
::selection { background: var(--lilac); color: var(--purple-deep); }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--purple); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 12px; }

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

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--purple-deep); margin: 0 0 .45em; letter-spacing: .1px; }
h2 { font-size: clamp(2.3rem, 5vw, 3.2rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--body);
  font-size: .78rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--purple);
  margin-bottom: .9em;
}
.eyebrow::before {
  content: ""; width: 28px; height: 1.5px; background: currentColor;
}

/* ---------- sketch boxes (pencil border + light hatched offset) ---------- */
.card, .btn, .note-card, .step {
  position: relative;
  isolation: isolate;
}
.card::before, .btn::before, .step::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--paper);
  border: 1.6px solid var(--ink);
  border-radius: var(--radius);
  pointer-events: none;
}
.btn::before { filter: url(#rough); }
.card::after, .btn::after {
  content: ""; position: absolute; inset: 0; z-index: -2;
  transform: translate(6px, 7px);
  border-radius: var(--radius-2);
  background: repeating-linear-gradient(-45deg, var(--purple-soft) 0 1px, transparent 1px 7px);
  opacity: .38;
  pointer-events: none;
  transition: transform .2s ease;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--body); font-size: .92rem; font-weight: 600; line-height: 1;
  letter-spacing: .06em; text-transform: uppercase;
  color: #fff; text-decoration: none;
  padding: 16px 28px;
  border: 0; background: none; cursor: pointer;
  transition: transform .15s ease;
}
.btn::before { background: var(--purple); border-color: var(--purple-deep); }
.btn:hover { color: #fff; transform: translate(-1px, -1px); }
.btn:hover::after { transform: translate(8px, 9px); }
.btn:active { transform: translate(2px, 2px); }
.btn:active::after { transform: translate(3px, 3px); }
.btn-ghost { color: var(--purple); }
.btn-ghost::before { background: var(--paper); border-color: var(--purple); }
.btn-ghost:hover { color: var(--purple-deep); }
.btn-small { font-size: .8rem; padding: 11px 18px; }
.btn-small::after { transform: translate(4px, 5px); }
.arrow { width: 30px; height: 16px; transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--purple); font-family: var(--serif); font-size: 1.9rem; font-weight: 600; letter-spacing: .3px; }
.brand b { color: var(--purple-deep); font-weight: 700; }
.brand-mark { width: 36px; height: 36px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a:not(.btn) {
  font-family: var(--body); font-size: .9rem; font-weight: 500; letter-spacing: .04em;
  color: var(--ink); text-decoration: none; position: relative; padding: 4px 0;
}
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px;
  background: var(--purple); transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav-links a:not(.btn):hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--purple); }
.nav-toggle { display: none; background: none; border: 0; color: var(--purple); width: 46px; height: 46px; padding: 6px; cursor: pointer; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 88px; position: relative; overflow: hidden; }
.hero::before { /* faint drafting grid */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--lilac-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--lilac-2) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at 20% 40%, #000 15%, transparent 60%);
  -webkit-mask-image: radial-gradient(ellipse at 20% 40%, #000 15%, transparent 60%);
}
.hero-grid { position: relative; z-index: 1; }
.hero-copy { max-width: 600px; }
.hero-title { font-size: clamp(4.2rem, 11vw, 7.4rem); line-height: .95; font-weight: 600; margin: 0; color: var(--purple); letter-spacing: -.5px; }
.hero-title span { color: var(--purple-deep); font-weight: 700; }
.tagline { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.7rem, 3.4vw, 2.3rem); color: var(--ink); margin: .25em 0 .9em; }
.scribble { position: relative; display: inline-block; }
.scribble svg { position: absolute; left: -2px; bottom: -10px; width: calc(100% + 4px); height: 14px; color: var(--purple-soft); opacity: .8; }
.scribble svg path { stroke-width: 2; }
.lead { font-size: 1.15rem; max-width: 33em; color: var(--ink-soft); }
.actions { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 34px; }

/* Milad Tower sketch: sits on the right, fades out toward the text */
.hero { min-height: min(760px, calc(100vh - 76px)); display: flex; align-items: center; }
.hero > .wrap { flex: 1; }
.hero-bg {
  position: absolute; z-index: 0; right: 0; bottom: 0;
  width: min(68%, 1050px);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 34%);
  mask-image: linear-gradient(to right, transparent 0%, #000 34%);
}
.hero-bg img { width: 100%; height: auto; mix-blend-mode: multiply; }
.hero-copy .lead { background: rgba(255,255,255,.72); border-radius: 6px; }

/* draw-on animation, set up by main.js */
.draw-ready .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.draw-ready.drawn .draw { animation: draw 1.6s cubic-bezier(.6,.1,.3,1) forwards; animation-delay: var(--d, 0s); }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- sections ---------- */
.section { padding: 100px 0; position: relative; }
.section-tint { background: var(--lilac-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 48px; max-width: 780px; }
.section-head h2 { display: block; }
.section-head h2::after { /* short pencil rule under section titles */
  content: ""; display: block; width: 72px; height: 10px; margin-top: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 10'%3E%3Cpath d='M2 6 C 18 3, 40 8, 70 4' fill='none' stroke='%235b2a86' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left center / contain;
}

/* ---------- practices ---------- */
.practice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.card { padding: 36px 34px 30px; }
.practice-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.num { font-family: var(--serif); font-style: italic; font-size: 2rem; font-weight: 600; color: var(--purple-soft); line-height: 1; }
.icon { width: 50px; height: 50px; color: var(--purple); }
.practice h3 { font-size: 1.65rem; }
.practice p { color: var(--ink-soft); }
.practice-wide { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: start; }
.practice-wide .practice-top { flex-direction: column-reverse; gap: 10px; margin: 0; }
.practice-wide p { margin: 0; }
.list-label {
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--purple); margin: 1.2em 0 .7em;
}

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding-left: 30px; margin: 0 0 .55em; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .42em; width: 17px; height: 15px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M3 12 C 6 13, 8 16, 9.5 19 C 12 12, 16 6, 22 2' fill='none' stroke='%235b2a86' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.25fr .85fr; gap: 64px; align-items: start; }
.role { font-family: var(--serif); font-style: italic; font-size: 1.35rem; color: var(--purple); margin-top: -.4em; }
.about-copy p:not(.role):not(.eyebrow) { color: var(--ink-soft); }
.about-side { display: grid; gap: 56px; padding-top: 30px; }
.portrait { position: relative; margin: 0 auto; width: 100%; max-width: 360px; isolation: isolate; }
.portrait::before { /* pencil frame */
  content: ""; position: absolute; inset: -12px; z-index: -1;
  border: 1.6px solid var(--purple); border-radius: var(--radius);
}
.portrait::after { /* hatched offset */
  content: ""; position: absolute; inset: 0; z-index: -2;
  transform: translate(18px, 20px);
  background: repeating-linear-gradient(-45deg, var(--purple-soft) 0 1px, transparent 1px 7px);
  opacity: .45; border-radius: var(--radius-2);
}
.portrait img { width: 100%; height: auto; border-radius: 4px; }
.portrait .tape { top: -26px; }
.portrait figcaption { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--purple-deep); text-align: center; margin-top: 22px; }
.note-card {
  padding: 46px 30px 26px;
}
.note-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: #fff; border: 1.6px solid var(--purple);
  border-radius: var(--radius-2);
}
.note-card::after {
  content: ""; position: absolute; inset: 0; z-index: -2;
  transform: translate(-6px, 8px);
  border-radius: var(--radius);
  background: var(--lilac);
}
.tape {
  position: absolute; top: -14px; left: 50%; width: 110px; height: 28px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(120, 81, 169, .2);
}
.note-card h3 { font-size: 1.45rem; text-align: center; margin-bottom: .8em; }
.stars { list-style: none; margin: 0; padding: 0; font-size: .97rem; }
.stars li { position: relative; padding: 10px 0 10px 28px; border-bottom: 1px solid var(--line); }
.stars li:last-child { border-bottom: 0; }
.stars li::before { content: "✦"; position: absolute; left: 4px; top: 10px; color: var(--purple-soft); font-size: .85rem; }
.stars b { color: var(--purple-deep); font-weight: 600; }

/* ---------- VioLex AI ---------- */
.violex .section-head { max-width: 820px; }
.ai-badge {
  display: inline-block; font-family: var(--body); font-size: .4em; font-weight: 600; letter-spacing: .08em;
  color: #fff; padding: 5px 14px; margin-left: 10px;
  position: relative; isolation: isolate; vertical-align: middle;
}
.ai-badge::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--purple);
  border-radius: 50% 40% 55% 45% / 55% 45% 50% 40%; filter: url(#rough);
}
.violex-sub { font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--purple); line-height: 1.35; }
.violex-lead { color: var(--ink-soft); font-size: 1.1rem; }
.steps {
  list-style: none; margin: 8px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px;
}
.step { padding: 26px 20px 22px; position: relative; }
.step::before { border-color: var(--purple-soft); border-style: dashed; }
.step:not(:last-child) .step-n::after { /* little arrow to the next step */
  content: ""; position: absolute; right: -54px; top: 10px; width: 34px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 20'%3E%3Cpath d='M2 11 C 12 7, 24 14, 36 9 M 28 3 L 37 9 L 30 16' fill='none' stroke='%237851a9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.step-n {
  position: relative; display: grid; place-items: center;
  width: 40px; height: 40px; margin-bottom: 14px;
  font-family: var(--serif); font-size: 1.35rem; font-weight: 700; color: var(--purple);
}
.step-n::before {
  content: ""; position: absolute; inset: 0; border: 1.6px solid var(--purple);
  border-radius: 50% 45% 52% 48% / 48% 54% 46% 52%; filter: url(#rough);
}
.step h3 { font-size: 1.3rem; }
.step p { font-size: .93rem; line-height: 1.65; color: var(--ink-soft); margin: 0; }

/* ---------- insights ---------- */
.insight-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.insight { padding: 32px 34px 28px; }
.insight h3 { font-size: 1.7rem; margin-top: .6em; }
.tag {
  font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--purple); background: var(--lilac); padding: 4px 10px; border-radius: 3px;
}
.pen-line { width: 50%; height: 10px; color: var(--purple-soft); margin-top: 12px; opacity: .8; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.contact-list { margin: 28px 0 0; }
.contact-list div { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 120px 1fr; gap: 12px; }
.contact-list dt { font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--purple); line-height: 2.2; }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }

.contact-form { display: grid; gap: 18px; }
.contact-form h3 { font-size: 1.8rem; margin-bottom: 0; }
.contact-form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--purple-deep); }
.opt { color: var(--ink-soft); font-weight: 400; }
.contact-form input, .contact-form select, .contact-form textarea {
  font: inherit; font-family: var(--body); font-size: 1rem; font-weight: 400; color: var(--ink);
  width: 100%; padding: 11px 14px;
  background: var(--lilac-2);
  border: 1.5px solid #b9aac9;
  border-radius: 6px;
  outline: none; transition: border-color .15s, background .15s;
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--purple); background: #fff; }
.contact-form .invalid { border-color: #b3261e; }
.contact-form .btn { justify-self: start; margin-top: 6px; }
.form-hint { font-size: .85rem; color: var(--ink-soft); margin: 0; }

/* ---------- footer ---------- */
.site-footer { padding: 64px 0 40px; text-align: center; color: var(--ink-soft); font-size: .95rem; }
.footer-inner { border-top: 1px solid var(--line); padding-top: 34px; }
.brand-foot { font-family: var(--serif); font-size: 2rem; font-weight: 600; color: var(--purple); margin: 0; }
.brand-foot b { color: var(--purple-deep); font-weight: 700; }
.brand-foot span { display: block; font-size: 1.15rem; font-style: italic; font-weight: 500; color: var(--ink-soft); margin: -2px 0 6px; }
.site-footer p { margin: .4em 0; }
.small { font-size: .82rem; }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; translate: 0 18px; transition: opacity .7s ease, translate .7s ease; }
.js .reveal.in { opacity: 1; translate: 0 0; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step:nth-child(3) .step-n::after, .step:nth-child(5) .step-n::after { display: none; }
}
@media (max-width: 920px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero { flex-direction: column; align-items: stretch; min-height: 0; padding-bottom: 0; }
  .hero > .wrap { flex: none; }
  .hero-bg { order: 2; position: relative; width: 100%; margin-top: 10px; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%); mask-image: linear-gradient(to bottom, transparent 0%, #000 22%); }
  .about-side { padding-top: 10px; }
  .practice-grid, .insight-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step-n::after { display: none; }
  .note-card { max-width: 520px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 6px;
    background: #fff; padding: 12px 24px 26px;
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 8px 0; font-size: 1rem; }
  .nav-links .btn { margin-top: 10px; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .wrap { padding: 0 16px; }
  .section { padding: 72px 0; }
  .hero { padding: 40px 0 60px; }
  .card { padding: 28px 22px 24px; }
  .practice-wide { grid-template-columns: 1fr; }
  .practice-wide .practice-top { flex-direction: row; }
  .steps { grid-template-columns: 1fr; }
  .contact-list div { grid-template-columns: 1fr; gap: 0; }
  .actions { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; translate: none; transition: none; }
  .draw-ready .draw { stroke-dasharray: none; stroke-dashoffset: 0; animation: none !important; }
  .btn, .btn::after { transition: none; }
}
