/* ==========================================================================
   JOES Internet Services — consolidated site styles
   Replaces the Tailwind 2.2 CDN, Font Awesome and AOS dependencies.
   Palette: orange #ff7f00, anthracite #3a3a45, light gray #f5f5f5, white.
   ========================================================================== */

/* Self-hosted variable fonts (latin subset) */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url(../fonts/montserrat-var.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400 700;
    font-stretch: 100%;
    font-display: swap;
    src: url(../fonts/open-sans-var.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --primary-color: #ff7f00;
    --primary-strong: #e67300;  /* button fill: white text passes WCAG large-text contrast */
    --primary-darker: #cc6600;  /* button hover */
    --primary-text: #b35900;    /* orange-toned small text on white (4.8:1) */
    --primary-tint: #fff2e5;    /* soft orange highlight */
    --secondary-color: #3a3a45;
    --accent-color: #f5f5f5;
    --text-color: #333333;
    --text-muted: #555c66;
    --white: #ffffff;
    --border-color: #777777;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --radius: 0.5rem;
    --header-height: 73px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-color);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--secondary-color);
    line-height: 1.25;
    margin: 0 0 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; }
h2 { font-size: 1.875rem; font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }

p {
    margin: 0 0 1rem;
}

ul {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}

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

/* Content links */
p a, li a, dd a, .card__note a {
    color: inherit;
    text-decoration: underline;
    transition: color 0.2s ease;
}

p a:hover, li a:hover, dd a:hover, .card__note a:hover {
    color: var(--primary-darker);
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-primary:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------------------------------------
   Color helpers (kept from previous stylesheet, used across pages)
   -------------------------------------------------------------------------- */

.primary-color { color: var(--primary-color); }
.secondary-color { color: var(--secondary-color); }
.text-muted { color: var(--text-muted); }
.bg-primary { background-color: var(--primary-color); }
.bg-secondary { background-color: var(--secondary-color); }
.bg-accent { background-color: var(--accent-color); }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.section {
    padding: 3rem 0;
    /* anchor offset below the fixed header */
    scroll-margin-top: calc(var(--header-height) + 8px);
}

.section--alt {
    background-color: var(--accent-color);
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    display: inline-block;
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-intro {
    max-width: 44rem;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.0625rem;
}

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

@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.text-center { text-align: center; }

.section-cta {
    text-align: center;
    margin-top: 2.5rem;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn-primary {
    display: inline-block;
    background-color: var(--primary-strong);
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1875rem; /* >=18.66px bold keeps white-on-orange WCAG compliant */
    font-weight: 700;
    padding: 0.75rem 1.75rem;
    border: none;
    border-radius: 0.375rem;
    box-shadow: var(--shadow-md);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-darker);
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Icons (inline SVG)
   -------------------------------------------------------------------------- */

.icon {
    width: 1.25em;
    height: 1.25em;
    vertical-align: -0.25em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--primary-tint);
    color: var(--primary-color);
}

.icon-circle .icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* --------------------------------------------------------------------------
   Header & navigation
   -------------------------------------------------------------------------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
}

.site-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.site-header__rule {
    height: 4px;
    background-color: var(--primary-color);
}

.joes-logo {
    display: flex;
    align-items: center;
    text-decoration: none !important;
}

.joes-logo__mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    margin-right: 0.75rem;
}

.joes-logo__text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.site-footer .joes-logo__text {
    color: var(--white);
}

.nav-desktop {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 900px) {
    .nav-desktop { display: flex; }
}

.nav-link {
    position: relative;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--primary-darker);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

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

.nav-link.active {
    color: var(--primary-darker);
    font-weight: 600;
}

/* Hamburger button (transforms into an X when open) */
.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

@media (min-width: 900px) {
    .nav-toggle { display: none; }
}

.nav-toggle__bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #374151;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Pre-rendered mobile menu, slides open via max-height */
.nav-mobile {
    overflow: hidden;
    max-height: 0;
    background-color: var(--white);
    transition: max-height 0.3s ease;
}

.nav-mobile.open {
    max-height: 30rem;
    box-shadow: var(--shadow-md);
}

.nav-mobile a {
    display: block;
    padding: 0.75rem 1.25rem;
    min-height: 44px;
    color: #374151;
    font-weight: 500;
    text-decoration: none;
}

.nav-mobile a:hover {
    background-color: var(--accent-color);
}

@media (min-width: 900px) {
    .nav-mobile { display: none; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
    padding-top: calc(var(--header-height) + 3rem);
    padding-bottom: 4rem;
    background: linear-gradient(180deg, var(--primary-tint) 0%, var(--white) 70%);
}

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

@media (min-width: 900px) {
    .hero__inner {
        grid-template-columns: 7fr 5fr;
    }
}

.hero h1 {
    margin-bottom: 1.25rem;
}

.hero__lead {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 36rem;
    margin-bottom: 1.75rem;
}

.hero__credentials {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

.hero__visual {
    display: flex;
    justify-content: center;
}

.hero__visual svg {
    width: 100%;
    max-width: 420px;
    height: auto;
}

/* --------------------------------------------------------------------------
   Cards (pillars, cases, engagement)
   -------------------------------------------------------------------------- */

.card {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border-top: 2px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-top-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.card__bar {
    height: 0.5rem;
    background-color: var(--primary-color);
}

.card__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card__title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.card__title-row h3 {
    margin: 0;
}

.card__who {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--primary-text);
    margin-bottom: 0.75rem;
}

.card__text {
    color: var(--text-muted);
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.check-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.check-list .icon {
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.card__proof {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.card__proof strong {
    color: var(--secondary-color);
}

.card__note {
    background-color: var(--primary-tint);
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    color: var(--text-color);
    margin-top: 0.75rem;
}

/* --------------------------------------------------------------------------
   Approach steps
   -------------------------------------------------------------------------- */

.approach-list {
    max-width: 52rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.approach-step {
    position: relative;
    display: flex;
    gap: 1.5rem;
}

.approach-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 24px;
    top: 56px;
    bottom: -1.75rem;
    width: 2px;
    background-color: var(--primary-color);
}

.approach-step__num {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
}

.approach-step h3 {
    margin-bottom: 0.5rem;
}

.approach-step p {
    color: var(--text-muted);
    margin: 0;
}

/* --------------------------------------------------------------------------
   Case studies
   -------------------------------------------------------------------------- */

.case-card .card__body {
    gap: 0.25rem;
}

.case-card h3 {
    margin-bottom: 1rem;
}

.case-card dl {
    margin: 0;
}

.case-card dt {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary-text);
    margin-bottom: 0.25rem;
}

.case-card dd {
    margin: 0 0 1rem;
    color: var(--text-muted);
}

.case-card dd:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Engagement ladder
   -------------------------------------------------------------------------- */

.ladder-card .card__body {
    align-items: flex-start;
}

.ladder-card__step {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary-text);
    margin-bottom: 0.5rem;
}

.ladder-card p {
    color: var(--text-muted);
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about-content::after {
    content: '';
    display: table;
    clear: both;
}

.profile-image {
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

.translator-image-container {
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Constrain the portrait on small screens so it doesn't fill the viewport */
.translator-image-container img {
    max-height: 400px;
    width: auto;
    object-fit: cover;
}

@media (min-width: 768px) {
    .translator-image-container {
        float: right;
        margin: 0 0 1rem 2rem;
        max-width: 30%;
    }

    .translator-image-container img {
        max-height: none;
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq-list {
    max-width: 48rem;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--secondary-color);
    cursor: pointer;
    list-style: none;
    min-height: 44px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    line-height: 1;
    color: var(--primary-color);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item__answer {
    padding: 0 1.25rem 1rem;
    color: var(--text-muted);
}

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

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 64rem;
    margin: 0 auto;
}

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

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.contact-method h3 {
    font-size: 1rem;
    margin-bottom: 0.125rem;
}

.contact-method p {
    margin: 0;
    color: var(--text-muted);
}

.contact-method .icon {
    color: var(--primary-color);
    width: 1.5rem;
    height: 1.5rem;
    margin-top: 0.125rem;
}

/* --------------------------------------------------------------------------
   Forms (used by contact-form.html inside the iframe)
   -------------------------------------------------------------------------- */

.form-field {
    margin-bottom: 1rem;
}

.form-field label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-color);
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 127, 0, 0.2);
    outline: none;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.form-error {
    color: #b91c1c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.hidden {
    display: none;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 3rem 0;
}

.site-footer__top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .site-footer__top {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 0.5rem;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    color: var(--white);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    text-decoration: underline;
}

.site-footer__bottom {
    border-top: 1px solid #565664;
    margin-top: 2rem;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: #c5c5cd;
}

.site-footer__bottom a {
    color: inherit;
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Simple page shell (privacy policy, thank-you)
   -------------------------------------------------------------------------- */

.page-main {
    padding: 3rem 0;
    background-color: var(--accent-color);
}

.page-panel {
    max-width: 56rem;
    margin: 0 auto;
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

.page-panel h1 {
    font-size: 1.875rem;
}

.page-panel h2 {
    font-size: 1.25rem;
    margin-top: 1.75rem;
}

.page-panel--center {
    text-align: center;
}

/* Non-fixed header variant for subpages */
.site-header--static {
    position: static;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .btn-primary,
    .card,
    .nav-toggle__bar {
        transition: none;
    }
}
