/* Theme */
:root {
  --nx-radius-lg: 0.75rem;
  --nx-radius-base: 0.5rem;
  --nx-container-max-width: 1200px;
  --nx-size-5xl: 3.5rem;
  --nx-spacing-section-gap: 5rem;
  --nx-size-xs: 0.75rem;
  --nx-spacing-container-padding: 1.5rem;
  --nx-color-surface: #f8f8f6;
  --nx-color-border: #e5e5e3;
  --nx-container-max-width-narrow: 720px;
  --nx-font-heading: DM Sans;
  --nx-size-sm: 0.875rem;
  --nx-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --nx-color-secondary: #f8f8f6;
  --nx-color-accent-foreground: #ffffff;
  --nx-color-accent: #c2652a;
  --nx-size-lg: 1.125rem;
  --nx-font-body: Inter, sans-serif;
  --nx-size-2xl: 1.5rem;
  --nx-shadow-base: 0 2px 8px rgba(0,0,0,0.08);
  --nx-color-secondary-foreground: #1a1a1a;
  --nx-color-muted: #737373;
  --nx-color-primary-foreground: #ffffff;
  --nx-color-primary: #477113;
  --nx-size-xl: 1.25rem;
  --nx-color-background: #ffffff;
  --nx-size-4xl: 2.5rem;
  --nx-size-base: 1rem;
  --nx-radius-full: 9999px;
  --nx-color-foreground: #1a1a1a;
  --nx-size-3xl: 2rem;
  --nx-shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
}

[data-scheme="dark"] {
  --nx-color-muted: #a3a3a3;
  --nx-color-foreground: #f5f5f3;
  --nx-color-primary-foreground: #141414;
  --nx-color-border: #2e2e2e;
  --nx-color-primary: #6f96ff;
  --nx-color-background: #141414;
  --nx-color-surface: #1e1e1e;
}

[data-scheme="light"] {
  --nx-color-background: #ffffff;
  --nx-color-surface: #f8f8f6;
  --nx-color-muted: #737373;
  --nx-color-border: #e5e5e3;
  --nx-color-foreground: #1a1a1a;
}

[data-scheme="brand"] {
  --nx-color-muted: #b0c4de;
  --nx-color-border: #2d5a8a;
  --nx-color-primary-foreground: #1a3a5c;
  --nx-color-foreground: #ffffff;
  --nx-color-background: #1a3a5c;
  --nx-color-primary: #ffffff;
  --nx-color-surface: #224a72;
}

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

body {
  font-family: var(--nx-font-body);
  font-size: var(--nx-size-base);
  color: var(--nx-color-foreground);
  background: var(--nx-color-background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.container--narrow {
  max-width: var(--nx-container-max-width-narrow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--nx-radius-base);
  font-family: var(--nx-font-body);
  font-size: var(--nx-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  opacity: 0.9;
}

.btn-primary {
  background: var(--nx-color-primary);
  color: var(--nx-color-primary-foreground);
}

.btn-ghost {
  background: transparent;
  color: var(--nx-color-foreground);
  border: 1px solid var(--nx-color-border);
}

.btn-ghost:hover {
  background: var(--nx-color-surface);
}

.section-label {
  font-family: var(--nx-font-body);
  font-size: var(--nx-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nx-color-primary);
}

.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;
}

/* Section: footer */
.footer {
  padding: var(--nx-spacing-section-gap) 0 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--nx-color-border);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__logo {
  font-family: var(--nx-font-heading);
  font-size: var(--nx-size-xl);
  font-weight: 700;
  color: var(--nx-color-foreground);
}

.footer__tagline {
  font-size: var(--nx-size-sm);
  color: var(--nx-color-muted);
  line-height: 1.6;
  max-width: 280px;
}

.footer__nav,
.footer__social {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__nav-title {
  font-size: var(--nx-size-sm);
  font-weight: 600;
  color: var(--nx-color-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer__nav-link {
  font-size: var(--nx-size-sm);
  color: var(--nx-color-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer__nav-link:hover {
  color: var(--nx-color-foreground);
}

.footer__bottom {
  padding-top: 2rem;
}

.footer__copyright {
  font-size: var(--nx-size-sm);
  color: var(--nx-color-muted);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Section: cta */
.cta {
  padding: var(--nx-spacing-section-gap) 0;
}

.cta__content {
  max-width: var(--nx-container-max-width-narrow);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

{:: if section.settings.text_align == "center" ::}
.cta__content {
  margin: 0 auto;
  align-items: center;
  text-align: center;
}
{:: endif ::}

.cta__heading {
  font-family: var(--nx-font-heading);
  font-size: var(--nx-size-3xl);
  font-weight: 700;
  color: var(--nx-color-foreground);
  line-height: 1.2;
}

.cta__subheading {
  font-size: var(--nx-size-lg);
  color: var(--nx-color-muted);
  line-height: 1.6;
}

.cta__actions {
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  .cta__heading {
    font-size: var(--nx-size-2xl);
  }
}

/* Section: about */
.about {
  padding: var(--nx-spacing-section-gap) 0;
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

{:: if section.settings.image_position == "left" ::}
.about__media {
  order: -1;
}
{:: endif ::}

.about__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about__heading {
  font-family: var(--nx-font-heading);
  font-size: var(--nx-size-3xl);
  font-weight: 700;
  color: var(--nx-color-foreground);
  line-height: 1.2;
}

.about__text {
  font-size: var(--nx-size-base);
  color: var(--nx-color-muted);
  line-height: 1.8;
}

.about__text p {
  margin-bottom: 1rem;
}

.about__text p:last-child {
  margin-bottom: 0;
}

.about__image {
  width: 100%;
  border-radius: var(--nx-radius-lg);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.about__placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--nx-color-surface);
  border: 1px solid var(--nx-color-border);
  border-radius: var(--nx-radius-lg);
}

@media (max-width: 768px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about__media {
    order: -1;
  }

  .about__heading {
    font-size: var(--nx-size-2xl);
  }
}

/* Section: header */
.header {
  padding: 1rem 0;
  background: var(--nx-color-background);
  border-bottom: 1px solid var(--nx-color-border);
  z-index: 100;
}

{:: if section.settings.sticky ::}
.header {
  position: sticky;
  top: 0;
}
{:: endif ::}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.header__logo-text {
  font-family: var(--nx-font-heading);
  font-size: var(--nx-size-xl);
  font-weight: 700;
  color: var(--nx-color-foreground);
}

.header__logo-img {
  height: 2rem;
  width: auto;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header__nav-link {
  font-size: var(--nx-size-sm);
  font-weight: 500;
  color: var(--nx-color-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.header__nav-link:hover {
  color: var(--nx-color-foreground);
}

.header__actions {
  flex-shrink: 0;
}

.header__actions .btn {
  padding: 0.5rem 1.25rem;
  font-size: var(--nx-size-sm);
}

@media (max-width: 768px) {
  .header__nav {
    display: none;
  }

  .header__actions {
    display: none;
  }
}

/* Section: blog-post */
.blog-post { padding: 4rem 0; }
.blog-post .container { max-width: 720px; }
.blog-post__back { display: inline-block; margin-bottom: 1.5rem; color: var(--nx-color-primary); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.blog-post__back:hover { text-decoration: underline; }
.blog-post__category { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--nx-color-primary); margin-bottom: 0.75rem; display: block; }
.blog-post__title { font-family: var(--nx-font-heading); font-size: 2.5rem; font-weight: 700; line-height: 1.2; margin-bottom: 0.75rem; color: var(--nx-color-foreground); }
.blog-post__meta { font-size: 0.9rem; color: #888; margin-bottom: 2rem; }
.blog-post__hero { margin-bottom: 2rem; border-radius: 12px; overflow: hidden; }
.blog-post__hero img { width: 100%; height: auto; display: block; }
.blog-post__body { font-size: 1.05rem; line-height: 1.75; color: var(--nx-color-foreground); }
.blog-post__body p { margin-bottom: 1.25rem; }
.blog-post__body ol, .blog-post__body ul { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.blog-post__body li { margin-bottom: 0.5rem; }
.blog-post__body strong { font-weight: 600; }
@media (max-width: 640px) { .blog-post__title { font-size: 1.75rem; } }

/* Section: features */
.features {
  padding: var(--nx-spacing-section-gap) 0;
}

.features__header {
  text-align: center;
  max-width: var(--nx-container-max-width-narrow);
  margin: 0 auto 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.features__heading {
  font-family: var(--nx-font-heading);
  font-size: var(--nx-size-3xl);
  font-weight: 700;
  color: var(--nx-color-foreground);
  line-height: 1.2;
}

.features__subheading {
  font-size: var(--nx-size-lg);
  color: var(--nx-color-muted);
  line-height: 1.6;
}

.features__grid {
  display: grid;
  gap: 2rem;
}

{:: if section.settings.columns == "2" ::}
.features__grid { grid-template-columns: repeat(2, 1fr); }
{:: endif ::}

{:: if section.settings.columns == "3" ::}
.features__grid { grid-template-columns: repeat(3, 1fr); }
{:: endif ::}

{:: if section.settings.columns == "4" ::}
.features__grid { grid-template-columns: repeat(4, 1fr); }
{:: endif ::}

.features__card {
  padding: 2rem;
  background: var(--nx-color-surface);
  border: 1px solid var(--nx-color-border);
  border-radius: var(--nx-radius-lg);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.features__icon {
  font-size: 2rem;
  line-height: 1;
}

.features__title {
  font-family: var(--nx-font-heading);
  font-size: var(--nx-size-lg);
  font-weight: 600;
  color: var(--nx-color-foreground);
}

.features__description {
  font-size: var(--nx-size-base);
  color: var(--nx-color-muted);
  line-height: 1.6;
}

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

  .features__heading {
    font-size: var(--nx-size-2xl);
  }
}

/* Section: hero */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--nx-spacing-section-gap) 0;
}

.hero__content {
  max-width: var(--nx-container-max-width-narrow);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero__heading {
  font-family: var(--nx-font-heading);
  font-size: var(--nx-size-5xl);
  font-weight: 700;
  line-height: 1.1;
  color: var(--nx-color-foreground);
}

.hero__subheading {
  font-size: var(--nx-size-lg);
  color: var(--nx-color-muted);
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

{:: if section.settings.text_align == "center" ::}
.hero__content {
  align-items: center;
  text-align: center;
}

.hero__actions {
  justify-content: center;
}
{:: endif ::}

{:: if section.settings.height == "large" ::}
.hero { min-height: 80vh; }
{:: endif ::}

{:: if section.settings.height == "medium" ::}
.hero { min-height: 60vh; }
{:: endif ::}

@media (max-width: 768px) {
  .hero__heading {
    font-size: var(--nx-size-3xl);
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Section: testimonials */
.testimonials {
  padding: var(--nx-spacing-section-gap) 0;
}

.testimonials__header {
  text-align: center;
  max-width: var(--nx-container-max-width-narrow);
  margin: 0 auto 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.testimonials__heading {
  font-family: var(--nx-font-heading);
  font-size: var(--nx-size-3xl);
  font-weight: 700;
  color: var(--nx-color-foreground);
  line-height: 1.2;
}

.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.testimonials__card {
  padding: 2rem;
  background: var(--nx-color-surface);
  border: 1px solid var(--nx-color-border);
  border-radius: var(--nx-radius-lg);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.testimonials__quote {
  font-size: var(--nx-size-base);
  color: var(--nx-color-foreground);
  line-height: 1.7;
  font-style: italic;
}

.testimonials__quote::before {
  content: "\201C";
  font-size: var(--nx-size-3xl);
  color: var(--nx-color-primary);
  line-height: 0;
  display: block;
  margin-bottom: 0.5rem;
}

.testimonials__author {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: auto;
}

.testimonials__name {
  font-weight: 600;
  font-size: var(--nx-size-sm);
  color: var(--nx-color-foreground);
}

.testimonials__role {
  font-size: var(--nx-size-sm);
  color: var(--nx-color-muted);
}

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

  .testimonials__heading {
    font-size: var(--nx-size-2xl);
  }
}

/* Section: contact */
.contact {
  padding: var(--nx-spacing-section-gap) 0;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact__heading {
  font-family: var(--nx-font-heading);
  font-size: var(--nx-size-3xl);
  font-weight: 700;
  color: var(--nx-color-foreground);
  line-height: 1.2;
}

.contact__description {
  font-size: var(--nx-size-base);
  color: var(--nx-color-muted);
  line-height: 1.7;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.contact__detail {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact__detail-label {
  font-size: var(--nx-size-sm);
  font-weight: 600;
  color: var(--nx-color-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact__detail-value {
  font-size: var(--nx-size-base);
  color: var(--nx-color-muted);
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact__field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact__label {
  font-size: var(--nx-size-sm);
  font-weight: 500;
  color: var(--nx-color-foreground);
}

.contact__input {
  padding: 0.75rem 1rem;
  background: var(--nx-color-background);
  border: 1px solid var(--nx-color-border);
  border-radius: var(--nx-radius-base);
  font-family: var(--nx-font-body);
  font-size: var(--nx-size-base);
  color: var(--nx-color-foreground);
  transition: border-color 0.15s ease;
}

.contact__input:focus {
  outline: none;
  border-color: var(--nx-color-primary);
}

.contact__input::placeholder {
  color: var(--nx-color-muted);
}

.contact__textarea {
  resize: vertical;
  min-height: 120px;
}

.contact__submit {
  align-self: flex-start;
}

@media (max-width: 768px) {
  .contact__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact__heading {
    font-size: var(--nx-size-2xl);
  }
}

/* Section: pricing */
.pricing {
  padding: var(--nx-spacing-section-gap) 0;
}

.pricing__header {
  text-align: center;
  max-width: var(--nx-container-max-width-narrow);
  margin: 0 auto 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pricing__heading {
  font-family: var(--nx-font-heading);
  font-size: var(--nx-size-3xl);
  font-weight: 700;
  color: var(--nx-color-foreground);
  line-height: 1.2;
}

.pricing__subheading {
  font-size: var(--nx-size-lg);
  color: var(--nx-color-muted);
  line-height: 1.6;
}

.pricing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: start;
}

.pricing__card {
  padding: 2rem;
  background: var(--nx-color-surface);
  border: 1px solid var(--nx-color-border);
  border-radius: var(--nx-radius-lg);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pricing__card--featured {
  border-color: var(--nx-color-primary);
  box-shadow: var(--nx-shadow-lg);
  position: relative;
}

.pricing__card-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pricing__plan-name {
  font-family: var(--nx-font-heading);
  font-size: var(--nx-size-lg);
  font-weight: 600;
  color: var(--nx-color-foreground);
}

.pricing__price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.pricing__amount {
  font-family: var(--nx-font-heading);
  font-size: var(--nx-size-4xl);
  font-weight: 700;
  color: var(--nx-color-foreground);
  line-height: 1;
}

.pricing__period {
  font-size: var(--nx-size-base);
  color: var(--nx-color-muted);
}

.pricing__plan-desc {
  font-size: var(--nx-size-sm);
  color: var(--nx-color-muted);
  line-height: 1.5;
}

.pricing__features {
  flex: 1;
  border-top: 1px solid var(--nx-color-border);
  padding-top: 1.5rem;
}

.pricing__feature-list {
  font-family: var(--nx-font-body);
  font-size: var(--nx-size-sm);
  color: var(--nx-color-muted);
  line-height: 2;
  white-space: pre-line;
  margin: 0;
}

.pricing__card-footer {
  margin-top: auto;
}

.pricing__btn {
  width: 100%;
}

@media (max-width: 768px) {
  .pricing__grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .pricing__heading {
    font-size: var(--nx-size-2xl);
  }
}

/* Section: blog-list */
.blog-list { padding: 4rem 0; }
.blog-list__title { font-family: var(--nx-font-heading); font-size: 2.5rem; font-weight: 700; margin-bottom: 2rem; color: var(--nx-color-foreground); }
.blog-list__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.blog-card { display: block; border-radius: 12px; overflow: hidden; background: var(--nx-color-background); border: 1px solid #e5e5e5; text-decoration: none; color: inherit; transition: box-shadow 0.2s, transform 0.2s; }
.blog-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.08); transform: translateY(-2px); }
.blog-card__image { aspect-ratio: 16/9; overflow: hidden; }
.blog-card__image img { width: 100%; height: 100%; object-fit: cover; }
.blog-card__content { padding: 1.25rem; }
.blog-card__category { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--nx-color-primary); margin-bottom: 0.5rem; display: block; }
.blog-card__title { font-family: var(--nx-font-heading); font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--nx-color-foreground); }
.blog-card__excerpt { font-size: 0.9rem; color: #666; line-height: 1.5; }
@media (max-width: 640px) { .blog-list__grid { grid-template-columns: 1fr; } .blog-list__title { font-size: 2rem; } }