/*
Theme Name: Roosisia Cloud
Theme URI: https://roosisia.cloud
Author: Roosisia
Description: A bold, tech-forward SaaS platform theme for the Roosisia Cloud ecosystem featuring deep navy foundations, vivid blue accents, and tight typographic precision with Space Grotesk, DM Sans, and Syne.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: roosisia-cloud
Tags: full-site-editing, block-themes, saas, dark, modern, one-column
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
*/

/* ----------------------------------------------------------------
   Base & Reset
   ---------------------------------------------------------------- */

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

:root,
body,
.wp-site-blocks {
    overflow: visible;
}

/* ----------------------------------------------------------------
   Typography polish
   ---------------------------------------------------------------- */

body,
.wp-site-blocks {
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--medium);
    line-height: 1.6;
    color: var(--wp--preset--color--text);
}

h1, h2, h3, h4, h5, h6,
.wp-block-heading {
    font-family: var(--wp--preset--font-family--display);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--wp--preset--color--text);
}

h1,
.wp-block-heading:where(.has-display-font-size) {
    font-weight: 800;
}

p {
    margin-block-start: 0;
    margin-block-end: 1em;
}

p:last-child {
    margin-block-end: 0;
}

/* Muted secondary text utility */
.has-muted-color {
    color: var(--wp--preset--color--muted);
}

/* Eyebrow / label typography */
.eyebrow,
.wp-block-paragraph.eyebrow,
.has-label-font-family {
    font-family: var(--wp--preset--font-family--label);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--wp--preset--color--accent);
    line-height: 1.4;
}

/* ----------------------------------------------------------------
   Links
   ---------------------------------------------------------------- */

a {
    color: var(--wp--preset--color--accent);
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover,
a:focus-visible {
    color: var(--wp--preset--color--accent-hover);
}

/* Underline on prose links inside entries / page content */
.entry-content a:not(.wp-block-button__link):not(.wp-block-navigation-item__content),
.wp-block-post-content a:not(.wp-block-button__link):not(.wp-block-navigation-item__content) {
    text-decoration: underline;
    text-decoration-color: var(--wp--preset--color--accent);
    text-underline-offset: 0.2em;
    text-decoration-thickness: 1px;
    transition: color 0.25s ease, text-decoration-color 0.25s ease;
}

.entry-content a:not(.wp-block-button__link):hover,
.wp-block-post-content a:not(.wp-block-button__link):hover {
    text-decoration-color: var(--wp--preset--color--accent-hover);
}

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

.wp-block-button__link,
.wp-element-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    font-family: var(--wp--preset--font-family--body);
    font-weight: 600;
    font-size: var(--wp--preset--font-size--medium);
    line-height: 1.4;
    color: var(--wp--preset--color--text);
    background-color: var(--wp--preset--color--accent);
    border: 2px solid transparent;
    border-radius: 100px;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.3s ease;
    box-shadow: 0 4px 14px rgba(45, 140, 255, 0.2);
}

.wp-block-button__link:hover,
.wp-block-button__link:focus-visible,
.wp-element-button:hover,
.wp-element-button:focus-visible {
    background-color: var(--wp--preset--color--accent-hover);
    color: var(--wp--preset--color--text);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45, 140, 255, 0.3);
}

.wp-block-button__link:active,
.wp-element-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(45, 140, 255, 0.15);
}

/* Outline button variant */
.wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    color: var(--wp--preset--color--accent);
    border-color: var(--wp--preset--color--accent);
    box-shadow: none;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus-visible {
    background-color: var(--wp--preset--color--accent);
    color: var(--wp--preset--color--text);
    border-color: var(--wp--preset--color--accent);
    box-shadow: 0 8px 24px rgba(45, 140, 255, 0.3);
}

/* ----------------------------------------------------------------
   Navigation
   ---------------------------------------------------------------- */

.wp-block-navigation-item__content {
    position: relative;
    transition: color 0.3s ease;
}

.wp-block-navigation-item__content:hover {
    color: var(--wp--preset--color--text);
}

/* Active nav dot (matching reference design) */
.wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--wp--preset--color--accent);
    box-shadow: 0 0 8px var(--wp--preset--color--accent);
}

/* Mobile hamburger overlay */
.wp-block-navigation__responsive-container.is-menu-open {
    padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    gap: var(--wp--preset--spacing--40);
    align-items: flex-start;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    font-size: var(--wp--preset--font-size--large);
}

/* ----------------------------------------------------------------
   Site Title
   ---------------------------------------------------------------- */

.wp-block-site-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.wp-block-site-title a:hover {
    color: var(--wp--preset--color--accent);
}

/* ----------------------------------------------------------------
   Header
   ---------------------------------------------------------------- */

.site-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* ----------------------------------------------------------------
   Cover block (hero)
   ---------------------------------------------------------------- */

.wp-block-cover {
    overflow: hidden;
}

.wp-block-cover .wp-block-cover__inner-container {
    position: relative;
    z-index: 2;
}

/* ----------------------------------------------------------------
   Images
   ---------------------------------------------------------------- */

.wp-block-image img,
.wp-block-cover img {
    display: block;
    max-width: 100%;
    height: auto;
}

.wp-block-image img {
    border-radius: 12px;
}

.wp-block-image figcaption {
    color: var(--wp--preset--color--muted);
    font-size: var(--wp--preset--font-size--small);
    margin-top: 0.5em;
}

/* Browser mockup styling */
.browser-mockup {
    background-color: var(--wp--preset--color--surface);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 120px rgba(45, 140, 255, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.browser-chrome-bar {
    height: 48px;
    background-color: var(--wp--preset--color--chrome);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    gap: 8px;
}

.chrome-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--wp--preset--color--border-subtle);
}

.browser-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--wp--preset--color--background);
}

.browser-viewport img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left top;
    opacity: 0.9;
}

/* ----------------------------------------------------------------
   Cards / Surface panels
   ---------------------------------------------------------------- */

.has-surface-background-color {
    border: 1px solid var(--wp--preset--color--border-subtle);
    border-radius: 12px;
}

/* Card-like groups on surface background */
.wp-block-group.has-surface-background-color {
    border: 1px solid var(--wp--preset--color--border-subtle);
    border-radius: 12px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.wp-block-group.has-surface-background-color:hover {
    border-color: rgba(45, 140, 255, 0.2);
    box-shadow: 0 0 40px rgba(45, 140, 255, 0.06);
}

/* ----------------------------------------------------------------
   Separator
   ---------------------------------------------------------------- */

.wp-block-separator {
    border-color: var(--wp--preset--color--border-subtle);
    opacity: 1;
}

.wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
    max-width: 120px;
}

/* ----------------------------------------------------------------
   Quote
   ---------------------------------------------------------------- */

.wp-block-quote {
    border-left: 3px solid var(--wp--preset--color--accent);
    padding-left: var(--wp--preset--spacing--40);
}

.wp-block-quote cite {
    display: block;
    margin-top: 1em;
    font-size: var(--wp--preset--font-size--small);
    font-style: normal;
    color: var(--wp--preset--color--muted);
    font-family: var(--wp--preset--font-family--label);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ----------------------------------------------------------------
   Code
   ---------------------------------------------------------------- */

.wp-block-code {
    font-size: var(--wp--preset--font-size--small);
    line-height: 1.7;
    overflow-x: auto;
}

code,
kbd,
pre {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* Inline code */
:not(pre) > code {
    background-color: var(--wp--preset--color--surface);
    color: var(--wp--preset--color--accent);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.875em;
}

/* ----------------------------------------------------------------
   Columns
   ---------------------------------------------------------------- */

@media (max-width: 781px) {
    .wp-block-columns {
        flex-direction: column;
    }
}

/* ----------------------------------------------------------------
   Post template / Query Loop
   ---------------------------------------------------------------- */

.wp-block-post-template .wp-block-post-featured-image img {
    border-radius: 12px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    width: 100%;
}

.wp-block-post-template .wp-block-post-title a {
    text-decoration: none;
    color: var(--wp--preset--color--text);
    transition: color 0.3s ease;
}

.wp-block-post-template .wp-block-post-title a:hover {
    color: var(--wp--preset--color--accent);
}

/* ----------------------------------------------------------------
   Glow accent utility
   ---------------------------------------------------------------- */

.has-glow-background-color {
    box-shadow: 0 0 80px rgba(45, 140, 255, 0.12);
}

/* Subtle radial glow for hero sections */
.hero-glow {
    background:
        radial-gradient(circle at 0% 50%, rgba(45, 140, 255, 0.05) 0%, transparent 50%),
        var(--wp--preset--color--background);
}

/* ----------------------------------------------------------------
   Focus styles (accessibility)
   ---------------------------------------------------------------- */

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

.wp-block-button__link:focus-visible {
    outline-offset: 4px;
}

/* ----------------------------------------------------------------
   Selection
   ---------------------------------------------------------------- */

::selection {
    background-color: var(--wp--preset--color--accent);
    color: var(--wp--preset--color--text);
}

/* ----------------------------------------------------------------
   Scrollbar
   ---------------------------------------------------------------- */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--wp--preset--color--background);
}

::-webkit-scrollbar-thumb {
    background: var(--wp--preset--color--border-subtle);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--wp--preset--color--muted);
}

/* ----------------------------------------------------------------
   Table
   ---------------------------------------------------------------- */

.wp-block-table table {
    border-collapse: collapse;
    width: 100%;
}

.wp-block-table th,
.wp-block-table td {
    padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
    border-bottom: 1px solid var(--wp--preset--color--border-subtle);
    text-align: left;
}

.wp-block-table th {
    font-family: var(--wp--preset--font-family--label);
    font-size: var(--wp--preset--font-size--small);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--wp--preset--color--muted);
}

.wp-block-table td {
    color: var(--wp--preset--color--text);
}

.wp-block-table thead {
    border-bottom: 2px solid var(--wp--preset--color--border-subtle);
}

/* ----------------------------------------------------------------
   Details / Accordion (FAQ)
   ---------------------------------------------------------------- */

.wp-block-details {
    border: 1px solid var(--wp--preset--color--border-subtle);
    border-radius: 8px;
    padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
    transition: border-color 0.3s ease;
}

.wp-block-details[open] {
    border-color: rgba(45, 140, 255, 0.3);
}

.wp-block-details summary {
    font-family: var(--wp--preset--font-family--display);
    font-weight: 600;
    font-size: var(--wp--preset--font-size--large);
    cursor: pointer;
    color: var(--wp--preset--color--text);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wp-block-details summary::-webkit-details-marker {
    display: none;
}

.wp-block-details summary::after {
    content: '+';
    font-size: 1.25em;
    color: var(--wp--preset--color--accent);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1em;
}

.wp-block-details[open] summary::after {
    transform: rotate(45deg);
}

/* ----------------------------------------------------------------
   Gallery
   ---------------------------------------------------------------- */

.wp-block-gallery .wp-block-image img {
    border-radius: 8px;
}

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

.wp-block-template-part[data-area="footer"] a {
    color: var(--wp--preset--color--accent);
    text-decoration: none;
    transition: color 0.25s ease;
}

.wp-block-template-part[data-area="footer"] a:hover {
    color: var(--wp--preset--color--accent-hover);
}

/* ----------------------------------------------------------------
   Spacing helpers for consistent vertical rhythm
   ---------------------------------------------------------------- */

.wp-site-blocks > * + * {
    margin-block-start: 0;
}

/* ----------------------------------------------------------------
   Loop layout utilities
   ---------------------------------------------------------------- */
/* These classes are wired to the wp:query blocks emitted by content/pages and
   templates. Do not rename. Tune colours and spacing to theme.json tokens. */

/* Horizontal scrollable rail */
.wp-block-query.is-style-loop-rail .wp-block-post-template {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    padding-bottom: var(--wp--preset--spacing--20);
}
.wp-block-query.is-style-loop-rail .wp-block-post-template > * {
    flex: 0 0 320px;
    scroll-snap-align: start;
}

/* Compact list with hairline row dividers */
.wp-block-query.is-style-loop-list .wp-block-post-template > * {
    border-bottom: 1px solid var(--wp--preset--color--border-subtle);
    padding-block: var(--wp--preset--spacing--30);
}
.wp-block-query.is-style-loop-list .wp-block-post-template > *:last-child {
    border-bottom: 0;
}

/* Zigzag — flip the columns inside every even entry */
.wp-block-query.is-style-loop-zigzag .wp-block-post-template > *:nth-child(even) .wp-block-columns {
    flex-direction: row-reverse;
}

/* Timeline — vertical line with node markers per entry */
.wp-block-query.is-style-loop-timeline .wp-block-post-template {
    position: relative;
    padding-inline-start: 2.5rem;
}
.wp-block-query.is-style-loop-timeline .wp-block-post-template::before {
    content: '';
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0.5rem;
    width: 2px;
    background: var(--wp--preset--color--border-subtle);
    opacity: 0.5;
}
.wp-block-query.is-style-loop-timeline .wp-block-post-template > * {
    position: relative;
}
.wp-block-query.is-style-loop-timeline .wp-block-post-template > *::before {
    content: '';
    position: absolute;
    inset-inline-start: -2.25rem;
    inset-block-start: 0.6rem;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--wp--preset--color--accent);
    border-radius: 50%;
    background: var(--wp--preset--color--background);
}

/* Magazine — first child spans 2 columns of the grid */
.wp-block-query.is-style-loop-magazine .wp-block-post-template > *:first-child {
    grid-column: span 2;
}
@media (max-width: 600px) {
    .wp-block-query.is-style-loop-magazine .wp-block-post-template > *:first-child {
        grid-column: auto;
    }
}

/* ----------------------------------------------------------------
   Animations — subtle entrance for interactive elements
   ---------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
    .wp-block-group.has-surface-background-color,
    .wp-block-details,
    .wp-block-image {
        transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    }
}