/*
 * Granite Row Legal demo: restrained Swiss-grid design.
 * Monochrome with an oxblood accent, large type, thin rules, numbered practice areas, very little imagery.
 */

@font-face { font-family: "Inter Tight"; src: url("../fonts/inter-tight-latin-variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --paper: #f3f1ec;
  --paper-2: #e9e6df;
  --ink: #121212;
  --ink-2: #3a3a3a;
  --grey: #6b6a66;
  --rule: #121212;
  --rule-soft: #cfcbc2;
  --ox: #6e1423;
  --ox-2: #8a1c2e;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.03em; line-height: 1.02; margin: 0; }
h2 { font-size: clamp(2rem, 4vw, 3.3rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.25; }
em { font-style: normal; color: var(--ox); }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.mono { font-family: var(--mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--grey); margin: 0 0 18px; }
.lead { font-size: 1.22rem; line-height: 1.55; color: var(--ink-2); }
.num { font-family: var(--mono); font-size: .85rem; color: var(--ox); }
.num.big { font-family: var(--sans); font-size: clamp(4rem, 10vw, 9rem); font-weight: 300; letter-spacing: -0.06em; line-height: .8; color: var(--ink); }
.arrow { width: 1.1em; height: 1.1em; flex: none; transition: transform .25s ease; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 2000; }
.skip-link:focus { left: 12px; top: 12px; }
:focus-visible { outline: 2px solid var(--ox); outline-offset: 3px; }

/* Buttons and links */
.btn { display: inline-flex; align-items: center; gap: 14px; padding: 16px 22px; font: 500 1rem/1 var(--sans); text-decoration: none; border: 1px solid var(--ink); cursor: pointer; transition: background .2s ease, color .2s ease; }
.btn:hover .arrow, .link:hover .arrow { transform: translateX(4px); }
.btn-ox { background: var(--ox); border-color: var(--ox); color: #fff; }
.btn-ox:hover { background: var(--ink); border-color: var(--ink); }
.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-light:hover { background: transparent; color: var(--paper); }
.link { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-name { font-weight: 600; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-name span { font-family: var(--mono); font-weight: 400; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ox); margin-left: 6px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 30px; }
.main-nav a { text-decoration: none; font-size: .95rem; padding: 6px 0; border-bottom: 1px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.main-nav .nav-cta a { background: var(--ink); color: var(--paper); padding: 11px 16px; border: 0; }
.main-nav .nav-cta a:hover { background: var(--ox); }
.nav-toggle { display: none; background: none; border: 1px solid var(--ink); padding: 9px 14px; font: 500 .9rem var(--sans); color: var(--ink); cursor: pointer; }

/* Hero: 12-column grid with an oversized headline */
.hero { padding: 56px 0 72px; border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 40px; align-items: start; }
.hero-meta { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); margin: 0; }
.hero-title { grid-column: 1 / 10; grid-row: 2; font-size: clamp(2.9rem, 7.4vw, 7rem); letter-spacing: -0.055em; line-height: .93; font-weight: 600; }
.hero-side { grid-column: 1 / 7; grid-row: 3; }
.hero-side .lead { margin-bottom: 28px; }
.hero-figure { grid-column: 10 / 13; grid-row: 2 / 4; margin: 0; align-self: stretch; min-height: 420px; position: relative; }
.hero-figure img, .about-figure img, .split-photo img, .office img { filter: grayscale(1) contrast(1.05); }
.hero-figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Sections */
.section { padding: 96px 0; border-bottom: 1px solid var(--rule); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); margin-bottom: 0; }
.section-head .mono { margin: 0; }

/* Numbered practice-area index */
.area-index { list-style: none; margin: 0; padding: 0; }
.area-index a { display: grid; grid-template-columns: 1fr 4fr 6fr auto; gap: 24px; align-items: baseline; padding: 34px 0; border-bottom: 1px solid var(--rule-soft); text-decoration: none; transition: background .2s ease, padding .25s ease; }
.area-index a:hover { background: var(--paper-2); padding-inline: 16px; }
.area-index a:hover .arrow { transform: translateX(6px); color: var(--ox); }
.area-name { font-size: clamp(1.7rem, 3.4vw, 2.8rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1; }
.area-text { color: var(--ink-2); }

/* Photo + steps */
.split-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.split-grid figure { margin: 0; position: sticky; top: 110px; }
.split-grid h2 { margin-bottom: 36px; }
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--rule-soft); }
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; color: var(--ink-2); }

/* Statement band */
.statement { background: var(--ink); color: var(--paper); padding: 110px 0; }
.statement-text { font-size: clamp(2rem, 5vw, 4.4rem); font-weight: 500; letter-spacing: -0.045em; line-height: 1.02; max-width: 15em; margin: 0; }
.statement-text em { color: #d98b97; }

.principles > .mono { padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.principle-grid > div { padding: 30px 28px 10px 0; }
.principle-grid > div + div { padding-left: 28px; border-left: 1px solid var(--rule-soft); }
.principle-grid h3 { margin: 14px 0 10px; font-size: 1.4rem; }
.principle-grid p { color: var(--ink-2); }

.cta-band { background: var(--ox); color: #fff; padding: 88px 0; }
.cta-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: end; }
.cta-grid h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
.cta-grid p { color: rgba(255, 255, 255, .85); margin-bottom: 24px; }

/* Inner pages */
.page-hero { padding: 72px 0 64px; border-bottom: 1px solid var(--rule); }
.page-hero-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
.page-hero-grid .mono { grid-column: 1 / -1; }
.page-hero h1 { grid-column: 1 / 11; font-size: clamp(2.6rem, 6.4vw, 6rem); letter-spacing: -0.05em; line-height: .95; margin-bottom: 32px; }
.page-hero .lead { grid-column: 1 / 8; margin: 0; }

.area { scroll-margin-top: 80px; }
.area-grid { display: grid; grid-template-columns: 3fr 9fr; gap: 24px; }
.area-body h2 { margin-bottom: 18px; }
.area-body .lead { max-width: 40em; margin-bottom: 40px; }
.area-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.rule-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.rule-list li { padding: 14px 0; border-bottom: 1px solid var(--rule-soft); }
details { border-top: 1px solid var(--rule); }
details:last-child { border-bottom: 1px solid var(--rule); }
summary { cursor: pointer; padding: 16px 32px 16px 0; font-weight: 500; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 12px; font: 300 1.5rem/1 var(--sans); color: var(--ox); transition: transform .2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--ink-2); padding-bottom: 8px; }

.notice-section { padding: 48px 0; }
.notice, .footer-disclaimer { font-family: var(--mono); font-size: .8rem; line-height: 1.6; color: var(--grey); max-width: 60em; margin: 0; }

.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.about-figure { margin: 0; }
.about-text h2 { margin-bottom: 24px; }
.about-text > p { color: var(--ink-2); max-width: 36em; }
.values { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.values li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--rule-soft); }
.values h3 { margin-bottom: 6px; }
.values p { margin: 0; color: var(--ink-2); }
.office-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: center; }
.office-grid h2 { margin-bottom: 20px; }
.office-grid p { color: var(--ink-2); max-width: 32em; }
.office figure { margin: 0; }
.office img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.contact-details dl { margin: 0 0 32px; border-top: 1px solid var(--rule); }
.contact-details dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule-soft); }
.contact-details dt { margin: 0; padding-top: 3px; }
.contact-details dd { margin: 0; overflow-wrap: anywhere; }
.map-placeholder { aspect-ratio: 4 / 3; border: 1px solid var(--rule); display: grid; place-items: center; text-align: center; padding: 24px; font-family: var(--mono); font-size: .8rem; color: var(--grey); background-image: linear-gradient(var(--rule-soft) 1px, transparent 1px), linear-gradient(90deg, var(--rule-soft) 1px, transparent 1px); background-size: 40px 40px; }
.map-placeholder span { background: var(--paper); padding: 8px 12px; }
.form-panel { border: 1px solid var(--rule); padding: 40px; background: #faf9f6; scroll-margin-top: 100px; }
.form-panel h2 { font-size: 2rem; margin-bottom: 14px; }
.form-warning { font-size: .95rem; color: var(--ox); border-left: 2px solid var(--ox); padding-left: 12px; margin-bottom: 28px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; margin-bottom: 28px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.field label span { text-transform: none; color: var(--grey); }
.field input, .field select, .field textarea { font: 400 1rem var(--sans); color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--ink); padding: 10px 0; border-radius: 0; }
.field textarea { border: 1px solid var(--ink); padding: 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ox); box-shadow: 0 1px 0 var(--ox); }
.was-checked :invalid { border-color: #b3261e; }
.form-note { font-size: .88rem; color: var(--grey); margin: 16px 0 0; }

/* Footer */
.site-footer { background: var(--ink); color: #d9d6cf; padding: 72px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 4fr 3fr 3fr 2fr; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid #3a3a3a; }
.footer-name { font-size: clamp(2rem, 3.4vw, 2.8rem); font-weight: 600; letter-spacing: -0.04em; line-height: .95; color: #fff; }
.site-footer .mono { color: #8f8c86; }
.site-footer p { margin: 0 0 6px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { text-decoration: none; overflow-wrap: anywhere; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-disclaimer { color: #8f8c86; padding: 28px 0; }
.footer-bottom { font-size: .85rem; color: #8f8c86; border-top: 1px solid #3a3a3a; padding-top: 22px; }

/* Gentle entrance: rules draw in, headline rises (off for reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .hero-meta, .section-head, .steps, .rule-list { position: relative; }
  .hero-title, .page-hero h1 { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-side, .page-hero .lead { animation: rise .9s .12s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-figure { animation: reveal 1.1s .2s cubic-bezier(.2, .7, .2, 1) both; }
  .area-index li { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .area-index li:nth-child(2) { animation-delay: .08s; }
  .area-index li:nth-child(3) { animation-delay: .16s; }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  @keyframes reveal { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
}

/* Tablet */
@media (max-width: 1000px) {
  .nav-toggle { display: inline-block; }
  .main-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--rule); display: none; padding: 8px 24px 24px; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--rule-soft); }
  .main-nav .nav-cta a { margin-top: 16px; text-align: center; }
  .hero-title { grid-column: 1 / -1; }
  .hero-side { grid-column: 1 / 8; }
  .hero-figure { grid-column: 8 / 13; grid-row: 3; min-height: 320px; }
  .area-index a { grid-template-columns: 56px 1fr auto; }
  .area-text { grid-column: 2 / 3; grid-row: 2; }
  .area-index .arrow { grid-column: 3; grid-row: 1; }
  .split-grid, .about-grid, .office-grid, .contact-grid, .cta-grid { grid-template-columns: 1fr; gap: 40px; }
  .split-grid figure { position: static; }
  .area-grid { grid-template-columns: 1fr; }
  .page-hero h1, .page-hero .lead { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Phone */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .wrap { width: min(var(--wrap), 100% - 32px); }
  .hero { padding: 32px 0 48px; }
  .hero-meta { flex-direction: column; gap: 4px; }
  .hero-side, .hero-figure { grid-column: 1 / -1; }
  .hero-figure { grid-row: 4; min-height: 280px; }
  .section { padding: 64px 0; }
  .area-index a { gap: 12px; padding: 26px 0; }
  .principle-grid, .area-cols, .form-grid { grid-template-columns: 1fr; }
  .principle-grid > div, .principle-grid > div + div { padding: 24px 0; border-left: 0; border-top: 1px solid var(--rule-soft); }
  .statement { padding: 72px 0; }
  .form-panel { padding: 26px 20px; }
  .contact-details dl > div { grid-template-columns: 1fr; gap: 4px; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: space-between; }
}
