/*
 * ddt.solutions - Mobile-First Coming Soon Landing Page
 * Stylesheet with mobile-first responsive design
 * Version: 1.0
 */

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
    /* Color Palette */
    --color-primary: #003399;        /* EU Blue */
    --color-secondary: #0077B6;      /* Trust Teal */
    --color-background: #FFFFFF;     /* Clean White */
    --color-text-primary: #1A1A2E;   /* Dark Gray */
    --color-text-secondary: #6B7280; /* Medium Gray */
    --color-success: #10B981;        /* Green */
    --color-error: #EF4444;          /* Red */
    --color-border: #E5E7EB;
    --color-focus: #0077B6;

    /* Typography */
    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing Scale */
    --space-xs: 0.25rem;   /* 4px */
    --space-sm: 0.5rem;    /* 8px */
    --space-md: 1rem;      /* 16px */
    --space-lg: 1.5rem;    /* 24px */
    --space-xl: 2rem;      /* 32px */
    --space-2xl: 3rem;     /* 48px */

    /* Container */
    --container-max-width: 1200px;
    --container-padding: var(--space-md);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* Focus Ring */
    --focus-ring: 0 0 0 3px rgba(0, 119, 182, 0.4);
}

/* ==========================================================================
   Base Styles (Mobile-First)
   ========================================================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    z-index: 9999;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-md);
}

/* ==========================================================================
   Container
   ========================================================================== */

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

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 var(--space-md);
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.125rem;
}

p {
    margin: 0 0 var(--space-md);
}

a {
    color: var(--color-primary);
    text-decoration: underline;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-secondary);
}

a:focus {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem var(--space-lg);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 44px; /* Touch target minimum */
}

.button:focus {
    outline: none;
    box-shadow: var(--focus-ring);
}

.button:active {
    transform: scale(0.98);
}

.button-primary {
    background-color: var(--color-primary);
    color: white;
}

.button-primary:hover {
    background-color: #002266;
    color: white;
}

.button-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.button-secondary:hover {
    background-color: var(--color-primary);
    color: white;
}

/* ==========================================================================
   Header
   ========================================================================== */

.header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--space-md) 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--color-text-primary);
}

.logo-icon {
    width: 36px;
    height: 36px;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.logo-accent {
    color: var(--color-primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    padding: calc(72px + var(--space-xl)) 0 var(--space-xl);
    min-height: auto;
}

.hero .container {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

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

.hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.hero-cta {
    margin: 0 auto;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-illustration {
    width: 100%;
    max-width: 280px;
}

.hero-illustration svg {
    width: 100%;
    height: auto;
}

/* ==========================================================================
   Value Proposition Section
   ========================================================================== */

.value-proposition {
    padding: var(--space-xl) 0;
    background-color: #F9FAFB;
}

.section-title {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: var(--space-xl);
    color: var(--color-text-primary);
}

.value-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.value-card {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-normal);
}

.value-card:hover {
    box-shadow: var(--shadow-md);
}

.value-icon {
    margin-bottom: var(--space-md);
}

.value-icon svg {
    width: 48px;
    height: 48px;
}

.value-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--color-text-primary);
}

.value-description {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact {
    padding: var(--space-xl) 0;
}

.contact-wrapper {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-width: 100%;
}

.contact-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.contact-subtitle {
    color: var(--color-text-secondary);
    margin: 0;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* Honeypot field - hidden visually but accessible to screen readers */
.honeypot {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.required {
    color: var(--color-error);
}

.optional {
    color: var(--color-text-secondary);
    font-weight: 400;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-text-primary);
    background-color: white;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    min-height: 44px;
    appearance: none;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: var(--color-secondary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-focus);
    box-shadow: var(--focus-ring);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-text-secondary);
    opacity: 0.7;
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: var(--color-error);
}

.form-error {
    font-size: 0.8125rem;
    color: var(--color-error);
    display: none;
}

.form-error.visible {
    display: block;
}

/* Select Wrapper */
.select-wrapper {
    position: relative;
}

.select-wrapper select {
    padding-right: var(--space-2xl);
}

.select-icon {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
    color: var(--color-text-secondary);
}

/* Message Field - Progressive Disclosure */
.message-field {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0;
    padding: 0;
    transition: max-height var(--transition-normal), opacity var(--transition-normal), margin var(--transition-normal), padding var(--transition-normal);
}

.message-field.visible {
    max-height: 500px;
    opacity: 1;
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
}

/* Checkbox */
.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-sm);
}

.form-checkbox {
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    flex-shrink: 0;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.checkbox-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    line-height: 1.5;
}

.checkbox-label .link {
    color: var(--color-primary);
}

/* Submit Button */
.form-submit {
    width: 100%;
    margin-top: var(--space-sm);
}

.form-submit .btn-loader {
    display: none;
}

.form-submit.loading .btn-text {
    visibility: hidden;
}

.form-submit.loading .btn-loader {
    display: block;
    position: absolute;
}

.form-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}

.spinner {
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Success Message */
.form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-xl);
    background: #ECFDF5;
    border-radius: var(--radius-lg);
    animation: fadeIn var(--transition-slow);
}

.form-success.visible {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-icon-wrapper {
    margin-bottom: var(--space-md);
}

.success-icon {
    width: 64px;
    height: 64px;
}

.success-title {
    font-size: 1.25rem;
    color: var(--color-success);
    margin-bottom: var(--space-sm);
}

.success-message {
    color: var(--color-text-secondary);
    margin: 0;
}

/* Error State for Message Box */
.form-success.error {
    background: #FEF2F2;
}

.form-success.error .success-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--color-error);
    border-radius: 50%;
    font-size: 32px;
    color: white;
}

.form-success.error .success-icon {
    display: none;
}

.form-success.error .success-title {
    color: var(--color-error);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background-color: var(--color-text-primary);
    color: white;
    padding: var(--space-xl) 0 var(--space-lg);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    display: block;
    margin-bottom: var(--space-xs);
}

.footer-logo .logo-accent {
    color: var(--color-secondary);
}

.footer-tagline {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: white;
}

.footer-social {
    display: flex;
    gap: var(--space-md);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: background var(--transition-fast);
}

.social-link:hover {
    background: var(--color-secondary);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    padding-top: var(--space-lg);
    text-align: center;
}

.copyright {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 var(--space-xs);
}

.powered-by {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.powered-by .link {
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   Tablet Breakpoint (768px and up)
   ========================================================================== */

@media (min-width: 768px) {
    :root {
        --container-padding: var(--space-lg);
    }

    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.875rem;
    }

    .hero {
        padding: calc(88px + var(--space-2xl)) 0 var(--space-2xl);
        min-height: auto;
    }

    .hero .container {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }

    .hero-content {
        text-align: left;
        flex: 1;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-cta {
        margin: 0;
    }

    .hero-visual {
        flex: 1;
        justify-content: flex-end;
    }

    .hero-illustration {
        max-width: 320px;
    }

    .value-grid {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .value-card {
        flex: 1 1 calc(50% - var(--space-md));
        min-width: 280px;
    }

    .contact-wrapper {
        padding: var(--space-2xl);
        max-width: 600px;
        margin: 0 auto;
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .footer-brand {
        text-align: left;
        flex: 1 1 200px;
    }

    .footer-links {
        flex: 0 0 auto;
    }

    .footer-social {
        flex: 0 0 auto;
    }

    .footer-bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }
}

/* ==========================================================================
   Desktop Breakpoint (1024px and up)
   ========================================================================== */

@media (min-width: 1024px) {
    :root {
        --container-padding: var(--space-xl);
    }

    h1 {
        font-size: 2.75rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero {
        padding: calc(96px + var(--space-2xl)) 0 var(--space-2xl);
        min-height: 100vh;
        display: flex;
        align-items: center;
    }

    .hero-title {
        font-size: 3rem;
        max-width: 600px;
    }

    .hero-subtitle {
        font-size: 1.25rem;
        max-width: 520px;
    }

    .hero-illustration {
        max-width: 400px;
    }

    .value-proposition {
        padding: var(--space-2xl) 0;
    }

    .value-grid {
        flex-wrap: nowrap;
    }

    .value-card {
        flex: 1;
        min-width: auto;
    }

    .value-card:last-child {
        margin-right: 0;
    }

    .contact {
        padding: var(--space-2xl) 0 calc(var(--space-2xl) * 2);
    }

    .form-submit {
        width: auto;
        min-width: 200px;
    }

    .footer {
        padding: var(--space-2xl) 0 var(--space-lg);
    }
}

/* ==========================================================================
   Large Desktop (1280px and up)
   ========================================================================== */

@media (min-width: 1280px) {
    .hero-illustration {
        max-width: 450px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .button,
    .contact-form,
    .hero-cta,
    .footer-social {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .hero {
        padding-top: 0;
    }

    .hero-title {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   High Contrast Mode
   ========================================================================== */

@media (prefers-contrast: high) {
    :root {
        --color-border: #000000;
        --color-text-secondary: #333333;
    }

    .value-card {
        border: 2px solid var(--color-text-primary);
    }

    .button {
        border: 2px solid currentColor;
    }
}
