/*
Theme Name: Cabrio Law
Author: Cabrio Law
Description: Custom theme for cabriolaw.com, matching the Squarespace design.
Version: 2.5.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: cabrio
*/

:root {
  --hero-grey: #D9D9D9;
  --ink: #1F231F;
  --slate: #7A7A7A;
  --offwhite: #F5F5F5;
  --line-green: #5A8F55;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --ui: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --text: "Helvetica Neue", Helvetica, "Inter", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: #000; font-family: var(--text); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 400; }

/* The two serif styles used across the site */
.light { font-family: var(--display); font-weight: 300; font-variation-settings: "SOFT" 0, "WONK" 0; letter-spacing: -.02em; }
.heavy { font-family: var(--display); font-weight: 600; font-variation-settings: "SOFT" 100, "WONK" 0; letter-spacing: -.01em; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -3rem; background: #000; color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { top: 1rem; }

/* Thin quarter-circle line */
.arc { display: block; color: #222; overflow: visible; }

/* Buttons */
.button, .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-width: 242px; min-height: 58px; padding: 0 2rem; background: #000; color: #fff; border-radius: 8px; font-family: var(--ui); font-size: 13px; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; }
.button:hover, .wp-block-button__link:hover { background: #333; color: #fff; }

/* Header */
.site-header { position: relative; z-index: 10; background: var(--hero-grey); color: var(--ink); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 28px max(2vw, 20px); }
.wordmark { font-size: 26px; line-height: 1; color: var(--ink); text-decoration: none; }
.custom-logo { height: 30px; width: auto; }
.site-nav ul { display: flex; gap: 34px; list-style: none; margin: 0; padding: 0; }
.site-nav a { font-family: var(--ui); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.nav-toggle { display: none; }

@media (max-width: 767px) {
  .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 6px; width: 40px; height: 40px; padding: 8px; background: none; border: 0; cursor: pointer; }
  .nav-toggle-bar { display: block; width: 24px; height: 1px; background: var(--ink); }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--hero-grey); padding: 10px 20px 40px; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: center; gap: 22px; }
  .site-nav a { font-size: 18px; }
}

/* Hero */
.hero { background: var(--hero-grey); color: var(--ink); text-align: center; padding: 30px 0 4.5vw; overflow: hidden; }
.hero-title { font-size: 7vw; line-height: 1.1; }
.hero-wordmark { display: block; font-size: 18.7vw; line-height: .9; margin-top: 7.5vw; white-space: nowrap; }

/* Intro */
.intro { position: relative; padding: 10vw 5vw 7vw 26.7vw; }
.intro .arc { position: absolute; left: 11.2vw; top: 3vw; width: 11vw; height: 11vw; }
.intro p { font-size: 4.45vw; line-height: 1.05; margin: 0 0 .55em; max-width: 62vw; color: #000; }
.intro p + p { margin-bottom: 0; }
.intro > .button { margin-top: max(32px, 3vw); }

/* How can we help */
.services { position: relative; background: var(--slate); color: #fff; overflow: hidden; }
.services-texture { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.services-inner { position: relative; padding: 6vw 5.7vw 6vw; }
.services h2 { font-size: 8.3vw; line-height: 1; margin-bottom: 6vw; }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 34.9vw)); column-gap: 14vw; row-gap: 5vw; }
.service { border-bottom: 1px solid #fff; padding-bottom: 5.8vw; }
.service h3 { font-family: var(--text); font-size: clamp(1.3rem, 2vw, 2.1rem); line-height: 1.2; margin-bottom: 3.4vw; }
.service p { font-size: clamp(.95rem, 1.15vw, 1.15rem); line-height: 1.3; letter-spacing: .01em; margin: 0; }

/* Mission */
.mission { display: grid; grid-template-columns: minmax(0, 1fr) 42.3vw; column-gap: 6vw; background: var(--offwhite); padding: 2.2vw 2.8vw 3vw 2vw; }
.mission-label { font-family: var(--ui); font-size: 14px; letter-spacing: .05em; text-transform: uppercase; margin: .4vw 0 2.6vw; }
.mission h2 { font-size: 3.9vw; line-height: 1.02; }
.mission-action { position: relative; height: 13vw; margin: 1.4vw 0 0 .75vw; }
.mission-action .arc { position: absolute; left: 0; top: 0; width: 10vw; height: 10vw; }
.mission-action .button { position: absolute; left: 15.3vw; top: 7.9vw; min-width: 250px; min-height: 60px; }
.mission-photo img, .mission-photo-placeholder { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 9999px 9999px 0 0; }
.mission-photo-placeholder { background: #8FA9B5; }

/* Footer */
.site-footer { background: #fff; color: #000; text-align: center; padding: 0 3.5vw 2vw; }
.footer-rule { border: 0; border-top: 1px solid #000; margin: 0; }
.footer-start { display: inline-block; margin-top: 4.3vw; font-family: var(--ui); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: #000; text-underline-offset: 3px; }
.footer-contact { font-style: normal; font-family: var(--ui); font-size: 20px; line-height: 1.45; margin-top: 1.8vw; }
.footer-contact a { color: #000; text-decoration: none; }
.footer-wordmark { display: block; font-size: 20.1vw; line-height: .9; margin: 5vw 0 0; white-space: nowrap; color: #000; }

/* Phones */
@media (max-width: 767px) {
  .hero-title { font-size: 11vw; }
  .intro { padding: 70px 7vw 60px; }
  .intro .arc { left: 7vw; top: 20px; width: 70px; height: 70px; }
  .intro p { font-size: 8.5vw; max-width: none; }
  .services-inner { padding: 60px 7vw; }
  .services h2 { font-size: 13vw; margin-bottom: 40px; }
  .service-grid { grid-template-columns: 1fr; row-gap: 40px; }
  .service { padding-bottom: 40px; }
  .service h3 { margin-bottom: 20px; }
  .mission { grid-template-columns: 1fr; row-gap: 40px; padding: 40px 7vw; }
  .mission h2 { font-size: 8vw; }
  .mission-action { height: auto; margin: 30px 0 0; }
  .mission-action .arc { display: none; }
  .mission-action .button { position: static; }
  .footer-start { margin-top: 50px; }
  .footer-contact { font-size: 17px; margin-top: 20px; }
  .footer-wordmark { margin-top: 50px; }
}

/* Inner pages (Case Studies, FAQ, Contact) */
.page-header { padding: 6vw 6vw 2vw; }
.page-header h1 { font-size: max(2.5rem, 6vw); line-height: 1.05; }
.entry-content { max-width: 52rem; padding: 0 6vw 6vw; font-size: 1.05rem; line-height: 1.6; }
.entry-content h2 { font-family: var(--display); font-weight: 300; font-size: 2.2rem; line-height: 1.1; margin: 2.5rem 0 1rem; }
.entry-content h3 { font-size: 1.35rem; margin: 2rem 0 .75rem; }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.25rem; }
.entry-content details { border-bottom: 1px solid #000; padding: 1.1rem 0; }
.entry-content summary { cursor: pointer; font-size: 1.15rem; }
.entry-content input, .entry-content textarea, .entry-content select { font: inherit; width: 100%; padding: .75rem; border: 1px solid #999; border-radius: 4px; background: #fff; }
.entry-content input[type="submit"], .entry-content button { width: auto; min-width: 200px; min-height: 52px; background: #000; color: #fff; border: 0; border-radius: 8px; font-family: var(--ui); font-size: 13px; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { margin-left: auto; margin-right: auto; }

/* Case Studies page */
.entry-content:has(.case-study) { max-width: none; }
.entry-content .case-intro { font-family: var(--display); font-weight: 300; font-variation-settings: "SOFT" 0, "WONK" 0; letter-spacing: -.02em; font-size: clamp(1.8rem, 3.4vw, 3.2rem); line-height: 1.1; max-width: 22em; margin: 0 0 4rem; }
.entry-content .case-study { border-top: 1px solid #000; padding: 3.5rem 0 4rem; }
.entry-content .case-study h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); max-width: 20em; margin: 0 0 1.5rem; }
.entry-content .case-study > p { max-width: 40em; }
.entry-content .case-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; list-style: none; padding: 0; margin: 2.5rem 0; }
.entry-content .case-steps li { border-top: 1px solid #999; padding-top: 1rem; }
.entry-content .case-steps h3 { font-family: var(--ui); font-size: 13px; letter-spacing: .05em; text-transform: uppercase; margin: 0 0 .6rem; }
.entry-content .case-steps p { font-size: .95rem; line-height: 1.45; margin: 0; }
.entry-content .case-photo { margin: 0; }
.entry-content .case-photo img { width: 100%; max-height: 560px; object-fit: cover; }
@media (max-width: 900px) { .entry-content .case-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .entry-content .case-steps { grid-template-columns: 1fr; } }

/* FAQ page */
.faq-header { background: var(--hero-grey); color: var(--ink); padding: 4vw 6vw 6vw; text-align: center; }
.faq-header h1 { font-size: clamp(2.4rem, 5.6vw, 6rem); line-height: 1.05; max-width: 14em; margin: 0 auto; }
.faq-list { max-width: 64rem; margin: 0 auto; padding: 5vw 6vw 7vw; }
.faq-item { border-bottom: 1px solid #000; }
.faq-item:first-child { border-top: 1px solid #000; }
.faq-item summary { position: relative; list-style: none; cursor: pointer; padding: 1.6rem 3rem 1.6rem 0; font-family: var(--text); font-size: clamp(1.15rem, 1.7vw, 1.5rem); line-height: 1.3; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before, .faq-item summary::after { content: ""; position: absolute; right: .4rem; top: 50%; width: 18px; height: 1px; background: #000; transition: transform .25s ease; }
.faq-item summary::after { transform: rotate(90deg); }
.faq-item[open] summary::after { transform: rotate(0deg); }
.faq-answer { padding: 0 0 2rem; max-width: 44em; }
.faq-answer p { margin: 0 0 1rem; font-size: 1.05rem; line-height: 1.6; }
.faq-answer a { text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .faq-item summary::after { transition: none; } }

/* Contact page */
.contact-header { background: var(--hero-grey); color: var(--ink); text-align: center; padding: 4vw 6vw 6vw; }
.contact-header h1 { font-size: clamp(3rem, 9vw, 9rem); line-height: 1; }
.contact-person { display: flex; align-items: center; gap: 18px; margin-top: 4.5rem; }
.contact-photo { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex: none; }
.intro .contact-person p { font-family: var(--ui); font-size: 15px; line-height: 1.5; letter-spacing: 0; max-width: none; margin: 0; }
.contact-person a { text-underline-offset: 3px; }
