/* ================================================
   VARIABLES & RESET
================================================ */
:root {
  --color-bg:           #111111;
  --color-surface:      #1e1e1e;
  --color-accent:       #D4873A;
  --color-accent-light: #E8A55A;
  --color-text:         #F0EDE8;
  --color-text-muted:   #9A9A9A;
  --color-chartreux:    #7A8A96;
  --color-border:       #2a2a2a;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Lato', system-ui, sans-serif;

  --nav-height:      80px;
  --max-width:       1200px;
  --section-padding: clamp(3.5rem, 8vw, 7rem);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.75;
  font-size: 1rem;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* ================================================
   TYPOGRAPHY
================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: clamp(2.4rem, 6vw,  4.8rem); }
h2 { font-size: clamp(1.9rem, 4vw,  3.2rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 2rem);  }
h4 { font-size: clamp(1.05rem, 1.8vw, 1.35rem); }

p {
  font-size: clamp(0.93rem, 1.4vw, 1.05rem);
  margin-bottom: 1.25rem;
}
p:last-child { margin-bottom: 0; }

.text-muted  { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }

/* ================================================
   LAYOUT
================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

section { padding: var(--section-padding) 0; }

.section-alt { background: var(--color-surface); }

/* ================================================
   HEADER & NAV
================================================ */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(17, 17, 17, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  gap: 1.5rem;
}

.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { height: 46px; width: auto; }
.logo-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text);
}

.nav-links {
  display: flex;
  gap: clamp(1rem, 2vw, 1.8rem);
  align-items: center;
}

.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color 0.2s;
  position: relative;
  white-space: nowrap;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--color-accent);
  transition: width 0.3s;
}

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

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.lang-switch a { color: var(--color-text-muted); transition: color 0.2s; }
.lang-switch a.current,
.lang-switch a:hover  { color: var(--color-accent); }
.lang-switch span     { color: var(--color-border); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--color-text);
  line-height: 1;
}

/* ================================================
   HERO
================================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(17,17,17,0.25) 0%,
    rgba(17,17,17,0.5)  55%,
    rgba(17,17,17,0.88) 100%
  );
}

.hero-content {
  position: relative;
  text-align: center;
  padding: var(--nav-height) 1.5rem 0;
  max-width: 860px;
}

.hero-content h1 { margin-bottom: 1rem; }
.hero-content .hero-sub {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
  font-style: italic;
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
}

.scroll-hint svg { width: 18px; height: 18px; }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ================================================
   BUTTONS
================================================ */
.btn {
  display: inline-block;
  padding: 0.7rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  transition: background 0.25s, color 0.25s;
}

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

/* ================================================
   PAGE HEADER (pagine interne)
================================================ */
.page-header {
  padding-top: calc(var(--nav-height) + 4.5rem);
  padding-bottom: 3.5rem;
  text-align: center;
}

.page-header h1   { margin-bottom: 0.6rem; }
.page-header .sub {
  color: var(--color-text-muted);
  font-style: italic;
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2vw, 1.3rem);
  max-width: 600px;
  margin: 0 auto;
}

.page-header + section,
.page-header + .section-alt { border-top: 1px solid var(--color-border); }

/* ================================================
   SECTION TITLE
================================================ */
.section-title {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.section-title h2  { margin-bottom: 0.5rem; }
.section-title p   { color: var(--color-text-muted); max-width: 600px; margin: 0 auto; }

.divider {
  width: 50px; height: 1px;
  background: var(--color-accent);
  margin: 0.9rem auto;
}

/* ================================================
   INTRO (lead paragraph)
================================================ */
p.intro {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 300;
  line-height: 1.65;
  text-align: center;
  max-width: 820px;
  margin: 0 auto 3.5rem;
  color: var(--color-text);
}

/* ================================================
   TWO-COLUMN INTRO (homepage: foto + testo)
================================================ */
.intro-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.intro-split img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.intro-split .text h3 { margin-bottom: 1rem; }
.intro-split .text p  { color: var(--color-text-muted); margin-bottom: 1.5rem; }

/* ================================================
   CAT PREVIEW CARDS (homepage)
================================================ */
.cats-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .cats-preview { grid-template-columns: repeat(4, 1fr); }
}

.cat-preview-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
}

.cat-preview-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
  background: var(--color-surface);
}

.cat-preview-card:hover img { transform: scale(1.06); }

.cat-preview-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17,17,17,0.88) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
}

.cat-preview-overlay h3 {
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin-bottom: 0.2rem;
}

.cat-preview-overlay p {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ================================================
   CARATTERISTICHE (3 colonne)
================================================ */
.caratteristiche {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 3rem;
  text-align: center;
}

.caratteristica img {
  width: 180px; height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.25rem;
  border: 1px solid var(--color-accent);
  background: var(--color-surface);
}

.caratteristica h4 {
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
  font-size: 1.15rem;
}

.caratteristica p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  max-width: 280px;
  margin: 0 auto;
}

/* ================================================
   TEXT SECTION (Chi siamo, Storia)
================================================ */
.text-section {
  max-width: 780px;
  margin: 0 auto;
}

.text-section h4 {
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  margin-top: 2.5rem;
  font-size: 1.25rem;
}

.text-section h4:first-child { margin-top: 0; }

.text-section p { color: var(--color-text-muted); }

/* ================================================
   TABS (I nostri gatti)
================================================ */
.tabs-nav {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 3.5rem;
  border-bottom: 1px solid var(--color-border);
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: -1px;
}

.tab-btn:hover        { color: var(--color-text); }
.tab-btn.active       { color: var(--color-accent); border-bottom-color: var(--color-accent); }

.tab-panel            { display: none; }
.tab-panel.active     { display: block; }

/* ================================================
   CAT CARDS GRID
================================================ */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.cat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s;
}

.cat-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-accent);
}

.cat-card-img {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--color-bg);
}

.cat-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.cat-card:hover .cat-card-img img { transform: scale(1.04); }

.cat-card-body { padding: 1.5rem; }

.cat-card-body h3 {
  font-size: 1.45rem;
  margin-bottom: 0.5rem;
}

.cat-card-body p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.pedigree-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  transition: opacity 0.2s;
}

.pedigree-link:hover { opacity: 0.7; }
.pedigree-link svg   { width: 14px; height: 14px; }

/* ================================================
   GALLERY GRID
================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.6rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  background: var(--color-surface);
}

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.gallery-item:hover img { transform: scale(1.06); }

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17,17,17,0.35);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover .gallery-item-overlay { opacity: 1; }

.gallery-item-overlay svg {
  width: 38px; height: 38px;
  color: var(--color-text);
}

.gallery-empty {
  text-align: center;
  padding: 6rem 2rem;
  color: var(--color-text-muted);
}

.gallery-empty p { font-family: var(--font-serif); font-size: 1.3rem; }

/* ================================================
   LIGHTBOX
================================================ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.94);
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem; right: 2rem;
  background: none; border: none;
  color: var(--color-text);
  cursor: pointer;
  font-size: 2.2rem;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  cursor: pointer;
  padding: 0.7rem 1rem;
  font-size: 1.2rem;
  opacity: 0.6;
  transition: opacity 0.2s, border-color 0.2s;
}

.lightbox-btn:hover { opacity: 1; border-color: var(--color-accent); }
#lightbox-prev      { left: 1.5rem; }
#lightbox-next      { right: 1.5rem; }

/* ================================================
   CONTACT
================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 5rem;
  align-items: start;
}

.contact-block { margin-bottom: 2.5rem; }
.contact-block:last-child { margin-bottom: 0; }

.contact-block h3 {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.contact-block p { color: var(--color-text-muted); }
.contact-block a { color: var(--color-accent); transition: opacity 0.2s; }
.contact-block a:hover { opacity: 0.7; }

form label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.45rem;
}

form input,
form textarea {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 300;
  margin-bottom: 1.5rem;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

form input:focus,
form textarea:focus { border-color: var(--color-accent); }

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

form button[type="submit"] {
  display: inline-block;
  padding: 0.75rem 2.5rem;
  background: var(--color-accent);
  color: var(--color-bg);
  border: 1px solid var(--color-accent);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
}

form button[type="submit"]:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent-light);
}

/* ================================================
   INLINE PORTRAIT (Chi siamo)
================================================ */
.inline-portrait {
  width: 220px;
  height: 220px;
  object-fit: cover;
  display: block;
  margin-bottom: 1rem;
}

.inline-portrait--right {
  float: right;
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.inline-portrait--left {
  float: left;
  margin-right: 2rem;
  margin-bottom: 1rem;
}

.text-section::after {
  content: '';
  display: table;
  clear: both;
}

@media (max-width: 560px) {
  .inline-portrait {
    float: none;
    width: 100%;
    height: 260px;
    margin: 0 0 1.5rem 0;
  }
}

/* ================================================
   FOOTER
================================================ */
footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 2.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-logo img          { height: 38px; margin: 0 auto; }
.footer-logo-text {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
}

.footer-nav a {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.footer-nav a:hover { color: var(--color-accent); }

.footer-social {
  display: flex;
  gap: 1.25rem;
}

.footer-social a { color: var(--color-text-muted); transition: color 0.2s; }
.footer-social a:hover { color: var(--color-accent); }
.footer-social svg { width: 20px; height: 20px; }

.footer-copy {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
  margin-top: 0.5rem;
  width: 100%;
  text-align: center;
}

/* ================================================
   RESPONSIVE
================================================ */
@media (max-width: 960px) {
  .intro-split    { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-grid   { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(17,17,17,0.98);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 2rem 2rem;
    gap: 1.25rem;
  }

  .nav-links.open { display: flex; }
  .menu-toggle    { display: block; }

  .tabs-nav {
    flex-wrap: wrap;
    border-bottom: none;
    gap: 0.4rem;
  }

  .tab-btn {
    border: 1px solid var(--color-border);
    border-bottom-width: 1px;
    margin-bottom: 0;
  }

  .tab-btn.active {
    background: var(--color-surface);
    border-color: var(--color-accent);
    color: var(--color-accent);
  }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .cats-grid    { grid-template-columns: 1fr; }
  #lightbox-prev, #lightbox-next { display: none; }
}
