/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
	padding-top: calc(70px + env(safe-area-inset-top));
	padding-bottom: calc(60px + env(safe-area-inset-bottom));
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

/* =========================================================
   COLORI E VARIABILI
   ========================================================= */

:root {
    --bg: #121212;
    --header: #181818;
    --card: #1c1c1c;
    --hover: #242424;
    --orange: #ff6c00;
    --white: #fff;
    --text: #eee;
    --muted: #aaa;
    --border: #303030;
}


/* =========================================================
   BASE
   ========================================================= */

button,
a {
    font: inherit;
}

button {
    border: 0;
}


/* =========================================================
   HEADER
   ========================================================= */

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;

	height: calc(70px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 18px 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: var(--header);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;

    color: var(--white);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;

    cursor: pointer;
}

.logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
}


/* =========================================================
   MENU BUTTON
   ========================================================= */

.menu-button {
    width: 46px;
    height: 46px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    background: transparent;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 25px;
    height: 2px;

    background: var(--white);
    transition: 0.2s;
}

.menu-button.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-button.open span:nth-child(2) {
    opacity: 0;
}

.menu-button.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* =========================================================
   MENU LATERALE
   ========================================================= */

.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1090;

    background: rgba(0, 0, 0, 0.6);

    opacity: 0;
    visibility: hidden;
    transition: 0.25s;
}

.menu-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.side-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;

    width: min(320px, 85vw);
    padding: 88px 16px 20px;

    background: var(--header);
    border-left: 1px solid var(--border);

    transform: translateX(100%);
    transition: 0.25s;

    overflow-y: auto;
}

.side-menu.open {
    transform: translateX(0);
}

.menu-title {
    margin: 0 12px 20px;

    color: var(--orange);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
}

.side-menu button {
    width: 100%;

    display: flex;
    align-items: center;
    gap: 14px;

    margin-bottom: 4px;
    padding: 15px 12px;

    color: var(--text);
    text-align: left;

    background: transparent;
    border-radius: 8px;

    cursor: pointer;
}

.side-menu button:hover {
    background: var(--hover);
    color: var(--orange);
}


/* =========================================================
   CONTENUTO PRINCIPALE
   ========================================================= */

main {
    width: min(100%, 900px);
    margin: auto;
    padding: 28px 18px;
}

.page-section {
    display: none;
    animation: fadeIn 0.25s ease;
}

.page-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    padding: 28px 4px 32px;
    text-align: center;
}

.hero h1 {
    margin-bottom: 14px;

    color: var(--orange);
    font-size: clamp(28px, 6vw, 42px);
}

.hero p {
    max-width: 680px;
    margin: auto;

    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}


/* =========================================================
   HOME / HUB
   ========================================================= */

.hub-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.hub-card {
    min-height: 145px;
    padding: 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;

    color: var(--white);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;

    cursor: pointer;

    font-size: 16px;
    font-weight: 700;

    transition: 0.2s;
}

.hub-card:first-letter {
    font-size: 38px;
}

.hub-card:hover {
    background: var(--hover);
    border-color: var(--orange);
    transform: translateY(-2px);
}

/* =========================================================
   CARD CONTENUTO
   ========================================================= */

.content-card {
    padding: 26px;

    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.content-card h2 {
    margin-bottom: 18px;

    color: var(--orange);
    font-size: 30px;
}

.content-card h3 {
    margin: 22px 0 10px;

    color: var(--white);
    font-size: 22px;
}

.content-card p {
    margin-bottom: 18px;

    color: var(--text);
    line-height: 1.7;
}

.section-icon {
    margin-bottom: 12px;
    font-size: 42px;
}


/* =========================================================
   IMMAGINE PLACEHOLDER
   ========================================================= */

.placeholder-photo {
    width: min(100%, 300px);
    aspect-ratio: 1;

    margin: 0 auto 28px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;

    background: #151515;
    border: 1px dashed #444;
    border-radius: 12px;

    color: var(--muted);
    font-size: 48px;
}

.placeholder-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.placeholder-photo small {
    font-size: 13px;
}


/* =========================================================
   LISTA LINK / PULSANTI
   ========================================================= */

.link-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-button {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    color: var(--white);
    text-decoration: none;

    background: #252525;
    border: 1px solid var(--border);
    border-radius: 8px;

    cursor: pointer;

    transition: 0.2s;
}

.action-button:hover {
    background: var(--hover);
    border-color: var(--orange);
}

.action-button.disabled {
    color: #777;
    cursor: default;
    opacity: 0.7;
}


/* =========================================================
   PULSANTE INDIETRO
   ========================================================= */

.back-button {
    display: block;

    width: 100%;
    box-sizing: border-box;

    margin: 15px auto;
    padding: 16px 16px;

    color: var(--white);
    background: var(--orange);

    text-decoration: none;
    text-align: center;

    border-radius: 8px;

    font-weight: bold;

    transition: 0.2s;
}

.back-button:hover {
    opacity: 0.9;
}

.back-button:active {
    opacity: 0.8;
}

/* =========================================================
   LINEA DIVISORIA
   ========================================================= */

.orange-line {
    display: flex;
    justify-content: center;
    gap: 16px;

    margin-top: 24px;
    padding-top: 20px;

    border-top: 1px solid var(--orange);
}

.grey-line {
    display: flex;
    justify-content: center;
    gap: 16px;

    margin-top: 24px;
    padding-top: 20px;

    border-top: 1px solid var(--border);
}

/* =========================
   CHI SONO
   ========================= */

.about-photo {
    width: 300px;
    aspect-ratio: 1;

    margin: 0 0 28px 0;

    overflow: hidden;
    border-radius: 12px;
}

.about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* =========================
   COMPAGNI ANIMALI
   ========================= */

.pet-info strong{
  color:var(--orange);
  font-size: 20px;
}

.pet-photo {
    width: 300px;
    aspect-ratio: 1;

    margin: 0 0 28px 0;

    overflow: hidden;
    border-radius: 12px;
}

.pet-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* =========================================================
   APP
   ========================================================= */

.app-item {
    display: flex;
    gap: 18px;

    margin-top: 18px;
    padding: 18px;

    background: #171717;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.app-logo-placeholder {
    width: 78px;
    height: 78px;
    flex: 0 0 78px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #222;
    border-radius: 16px;

    font-size: 36px;
}

.app-info {
    flex: 1;
}

.app-info h3 {
    margin: 0 0 8px;
}

.app-info p {
    margin-bottom: 12px;
    color: var(--muted);
}


/* =========================================================
   ELEMENTI DEL GIOCO
   ========================================================= */

.game-elements {
    display: flex;
    justify-content: center;
    gap: 16px;

    margin-top: 24px;
    padding-top: 20px;

    border-top: 1px solid var(--border);

    font-size: 32px;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;

    min-height: calc(52px + env(safe-area-inset-bottom));
    padding: 0 16px env(safe-area-inset-bottom);

    display: flex;
    align-items: center;
    justify-content: center;

    color: #888;
    font-size: 12px;
    text-align: center;

    background: var(--header);
    border-top: 1px solid var(--border);
}

.footer-roarking {
	padding-right: 5px;
	color: var(--orange);
}

/* =========================================================
   TABLET / DESKTOP
   ========================================================= */

@media (min-width: 700px) {

    .hub-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

	/*
    .hub-card:last-child {
        grid-column: 2;
    }
	*/
}


/* =========================================================
   SMARTPHONE
   ========================================================= */

@media (max-width: 480px) {

    body {
		padding-top: calc(64px + env(safe-area-inset-top));
		padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }

    .app-header {
		height: calc(64px + env(safe-area-inset-top));
		padding: env(safe-area-inset-top) 12px 0;
    }

    .brand {
        gap: 9px;
        font-size: 15px;
    }

    .logo {
        width: 38px;
        height: 38px;
    }

    main {
        padding: 18px 12px;
    }

    .hero {
        padding: 15px 4px 24px;
    }

    .hub-grid {
        gap: 10px;
    }

    .hub-card {
        min-height: 125px;
        padding: 15px 8px;
        font-size: 14px;
    }

    .content-card {
        padding: 20px 16px;
    }

    .content-card h2 {
        font-size: 26px;
    }

    .app-item {
        flex-direction: column;
    }
	
	.about-photo {
		width: min(100%, 300px);
		aspect-ratio: 1;

		margin: 0 auto 28px;

		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 8px;

		background: #151515;
		border: 1px dashed #444;
		border-radius: 12px;

		color: var(--muted);
		font-size: 48px;
	}

	.about-photo img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		border-radius: 12px;
	}
	
	.pet-photo{
		width: min(100%, 300px);
		aspect-ratio: 1;

		margin: 0 auto 28px;

		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 8px;

		background: #151515;
		border: 1px dashed #444;
		border-radius: 12px;

		color: var(--muted);
		font-size: 48px;
	}

	.pet-photo img{
		width: 100%;
		height: 100%;
		object-fit: cover;
		border-radius: 12px;
	}
}