/* Use Space Grotesk as the heading/display font (closest to Science Gothic) with system fallbacks */
body {
    font-family: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

:root {
    --primary: #FA802F; /* orange from logo */
    --accent: #1ABC9C; /* turquoise */
    --muted: #f6f6f6;
    --card-shadow: 0 8px 24px rgba(15, 15, 15, 0.06);
    --radius: 12px;
    --max-width: 980px;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Space Grotesk', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #111;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fixed-width container to match index.php's layout */
.cover-container {
    max-width: 42em;
    margin: 0 auto;
    padding: 0 18px;
}

.site-header {
    /* reduced vertical padding for a more compact header */
    padding: 14px 16px;
    text-align: center;
    background: var(--primary);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Use intrinsic image size via width/height attributes; keep responsive with max-width and a max-height so header stays compact */
.site-logo {
    height: auto;
    width: auto;
    max-width: 100%;
    max-height: 120px;
    display: block;
    margin: 0 auto;
}

/* small-screen cap so the logo doesn't overwhelm narrow viewports */
@media (max-width: 560px) {
    .site-logo {
        max-width: 220px;
        max-height: 72px;
        height: auto;
    }
}

/* Header/menu layout copied from index.php for centered nav and contact CTA */
.nav-link {
    color: white !important;
}

/* tighter spacing for the moderate header compact variant */
.header-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 100%;
    padding: 0.25rem 0;
}

.nav-masthead {
    margin: 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.nav-masthead .nav-link {
    padding: 0.25rem 0.5rem;
}

@media (max-width: 767.98px) {
    .header-grid {
        flex-direction: column;
        row-gap: 0.5rem;
        align-items: center;
    }

    .nav-masthead {
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 768px) {
    .header-grid {
        flex-direction: column;
        padding: 0.5rem 0;
    }
}

/* Hero */
.hero {
    max-width: 100%;
    margin: 48px 0 64px;
    padding: 0;
    text-align: left;
}

/* Keep the hero heading as two columns: icon (fixed) on the left and text on the right at all sizes */
.hero-heading {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: 16px;
}

/* Constrain logo icon to a square and preserve aspect ratio for non-square sources */
.hero-logo-icon {
    width: 72px;
    height: 72px;
    object-fit: contain;
    display: block;
}

/* For very narrow screens only slightly reduce icon size to avoid overflow while keeping two-column layout */
@media (max-width: 360px) {
    .hero-logo-icon {
        width: 56px;
        height: 56px;
    }
}

/* Section headings: modern font, larger, and lighter gray */
.hero h1 {
    font-size: 56px;
    line-height: 1.03;
    margin-bottom: 18px;
    font-weight: 800;
    color: #333333; /* lighter dark-gray */
    letter-spacing: -0.02em;
    font-family: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

.hero p.lead {
    font-size: 18px;
    color: #444;
    margin-bottom: 22px;
    max-width: 60ch;
}

.btn-cta {
    background: var(--primary);
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none; /* remove underline */
    display: inline-block; /* ensure anchor behaves like a button */
    box-shadow: 0 8px 18px rgba(250, 120, 60, 0.16);
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.btn-cta:hover, .btn-cta:focus {
    text-decoration: none;
}

/* Two-column feature */
.feature-row {
    position: relative; /* ensure absolute children can be placed relative to the whole section */
    max-width: 100%;
    margin: 40px 0;
    padding: 26px;
    border-radius: 14px;
    background: linear-gradient(to bottom left, rgba(255, 255, 255, 0.98) 0%, rgba(246, 246, 246, 1) 55%, rgba(235, 235, 235, 1) 100%);
    border-left: 4px solid rgba(11, 11, 11, 0.04);
    box-shadow: 0 8px 20px rgba(15, 15, 15, 0.04);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.feature-row .feature-text h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
}

/* Corner tag for the feature block - non-rotated and positioned to the section's top-left */
.feature-text {
    position: static;
}

.corner-tag {
    position: absolute;
    /* pull slightly outside the section so the tag sits at the outer top-left corner */
    top: -12px;
    left: calc(-12px + 5%); /* moved right by 5% of the feature-row width */
    /* dark gray background for the tag */
    background: #333333;
    color: #fff;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
    box-shadow: none; /* removed drop shadow per request */
    display: inline-block;
    z-index: 30;
    white-space: nowrap;
    border-radius: 6px;
}

/* Small adjustments for any icon inside the corner tag */
.corner-tag .bi {
    font-size: 14px;
    vertical-align: -2px; /* nudge to align with text */
    margin-right: 8px;
    opacity: 0.98;
}

@media (max-width: 560px) {
    .corner-tag {
        left: calc(-8px + 5%);
        top: -8px;
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* responsive square thumbnail: small screens scale, medium+ use the original fixed width */
/* Default (mobile / stacked columns): center the thumbnail so it looks balanced when columns are stacked */
.feature-figure {
    width: 86%;
    max-width: 320px;
    aspect-ratio: 1 / 1; /* keeps the image square */
    height: auto;
    border-radius: 12px;
    background: #e9e7e3;
    display: block;
    margin: 18px auto 0; /* centered when columns stack */
    box-shadow: var(--card-shadow);
    overflow: hidden;
    object-fit: cover;
}

@media (min-width: 768px) {
    /* On medium and larger screens keep the thumbnail compact but centered */
    .feature-figure {
        max-width: 220px;
        width: 220px;
        /* center the thumbnail on all screen sizes */
        margin: 18px auto 0;
    }
}

/* play-overlay on feature thumbnail */
.feature-figure-wrapper {
    position: relative;
    display: inline-block;
}

.feature-figure-wrapper .feature-figure {
    display: block;
    border-radius: 12px;
}

.play-overlay {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease;
}

.play-overlay::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-left: 18px solid #fff;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 4px;
}

.play-overlay:hover, .play-overlay:focus {
    transform: translate(-50%, -50%) scale(1.06);
    background: rgba(0, 0, 0, 0.55);
    outline: none;
}

.play-overlay:focus {
    box-shadow: 0 0 0 4px rgba(250, 128, 47, 0.12);
}

@media (max-width: 560px) {
    .play-overlay {
        width: 56px;
        height: 56px;
    }

    .play-overlay::before {
        border-left: 14px solid #fff;
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
    }
}

/* Why section */
.why {
    max-width: 100%;
    padding: 0;
    text-align: center
}

.why h2 {
    font-size: 36px;
    margin-bottom: 18px;
    font-weight: 800;
    color: #333333;
    font-family: 'Space Grotesk', sans-serif;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 18px
}

.feature-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.03)
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    flex: 0 0 56px
}

/* Use Bootstrap Icons inside feature-icon and size them for visual balance */
.feature-icon i {
    font-size: 20px;
    line-height: 1;
}

.feature-title {
    font-weight: 700;
    font-size: 15px
}

.feature-desc {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.6)
}

/* Latest insights */
.insights {
    max-width: 100%;
    padding: 0
}

.insights h3 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 18px;
    text-align: center;
    color: #333333;
    font-family: 'Space Grotesk', sans-serif;
}

/* Latest insights: never more than two columns */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px
}

.insight-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.04)
}

.insight-thumb {
    height: 120px;
    display: block;
    width: 100%;
    object-fit: cover;
    background: #e9e9e9
}

.insight-body {
    padding: 12px
}

.insight-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px
}

.insight-excerpt {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.6)
}

/* Read More button for Latest Insights */
.insights-footer {
    text-align: center;
    margin-top: 18px;
}

.read-more-btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(250, 120, 60, 0.16);
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.read-more-btn:hover, .read-more-btn:focus {
    transform: translateY(-3px);
    opacity: 0.95;
    outline: none;
}


.view-all {
    display: inline-block;
    color: lightgrey;
    padding: 10px 18px;
    font-weight: 700;
    text-decoration: none;
}

.view-all:hover, .view-all:focus {
    transform: translateY(-3px);
    opacity: 0.95;
    outline: none;
}

/* footer bottom bar (no separator) */
.footer-bottom {
    background: #242428;
    padding: 0.75rem 0;
}

/* small legal links row shown under social icons */
.footer-bottom .footer-legal {
    margin-top: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.82);
}

.footer-bottom .footer-legal a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    margin: 0 6px;
}

.footer-bottom .footer-legal .sep {
    color: rgba(255, 255, 255, 0.54);
    margin: 0 6px;
}

/* Postal band decorative stripes (used for postal-band DIVs) */
.postal-band {
    width: 100%;
    height: 25px;
    margin: 10px 0 0 0;
    /* diagonal repeating red / white / blue stripes to evoke postal airmail */
    /* red, white, blue, white sequence */
    background: repeating-linear-gradient(135deg,
    #ba4b4d 0 12px,
    #ffffff 12px 24px,
    #5594e6 24px 36px,
    #ffffff 36px 48px
    );
    background-size: auto;
    box-shadow: inset 0 -1px rgba(0, 0, 0, 0.04);
    pointer-events: none;
}

/* Small centered instructional note that appears above the postal band */
.postal-note {
    text-align: center;
    margin-top: 12px;
    margin-bottom: 6px;
    pointer-events: none; /* decorative only */
}

.postal-note small {
    color: rgba(0, 0, 0, 0.56);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1px;
}

@media (max-width: 560px) {
    .postal-band {
        height: 14px;
        background-size: auto;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .hero h1 {
        font-size: 40px
    }

    /* keep two columns on medium widths */
    .insights-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .features-grid {
        grid-template-columns: 1fr
    }
}

@media (max-width: 560px) {
    .hero {
        margin: 20px auto
    }

    .hero h1 {
        font-size: 28px
    }

    /* stack to single column on smallest screens */
    .insights-grid {
        grid-template-columns: 1fr
    }

    .feature-row {
        display: block
    }

    /* On the smallest screens center the thumbnail */
    .feature-figure {
        width: 86%;
        max-width: 320px;
        height: auto;
        aspect-ratio: 1/1;
        margin: 18px auto 0;
    }

    .feature-row .row {
        align-items: flex-start
    }

    .site-header {
        padding: 18px
    }
}

/* small helpers */
.muted {
    color: rgba(0, 0, 0, 0.55)
}

/* accessibility helper: visually hide content but keep it available to screen readers */
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* visually hide text but preserve its layout space so neighboring content doesn't not shift
   using visibility:hidden preserves box layout; add aria-label on the column for accessibility */
.sr-inflow {
    visibility: hidden !important;
}

/* Footer styling: full-width dark background, inner content constrained by .container */
footer {
    padding-top: 2rem;
    background: #2f2f33;
    color: #fff;
    position: relative;
}

footer h5 {
    color: #fff;
    margin-bottom: 0.5rem;
}

footer a {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
}

footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Pre-footer (newsletter / contact) placed directly above footer */
.pre-footer {
    /* Diagonal grey gradient from top-left (light) to bottom-right (darker) */
    background: linear-gradient(to bottom right, #f3f3f3 0%, #bababa 100%);
    color: #111;
    padding: 36px 0;
    margin-top: 28px;
}

.pre-footer .lead {
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: 0.75rem;
}

.pre-footer .form-inline {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.pre-footer .form-inline input[type="email"] {
    flex: 1 1 320px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    max-height: 48px;
    box-sizing: border-box;
}

.pre-footer .form-inline button {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

@media (max-width: 560px) {
    .pre-footer .form-inline {
        flex-direction: column;
        padding: 0 12px
    }

    .pre-footer .form-inline button {
        width: 100%;
    }
}

/* footer logo icon: position the icon so its bottom edge is flush with the top edge of the main footer */
.footer-logo-icon {
    position: absolute;
    left: 18px;
    top: -72px;
    width: 72px;
    height: 72px;
    object-fit: contain;
    z-index: 5;
}

@media (max-width: 360px) {
    .footer-logo-icon {
        left: 12px;
        top: -56px;
        width: 56px;
        height: 56px;
    }
}

/* Header phone CTA (under the main logo) - make the number slightly smaller than the nav items */
.header-phone {
    margin-top: 8px;
}

.header-phone .phone-link {
    display: inline-block;
    background: #d45f25; /* darker orange */
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px; /* smaller than typical nav text (~16px) */
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(212, 95, 37, 0.18);
}

.header-phone .phone-link:hover, .header-phone .phone-link:focus {
    background: #c14f1e;
    text-decoration: none;
    outline: none;
}

@media (max-width: 560px) {
    .header-phone .phone-link {
        padding: 6px 10px;
        font-size: 12px;
    }
}

.footer-bottom .social-links {
    display: flex;
    gap: 12px; /* slightly larger gap for breathing room */
    justify-content: center;
    align-items: center;
}

/* Social icon containers: rounded-square with a 1px white border and inner spacing.
   On small screens they become circular for a compact, touch-friendly UI. */
.footer-bottom .social-links a {
    color: #f6f6f6;
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* target ~4px spacing around the icon glyph: font-size ~20px + padding 6px gives ~4px visual gap */
    padding: 6px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 10px; /* rounded-square */
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.98);
    background: transparent;
    transition: transform 150ms ease, background 150ms ease, color 150ms ease;
}

/* Hover and focus states */
.footer-bottom .social-links a:hover,
.footer-bottom .social-links a:focus {
    color: #ffffff;
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.04);
    outline: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Keyboard focus visible style (accessibility) */
.footer-bottom .social-links a:focus {
    box-shadow: 0 0 0 4px rgba(250, 128, 47, 0.12);
}

/* On very small screens make icons circular */
@media (max-width: 560px) {
    .footer-bottom .social-links a {
        border-radius: 50%;
        min-width: 40px;
        min-height: 40px;
        padding: 6px;
    }
}

h3.ribbon {
    background-color: #4bdfc2;
    line-height: 60px;
    font-size: 40px;
    text-align: center;
    position: relative;
    margin: 100px auto;
    color: #fff;
}

h3.ribbon:before, h3.ribbon:after {
    background-color: #1d8a74;
    width: 50px;
    height: 100%;
    content: '';
    display: block;
    transform: skewY(20deg);
    position: absolute;
    z-index: -1;
}

h3.ribbon:before {
    top: 10px;
    left: 0;
}

h3.ribbon:after {
    top: -10px;
    right: 0;
}

/* Brand stacking: place mark above the textual logo and center them */
.brand {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px; /* tightened spacing between mark and textual logo by ~50% */
    text-decoration: none;
    color: inherit;
}

/* Increased mark size for stronger presence */
.brand-mark {
    display: block;
    width: 116px; /* ~20% larger than 96px */
    height: 116px;
    line-height: 0;
}

/* Ensure the textual logo scales down responsively next to the mark */
.brand .site-logo {
    max-width: 220px; /* reduced so the larger mark doesn't make the header too tall */
    height: auto;
    display: block;
    margin: 0;
}

@media (max-width: 560px) {
    /* smaller mark on narrow screens to avoid taking too much vertical space */
    .brand-mark { width: 86px; height: 86px; /* ~20% larger than 72px */ }
    .brand .site-logo { max-width: 160px; }
}

/* Keep the header grid compact on larger screens: align items center by default */
.header-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 100%;
    padding: 0.25rem 0;
}

/* Back link used in articles (orange, no underline) */
.back-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
}
.back-link:hover,
.back-link:focus {
    text-decoration: none;
    opacity: 0.92;
}

/* Plain phone link used on contact page: orange color, bold, no underline */
.phone-link-plain {
    color: var(--primary);
    text-decoration: none;
}

.phone-link-plain:hover,
.phone-link-plain:focus {
    text-decoration: none;
    opacity: 0.92;
}

/* About hero banner style (lightened Simplisti orange, rounded) */
.about-hero-banner {
  background: rgba(247,148,29,0.12); /* slightly stronger tint of #F7941D */
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(247,148,29,0.06);
  box-shadow: 0 8px 18px rgba(247,148,29,0.04);
}

.about-hero-banner .hero-heading {
  align-items: center;
}

@media (min-width: 768px) {
  .about-hero-banner {
    padding: 1.75rem;
  }
}

/* Profile separator: centered '//' with full-width subtle strikethrough line */
.profile-separator {
  position: relative;
  text-align: center;
  width: 100%;
}

.profile-separator::before {
  /* horizontal line removed per request */
  display: none;
}

.profile-separator .sep {
  position: relative;
  display: inline-block;
  z-index: 1; /* above the (now removed) line */
  color: rgba(0,0,0,0.32); /* lighter gray */
  font-size: 3rem; /* bigger */
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0 0.5rem; /* less horizontal padding */
  line-height: 1;
}

@media (max-width: 560px) {
  .profile-separator .sep { font-size: 2rem; padding: 0 0.4rem; }
}
