/* ==========================================================================
   Shah Attorney at Law — styles.css
   Custom stylesheet
   Fonts: Libre Baskerville (replaces Calluna), Jost (replaces Futura PT)
   ========================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,400;0,500;0,700;1,400&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

/* ==========================================================================
   1. Custom Properties
   ========================================================================== */

:root {
  /* Colors */
  --color-navy:          #081b33;
  --color-navy-dark:     #08182d;
  --color-red:           #e54a35;
  --color-bg:            #f2f2f2;
  --color-text:          rgba(8, 27, 51, 0.8);
  --color-white:         #fff;
  --color-hr:            #bbb;
  --color-input-border:  #ccc;
  --color-input-bg:      #fafafa;
  --color-error:         #BD0000;
  --color-error-border:  #E99292;

  /* Fonts */
  --font-serif:      "Libre Baskerville", "Times New Roman", Times, serif;
  --font-sans:       "Jost", "Helvetica Neue", Arial, sans-serif;

  /* Type scale */
  --text-base:       18px;
  --text-body-lh:    1.5;
  --text-body-ls:    0.02em;

  /* Spacing */
  --spacing-section:       68px;
  --spacing-outer-padding: 8vw;
  --spacing-col-gutter:    68px;

  /* Buttons */
  --btn-border-width:  2px;

  /* Banner */
  --banner-height:   48vh;

  /* Container */
  --container-max:   1920px;
}

/* ==========================================================================
   2. Reset & Base
   ========================================================================== */

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

html {
  font-size: var(--text-base);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: var(--text-body-lh);
  letter-spacing: var(--text-body-ls);
  color: var(--color-text);
  background-color: var(--color-bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-red);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-navy);
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1, h2, h3 {
  margin-bottom: 0.5em;
}

h1 {
  font-family: var(--font-serif);
  font-size: 58px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-navy);
}

h2 {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--color-navy);
}

h3 {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-red);
}

p {
  margin-bottom: 1em;
}

blockquote {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--color-navy);
  border: none;
  padding: 0;
  margin: 0 0 1.2em;
}

blockquote.quote {
  font-size: 1.8vw;
  margin: 0 255px;
}

blockquote .source {
  display: block;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: .28em;
  text-align: right;
  margin-top: 0.5em;
  text-align: center;
  text-transform: uppercase;
  color: var(--color-red);
}

/* Responsive heading scale */
@media (max-width: 927px) {
  h1 { font-size: 28px; }
}
@media (min-width: 928px) and (max-width: 1920px) {
  h1 { font-size: clamp(28px, 3.02vw, 58px); }
}

@media (max-width: 1173px) {
  h2 { font-size: 22px; }
  h2.contact { margin-top: 40px; }
}
@media (min-width: 1174px) and (max-width: 1920px) {
  h2 { font-size: clamp(36px, 0.875vw, 36px); }
}

@media (max-width: 1493px) {
  h3 { font-size: 14px; }
}

@media (max-width: 768px) {
  blockquote { font-size: 28px; }
  blockquote.quote {
    font-size: inherit;
    margin: auto;
  }
}

/* ==========================================================================
   4. Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--spacing-outer-padding);
  padding-right: var(--spacing-outer-padding);
}

.section {
  padding-top: var(--spacing-section);
  padding-bottom: var(--spacing-section);
}

/* Flexbox row for multi-column layouts */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-col-gutter);
}

.col-half   { flex: 1 1 calc(50% - var(--spacing-col-gutter) / 2); min-width: 280px; }
.col-third  { flex: 1 1 calc(33.333% - var(--spacing-col-gutter) * 2 / 3); min-width: 260px; }
.col-two-thirds { flex: 1 1 calc(66.667% - var(--spacing-col-gutter) / 3); min-width: 300px; }
.col-full   { flex: 1 1 100%; }

.text-center { text-align: center; }

/* ==========================================================================
   5. Header — Desktop
   ========================================================================== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--spacing-outer-padding);
  max-width: var(--container-max);
  margin: 0 auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-nav a {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--color-text);
  transition: color 0.15s ease;
}

.header-nav a.active {
  color: var(--color-red);
}

.header-nav a:hover {
  color: var(--color-red);
}

/* Secondary nav (left side) */
.header-nav--secondary a {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-red);
}

.header-nav--secondary a:hover {
  color: var(--color-navy);
}

/* Logo (center) */
.header-logo {
  flex-shrink: 0;
  order: 0;
}

.header-logo img {
  max-height: 70px;
  width: auto;
}

/* Desktop layout: secondary (left) | logo (center) | primary (right) */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.header-nav--secondary {
  justify-self: start;
}

.header-logo {
  justify-self: center;
}

.header-nav--primary {
  justify-self: end;
}

/* Hide desktop header on mobile */
@media (max-width: 768px) {
  .site-header {
    display: none;
  }
}

/* ==========================================================================
   6. Mobile Header / Navigation
   ========================================================================== */

.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background-color: var(--color-bg);
}

.mobile-header__title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-navy);
  text-decoration: none;
}

/* Hamburger button */
.mobile-header__toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mobile-header__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-navy);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger → X animation */
.mobile-header__toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-header__toggle.is-active span:nth-child(2) {
  opacity: 0;
}
.mobile-header__toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background-color: var(--color-bg);
  z-index: 100;
  padding: 80px 32px 32px;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  overflow-y: auto;
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav__primary a {
  display: block;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 2;
  color: var(--color-navy);
  text-align: center;
}

.mobile-nav__primary a.active {
  color: var(--color-red);
}

.mobile-nav__primary a:hover {
  color: var(--color-red);
}

.mobile-nav__secondary {
  margin-top: 16px;
}

.mobile-nav__secondary a {
  display: block;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--color-red);
  text-align: center;
}

.mobile-nav__close {
  position: absolute;
  top: 16px;
  right: 32px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--color-navy);
  line-height: 1;
}

@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }
}

/* ==========================================================================
   7. Banner / Hero
   ========================================================================== */

.banner {
  position: relative;
  height: var(--banner-height);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background-color: var(--color-navy-dark);
}

.banner__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.banner__content {
  position: relative;
  z-index: 1;
  padding: 0 var(--spacing-outer-padding);
  max-width: 800px;
}

.banner__label {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-red);
  line-height: 2;
  margin-bottom: 0;
}

.banner__title {
  font-family: var(--font-serif);
  font-size: 4vw;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--color-bg);
  margin-bottom: 0;
}

/* Responsive hero text */
@media (max-width: 768px) {
  .banner {
    height: 40vh;
  }
  .banner__title {
    font-size: 48px;
  }
  .banner__label {
    font-size: 12px;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .banner__title {
    font-size: 5.625vw;
  }
}

/* Page-level banner (shorter, for inner pages) */
.banner--page {
  height: 30vh;
  min-height: 200px;
}

.banner--page .banner__title {
  font-size: 58px;
}

@media (max-width: 768px) {
  .banner--page {
    height: 25vh;
  }
  .banner--page .banner__title {
    font-size: 32px;
  }
}

/* ==========================================================================
   8. Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-style: normal;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: var(--btn-border-width) solid var(--color-navy);
  border-radius: 0;
  color: var(--color-navy);
  background-color: transparent;
  transition: background-color 0.1s linear, color 0.1s linear;
}

.btn:hover {
  background-color: var(--color-navy);
  color: var(--color-white);
}

/* Sizes */
.btn--sm {
  font-size: 15px;
  padding: 13px 26px;
}

.btn--md {
  font-size: 18px;
  padding: 21px 34px;
}

.btn--lg {
  font-size: 19px;
  padding: 25px 46px;
  letter-spacing: 0.08em;
}

/* Solid variant (for dark backgrounds or form submit) */
.btn--solid {
  color: var(--color-bg);
  background-color: var(--color-navy);
  border-color: var(--color-navy);
}

.btn--solid:hover {
  background-color: transparent;
  color: var(--color-navy);
}

/* ==========================================================================
   9. Horizontal Rules
   ========================================================================== */

hr {
  border: none;
  height: 1px;
  background-color: var(--color-hr);
  margin: 2em 0;
}

hr.hr--narrow {
  width: 75%;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   10. Content Sections
   ========================================================================== */

.content-block {
  margin-bottom: var(--spacing-section);
}

.content-block:last-child {
  margin-bottom: 0;
}

/* About page photo */
.about-photo {
  width: 60%;
  max-width: 480px;
  padding-top: 75px;
}

/* Practice areas list */
.practice-list {
  columns: 2;
  column-gap: var(--spacing-col-gutter);
}

.practice-list li {
  margin-bottom: 0.75em;
  break-inside: avoid;
}

@media (max-width: 640px) {
  .practice-list {
    columns: 1;
  }
}

/* Contact info block */
.contact-info p {
  margin-bottom: 1.5em;
}

.contact-info a {
  color: var(--color-red);
}

.contact-info a.contact-phone {
  color: var(--color-text);
}

/* ==========================================================================
   11. Forms
   ========================================================================== */

.chat-column {
  margin: 0 180px;
}

.chat-title {
  text-align: center;
  font-size: 37px;
}

.form-group {
  margin-bottom: 1.25em;
}

.form-group label {
  display: block;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-navy);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-input-border);
  background: var(--color-input-bg);
  color: var(--color-navy);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  border-radius: 2px;
  transition: background 0.1s ease-in;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23081b33' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  background: var(--color-white);
  outline: 2px solid var(--color-navy);
  outline-offset: -2px;
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* Error state */
.form-group.has-error input,
.form-group.has-error textarea {
  border-color: var(--color-error-border);
}

.form-group.has-error label {
  color: var(--color-error);
}

.form-error {
  color: var(--color-error);
  font-size: 13px;
  margin-top: 4px;
}

/* Honeypot */
.form-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* Form submit button */
.form-submit {
  margin-top: 1em;
}

/* Form status messages */
.form-status {
  padding: 12px 16px;
  margin-bottom: 1.25em;
  border-radius: 2px;
  font-size: 15px;
}

.form-status--success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-status--error {
  background-color: #f8d7da;
  color: var(--color-error);
  border: 1px solid var(--color-error-border);
}

/* Prevent iOS zoom on focus */
@media (max-width: 600px) {
  .form-group input,
  .form-group textarea {
    font-size: max(16px, 1rem);
  }
}

/* ==========================================================================
   12. Footer
   ========================================================================== */

.site-footer {
  padding: 20px var(--spacing-outer-padding);
  max-width: var(--container-max);
  margin: 0 auto;
  text-align: center;
}

.site-footer hr {
  margin: auto;
}

.site-footer p {
  font-size: 14px;
  color: var(--color-text);
  margin-bottom: 0.4em;
}

.site-footer a {
  color: var(--color-red);
  font-size: 14px;
  font-weight: 490;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  text-align: left;
  padding: 20px 0;
}

.footer-left {
  flex: 1;
}

.footer-right {
  flex: 1;
  text-align: justify;
  max-width: 400px;
}

.site-footer .footer-phone {
  color: var(--color-text);
}

.site-footer .license-section {
  margin: auto;
  padding: 45px 0;
}

.site-footer .license-section .container {
  padding: 0;
}

.site-footer .license-section .row {
  align-items: center;
}

.site-footer .license-section .chat-column {
  margin: 0;
  text-align: left;
}

.site-footer .license-section .license {
    white-space: pre-wrap;
    font-size: 20px;
    font-family: var(--font-serif);
}

/* ==========================================================================
   13. Responsive — Tablet & Mobile
   ========================================================================== */

/* Stack columns on mobile */
@media (max-width: 640px) {
  .row {
    flex-direction: column;
    display: block;
  }

  .col-half,
  .col-third,
  .col-two-thirds {
    flex: 1 1 100%;
    margin: auto;
  }

  form {
    margin-bottom: 75px;
  }

  .about-photo {
    width: 100%;
    padding-top: 0;
  }

  .section {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .site-footer .row {
    display: flex;
    gap: 25px;
  }

  .footer-bottom {
    display: block;
  }

  .footer-right {
    padding-top: 40px;
  }
}

/* Tablet adjustments */
@media (max-width: 768px) {
  :root {
    --spacing-outer-padding: 6vw;
  }
}

/* Small phone adjustments */
@media (max-width: 375px) {
  :root {
    --spacing-outer-padding: 5vw;
  }
}

/* ==========================================================================
   14. Utilities
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.visually-hidden {
  position: absolute;
  left: -9999px;
}
