@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap');

html {
    font-size: 16px;
}

:root {
    /* Crisp, high-contrast light mode */
    --bg: #ffffff;
    --surface: #f8fafc;
    --surface-hover: #f1f5f9;

    /* Deep slate/charcoal text for high readability */
    --text: #334155;
    --text-header: #0f172a;
    --accent: #64748b;

    /* Deep teal/cyan accent for authority */
    --cyan: #0284c7;
    --cyan-dim: rgba(2, 132, 199, 0.08);

    /* Subtle structural grids */
    --grid-line: rgba(15, 23, 42, 0.04);
    --border: rgba(15, 23, 42, 0.1);
    --border-cyan: rgba(2, 132, 199, 0.2);

    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.8;
    margin: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;

    /* Explicitly enable beautiful ligatures for serif typography */
    font-variant-ligatures: common-ligatures discretionary-ligatures contextual;
    font-feature-settings: "liga" 1, "dlig" 1;
}

header {
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed var(--border);
    font-family: var(--font-body);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}

.monogram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-header);
    border: 1.5px solid transparent;
    background: linear-gradient(var(--bg), var(--bg)) padding-box,
                linear-gradient(135deg, #2563eb, #0891b2) border-box;
}

.logo-text {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-header);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

nav a {
    color: var(--accent);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a:hover,
nav a.active {
    color: var(--cyan);
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
}

/* Refined Header Elements */
h1,
h2,
h3 {
    font-family: var(--font-display);
    color: var(--text-header);
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: normal;
}

strong {
    font-weight: 600;
    color: var(--text-header);
}

/* Tighter Hero Welcome */
.hero {
    padding: 3rem 0;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 3rem;
}

.hero-label {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--cyan);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 4.5rem);
    font-weight: 700;
    letter-spacing: normal;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.0rem;
    color: var(--text);
    max-width: 650px;
    line-height: 1.7;
    font-weight: 400;
    margin-bottom: 0;
}

/* Common Page Elements */
p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

strong {
    font-weight: 700;
    color: var(--text-header);
}

.topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
}

.topic {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cyan);
    background: var(--cyan-dim);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    border: 1px dashed var(--border-cyan);
}

/* Homepage Structure */
section {
    margin-bottom: 6rem;
}

.section-title {
    font-family: var(--font-mono);
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 1rem;
    margin-bottom: 2.5rem;
}

/* Core Axiom Box */
.core-axiom {
    background: var(--surface);
    border: 1px dashed var(--border-cyan);
    padding: 3rem;
    border-radius: 4px;
    position: relative;
}

.core-axiom::before {
    content: 'FOUNDATIONAL AXIOM';
    position: absolute;
    top: -10px;
    left: 3rem;
    background: var(--bg);
    padding: 0 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 1px;
}

.core-axiom h2 {
    font-size: 2.5rem;
    margin-top: 0;
}

.core-axiom p {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-header);
}

/* Taxonomy Grid */
.taxonomy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.taxonomy-card {
    padding: 2rem;
    background: #ffffff;
    border: 1px dashed var(--border);
    border-radius: 4px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.taxonomy-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.05);
    border-color: var(--border-cyan);
}

.taxonomy-card .topic {
    margin: 0 0 1rem 0;
    display: inline-block;
}

.taxonomy-card h3 {
    font-size: 1.5rem;
    margin-top: 0;
}

.taxonomy-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
    color: var(--text);
}

/* About Section */
.about-section {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    padding: 3rem 0;
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
}

.about-avatar {
    width: 120px;
    height: 120px;
    border-radius: 4px;
    background: var(--surface);
    border: 1px dashed var(--border-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    color: var(--cyan);
    font-weight: 600;
    flex-shrink: 0;
}

.about-content h2 {
    margin-top: 0;
    font-size: 2rem;
}

.about-content p {
    font-size: 1.1rem;
}

/* Subscribe Box */
.subscribe-box {
    background: var(--cyan-dim);
    border: 1px dashed var(--border-cyan);
    padding: 3rem;
    border-radius: 4px;
    text-align: center;
    margin-top: 4rem;
}

.subscribe-box h2 {
    color: var(--text-header);
    margin-top: 0;
}

.subscribe-form {
    display: flex;
    max-width: 500px;
    margin: 2rem auto 0;
    gap: 1rem;
}

.subscribe-input {
    flex: 1;
    padding: 1rem;
    border: 1px dashed var(--border);
    background: #ffffff;
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 4px;
    transition: border-color 0.2s;
}

.subscribe-input:focus {
    outline: none;
    border-color: var(--cyan);
}

.subscribe-btn {
    background: var(--text-header);
    color: #ffffff;
    border: none;
    padding: 0 2rem;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.subscribe-btn:hover {
    background: var(--cyan);
}

/* Research Box */
.thesis-box {
    background: var(--surface);
    border: 1px dashed var(--border-cyan);
    padding: 2rem;
    margin: 2.5rem 0;
    border-radius: 4px;
}

.thesis-label {
    font-family: var(--font-display);
    color: var(--cyan);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
    letter-spacing: 1.5px;
}

.thesis-box p {
    margin-bottom: 0.75rem;
    color: var(--text);
    font-size: 1.05rem;
}

.thesis-box p:last-child {
    margin-bottom: 0;
}

/* Blog List */
.page-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: normal;
    margin-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 1.5rem;
    margin-top: 2rem;
}

.post-list {
    list-style: none;
    padding: 0;
    margin-top: 2.5rem;
}

.post-item {
    margin-bottom: 1.5rem;
    padding: 2rem;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: 4px;
    transition: border-color 0.2s;
}

.post-item:hover {
    border-color: var(--border-cyan);
    background: #ffffff;
}

.post-meta-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.post-meta {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--accent);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-item h2 {
    margin: 0 0 0.75rem 0;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: normal;
}

.post-item h2 a {
    color: var(--text-header);
    text-decoration: none;
}

.post-item h2 a:hover {
    color: var(--cyan);
}

.post-item p {
    margin-bottom: 0;
    font-size: 1.05rem;
    color: var(--text);
}

/* Article */
article h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: normal;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

article .meta {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--accent);
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

article h2 {
    font-size: 1.8rem;
    margin-top: 3rem;
    font-weight: 700;
    letter-spacing: normal;
}

/* ==========================================================================
   Product Showcase (Homepage Apps Grid)
   ========================================================================== */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.app-card {
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: 6px;
    padding: 2.5rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.app-card:hover {
    transform: translateY(-4px);
    border-color: var(--cyan);
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(2, 132, 199, 0.06);
}

.app-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.app-card-logo-container {
    height: 48px;
    display: flex;
    align-items: center;
}

.app-card-logo-container img {
    height: 100%;
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

.app-card .badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--cyan);
    background: var(--cyan-dim);
    border: 1px solid var(--border-cyan);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.app-card h3 {
    font-size: 1.75rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.app-card p {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.app-card-links {
    display: flex;
    gap: 1.5rem;
    margin-top: auto;
    border-top: 1px dashed var(--border);
    padding-top: 1.5rem;
}

.app-card-links a {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.app-card-links .btn-primary {
    color: var(--cyan);
}

.app-card-links .btn-secondary {
    color: var(--accent);
}

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

/* ==========================================================================
   Product Detail (Writedown & Dashsalt Detail Pages)
   ========================================================================== */
.product-hero {
    text-align: center;
    padding: 4rem 0 3rem;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 3.5rem;
}

.product-hero-logo {
    max-height: 80px;
    width: auto;
    margin-bottom: 2rem;
}

.product-tagline {
    font-size: 1.35rem;
    color: var(--accent);
    font-style: italic;
    max-width: 600px;
    margin: 1.5rem auto 0;
    line-height: 1.6;
}

.product-meta-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2.5rem 0;
    flex-wrap: wrap;
}

.product-meta-item {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-header);
    border: 1px dashed var(--border);
    padding: 0.4rem 1rem;
    border-radius: 4px;
    background: var(--surface);
}

.grid-2col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    margin: 4rem 0;
}

.feature-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2rem;
}

.feature-item::before {
    content: '→';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--cyan);
    font-weight: 700;
}

.feature-item h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.feature-item p {
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Steps Process Flow */
.process-flow {
    margin: 4rem 0;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.process-card {
    background: var(--surface);
    border: 1px dashed var(--border);
    padding: 2rem;
    border-radius: 4px;
    text-align: center;
    transition: border-color 0.2s;
}

.process-card:hover {
    border-color: var(--border-cyan);
}

.process-step-num {
    font-family: var(--font-mono);
    color: var(--cyan);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: block;
}

.process-card img {
    width: 100%;
    max-width: 150px;
    height: auto;
    margin: 1rem auto;
    display: block;
}

.process-card h4 {
    font-size: 1.15rem;
    margin: 0.5rem 0;
}

.process-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Pricing Table */
.pricing-section {
    background: var(--surface);
    border: 1px dashed var(--border-cyan);
    border-radius: 6px;
    padding: 3rem;
    margin: 4rem 0;
}

.pricing-header {
    text-align: center;
    margin-bottom: 3rem;
}

.pricing-header h2 {
    font-size: 2.2rem;
    margin-top: 0;
}

.pricing-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
}

.pricing-card {
    background: #ffffff;
    border: 1px dashed var(--border);
    padding: 2.5rem;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}

.pricing-card.featured {
    border-color: var(--cyan);
    box-shadow: 0 10px 30px rgba(2, 132, 199, 0.04);
}

.pricing-card h3 {
    margin-top: 0;
    font-size: 1.5rem;
}

.price {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-header);
    margin: 1.5rem 0;
}

.price-sub {
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--accent);
    font-weight: normal;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem 0;
    flex-grow: 1;
}

.pricing-features li {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.pricing-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--cyan);
    font-weight: 700;
}

.pricing-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--text-header);
    color: #ffffff;
    padding: 1rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
    box-sizing: border-box;
}

.pricing-card.featured .pricing-btn {
    background: var(--cyan);
}

.pricing-btn:hover {
    background: var(--accent);
}

.pricing-card.featured .pricing-btn:hover {
    background: var(--text-header);
}

/* ==========================================================================
   Support & Contact Pages
   ========================================================================== */
.support-container {
    max-width: 650px;
    margin: 0 auto;
}

.support-desc {
    font-size: 1.15rem;
    margin-bottom: 3rem;
    text-align: center;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: var(--text-header);
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px dashed var(--border);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: #ffffff;
    color: var(--text-header);
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px var(--cyan-dim);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 0.35rem;
}

.checkbox-group label {
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: none;
    font-weight: normal;
    color: var(--text);
}

.form-submit-btn {
    background: var(--text-header);
    color: #ffffff;
    border: none;
    padding: 1.1rem 2.5rem;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
    margin-top: 1rem;
}

.form-submit-btn:hover {
    background: var(--cyan);
}

.form-submit-btn:active {
    transform: scale(0.98);
}

/* Toast Messages */
.toast-msg {
    display: none;
    background: var(--cyan-dim);
    border: 1px dashed var(--border-cyan);
    padding: 2rem;
    border-radius: 4px;
    text-align: center;
    margin-top: 2rem;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-msg h3 {
    color: var(--cyan);
    margin-top: 0;
}

.toast-msg p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

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

/* ==========================================================================
   Privacy Policy Styling
   ========================================================================== */
.privacy-container {
    max-width: 700px;
    margin: 0 auto;
}

.privacy-container section {
    margin-bottom: 3.5rem;
}

.privacy-container h2 {
    font-size: 1.6rem;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.privacy-container ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.privacy-container li {
    margin-bottom: 0.75rem;
}