/* ============================================
   TEALEDGE THEME — CSS
   Inspired by iStudio visual DNA:
   - Deep teal + pale teal palette
   - Geometric sans typography
   - Sharp corners (0 border-radius)
   - Asymmetric layouts
   - Color-blocked accent elements
   - 2px border decorative accents
   ============================================ */

:root {
  --c-primary: #0D6B68;
  --c-primary-dark: #0a5653;
  --c-dark: #03201F;
  --c-light: #E6F0EF;
  --c-light-alt: #f4f9f8;
  --c-body: #555555;
  --c-white: #ffffff;
  --c-border: #d4e3e1;
  --font-heading: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1200px;
  --gap: 2rem;
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--c-body);
  background: var(--c-white);
}

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

a { color: var(--c-primary); text-decoration: none; transition: color .3s; }
a:hover { color: var(--c-primary-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--c-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }

p { margin-bottom: 1rem; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* === SKIP NAV === */
.skip-nav {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: .5rem 1rem;
  background: var(--c-primary);
  color: var(--c-white);
}
.skip-nav:focus { left: 0; }

/* === HEADER / NAVBAR === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--c-white);
  border-bottom: 2px solid var(--c-light);
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 2px 20px rgba(3,32,31,.08); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-dark);
  letter-spacing: -0.02em;
}
.site-logo:hover { color: var(--c-primary); }

.main-nav { display: flex; align-items: center; gap: 0; }
.main-nav a {
  display: block;
  padding: .5rem 1.25rem;
  font-family: var(--font-heading);
  font-size: .95rem;
  font-weight: 500;
  color: var(--c-dark);
  transition: color .3s;
}
.main-nav a:hover { color: var(--c-primary); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 2px solid var(--c-dark);
  padding: 8px 7px;
  cursor: pointer;
  transition: border-color .3s;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-dark);
  transition: transform .3s, opacity .3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-white);
    border-bottom: 2px solid var(--c-light);
    flex-direction: column;
    padding: 1rem 0;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: .75rem 1.25rem; }
}

/* === HERO (split-screen, asymmetric) === */
.hero {
  background: var(--c-light);
  padding: 4rem 0 0 0;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  min-height: 420px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 3rem 3rem 0;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-content h1 .accent {
  color: var(--c-primary);
}

.hero-subtitle {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  color: var(--c-body);
}

.hero-cta {
  display: inline-block;
  padding: .85rem 2.2rem;
  background: var(--c-primary);
  color: var(--c-white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid var(--c-primary);
  transition: background .3s, color .3s;
}
.hero-cta:hover {
  background: transparent;
  color: var(--c-primary);
}

.hero-visual {
  position: relative;
  background: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
}

.hero-visual::before {
  content: "";
  position: absolute;
  top: 0;
  left: -40px;
  width: 40px;
  height: 100%;
  background: var(--c-primary);
}

.hero-badge {
  position: absolute;
  bottom: 2rem;
  left: 2.5rem;
  background: var(--c-dark);
  color: var(--c-white);
  padding: .6rem 1.2rem;
  font-family: var(--font-heading);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-content { padding: 2rem 0; }
  .hero-visual { min-height: 200px; }
  .hero-visual::before { display: none; }
}

/* === INLINE LABEL (color-blocked accent text) === */
.label-accent {
  display: inline;
  background: var(--c-primary);
  color: var(--c-white);
  padding: .15em .5em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.label-accent--light {
  background: var(--c-light);
  color: var(--c-primary);
}

/* === SECTION SPACING === */
.section { padding: 5rem 0; }
.section--light { background: var(--c-light); }
.section--dark { background: var(--c-dark); color: rgba(255,255,255,.75); }
.section--dark h2, .section--dark h3 { color: var(--c-white); }

.section-header {
  margin-bottom: 3rem;
}
.section-header h2 {
  margin-bottom: .75rem;
}
.section-header p {
  max-width: 640px;
  color: var(--c-body);
}

/* === LATEST POSTS (asymmetric: featured + sidebar list) === */
.posts-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
}

.post-featured {
  border: 2px solid var(--c-border);
  transition: border-color .3s;
}
.post-featured:hover { border-color: var(--c-primary); }

.post-featured-img {
  overflow: hidden;
}
.post-featured-img img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform .5s;
}
.post-featured:hover .post-featured-img img { transform: scale(1.05); }

.post-featured-body {
  padding: 1.8rem;
}
.post-featured-body .post-date {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--c-primary);
  margin-bottom: .5rem;
  font-weight: 600;
}
.post-featured-body h3 { margin-bottom: .75rem; }
.post-featured-body h3 a { color: var(--c-dark); }
.post-featured-body h3 a:hover { color: var(--c-primary); }

.posts-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-side-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 2px solid var(--c-border);
  align-items: start;
}
.post-side-item:first-child { padding-top: 0; }
.post-side-item:last-child { border-bottom: none; }

.post-side-thumb {
  overflow: hidden;
}
.post-side-thumb img {
  width: 100px;
  height: 72px;
  object-fit: cover;
}

.post-side-info .post-date {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--c-primary);
  font-weight: 600;
}
.post-side-info h4 {
  font-size: 1rem;
  margin-top: .3rem;
}
.post-side-info h4 a { color: var(--c-dark); }
.post-side-info h4 a:hover { color: var(--c-primary); }

@media (max-width: 768px) {
  .posts-layout { grid-template-columns: 1fr; }
}

/* === TOPICS (checkerboard grid with alternating bg) === */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0;
}

.topic-card {
  padding: 2.2rem 1.8rem;
  border: 2px solid transparent;
  transition: background .3s, color .3s, border-color .3s;
}

.topic-card:nth-child(odd) {
  background: var(--c-primary);
  color: rgba(255,255,255,.85);
}
.topic-card:nth-child(odd) h3 { color: var(--c-white); }
.topic-card:nth-child(odd):hover {
  background: var(--c-light);
  color: var(--c-body);
}
.topic-card:nth-child(odd):hover h3 { color: var(--c-dark); }

.topic-card:nth-child(even) {
  background: var(--c-light);
  color: var(--c-body);
}
.topic-card:nth-child(even) h3 { color: var(--c-dark); }
.topic-card:nth-child(even):hover {
  background: var(--c-primary);
  color: rgba(255,255,255,.85);
}
.topic-card:nth-child(even):hover h3 { color: var(--c-white); }

.topic-card h3 {
  font-size: 1.2rem;
  margin-bottom: .75rem;
  transition: color .3s;
}

.topic-card-desc {
  font-size: .95rem;
  line-height: 1.6;
}

/* === FAQ (editorial style, not accordion) === */
.faq-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.faq-item {
  padding: 2rem;
  border-bottom: 2px solid var(--c-border);
  border-right: 2px solid var(--c-border);
}
.faq-item:nth-child(even) { border-right: none; }
.faq-item:nth-last-child(-n+2) { border-bottom: none; }

.faq-item h3 {
  font-size: 1.05rem;
  margin-bottom: .75rem;
  padding-left: 1.5rem;
  position: relative;
}
.faq-item h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: .35em;
  width: .85rem;
  height: 2px;
  background: var(--c-primary);
}

.faq-item .faq-answer {
  font-size: .95rem;
  line-height: 1.7;
  padding-left: 1.5rem;
}

@media (max-width: 768px) {
  .faq-list { grid-template-columns: 1fr; }
  .faq-item { border-right: none; }
  .faq-item:last-child { border-bottom: none; }
}

/* === FOOTER === */
.site-footer {
  background: var(--c-dark);
  color: rgba(255,255,255,.5);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-white);
  display: inline-block;
  margin-bottom: 1rem;
}

.site-footer h4 {
  color: var(--c-white);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.footer-nav a {
  display: block;
  color: rgba(255,255,255,.5);
  padding: .3rem 0;
  font-size: .95rem;
  transition: color .3s, padding-left .3s;
}
.footer-nav a::before {
  content: "\203A";
  margin-right: .5rem;
}
.footer-nav a:hover {
  color: var(--c-white);
  padding-left: .5rem;
}

.footer-contact a {
  color: rgba(255,255,255,.5);
}
.footer-contact a:hover { color: var(--c-white); }

.footer-bottom {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .85rem;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
}

/* === BLOG INDEX === */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

.blog-card {
  border: 2px solid var(--c-border);
  transition: border-color .3s;
}
.blog-card:hover { border-color: var(--c-primary); }

.blog-card-img {
  overflow: hidden;
}
.blog-card-img img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform .5s;
}
.blog-card:hover .blog-card-img img { transform: scale(1.05); }

.blog-card-body {
  padding: 1.5rem;
}
.blog-card-body .post-date {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--c-primary);
  font-weight: 600;
  margin-bottom: .4rem;
}
.blog-card-body h3 {
  font-size: 1.15rem;
  margin-bottom: .6rem;
}
.blog-card-body h3 a { color: var(--c-dark); }
.blog-card-body h3 a:hover { color: var(--c-primary); }
.blog-card-body .excerpt {
  font-size: .92rem;
  line-height: 1.6;
}

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

/* === PAGINATION === */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: 3rem;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: .4rem .8rem;
  font-size: .95rem;
  font-weight: 600;
  border: 2px solid var(--c-border);
  color: var(--c-dark);
  transition: background .3s, color .3s, border-color .3s;
}
.pagination a:hover {
  background: var(--c-primary);
  color: var(--c-white);
  border-color: var(--c-primary);
}
.pagination .active {
  background: var(--c-primary);
  color: var(--c-white);
  border-color: var(--c-primary);
}

/* === SINGLE POST === */
.post-header {
  padding: 3rem 0 2rem;
  background: var(--c-light);
}
.post-header h1 { margin-bottom: .5rem; }
.post-header .post-date {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--c-primary);
  font-weight: 600;
}

.post-cover {
  margin: -1rem 0 2rem;
}
.post-cover img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
}

.post-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}
.post-body h2, .post-body h3, .post-body h4 { margin-top: 2rem; margin-bottom: .75rem; }
.post-body p { margin-bottom: 1.25rem; line-height: 1.8; }
.post-body ul, .post-body ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.post-body li { margin-bottom: .4rem; line-height: 1.7; }
.post-body blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  border-left: 4px solid var(--c-primary);
  background: var(--c-light);
  font-style: italic;
}
.post-body img { margin: 1.5rem 0; }
.post-body a { text-decoration: underline; }

/* === PAGE (static) === */
.page-header {
  padding: 3rem 0 2rem;
  background: var(--c-light);
}
.page-header h1 { margin-bottom: 0; }

.page-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}
.page-body h2, .page-body h3 { margin-top: 2rem; margin-bottom: .75rem; }
.page-body p { margin-bottom: 1.25rem; line-height: 1.8; }
.page-body ul, .page-body ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.page-body li { margin-bottom: .4rem; line-height: 1.7; }
.page-body a { text-decoration: underline; }

/* === BREADCRUMB-STYLE TAGLINE === */
.hero-tagline {
  display: inline-block;
  padding: .5rem 1.2rem;
  border: 2px solid var(--c-white);
  font-size: .9rem;
  font-weight: 500;
  color: var(--c-body);
  margin-bottom: 1.5rem;
}

/* === BACK TO TOP === */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--c-primary);
  color: var(--c-white);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: none;
  cursor: pointer;
  z-index: 999;
  transition: background .3s;
}
.back-to-top:hover { background: var(--c-dark); }
.back-to-top.visible { display: flex; }

/* === UTILITY === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* === FOCUS STYLES === */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}
