/*
Theme Name: Nexinity
Theme URI: https://nexinity.eu/
Author: Nexinity
Author URI: https://nexinity.eu/
Description: Custom block theme for Nexinity — SEPA payment processing in Europe. Trustworthy, business-grade aesthetic in Nexinity green (#238c51), Lora serif for headings and Inter for body.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nexinity
Tags: full-site-editing, block-templates, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

/* Nexinity site-wide tweaks beyond theme.json */

:root {
  --nx-green: #168761;
  --nx-green-light: #46e696;
  --nx-green-dark: #0f5230;
  --nx-green-deep: #0c3824;
  --nx-ink: #1a1a1a;
  --nx-slate: #4a5568;
  --nx-cream: #fafaf7;
  --nx-mist: #e8ece9;
}

body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Header */
.wp-site-blocks > header { border-bottom: 1px solid var(--nx-mist); background: #fff; position: sticky; top: 0; z-index: 100; }
.wp-block-site-logo img { max-height: 44px; width: auto; }

/* Nav links */
.wp-block-navigation .wp-block-navigation-item__content { font-weight: 500; font-size: 15px; letter-spacing: 0.1px; }
.wp-block-navigation .wp-block-navigation-item__content:hover { color: var(--nx-green); }

/* Buttons */
.wp-block-button__link {
  border-radius: 6px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.2px;
  transition: all .15s ease;
}
.wp-block-button.is-style-outline .wp-block-button__link {
  border: 1.5px solid var(--nx-ink);
  background: transparent;
  color: var(--nx-ink);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--nx-ink); color: #fff;
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background: var(--nx-green-dark) !important;
}

/* Hero */
.nx-hero { padding: 80px 0 72px; }
.nx-hero h1 { font-family: 'Lora', Georgia, serif; font-weight: 500; font-size: clamp(40px, 5.5vw, 64px); line-height: 1.08; letter-spacing: -0.5px; margin-bottom: 22px; }
.nx-hero .nx-eyebrow { font-weight: 600; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 18px; }
.nx-hero p.nx-lead { font-size: 19px; max-width: 620px; line-height: 1.55; }

/* Section helpers */
.nx-section { padding: 96px 0; }
.nx-section--cream { background: var(--nx-cream); }
.nx-section--deep { background: var(--nx-green-deep); color: #fff; }
.nx-section h2 { font-family: 'Lora', Georgia, serif; font-weight: 500; font-size: clamp(30px, 3.5vw, 44px); line-height: 1.15; letter-spacing: -0.3px; margin: 0 0 20px; }
.nx-section .nx-eyebrow { color: var(--nx-green); font-weight: 600; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px; }

/* Stats strip */
.nx-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 56px 0; border-top: 1px solid var(--nx-mist); border-bottom: 1px solid var(--nx-mist); }
.nx-stats .nx-stat { text-align: center; }
.nx-stats .nx-stat-num { font-family: 'Lora', Georgia, serif; font-size: clamp(36px, 4.5vw, 56px); color: var(--nx-green); line-height: 1; margin-bottom: 8px; }
.nx-stats .nx-stat-label { font-size: 14px; color: var(--nx-slate); letter-spacing: 0.3px; }

/* USP cards */
.nx-usps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.nx-usp { background: #fff; padding: 32px; border: 1px solid var(--nx-mist); border-radius: 16px; transition: all .2s; }
.nx-usp:hover { box-shadow: 0 8px 24px rgba(0,0,0,.06); transform: translateY(-2px); }
.nx-usp .nx-usp-icon { width: 44px; height: 44px; border-radius: 8px; background: rgba(70,230,150,.12); color: var(--nx-green-light); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px; font-size: 22px; }
.nx-usp h3 { font-family: 'Lora', Georgia, serif; font-weight: 500; font-size: 22px; margin: 0 0 10px; line-height: 1.25; }
.nx-usp p { color: var(--nx-slate); font-size: 15px; line-height: 1.6; margin: 0; }

/* Partner logos strip */
.nx-partners { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px 32px; }
.nx-partners .nx-partner {
  display: inline-flex; align-items: center;
  font-family: 'Lora', Georgia, serif; font-weight: 500; font-size: 18px; color: #7a8880; letter-spacing: 0.4px;
  padding: 10px 22px; border: 1.5px solid #d6ddd9; border-radius: 6px; background: #fff;
  transition: border-color .15s, color .15s, box-shadow .15s;
}
.nx-partners .nx-partner:hover { border-color: var(--nx-green); color: var(--nx-green); box-shadow: 0 2px 8px rgba(22,135,97,.1); }

/* Form */
.nx-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 20px;
}
.nx-form-grid p { margin: 0; }
.nx-form-grid .nx-fullwidth { grid-column: 1 / -1; }
.nx-form-grid label { display: block; font-size: 13px; font-weight: 600; color: var(--nx-ink); margin-bottom: 8px; letter-spacing: 0.2px; }
.nx-form-grid input[type=text],
.nx-form-grid input[type=email],
.nx-form-grid input[type=tel],
.nx-form-grid input[type=url],
.nx-form-grid select,
.nx-form-grid textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #cfd6d2; border-radius: 6px;
  font-size: 15px; font-family: inherit; background: #fff; box-sizing: border-box;
}
.nx-form-grid input:focus, .nx-form-grid select:focus, .nx-form-grid textarea:focus {
  outline: none; border-color: var(--nx-green); box-shadow: 0 0 0 3px rgba(22,135,97,.15);
}
.nx-form-grid textarea { min-height: 120px; resize: vertical; }
.nx-form-grid input[type=submit] {
  background: var(--nx-green); color: #fff; border: none; padding: 13px 28px;
  border-radius: 6px; font-weight: 600; font-size: 15px; cursor: pointer; transition: background .15s;
}
.nx-form-grid input[type=submit]:hover { background: var(--nx-green-dark); }
/* Keep legacy .wpcf7-form selectors for CF7 default forms */
.wpcf7-form label { display: block; font-size: 13px; font-weight: 600; color: var(--nx-ink); margin-bottom: 8px; }
.wpcf7-form input[type=text], .wpcf7-form input[type=email], .wpcf7-form input[type=tel],
.wpcf7-form input[type=url], .wpcf7-form select, .wpcf7-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #cfd6d2; border-radius: 6px;
  font-size: 15px; font-family: inherit; background: #fff; box-sizing: border-box;
}
.wpcf7-form input:focus, .wpcf7-form select:focus, .wpcf7-form textarea:focus {
  outline: none; border-color: var(--nx-green); box-shadow: 0 0 0 3px rgba(22,135,97,.15);
}
.wpcf7-form textarea { min-height: 120px; resize: vertical; }
.wpcf7-form input[type=submit] {
  background: var(--nx-green); color: #fff; border: none; padding: 13px 28px;
  border-radius: 6px; font-weight: 600; font-size: 15px; cursor: pointer; transition: background .15s;
}
.wpcf7-form input[type=submit]:hover { background: var(--nx-green-dark); }

/* Footer */
.wp-site-blocks > footer { background: var(--nx-green-deep); color: rgba(255,255,255,.78); padding: 64px 0 32px; }
.wp-site-blocks > footer a { color: rgba(255,255,255,.78); text-decoration: none; }
.wp-site-blocks > footer a:hover { color: #fff; }
.wp-site-blocks > footer h4 { color: #fff; font-family: 'Lora', Georgia, serif; font-weight: 500; font-size: 16px; margin: 0 0 14px; letter-spacing: 0.3px; }
/* Footer logo link */
.nx-footer-logo { display: inline-block; line-height: 0; }

/* Hero illustration */
.nx-hero-illustration { display: flex; align-items: center; justify-content: center; }
.nx-hero-illustration svg { width: 100%; height: auto; max-width: 460px; }
@media (max-width: 880px) { .nx-hero-illustration { display: none; } }

/* Dark section cards */
.nx-dark-card { background: rgba(255,255,255,0.06); border-radius: 16px; padding: 32px 28px; }
.nx-dark-card h3 { color: #fff; }
.nx-dark-card p { color: rgba(255,255,255,0.72); }

/* Responsive */
@media (min-width: 783px) and (max-width: 1040px) {
  /* 3-column card grids → 2-per-row at tablet widths */
  .wp-block-columns:has(> .wp-block-column:nth-child(3)) > .wp-block-column {
    flex-basis: calc(50% - 16px) !important;
    flex-grow: 0 !important;
  }
}
@media (max-width: 880px) {
  .nx-stats { grid-template-columns: 1fr; gap: 32px; }
  .nx-usps { grid-template-columns: 1fr; }
  .nx-form-grid { grid-template-columns: 1fr; }
  .wpcf7-form { grid-template-columns: 1fr; }
  .nx-section { padding: 64px 0; }
  .nx-hero { padding: 64px 0 56px; }
}

/* Hide WP admin bar gap on frontend */
html { margin-top: 0 !important; }
