/* Shared layout for contact, blog, privacy and similar pages */

:root {
  --color-white: #ffffff;
  --color-off-white: #f8f7f4;
  --color-charcoal: #1c1c1c;
  --color-charcoal-soft: #2a2a2a;
  --color-grey: #6b6b6b;
  --color-grey-light: #a3a3a3;
  --color-border: #e4e2dc;
  --color-accent: #a07848;
  --color-accent-hover: #856038;
  --color-accent-light: rgba(160, 120, 72, 0.12);
  --font-heading: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow-sm: 0 2px 8px rgba(28, 28, 28, 0.06);
  --shadow-md: 0 8px 30px rgba(28, 28, 28, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--color-charcoal);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10001;
  padding: 0.75rem 1.25rem;
  background: var(--color-accent);
  color: var(--color-white);
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.skip-link:focus { top: 1rem; }

.section-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 0.75rem);
  max-width: 100%;
  font-family: var(--font-heading);
  font-size: clamp(0.625rem, 2.5vw, 0.75rem);
  font-weight: 600;
  letter-spacing: clamp(0.08em, 0.35vw, 0.14em);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.section-label::before,
.section-label::after {
  content: '';
  flex-shrink: 0;
  width: clamp(18px, 5vw, 32px);
  height: 1px;
  background: var(--color-accent);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.25rem;
}

.section-subtitle {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--color-grey);
  max-width: 620px;
  line-height: 1.8;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  transition: opacity var(--transition);
}

.nav__logo:hover { opacity: 0.85; }

.nav__logo img {
  height: 54px;
  width: auto;
  max-width: 220px;
  display: block;
  object-fit: contain;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav__link {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
  transition: color var(--transition);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.nav__link:hover,
.nav__link--active { color: var(--color-accent); }

.nav__link:hover::after,
.nav__link--active::after { width: 100%; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-charcoal);
  transition: all var(--transition);
  border-radius: 2px;
}

.nav__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.active span:nth-child(2) { opacity: 0; }

.nav__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Page header */
.page-hero {
  padding: calc(var(--nav-height) + clamp(3rem, 6vw, 4rem)) 0 clamp(2rem, 4vw, 2.75rem);
  background: var(--color-off-white);
  text-align: center;
}

.page-hero .section-title {
  margin-bottom: clamp(1rem, 2.5vw, 1.25rem);
}

.page-hero .section-subtitle {
  margin-left: auto;
  margin-right: auto;
  max-width: 640px;
}

/* Content sections */
.content-section {
  padding: 2rem 0 5rem;
  background: var(--color-off-white);
}

.content-section .container {
  max-width: 800px;
}

.content-section--blog {
  padding: 0 0 clamp(4rem, 7vw, 6rem);
}

.content-section--blog .container {
  max-width: 860px;
}

/* Blog */
.blog-index {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 1.75rem) clamp(1.5rem, 3vw, 2rem);
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
  box-shadow: var(--shadow-sm);
}

.blog-index__title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.blog-index__list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  list-style: none;
  counter-reset: blog-index;
}

.blog-index__list li {
  counter-increment: blog-index;
}

.blog-index__list a::before {
  content: counter(blog-index, decimal-leading-zero);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-right: 0.75rem;
}

.blog-index__list a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-charcoal);
  transition: color var(--transition);
}

.blog-index__list li:last-child a {
  padding-bottom: 0;
  border-bottom: none;
}

.blog-index__list a:hover {
  color: var(--color-accent);
}

.blog-index__list span {
  font-size: 0.875rem;
  color: var(--color-grey-light);
  white-space: nowrap;
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 5vw, 3.5rem);
}

.blog-article {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  scroll-margin-top: calc(var(--nav-height) + 1.25rem);
}

.blog-article__body {
  padding: clamp(0.75rem, 2vw, 1rem) clamp(1.5rem, 3vw, 2.25rem) clamp(2rem, 4vw, 2.5rem);
}

.blog-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: clamp(1.25rem, 3vw, 1.5rem) clamp(1.5rem, 3vw, 2.25rem) 0;
  font-size: 0.8125rem;
  color: var(--color-grey-light);
}

.blog-article__meta time {
  font-weight: 500;
  color: var(--color-grey);
}

.blog-article__category {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.blog-article__read-time::before {
  content: none;
}

.blog-article__image {
  margin: clamp(1.25rem, 3vw, 1.75rem) 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-off-white);
  border-radius: var(--radius-sm);
}

.blog-article__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-article h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin: 0 0 clamp(0.85rem, 2vw, 1rem);
  color: var(--color-charcoal);
  line-height: 1.3;
}

.blog-lead {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-charcoal-soft);
  margin-bottom: 0;
}

.blog-article h3 {
  font-size: 1.0625rem;
  margin: clamp(1.5rem, 3vw, 1.75rem) 0 0.65rem;
  color: var(--color-charcoal);
  line-height: 1.35;
}

.blog-article p {
  color: var(--color-grey);
  margin-bottom: clamp(0.85rem, 2vw, 1rem);
  line-height: 1.75;
}

.blog-article p:last-of-type:not(.blog-cta) {
  margin-bottom: 0;
}

.blog-article ul,
.blog-article ol {
  padding-left: 1.5rem;
  margin: 0.25rem 0 clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-grey);
}

.blog-article ul {
  list-style: disc;
}

.blog-article ol {
  list-style: decimal;
}

.blog-article ul li,
.blog-article ol li {
  margin-bottom: 0.45rem;
}

.blog-article code {
  font-size: 0.875em;
  background: var(--color-off-white);
  border: 1px solid var(--color-border);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: var(--color-charcoal-soft);
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: clamp(1.5rem, 3vw, 1.75rem);
  padding-top: clamp(1.25rem, 2.5vw, 1.5rem);
  border-top: 1px solid var(--color-border);
}

.blog-tags span {
  font-size: 0.75rem;
  color: var(--color-grey);
  background: var(--color-off-white);
  border: 1px solid var(--color-border);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

.blog-cta {
  margin-top: clamp(1.25rem, 2.5vw, 1.5rem);
  margin-bottom: 0;
}

.blog-cta a {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-accent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}

.blog-cta a:hover {
  color: var(--color-accent-hover);
  border-bottom-color: var(--color-accent-hover);
}

/* Privacy / prose */
.prose h2 {
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
  color: var(--color-charcoal);
}

.prose p,
.prose li {
  color: var(--color-grey);
  margin-bottom: 1rem;
}

.prose strong {
  color: var(--color-charcoal);
  font-weight: 600;
}

.prose ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 0.5rem 0 1rem;
}

.prose ul li { margin-bottom: 0.4rem; }

.prose a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.prose a:hover { color: var(--color-accent-hover); }

.prose-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

/* Footer */
.footer {
  background: var(--color-charcoal);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0 1.75rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 4rem;
  align-items: start;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__brand-col { max-width: 420px; }

.footer__links-col {
  max-width: 220px;
  margin-left: auto;
}

.footer__brand {
  margin-bottom: 1rem;
  line-height: 0;
}

.footer__brand img {
  height: 50px;
  width: auto;
  max-width: 220px;
  display: block;
  object-fit: contain;
}

.footer__desc {
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer__heading {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer__nav a {
  font-size: 0.9rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition);
}

.footer__nav a:hover { color: var(--color-white); }

.footer__bottom {
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
}

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

@media (max-width: 768px) {
  :root { --nav-height: 70px; }
  .container { padding: 0 1.25rem; }

  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    opacity: 0;
    transition: all var(--transition);
    pointer-events: none;
  }

  .nav__links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav__toggle { display: flex; }

  .nav__logo img {
    height: 46px;
    max-width: 185px;
  }

  .footer__brand img { height: 42px; }

  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer__links-col { max-width: none; margin-left: 0; }
  .footer__bottom { text-align: center; }

  .blog-index { padding: 1.25rem 1.25rem; }

  .blog-article__meta,
  .blog-article__body {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .blog-article__body {
    padding-bottom: 1.75rem;
  }

  .blog-index__list a {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}
