/* style.css - Premium Design Edition - WCAG 2.2 AAA Compliant */
:root {
    --beige: #F5F5DC;
    --red: #A00000;  /* Darkened from #8B0000 for better contrast */
    --gold: #C7A400;  /* Adjusted for AAA contrast */
    --gold-dark: #B8860B;  /* Darkened for AAA contrast */
    --gold-light: #FFF8DC;
    --ink: #000000;  /* Pure black for maximum contrast */
    --blue: #0a1535;  /* Darkened for AAA contrast */
    --green: #082912;  /* Darkened for AAA contrast */
    --soft-white: #FFFFFF;  /* Pure white for maximum contrast */
    --shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
    --shadow-premium: 0 25px 60px rgba(0, 0, 0, 0.35);
    --shadow-light: 0 8px 24px rgba(0, 0, 0, 0.15);
    --am-blue: #163a75;  /* Darkened for AAA contrast */
    --am-blue-dark: #0f2850;
    --am-blue-light: #4a6b9e;
    --focus-color: #0050D0;  /* High contrast focus color */
}

/* ===== ACCESSIBILITY UTILITIES ===== */

/* Screen Reader Only - Visually hidden but accessible */
.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;
}

/* Skip Link - Visible on focus for keyboard navigation */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 16px 24px;
    background: var(--ink);
    color: #FFFFFF;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;  /* Increased for better visibility */
    font-size: 1.1rem;  /* Increased for better readability */
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: top 0.3s ease;
    border: 3px solid var(--focus-color);  /* Enhanced border for AAA */
}

.skip-link:focus {
    top: 0;
    outline: 4px solid var(--focus-color);  /* Increased to 4px for AAA */
    outline-offset: 3px;
}

/* ===== FOCUS INDICATORS - AAA COMPLIANT ===== */

/* Global focus-visible styles for keyboard navigation - Enhanced for AAA */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 4px solid var(--focus-color);  /* Increased to 4px thickness */
    outline-offset: 3px;
    border-radius: 4px;
}

/* Remove default outline when using focus-visible */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible) {
    outline: none;
}

/* CTA Button Focus - Enhanced for AAA */
.cta:focus-visible {
    outline: 4px solid #FFFFFF;
    outline-offset: 4px;
    box-shadow: 0 0 0 8px var(--focus-color);  /* Increased thickness */
}

/* High Contrast Toggle Focus */
.high-contrast-toggle:focus-visible {
    outline: 4px solid var(--focus-color);
    outline-offset: 3px;
}

/* Footer Link Focus - Enhanced for AAA */
footer a:focus-visible {
    outline: 4px solid #FFD700;  /* Bright gold for high contrast on black */
    outline-offset: 4px;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.3);  /* Add background for better visibility */
}

/* Header Link Focus */
header a:focus-visible {
    outline: 4px solid var(--focus-color);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Service Card Link Focus */
.service-content a:focus-visible {
    outline: 4px solid var(--focus-color);
    outline-offset: 4px;
}

/* Contact page button focus */
#contact-email-reveal-btn:focus-visible {
    outline: 4px solid #FFFFFF;
    outline-offset: 4px;
    box-shadow: 0 0 0 8px var(--focus-color);
}

#contact-email-link:focus-visible {
    outline: 4px solid var(--focus-color);
    outline-offset: 4px;
}

/* Grid card links focus */
.grid a:focus-visible {
    outline: 4px solid var(--focus-color);
    outline-offset: 3px;
}

/* Ensure links are distinguishable from text (not just by color) */
main a:not(.cta),
article a:not(.cta),
section a:not(.cta):not(.service-content a) {
    text-decoration: underline;
    text-underline-offset: 3px;  /* Increased for better visibility */
    text-decoration-thickness: 2px;  /* Added thickness */
    font-weight: 600;  /* Added weight for better distinction */
}

main a:not(.cta):hover,
article a:not(.cta):hover,
section a:not(.cta):not(.service-content a):hover {
    text-decoration-thickness: 3px;  /* Increased on hover */
}

/* ===== TEXT SPACING SUPPORT - AAA COMPLIANT ===== */

/* Allow user-adjustable text spacing per WCAG 2.2 AAA */
* {
    /* Support line height adjustment up to 1.5 */
    line-height: 1.6 !important;
}

p, li, span, div, a, button {
    /* Support paragraph spacing up to 2x font size */
    margin-bottom: 1em;
}

p + p, li + li {
    margin-top: 1em;
}

/* Support letter spacing adjustment */
body {
    letter-spacing: normal;
    word-spacing: normal;
}

/* Ensure spacing adjustments don't break layout */
body.user-spacing p {
    line-height: 1.8 !important;
    letter-spacing: 0.12em !important;
    word-spacing: 0.16em !important;
}

body.user-spacing p + p {
    margin-top: 2em !important;
}

/* BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', 'Poppins', sans-serif;
    background: var(--soft-white);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;  /* Explicit base font size for consistency */
}

/* HERO SECTION */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 60px;
    background: linear-gradient(135deg, var(--beige) 0%, var(--gold-light) 50%, var(--soft-white) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 40%, rgba(255, 215, 0, 0.12), transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(139, 0, 0, 0.08), transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to bottom, transparent, var(--soft-white));
    pointer-events: none;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-logo {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo img {
    height: clamp(120px, 18vw, 200px);
    width: auto;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
    transition: transform 0.4s ease;
}

.hero-logo img:hover {
    transform: scale(1.05);
}

.eyebrow {
    font-family: 'Shippori Mincho', serif;
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: var(--red);
    margin-bottom: 16px;
    font-weight: 700;  /* Increased for better readability */
    text-transform: uppercase;
}

.hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: none;  /* Removed for cleaner text */
}

.lead {
    font-size: 1.4rem;  /* Increased for better readability */
    color: var(--ink);
    font-weight: 600;  /* Increased for better contrast */
    margin-bottom: 32px;
    line-height: 1.5;
}

.kanji-stack {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin: 40px 0 48px;
}

.kanji-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.kanji {
    font-family: 'Shippori Mincho', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--red);
    text-shadow: none;  /* Removed for better clarity */
    transition: transform 0.3s ease;
}

.kanji:hover {
    transform: scale(1.1);
}

.kanji-label {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;  /* Increased for better readability */
    letter-spacing: 2px;
    color: var(--ink);
    text-transform: uppercase;
    font-weight: 700;  /* Increased for better visibility */
}

.hero-explainer {
    font-size: 1.1rem;  /* Increased for better readability */
    line-height: 1.7;
    color: var(--ink);
    margin: 20px auto 48px;
    max-width: 720px;
    font-weight: 500;  /* Added weight for better readability */
}

/* SERVICE SECTIONS */
.service {
    position: relative;
    padding: 100px 24px;
    background: var(--soft-white);
    overflow: hidden;
    perspective: 2000px;
}

.service:nth-child(even) {
    background: linear-gradient(135deg, var(--soft-white) 0%, var(--beige) 50%, var(--soft-white) 100%);
}

.service::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.08), transparent 50%);
    pointer-events: none;
    opacity: 0.6;
}

/* AROUNDMANCHESTER - Blue Theme */
#aroundmanchester {
    background: linear-gradient(135deg, #e8f0fe 0%, #d4e5fc 50%, #f0f6ff 100%);
}

#aroundmanchester::before {
    background: radial-gradient(circle at 80% 20%, rgba(31, 74, 160, 0.12), transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(91, 127, 184, 0.08), transparent 50%);
}

#aroundmanchester .service-content {
    background: rgba(255, 255, 255, 0.85);
}

#aroundmanchester .service-content::before {
    border-color: rgba(31, 74, 160, 0.25);
}

#aroundmanchester .service-content:hover::before {
    border-color: rgba(31, 74, 160, 0.5);
}

#aroundmanchester h2 {
    color: var(--am-blue);
    background: none;
    -webkit-text-fill-color: inherit;
}

/* FREYASPARK - Red/Orange/Fire Theme */
#freyaspark {
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8dc 50%, #fff9f5 100%);
}

#freyaspark::before {
    background: radial-gradient(circle at 80% 20%, rgba(255, 100, 50, 0.12), transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(255, 165, 0, 0.08), transparent 50%);
}

#freyaspark .service-content {
    background: rgba(255, 255, 255, 0.85);
}

#freyaspark .service-content::before {
    border-color: rgba(255, 100, 50, 0.25);
}

#freyaspark .service-content:hover::before {
    border-color: rgba(255, 100, 50, 0.5);
}

#freyaspark h2 {
    color: #B83A15;  /* Dark red for AAA contrast */
    background: none;
    -webkit-text-fill-color: inherit;
}

/* NOFLASHSTUDIO - Green/Creative Theme */
#noflashstudio {
    background: linear-gradient(135deg, #f0f9f4 0%, #ddf2e6 50%, #f5fbf7 100%);
}

#noflashstudio::before {
    background: radial-gradient(circle at 80% 20%, rgba(11, 59, 28, 0.10), transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(34, 139, 34, 0.06), transparent 50%);
}

#noflashstudio .service-content {
    background: rgba(255, 255, 255, 0.85);
}

#noflashstudio .service-content::before {
    border-color: rgba(11, 59, 28, 0.25);
}

#noflashstudio .service-content:hover::before {
    border-color: rgba(11, 59, 28, 0.5);
}

#noflashstudio h2 {
    color: var(--green);
    background: none;
    -webkit-text-fill-color: inherit;
}

.service-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 40px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
    transform-origin: top center;
    transform-style: preserve-3d;
    transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.service-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    border: 2px solid rgba(255, 215, 0, 0.2);
    pointer-events: none;
    transition: border-color 0.6s ease;
}

.service-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    border-radius: 24px 24px 0 0;
    z-index: 10;
}

.service-content:hover {
    transform: rotateX(8deg);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.4), 0 15px 30px rgba(0, 0, 0, 0.2);
}

.service-content:hover::before {
    border-color: rgba(255, 215, 0, 0.4);
}

.service .logo {
    margin-bottom: 12px;
}

.service .logo img {
    height: clamp(80px, 12vw, 140px);
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.service .logo img:hover {
    transform: scale(1.05);
}

/* Override gradient text for AAA contrast - use solid colors */
#aroundmanchester h2 {
    color: var(--am-blue);
    background: none;
    -webkit-text-fill-color: inherit;
}

#freyaspark h2 {
    color: #B83A15;  /* Dark red for AAA contrast */
    background: none;
    -webkit-text-fill-color: inherit;
}

#noflashstudio h2 {
    color: var(--green);
    background: none;
    -webkit-text-fill-color: inherit;
}

.service h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 16px;
}

/* Service-specific CTA buttons with AAA contrast */
#aroundmanchester .cta {
    background: var(--am-blue);
    border-color: var(--am-blue);
}

#aroundmanchester .cta:hover {
    background: var(--am-blue-dark);
    border-color: var(--am-blue-dark);
}

#freyaspark .cta {
    background: #B83A15;
    border-color: #B83A15;
}

#freyaspark .cta:hover {
    background: #8B2910;
    border-color: #8B2910;
}

#noflashstudio .cta {
    background: var(--green);
    border-color: var(--green);
}

#noflashstudio .cta:hover {
    background: #051a0a;
    border-color: #051a0a;
}

/* CTA BUTTON - Enhanced for AAA */
.cta {
    display: inline-block;
    padding: 18px 40px;  /* Increased padding for larger touch target */
    background: var(--ink);  /* Solid black background for maximum contrast */
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;  /* Increased for better visibility */
    font-size: 1.1rem;  /* Increased for better readability */
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: var(--shadow-light);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border: 3px solid var(--ink);  /* Added border for definition */
    min-width: 44px;  /* Ensure minimum touch target size */
    min-height: 44px;
}

.cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.cta:hover::before {
    width: 400px;
    height: 400px;
}

.cta:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    background: var(--blue);  /* Dark blue on hover */
    border-color: var(--blue);
}

.cta:active {
    transform: translateY(-1px);
}

/* FOOTER - Enhanced for AAA */
footer {
    background: #000000;  /* Pure black for maximum contrast */
    color: #FFFFFF;
    padding: 32px 16px;
    text-align: center;
}

footer p {
    margin-bottom: 16px;
    opacity: 1;
    font-weight: 500;  /* Added weight for better readability */
}

footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

footer nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer li,
footer li + li {
    margin: 0;
}

footer a {
    color: #FFD700;  /* Bright gold for AAA contrast on black (10.4:1 ratio) */
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
    font-weight: 700;  /* Increased for better visibility */
    transition: color 0.3s ease;
    position: relative;
    margin-bottom: 0;
}

/* ===== HIGH CONTRAST MODE ===== */
body.high-contrast {
    --beige: #FFFFFF;
    --red: #000000;
    --gold: #000000;
    --gold-dark: #000000;
    --gold-light: #FFFFFF;
    --ink: #000000;
    --blue: #000000;
    --green: #000000;
    --soft-white: #FFFFFF;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
    --shadow-premium: 0 4px 8px rgba(0, 0, 0, 0.8);
    --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.6);
    --am-blue: #000000;
    --am-blue-dark: #000000;
    --am-blue-light: #000000;
}

body.high-contrast {
    background: #FFFFFF !important;
    color: #000000 !important;
}

body.high-contrast .hero {
    background: #FFFFFF !important;
    color: #000000 !important;
}

body.high-contrast .hero::before,
body.high-contrast .hero::after {
    display: none !important;
}

body.high-contrast .hero-logo img {
    filter: contrast(2) grayscale(1) !important;
}

body.high-contrast .eyebrow,
body.high-contrast .lead,
body.high-contrast .hero h1,
body.high-contrast .hero-explainer {
    color: #000000 !important;
    text-shadow: none !important;
}

body.high-contrast .kanji {
    color: #000000 !important;
    text-shadow: none !important;
}

body.high-contrast .kanji-label {
    color: #000000 !important;
}

body.high-contrast .service {
    background: #FFFFFF !important;
}

body.high-contrast .service::before {
    display: none !important;
}

body.high-contrast .service-content {
    background: #FFFFFF !important;
    border: 3px solid #000000 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

body.high-contrast .service-content::before {
    display: none !important;
}

body.high-contrast .service-content::after {
    display: none !important;
}

body.high-contrast .service-content:hover {
    background: #FFFFFF !important;
    box-shadow: none !important;
    transform: none !important;
}

body.high-contrast .service h2 {
    color: #000000 !important;
    background: none !important;
    -webkit-text-fill-color: #000000 !important;
}

body.high-contrast .service p {
    color: #000000 !important;
}

body.high-contrast .service .logo img,
body.high-contrast .service .logo svg {
    filter: contrast(2) grayscale(1) !important;
}

body.high-contrast .cta {
    background: #FFFFFF !important;
    color: #000000 !important;
    border: 3px solid #000000 !important;
    box-shadow: none !important;
}

body.high-contrast .cta:hover {
    background: #000000 !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
}

body.high-contrast footer {
    background: #FFFFFF !important;
    color: #000000 !important;
    border-top: 3px solid #000000 !important;
}

body.high-contrast footer a {
    color: #000000 !important;
    font-weight: 700 !important;
}

body.high-contrast footer a::after {
    background: #000000 !important;
}

body.high-contrast footer a:hover {
    color: #000000 !important;
    text-decoration: underline !important;
}

body.high-contrast .trademark-notice {
    color: #000000 !important;
}

/* High Contrast for Tailwind-styled pages (privacy, cookies, terms, contact) */
body.high-contrast header {
    background: #FFFFFF !important;
    border-bottom: 3px solid #000000 !important;
    box-shadow: none !important;
}

body.high-contrast header a,
body.high-contrast header span {
    color: #000000 !important;
}

body.high-contrast header img {
    filter: contrast(2) grayscale(1) !important;
}

body.high-contrast section {
    background: #FFFFFF !important;
    color: #000000 !important;
}

body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast h5,
body.high-contrast h6 {
    color: #000000 !important;
}

body.high-contrast p,
body.high-contrast li,
body.high-contrast span,
body.high-contrast div {
    color: #000000 !important;
}

body.high-contrast a {
    color: #000000 !important;
    text-decoration: underline !important;
}

body.high-contrast .bg-white,
body.high-contrast .bg-green-50,
body.high-contrast .bg-blue-50,
body.high-contrast .bg-yellow-50 {
    background: #FFFFFF !important;
}

body.high-contrast .border-green-500,
body.high-contrast .border-blue-500,
body.high-contrast .border-yellow-500,
body.high-contrast .border-l-4 {
    border-color: #000000 !important;
}

body.high-contrast .rounded-2xl,
body.high-contrast .rounded-r-lg {
    box-shadow: none !important;
    border: 3px solid #000000 !important;
}

body.high-contrast .text-green-500,
body.high-contrast .text-green-600,
body.high-contrast .text-green-800,
body.high-contrast .text-green-900,
body.high-contrast .text-blue-600,
body.high-contrast .text-yellow-400,
body.high-contrast .text-yellow-300,
body.high-contrast .text-gray-500,
body.high-contrast .text-gray-700,
body.high-contrast .text-gray-900,
body.high-contrast .text-slate-900 {
    color: #000000 !important;
}

/* High Contrast - Contact Page Specific Elements */
body.high-contrast .bg-orange-50,
body.high-contrast .bg-amber-50,
body.high-contrast .bg-gray-50,
body.high-contrast .bg-purple-50,
body.high-contrast .bg-indigo-50,
body.high-contrast .from-yellow-50,
body.high-contrast .to-orange-50,
body.high-contrast .from-orange-50,
body.high-contrast .to-orange-100,
body.high-contrast .from-blue-50,
body.high-contrast .to-blue-100,
body.high-contrast .from-purple-50,
body.high-contrast .to-purple-100,
body.high-contrast .from-indigo-50,
body.high-contrast .to-indigo-100 {
    background: #FFFFFF !important;
}

body.high-contrast .border-orange-500,
body.high-contrast .border-orange-400,
body.high-contrast .border-orange-300,
body.high-contrast .border-amber-500,
body.high-contrast .border-purple-300,
body.high-contrast .border-blue-300,
body.high-contrast .border-indigo-500,
body.high-contrast .border-indigo-400,
body.high-contrast .border-indigo-300 {
    border-color: #000000 !important;
}

body.high-contrast .text-orange-500,
body.high-contrast .text-orange-600,
body.high-contrast .text-orange-700,
body.high-contrast .text-orange-800,
body.high-contrast .text-orange-900,
body.high-contrast .text-amber-100,
body.high-contrast .text-amber-700,
body.high-contrast .text-purple-900,
body.high-contrast .text-blue-900,
body.high-contrast .text-blue-800,
body.high-contrast .text-gray-300,
body.high-contrast .text-gray-600,
body.high-contrast .text-indigo-500,
body.high-contrast .text-indigo-600,
body.high-contrast .text-indigo-700,
body.high-contrast .text-indigo-800,
body.high-contrast .text-indigo-900,
body.high-contrast .text-indigo-100 {
    color: #000000 !important;
}

/* High Contrast - Buttons (including email reveal button) */
body.high-contrast button,
body.high-contrast .inline-block[class*="bg-gradient"],
body.high-contrast [class*="from-orange"],
body.high-contrast [class*="to-orange"] {
    background: #FFFFFF !important;
    color: #000000 !important;
    border: 3px solid #000000 !important;
    box-shadow: none !important;
}

body.high-contrast button:hover,
body.high-contrast .inline-block[class*="bg-gradient"]:hover {
    background: #000000 !important;
    color: #FFFFFF !important;
    transform: none !important;
}

body.high-contrast #contact-email-reveal-btn {
    background: #FFFFFF !important;
    color: #000000 !important;
    border: 3px solid #000000 !important;
    box-shadow: none !important;
}

body.high-contrast #contact-email-reveal-btn:hover {
    background: #000000 !important;
    color: #FFFFFF !important;
}

/* High Contrast - Email container and link */
body.high-contrast #contact-email-container {
    background: #FFFFFF !important;
    border: 3px solid #000000 !important;
}

body.high-contrast #contact-email-link {
    background: #FFFFFF !important;
    color: #000000 !important;
    border: 3px solid #000000 !important;
}

body.high-contrast #contact-email-link:hover {
    background: #000000 !important;
    color: #FFFFFF !important;
}

/* High Contrast - Service Cards (contact page) */
body.high-contrast .grid a[class*="bg-gradient"],
body.high-contrast a[class*="from-blue-50"],
body.high-contrast a[class*="from-orange-50"],
body.high-contrast a[class*="from-purple-50"] {
    background: #FFFFFF !important;
    border: 3px solid #000000 !important;
    box-shadow: none !important;
}

body.high-contrast .grid a[class*="bg-gradient"]:hover,
body.high-contrast a[class*="from-blue-50"]:hover,
body.high-contrast a[class*="from-orange-50"]:hover,
body.high-contrast a[class*="from-purple-50"]:hover {
    background: #f0f0f0 !important;
    box-shadow: none !important;
}

/* High Contrast - Rounded elements with shadows */
body.high-contrast .rounded-lg {
    box-shadow: none !important;
}

body.high-contrast main {
    background: #FFFFFF !important;
}

body.high-contrast article > div {
    background: #FFFFFF !important;
    box-shadow: none !important;
    border: 3px solid #000000 !important;
}

/* High Contrast - Hero sections on sub-pages */
body.high-contrast [class*="from-amber"],
body.high-contrast [class*="from-green"],
body.high-contrast [class*="from-blue"],
body.high-contrast [class*="from-slate"],
body.high-contrast [class*="from-indigo"],
body.high-contrast [class*="from-beige"],
body.high-contrast [class*="via-amber"],
body.high-contrast [class*="via-green"],
body.high-contrast [class*="via-blue"],
body.high-contrast [class*="via-slate"],
body.high-contrast [class*="via-indigo"],
body.high-contrast [class*="via-white"],
body.high-contrast [class*="to-amber"],
body.high-contrast [class*="to-green"],
body.high-contrast [class*="to-blue"],
body.high-contrast [class*="to-slate"],
body.high-contrast [class*="to-indigo"],
body.high-contrast [class*="to-gray"],
body.high-contrast [class*="bg-gradient"] {
    background: #FFFFFF !important;
}

body.high-contrast .text-white {
    color: #000000 !important;
}

body.high-contrast .text-green-100,
body.high-contrast .text-blue-100,
body.high-contrast .text-amber-100,
body.high-contrast .text-indigo-100,
body.high-contrast .text-gray-300 {
    color: #000000 !important;
}

/* High Contrast - Yellow bullet points */
body.high-contrast .text-yellow-600,
body.high-contrast .text-yellow-500 {
    color: #000000 !important;
}

/* High Contrast - All border colors for consistency */
body.high-contrast [class*="border-"] {
    border-color: #000000 !important;
}

/* High Contrast - All shadow elements */
body.high-contrast [class*="shadow"] {
    box-shadow: none !important;
}

/* High Contrast - Strong/bold text */
body.high-contrast strong,
body.high-contrast b,
body.high-contrast .font-bold,
body.high-contrast .font-semibold {
    color: #000000 !important;
}

/* High Contrast - Skip Link */
body.high-contrast .skip-link {
    background: #FFFFFF !important;
    color: #000000 !important;
    border: 3px solid #000000 !important;
}

body.high-contrast .skip-link:focus {
    outline: 3px solid #000000 !important;
    outline-offset: 2px !important;
}

/* High Contrast - Focus Indicators */
body.high-contrast a:focus-visible,
body.high-contrast button:focus-visible,
body.high-contrast input:focus-visible,
body.high-contrast textarea:focus-visible,
body.high-contrast select:focus-visible,
body.high-contrast [tabindex]:focus-visible {
    outline: 3px solid #000000 !important;
    outline-offset: 3px !important;
    background: #FFFFFF !important;
}

body.high-contrast .cta:focus-visible {
    outline: 3px solid #000000 !important;
    outline-offset: 4px !important;
    box-shadow: none !important;
}

body.high-contrast footer a:focus-visible {
    outline: 3px solid #000000 !important;
    outline-offset: 4px !important;
    background: #FFFFFF !important;
    color: #000000 !important;
}

body.high-contrast header a:focus-visible {
    outline: 3px solid #000000 !important;
    outline-offset: 3px !important;
}

body.high-contrast #contact-email-reveal-btn:focus-visible,
body.high-contrast #contact-email-link:focus-visible {
    outline: 3px solid #000000 !important;
    outline-offset: 4px !important;
    box-shadow: none !important;
}

body.high-contrast .grid a:focus-visible {
    outline: 3px solid #000000 !important;
    outline-offset: 3px !important;
}

/* High Contrast Toggle Button */
.high-contrast-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 14px 24px;  /* Increased padding */
    background: #FFFFFF;
    color: #000000;
    border: 3px solid #000000;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;  /* Increased for better visibility */
    font-size: 1rem;  /* Increased for better readability */
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    min-width: 44px;  /* Ensure minimum touch target */
    min-height: 44px;
}

/* Adjust position when there's a sticky header */
header.sticky ~ * .high-contrast-toggle,
body:has(header.sticky) .high-contrast-toggle {
    top: 80px;
}

.high-contrast-toggle:hover {
    background: #000000;
    color: #FFFFFF;
    transform: scale(1.05);
}

.high-contrast-toggle:focus {
    outline: 4px solid var(--focus-color);
    outline-offset: 3px;
}

body.high-contrast .high-contrast-toggle {
    background: #000000;
    color: #FFFFFF;
    border: 3px solid #FFFFFF;
    box-shadow: 0 0 0 3px #000000;
}

body.high-contrast .high-contrast-toggle:hover {
    background: #FFFFFF;
    color: #000000;
}

/* Text Spacing Toggle Button */
.text-spacing-toggle {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    padding: 14px 24px;
    background: #FFFFFF;
    color: #000000;
    border: 3px solid #000000;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    min-width: 44px;
    min-height: 44px;
}

/* Adjust position when there's a sticky header */
header.sticky ~ * .text-spacing-toggle,
body:has(header.sticky) .text-spacing-toggle {
    top: 145px;
}

.text-spacing-toggle:hover {
    background: #000000;
    color: #FFFFFF;
    transform: scale(1.05);
}

.text-spacing-toggle:focus {
    outline: 4px solid var(--focus-color);
    outline-offset: 3px;
}

body.high-contrast .text-spacing-toggle {
    background: #000000;
    color: #FFFFFF;
    border: 3px solid #FFFFFF;
    box-shadow: 0 0 0 3px #000000;
}

body.high-contrast .text-spacing-toggle:hover {
    background: #FFFFFF;
    color: #000000;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .service-content {
        padding: 40px 32px;
    }
    
    .kanji {
        font-size: 2.5rem;
    }

    .kanji-stack {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 70vh;
        padding-bottom: 50px;
    }

    .hero h1 {
        font-size: 2.2rem;
        margin-bottom: 16px;
    }

    .lead {
        font-size: 1.15rem;
    }

    .hero-explainer {
        margin: 16px auto 36px;
    }

    .service {
        padding: 80px 16px;
    }

    .service-content {
        padding: 32px 24px;
        gap: 12px;
    }

    .kanji {
        font-size: 2rem;
    }

    .kanji-stack {
        gap: 32px;
        margin: 28px 0 40px;
    }

    .kanji-label {
        font-size: 0.85rem;
        letter-spacing: 1.5px;
    }
}

@media (max-width: 640px) {
    body {
        padding-top: 0;
    }

    .hero {
        min-height: 60vh;
        padding: 20px 0 45px 0;
    }

    .hero-logo img {
        height: clamp(100px, 20vw, 150px);
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .lead {
        font-size: 1rem;
    }

    .hero-explainer {
        font-size: 0.95rem;
        margin: 16px auto 32px;
    }

    .eyebrow {
        font-size: 1rem;
        letter-spacing: 2px;
    }

    .service {
        padding: 60px 12px;
    }

    .service-content {
        padding: 24px 16px;
        border-radius: 16px;
    }

    .service h2 {
        font-size: 1.6rem;
    }

    .service p {
        font-size: 0.9rem;
    }

    .cta {
        padding: 14px 28px;
        font-size: 0.9rem;
        letter-spacing: 0.8px;
    }

    .kanji {
        font-size: 1.8rem;
    }

    .kanji-stack {
        gap: 24px;
        margin: 24px 0 32px;
    }

    .kanji-label {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ===== E-PAPER / KINDLE DEVICE FIXES ===== */
/* Kindle browsers have limited CSS support - use simple, robust styles */

/* Monochrome display detection */
@media (monochrome) {
    /* Simplify hero section for e-paper */
    .hero {
        background: #FFFFFF !important;
        min-height: auto !important;
        padding: 40px 20px !important;
    }

    .hero::before,
    .hero::after {
        display: none !important;
    }

    .hero-content {
        position: static !important;
        max-width: 100% !important;
    }

    /* Fix hero logo positioning */
    .hero-logo {
        display: block !important;
        text-align: center !important;
        margin-bottom: 20px !important;
    }

    .hero-logo picture {
        display: block !important;
    }

    .hero-logo img {
        height: 120px !important;
        width: auto !important;
        max-width: 100% !important;
        display: inline-block !important;
        filter: none !important;
        transform: none !important;
    }

    /* Disable hover effects */
    .hero-logo img:hover {
        transform: none !important;
    }

    /* Simplify kanji stack */
    .kanji-stack {
        display: block !important;
        text-align: center !important;
        margin: 20px 0 !important;
    }

    .kanji-column {
        display: inline-block !important;
        margin: 10px 15px !important;
        vertical-align: top !important;
    }

    .kanji {
        transform: none !important;
        text-shadow: none !important;
    }

    .kanji:hover {
        transform: none !important;
    }

    /* Service sections - simplify layout */
    .service {
        background: #FFFFFF !important;
        padding: 40px 15px !important;
        perspective: none !important;
    }

    .service::before {
        display: none !important;
    }

    .service-content {
        position: static !important;
        max-width: 100% !important;
        padding: 20px !important;
        background: #FFFFFF !important;
        backdrop-filter: none !important;
        border: 2px solid #000000 !important;
        border-radius: 8px !important;
        box-shadow: none !important;
        transform: none !important;
        transform-style: flat !important;
    }

    .service-content::before,
    .service-content::after {
        display: none !important;
    }

    .service-content:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    /* Fix service logo positioning */
    .service .logo {
        display: block !important;
        text-align: center !important;
        margin-bottom: 15px !important;
    }

    .service .logo img {
        height: 80px !important;
        width: auto !important;
        max-width: 100% !important;
        display: inline-block !important;
        filter: none !important;
        transform: none !important;
    }

    .service .logo img:hover {
        transform: none !important;
    }

    /* CTA buttons */
    .cta {
        background: #FFFFFF !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
        box-shadow: none !important;
        transform: none !important;
    }

    .cta::before {
        display: none !important;
    }

    .cta:hover {
        transform: none !important;
        filter: none !important;
    }

    /* Text styling */
    .service h2 {
        background: none !important;
        -webkit-text-fill-color: #000000 !important;
        color: #000000 !important;
    }

    /* Footer */
    footer {
        background: #FFFFFF !important;
        color: #000000 !important;
        border-top: 2px solid #000000 !important;
    }

    footer a {
        color: #000000 !important;
    }

    /* Skip link */
    .skip-link {
        position: static !important;
        display: block !important;
        background: #FFFFFF !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
        margin-bottom: 10px !important;
        text-align: center !important;
        transform: none !important;
    }

    /* High contrast toggle */
    .high-contrast-toggle {
        position: static !important;
        display: block !important;
        margin: 10px auto !important;
        transform: none !important;
    }
}

/* Additional fallback for browsers that don't support clamp() */
@supports not (height: clamp(80px, 12vw, 140px)) {
    .hero-logo img {
        height: 150px;
    }

    .service .logo img {
        height: 100px;
    }
}

/* Kindle Silk browser specific - uses limited viewport */
@media screen and (max-device-width: 1024px) and (color-index: 0) {
    .hero-logo img,
    .service .logo img {
        max-width: 90% !important;
        height: auto !important;
    }
}

/* ===== COMPANY INFO GRID ===== */
.company-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .company-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

.company-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.company-info-item dt,
.company-info-item .font-semibold {
    font-weight: 700;
    font-size: 0.95rem;
}

.company-info-item dd,
.company-info-item .company-info-value {
    font-weight: 500;
    color: var(--ink);
    font-size: 1rem;
}

/* Ensure abbreviations have proper styling */
abbr[title] {
    text-decoration: underline dotted;
    cursor: help;
}

/* ===== RESPONSIVE DESIGN ===== */