/*
Theme Name: JoyReef
Theme URI: https://www.joy-reef.com/
Author: Delpho snc
Author URI: https://www.joy-reef.com/
Description: Tema dark per Joyreef — aquarium blog & shop. Stile allineato a portal.joy-reef.com: navy profondo, accenti ciano, card scure. Compatibile con WooCommerce.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: joyreef
Tags: blog, e-commerce, dark, custom-menu, featured-images, translation-ready, woocommerce
*/

/* ============================================================
   JoyReef — design system (DARK)
   ============================================================ */
:root {
  --bg:        oklch(0.205 0.028 240);
  --bg-soft:   oklch(0.245 0.030 236);
  --surface:   oklch(0.252 0.028 236);
  --surface-2: oklch(0.285 0.030 234);
  --line:      oklch(0.62 0.03 230 / 0.20);
  --line-soft: oklch(0.62 0.03 230 / 0.12);

  --ink:       oklch(0.975 0.008 220);
  --ink-soft:  oklch(0.755 0.022 225);
  --ink-faint: oklch(0.60 0.022 230);

  --cyan:      oklch(0.82 0.115 200);
  --cyan-bri:  oklch(0.88 0.105 197);
  --cyan-deep: oklch(0.73 0.115 205);
  --teal:      var(--cyan);
  --teal-deep: var(--cyan-bri);
  --teal-ink:  oklch(0.165 0.026 240);
  --aqua:      oklch(0.85 0.10 196);
  --aqua-wash: oklch(0.55 0.08 205 / 0.16);
  --coral:     oklch(0.78 0.11 40);
  --coral-wash:oklch(0.6 0.10 40 / 0.16);
  --sand:      oklch(0.6 0.06 85 / 0.14);

  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.30), 0 2px 10px oklch(0 0 0 / 0.22);
  --shadow-md: 0 6px 20px oklch(0 0 0 / 0.35), 0 18px 50px oklch(0 0 0 / 0.30);
  --shadow-lg: 0 12px 34px oklch(0 0 0 / 0.40), 0 36px 90px oklch(0 0 0 / 0.40);

  --wrap: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font-head: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-soft);
  background-color: var(--bg);
  background-image:
    radial-gradient(1000px 560px at 10% -8%, oklch(0.55 0.13 200 / 0.14), transparent 58%),
    radial-gradient(900px 520px at 102% -2%, oklch(0.5 0.10 225 / 0.12), transparent 55%),
    linear-gradient(180deg, oklch(0.155 0.024 244), oklch(0.215 0.030 236) 42%, oklch(0.20 0.028 240));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.08; letter-spacing: -0.018em; margin: 0; color: var(--ink); text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 12px; z-index: 200; background: var(--cyan); color: #06222a; padding: 10px 16px; border-radius: 10px; font-family: var(--font-head); font-weight: 700; }

/* ---------- chips / tag ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--aqua-wash); color: var(--cyan-bri); border: 1px solid oklch(0.7 0.09 200 / 0.28); white-space: nowrap; }
.chip.coral { background: var(--coral-wash); color: oklch(0.82 0.10 45); border-color: oklch(0.7 0.1 45 / 0.28); }
.chip.sand  { background: var(--sand); color: oklch(0.86 0.07 92); border-color: oklch(0.7 0.06 88 / 0.26); }
.chip.plain { background: oklch(0.6 0.01 230 / 0.12); color: var(--ink-soft); border-color: var(--line); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-family: var(--font-head); font-weight: 700; font-size: 15px; padding: 13px 22px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease); white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cyan); color: oklch(0.18 0.03 238); box-shadow: 0 6px 22px oklch(0.7 0.12 200 / 0.28); }
.btn-primary:hover { background: var(--cyan-bri); box-shadow: 0 10px 30px oklch(0.7 0.12 200 / 0.42); transform: translateY(-2px); }
.btn-ghost { background: oklch(0.6 0.02 235 / 0.06); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: oklch(0.7 0.09 200 / 0.5); color: var(--cyan-bri); transform: translateY(-2px); }
.btn-sm { padding: 9px 15px; font-size: 13.5px; }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: baseline; font-family: var(--font-head); font-weight: 800; font-size: 23px; letter-spacing: -0.03em; text-transform: lowercase; color: var(--ink); }
.brand b { color: var(--cyan); font-weight: 800; border-bottom: 2.5px solid var(--cyan); padding-bottom: 1px; line-height: 1; }
.brand img { max-height: 38px; width: auto; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: oklch(0.18 0.026 242 / 0.72); backdrop-filter: saturate(1.3) blur(16px); border-bottom: 1px solid var(--line-soft); }
.site-header .nav { display: flex; align-items: center; gap: 28px; min-height: 70px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 8px; list-style: none; padding: 0; }
.nav-links a { font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--ink-soft); padding: 9px 13px; border-radius: 10px; transition: background .15s, color .15s; display: block; }
.nav-links a:hover, .nav-links .current-menu-item > a, .nav-links .current_page_item > a { color: var(--cyan-bri); background: oklch(0.55 0.08 205 / 0.14); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.icon-btn { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: oklch(0.6 0.02 235 / 0.06); border: 1px solid var(--line); color: var(--ink-soft); cursor: pointer; transition: all .15s; position: relative; }
.icon-btn:hover { border-color: oklch(0.7 0.09 200 / 0.5); color: var(--cyan-bri); }
.lang { font-family: var(--font-head); font-weight: 600; font-size: 13px; color: var(--ink-faint); display: flex; gap: 6px; align-items: center; }
.lang .on { color: var(--cyan-bri); }
.cart-count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--coral); color: oklch(0.2 0.03 40); font-size: 11px; font-weight: 800; display: grid; place-items: center; font-family: var(--font-head); border: 2px solid var(--bg); }
.menu-toggle { display: none; }

/* ---------- footer ---------- */
.site-footer { background: oklch(0.145 0.024 242); color: var(--ink-soft); margin-top: 90px; border-top: 1px solid var(--line-soft); }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--cyan-bri); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding: 64px 0 40px; }
.footer-grid h4 { color: var(--ink); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; font-weight: 700; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.footer-bottom { border-top: 1px solid var(--line-soft); padding: 22px 0 36px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--ink-faint); }
.legal-links { display: flex; flex-wrap: wrap; gap: 12px; }
.legal-links a { color: var(--ink-faint); }
.legal-links a:hover { color: var(--cyan-bri); }
.footer-brand { display:flex; align-items:baseline; font-family: var(--font-head); font-weight:800; font-size:22px; letter-spacing:-0.03em; text-transform:lowercase; color:var(--ink); margin-bottom:14px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 38px; height: 38px; border-radius: 10px; background: oklch(0.7 0.02 230 / 0.08); display: grid; place-items: center; transition: background .15s, color .15s; }
.footer-social a:hover { background: oklch(0.6 0.08 205 / 0.2); color: var(--cyan-bri); }

/* ---------- placeholder media ---------- */
.ph { position: relative; overflow: hidden; background: oklch(0.27 0.026 236); background-image: repeating-linear-gradient(135deg, oklch(0.30 0.028 234) 0 11px, oklch(0.255 0.024 238) 11px 22px); display: grid; place-items: center; }
.ph span { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12px; letter-spacing: 0.02em; color: var(--cyan-bri); background: oklch(0.16 0.024 240 / 0.82); padding: 5px 11px; border-radius: 999px; border: 1px solid oklch(0.6 0.08 205 / 0.30); }
.thumb-img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- section heading ---------- */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.sec-kicker { font-family: var(--font-head); font-weight: 700; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 12px; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 38px); }
.sec-head p { color: var(--ink-soft); max-width: 46ch; margin-top: 10px; }
.link-more { font-family: var(--font-head); font-weight: 700; color: var(--cyan-bri); display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.link-more:hover { gap: 10px; }

/* ---------- article card ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.acard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; display: flex; flex-direction: column; }
.acard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: oklch(0.7 0.09 200 / 0.35); }
.acard .ph { aspect-ratio: 16 / 10; }
.acard-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.acard .meta-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.acard h3 { font-size: 20px; line-height: 1.2; }
.acard h3 a:hover { color: var(--cyan-bri); }
.acard .excerpt { color: var(--ink-soft); font-size: 14.5px; }
.acard .date { margin-top: auto; font-size: 13px; color: var(--ink-faint); font-family: var(--font-head); font-weight: 500; display: flex; align-items: center; gap: 7px; }

@media (max-width: 920px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
