/* ============================================================
   MyStash Template — template.css v2.7.1
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800&family=DM+Sans:wght@400;500;600&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --teal:        #2D6A5F;
    --teal-light:  #3D8A7A;
    --teal-pale:   #E8F4F1;
    --terra:       #C4714A;
    --terra-light: #E8926A;
    --cream:       #FAF7F2;
    --warm-white:  #FFFDF9;
    --ink:         #2A2018;
    --ink-mid:     #5A4E40;
    --ink-soft:    #8A7B6A;
    --border:      #E2D9CC;
    --font:        'Open Sans', system-ui, sans-serif;
    --shadow-sm:   0 2px 8px rgba(42,32,24,0.06);
    --shadow-md:   0 8px 24px rgba(42,32,24,0.10);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; font-size: 16px; }
body  { font-family: var(--font); background: var(--cream); color: var(--ink); line-height: 1.7; overflow-x: hidden; }
img   { max-width: 100%; height: auto; display: block; }
a     { color: var(--teal); transition: color 0.2s; }
a:hover { color: var(--teal-light); }
h1,h2,h3,h4,h5,h6 { font-family: var(--font); color: var(--ink); line-height: 1.2; }
p     { color: var(--ink-mid); font-weight: 300; margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.container    { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.hcl-cube     { border-radius: 18%; }


/* ════════════════════════════════════════════════════════════
   HERO — cube grid + tagline + CTA, full viewport height
   ════════════════════════════════════════════════════════════ */
#ms-hero {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
}

.hero-logo-lockup {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.hero-cube-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: clamp(240px, 35vw, 480px);
    height: clamp(240px, 35vw, 480px);
}

.hero-tagline {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--ink-mid);
    text-align: center;
    letter-spacing: -0.03em;
    margin: 0;
}

.hero-cta {
    display: inline-block;
    border: 2px solid var(--teal);
    color: var(--teal);
    background: transparent;
    padding: 0.85rem 2.2rem;
    border-radius: 6px;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s, color 0.2s;
    margin-top: 0;
}
.hero-cta:hover { background: var(--teal); color: #fff; }


/* ════════════════════════════════════════════════════════════
   OUR APPS — 3×3 cube grid
   ════════════════════════════════════════════════════════════ */
#ms-home-content { background: var(--cream); width: 100%; }

#ms-apps {
    padding: 2.5rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.apps-heading {
    font-size: 1.6rem; font-weight: 700;
    color: var(--ink); text-align: center;
    margin-bottom: 1.5rem; letter-spacing: 0.01em;
}

.apps-cube-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
    gap: 16px;
    align-items: stretch;
}

.app-cube {
    aspect-ratio: 1 / 1;
    border: 2px solid var(--cube-colour, var(--teal));
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    position: relative;
    transition: transform 0.25s, box-shadow 0.25s;
}
.app-cube:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.app-cube .moduletable {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}

.app-cube a.ms-app-card-link {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    text-decoration: none;
    color: inherit;
}

.app-cube .ms-app-card {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}

.app-cube .ms-app-img-wrap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 4rem;
    overflow: hidden;
}
.app-cube .ms-app-img-wrap img,
.app-cube img.cardimage {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    margin: 0 !important;
    padding: 12px !important;
    box-sizing: border-box !important;
}

.app-cube .ms-app-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.75rem;
    border-top: 1px solid var(--border);
    background: #fff;
    overflow: hidden;
    box-sizing: border-box;
}
.app-cube .ms-app-name strong,
.app-cube .ms-app-name span {
    font-size: 0.82rem !important;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
    text-align: center;
    display: block;
}

.app-cube a.ms-app-card-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}


/* ════════════════════════════════════════════════════════════
   CONTACT FORMS
   ════════════════════════════════════════════════════════════ */
#ms-contact-forms {
    background: var(--cream);
    border-top: 1px solid var(--border);
    padding: 3rem 2rem 4rem;
}

.contact-forms-grid {
    max-width: 1100px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 2px;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    background: var(--border);
}

.contact-panel { background: #fff; padding: 2rem; display: flex; flex-direction: column; }
.contact-panel h3 {
    font-size: 0.92rem; font-weight: 600;
    color: var(--ink); line-height: 1.5; margin-bottom: 2rem;
    min-height: 3rem;
}

.ms-form { display: flex; flex-direction: column; gap: 0.75rem; }
.form-row-half { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

.ms-form input,
.ms-form textarea {
    font-family: var(--font); font-size: 0.85rem;
    color: var(--ink); background: #fff;
    border: 1px solid var(--border); border-radius: 4px;
    padding: 0.55rem 0.8rem; width: 100%;
    outline: none; transition: border-color 0.2s; resize: vertical;
}
.ms-form input:focus,
.ms-form textarea:focus { border-color: var(--teal); }
.ms-form input::placeholder,
.ms-form textarea::placeholder { color: #bbb; font-size: 0.82rem; }

.ms-btn {
    align-self: flex-start;
    background: var(--teal); color: #fff;
    border: none; border-radius: 50px;
    padding: 0.6rem 1.5rem;
    font-family: var(--font); font-size: 0.82rem; font-weight: 600;
    cursor: pointer; transition: background 0.2s;
}
.ms-btn:hover { background: var(--teal-light); }

.ms-btn-terra {
    align-self: flex-start;
    background: var(--terra); color: #fff;
    border: none; border-radius: 50px;
    padding: 0.6rem 1.5rem;
    font-family: var(--font); font-size: 0.82rem; font-weight: 600;
    cursor: pointer; transition: background 0.2s, color 0.2s;
}
.ms-btn-terra:hover { background: var(--terra-light, #d4845a); color: #fff; }


/* ════════════════════════════════════════════════════════════
   INNER PAGE NAV
   ════════════════════════════════════════════════════════════ */
#ms-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(250,247,242,0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 2rem;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-logo  { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.nav-cube-logo { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; width: 30px; height: 30px; }
.nav-wordmark  { font-family: var(--font); font-size: 1.2rem; font-weight: 700; color: var(--teal); }
#ms-nav .mod-menu ul { list-style: none; display: flex; gap: 1.6rem; }
#ms-nav .mod-menu a  { font-size: 0.85rem; font-weight: 600; color: var(--ink-mid); text-decoration: none; letter-spacing: 0.05em; text-transform: uppercase; transition: color 0.2s; }
#ms-nav .mod-menu a:hover { color: var(--teal); }


/* ════════════════════════════════════════════════════════════
   INNER PAGE LAYOUT
   ════════════════════════════════════════════════════════════ */
#ms-top, #ms-bottom { padding: 2rem 0; background: var(--warm-white); border-bottom: 1px solid var(--border); }
.ms-top-grid, .ms-bottom-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; }

#ms-content-area { padding: 3rem 2rem; display: grid; grid-template-columns: 1fr; gap: 2rem; }
#ms-content-area.has-sidebar-left  { grid-template-columns: 260px 1fr; }
#ms-content-area.has-sidebar-right { grid-template-columns: 1fr 260px; }
#ms-content-area.has-both-sidebars { grid-template-columns: 220px 1fr 220px; }

#ms-component { background: var(--warm-white); border: 1px solid var(--border); border-radius: 16px; padding: 2.5rem; box-shadow: var(--shadow-sm); }

#ms-breadcrumbs .mod-breadcrumbs__wrapper:not(:first-child) {
    display: none !important;
}
.ms-sidebar .moduletable { background: var(--warm-white); border: 1px solid var(--border); border-radius: 12px; padding: 1.4rem; margin-bottom: 1.2rem; }
.ms-sidebar .moduletable h3 { font-size: 0.95rem; color: var(--teal); padding-bottom: 0.5rem; border-bottom: 2px solid var(--teal-pale); margin-bottom: 0.8rem; }

#ms-breadcrumbs {
    margin-bottom: 0.75rem;
}
#ms-breadcrumbs .ms-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
    color: var(--ink-soft);
}
#ms-breadcrumbs .breadcrumb-item a {
    color: var(--teal);
    text-decoration: none;
}
#ms-breadcrumbs .breadcrumb-item a:hover { text-decoration: underline; }
#ms-breadcrumbs .breadcrumb-item.active { color: var(--ink-soft); }
#ms-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
    content: '›';
    color: var(--ink-soft);
    margin-right: 0.3rem;
}

.page-header h1 { font-size: clamp(1.6rem,3vw,2.4rem); margin-bottom: 1.5rem; }
.article-info   { font-size: 0.8rem; color: var(--ink-soft); margin: 0.5rem 0 1.5rem; }
.readmore a     { display: inline-block; background: var(--teal); color: #fff; padding: 0.55rem 1.4rem; border-radius: 50px; text-decoration: none; font-weight: 600; font-size: 0.85rem; }
.readmore a:hover { background: var(--teal-light); }
#ms-banner { padding: 1.5rem 2rem; }


/* ════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════ */
#ms-footer { background: var(--ink); color: rgba(255,255,255,0.5); padding: 3rem 2rem 1.5rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 1.5rem; gap: 2rem; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 1rem; }
.footer-cube-logo { display: grid; grid-template-columns: repeat(3,1fr); gap: 3px; width: 40px; height: 40px; }
.footer-brand-name { font-family: var(--font); font-size: 1.3rem; font-weight: 700; color: #fff; }
.footer-tagline-text { font-size: 0.78rem; }
#ms-footer .mod-menu ul { list-style: none; display: flex; gap: 1.5rem; flex-wrap: wrap; }
#ms-footer .mod-menu a  { color: rgba(255,255,255,0.45); text-decoration: none; font-size: 0.82rem; transition: color 0.2s; }
#ms-footer .mod-menu a:hover { color: #fff; }
.footer-copy { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; flex-wrap: wrap; gap: 0.5rem; }
.footer-copy a { color: rgba(255,255,255,0.4); text-decoration: none; }
.footer-copy a:hover { color: #fff; }


/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .hero-cube-grid { width: clamp(200px, 60vw, 400px); height: clamp(200px, 60vw, 400px); }
    .hero-tagline   { font-size: clamp(1.1rem, 4vw, 1.6rem); }
    .apps-cube-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .contact-forms-grid { grid-template-columns: 1fr; }
    .ms-top-grid, .ms-bottom-grid { grid-template-columns: 1fr; }
    #ms-content-area,
    #ms-content-area.has-sidebar-left,
    #ms-content-area.has-sidebar-right,
    #ms-content-area.has-both-sidebars { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
    .footer-copy  { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .hero-cube-grid { width: 70vw; height: 70vw; }
    .apps-cube-grid { grid-template-columns: 1fr; gap: 10px; max-width: 380px; margin: 0 auto; }
    .app-cube { aspect-ratio: 5 / 3; border-radius: 10px; }
    .form-row-half { grid-template-columns: 1fr; }
}


/* ── Coming Soon ribbon ───────────────────────────────────── */
.app-cube .ms-app-card.coming-soon {
    position: relative;
    overflow: hidden;
}

.app-cube .ms-app-card.coming-soon::after {
    content: 'Coming Soon';
    position: absolute;
    top: 22px;
    right: -30px;
    width: 120px;
    background: var(--terra);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.3rem 0;
    transform: rotate(45deg);
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    overflow: hidden;
}

.app-cube .ms-app-card.coming-soon .ms-app-img-wrap img {
    filter: grayscale(30%) opacity(0.85);
}


/* ════════════════════════════════════════════════════════════
   TERMS OF SERVICE / PRIVACY POLICY
   ════════════════════════════════════════════════════════════ */

.tos-wrapper {
    max-width: 820px;
    margin: 0 auto;
    padding: 60px 32px 80px;
}

.tos-header {
    text-align: center;
    margin-bottom: 56px;
    padding-bottom: 40px;
    border-bottom: 3px solid var(--teal-pale);
}

.tos-logo {
    font-family: var(--font);
    font-weight: 900;
    font-size: 2.5rem;
    color: var(--teal);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.tos-title {
    font-family: var(--font);
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--teal);
    margin-bottom: 12px;
}

.tos-meta {
    font-size: 0.875rem;
    color: var(--ink-soft);
    font-weight: 600;
}

.tos-intro {
    background: var(--teal-pale);
    border-left: 4px solid var(--teal);
    border-radius: 0 12px 12px 0;
    padding: 20px 24px;
    margin-bottom: 48px;
    font-size: 0.95rem;
    color: var(--ink-mid);
}

.tos-section { margin-bottom: 48px; }

.tos-section h2 {
    font-family: var(--font);
    font-weight: 900;
    font-size: 1.25rem;
    color: var(--teal);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--teal-pale);
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.tos-section h2 .section-num {
    font-size: 0.8rem;
    font-weight: 900;
    background: var(--teal);
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.tos-section h3 {
    font-family: var(--font);
    font-weight: 800;
    font-size: 1rem;
    color: var(--teal);
    margin: 24px 0 10px;
}

.tos-section p {
    color: var(--ink-mid);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.tos-section ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 16px 0;
}

.tos-section ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: var(--ink-mid);
    font-size: 0.95rem;
}

.tos-section ul li::before {
    content: 'x';
    position: absolute;
    left: 0;
    color: var(--teal);
    font-weight: 900;
}

.tier-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 20px 0;
}

@media (max-width: 600px) {
    .tier-grid { grid-template-columns: 1fr; }
}

.tier-card {
    background: white;
    border: 2px solid var(--teal-pale);
    border-radius: 12px;
    padding: 20px;
}

.tier-card.featured {
    border-color: var(--teal);
    background: var(--teal-pale);
}

.tier-name {
    font-family: var(--font);
    font-weight: 900;
    font-size: 1rem;
    color: var(--teal);
    margin-bottom: 4px;
}

.tier-price {
    font-family: var(--font);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--teal);
    margin-bottom: 2px;
}

.tier-price-alt {
    font-size: 0.8rem;
    color: var(--ink-soft);
    margin-bottom: 14px;
}

.tos-important {
    background: #fff8f5;
    border: 1px solid #f0c8b0;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 16px 0;
    font-size: 0.875rem;
    color: var(--ink-mid);
}

.tos-important strong {
    color: var(--terra);
    display: block;
    margin-bottom: 4px;
}

.tos-legal {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 16px 0;
    font-size: 0.8rem;
    color: var(--ink-soft);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.tos-contact {
    background: var(--teal);
    color: white;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    margin-top: 48px;
}

.tos-contact h2 {
    font-family: var(--font);
    font-weight: 900;
    font-size: 1.25rem;
    color: white !important;
    margin-bottom: 12px;
}

.tos-contact p {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.tos-contact a {
    color: #7dd4cc;
    text-decoration: none;
    font-weight: 700;
}

.tos-contact a:hover { text-decoration: underline; }

.tos-footer {
    text-align: center;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--teal-pale);
    font-size: 0.8rem;
    color: var(--ink-soft);
}