/* ==========================================================================
   OptiCare Advisory Group — Stylesheet
   ========================================================================== */

:root {
  /* Colors */
  --navy: #11203d;
  --navy-soft: #1c3157;
  --navy-deep: #0b1730;
  --gold: #c9a227;
  --gold-light: #e3ca8a;
  --off-white: #f7f6f2;
  --white: #ffffff;
  --text: #2a2f3a;
  --text-muted: #5e6577;
  --border: #e2e4ea;

  /* Type */
  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --max-width: 1180px;
  --header-height: 76px;
  --radius: 6px;
  --transition: 0.2s ease;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--navy);
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 0.6em;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; }

p {
  margin: 0 0 1em;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

section {
  padding: 88px 0;
}

@media (max-width: 700px) {
  section {
    padding: 56px 0;
  }
}

/* Skip link for accessibility */
.skip-link:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  background: var(--navy);
  color: var(--white);
  padding: 8px 16px;
  border-radius: var(--radius);
  z-index: 1000;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 14px 30px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  text-align: center;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--gold);
  color: var(--navy-deep);
}

.btn-primary:hover {
  background-color: var(--gold-light);
}

/* ==========================================================================
   Section heading helpers
   ========================================================================== */

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.75em;
}

.eyebrow-light {
  color: var(--gold-light);
}

.section-heading {
  max-width: 720px;
  margin: 0 0 48px;
}

.section-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 14px;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-mark {
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy);
}

.logo-subtitle {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.main-nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--navy);
  border-bottom-color: var(--gold);
}

.btn-nav {
  flex-shrink: 0;
  padding: 11px 24px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--navy);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 860px) {
  .main-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }

  .main-nav.open {
    max-height: 320px;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
  }

  .main-nav li {
    border-bottom: 1px solid var(--border);
  }

  .main-nav li:last-child {
    border-bottom: none;
  }

  .nav-link {
    display: block;
    padding: 14px 0;
    border-bottom: none;
  }

  .btn-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  background-color: var(--off-white);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 88px 24px;
}

.hero-content {
  max-width: 600px;
}

.hero h1 {
  margin-bottom: 0.5em;
}

.hero-subhead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 2em;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-secondary {
  background-color: transparent;
  color: var(--navy);
  border-color: var(--border);
}

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

.hero-media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 24px 48px rgba(17, 32, 61, 0.16);
}

@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 56px 24px;
  }

  .hero-media {
    order: -1;
  }
}

@media (max-width: 600px) {
  .hero-actions .btn {
    width: 100%;
  }
}

/* ==========================================================================
   Services
   ========================================================================== */

.services {
  background-color: var(--off-white);
}

.section-heading {
  text-align: left;
}

.services .section-heading {
  text-align: center;
  margin: 0 auto 56px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

@media (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: 0 12px 32px rgba(17, 32, 61, 0.08);
  transform: translateY(-3px);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: rgba(201, 162, 39, 0.12);
  color: var(--navy);
  margin-bottom: 20px;
}

.card h3 {
  margin-bottom: 14px;
}

.card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.card li {
  position: relative;
  padding-left: 18px;
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 7px;
  height: 1px;
  background-color: var(--gold);
}

/* ==========================================================================
   About
   ========================================================================== */

.about-inner {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 64px;
  align-items: start;
}

@media (max-width: 860px) {
  .about-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

.about-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
  border-radius: var(--radius);
}

@media (max-width: 860px) {
  .about-media img {
    max-width: 320px;
    margin: 0 auto;
  }
}

.about-content p {
  color: var(--text-muted);
}

/* ==========================================================================
   Why OptiCare
   ========================================================================== */

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

.why h2 {
  color: var(--white);
  max-width: 760px;
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 32px;
}

@media (max-width: 760px) {
  .why-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.why-lead {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--gold-light);
  margin: 0;
}

.why-body {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  margin: 0;
}

/* ==========================================================================
   Insights
   ========================================================================== */

.insights-inner {
  display: flex;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
}

.insights-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  flex-shrink: 0;
}

.insights-text {
  flex: 1 1 420px;
}

.insights-text h2 {
  margin-bottom: 0.4em;
}

.insights-text p {
  color: var(--text-muted);
  margin: 0;
  max-width: 560px;
}

@media (max-width: 760px) {
  .insights-inner {
    text-align: center;
    flex-direction: column;
  }

  .insights-text p {
    margin: 0 auto;
  }
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  background-color: var(--off-white);
}

.contact-inner {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 56px;
}

@media (max-width: 860px) {
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.contact-details h3 {
  margin-bottom: 1em;
}

.contact-details p {
  margin-bottom: 1.4em;
}

.contact-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4em;
}

.contact-details a {
  font-size: 1.02rem;
  color: var(--navy);
  font-weight: 600;
  word-break: break-word;
}

.contact-details a:hover {
  color: var(--gold);
}

.contact-form {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 540px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--navy);
}

.form-group input,
.form-group textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--white);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.18);
}

.form-group textarea {
  resize: vertical;
}

.form-success {
  margin: 18px 0 0;
  padding: 14px 16px;
  background-color: rgba(201, 162, 39, 0.12);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--navy);
  font-weight: 600;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background-color: var(--navy-deep);
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.logo-footer .logo-title {
  color: var(--white);
}

.logo-footer .logo-subtitle {
  color: rgba(255, 255, 255, 0.55);
}

.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 600;
}

.footer-nav a:hover {
  color: var(--gold-light);
}

.footer-copy {
  font-size: 0.82rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  width: 100%;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
}

@media (min-width: 760px) {
  .footer-copy {
    width: auto;
    border-top: none;
    padding-top: 0;
    text-align: right;
    margin-left: auto;
  }
}
