/*
Theme Name: True Nature Asia
Theme URI: https://truenature.asia
Author: True Nature Asia
Author URI: https://truenature.asia
Description: A warm, earthy block theme for True Nature Asia — hypoallergenic Black Soldier Fly dog food made in Da Nang, Vietnam. Forest-green and cream palette with conversion-focused landing page sections.
Version: 2.0.0
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: true-nature-asia
*/

/* ---------- Global ---------- */
.wp-site-blocks > footer { margin-block-start: 0; }
:root { --tna-shadow: 0 24px 48px -28px rgba(34,50,31,.55); }

body { -webkit-font-smoothing: antialiased; }

.wp-block-button__link { transition: transform .2s ease, background-color .2s ease; }
.wp-block-button__link:hover { transform: translateY(-2px); }

/* Secondary / outline button */
.is-style-outline .wp-block-button__link,
.btn-outline .wp-block-button__link {
  background: transparent !important;
  color: var(--wp--preset--color--forest) !important;
  border: 1.5px solid var(--wp--preset--color--forest);
}
.is-style-outline .wp-block-button__link:hover,
.btn-outline .wp-block-button__link:hover {
  background: var(--wp--preset--color--forest) !important;
  color: var(--wp--preset--color--light) !important;
}
.btn-on-dark .wp-block-button__link {
  background: var(--wp--preset--color--honey) !important;
  color: var(--wp--preset--color--forest-deep) !important;
}

/* ---------- Header ---------- */
.tna-header { position: sticky; top: 0; z-index: 100; backdrop-filter: blur(10px); }
.tna-header .wp-block-site-logo img { width: 52px; height: auto; }
.tna-header .wp-block-navigation { font-family: var(--wp--preset--font-family--body); font-weight: 600; }
.tna-header .wp-block-navigation a:hover { color: var(--wp--preset--color--accent); }

/* ---------- Header right (lang switcher + CTA) ---------- */
.tna-headright { align-items: center; }
/* Custom EN|VI toggle */
.tna-lang-toggle { display: flex; align-items: center; gap: .3rem; }
.tna-lang-toggle__link {
  font-family: var(--wp--preset--font-family--body);
  font-weight: 700; font-size: .82rem; letter-spacing: .06em;
  color: var(--wp--preset--color--forest);
  text-decoration: none; padding: .2rem .1rem; line-height: 1;
  transition: color .15s;
}
.tna-lang-toggle__link:hover,
.tna-lang-toggle__link[aria-current="true"] { color: var(--wp--preset--color--accent); }
.tna-lang-toggle__sep { color: var(--wp--preset--color--forest); opacity: .35; font-size: .78rem; line-height: 1; }

/* ---------- Eyebrow / kicker ---------- */
.tna-kicker {
  text-transform: uppercase; letter-spacing: .2em; font-size: .78rem;
  font-weight: 700; color: var(--wp--preset--color--accent);
}
.tna-kicker.on-dark { color: var(--wp--preset--color--honey); }

/* ---------- Hero (light split) ---------- */
.tna-hero-split { position: relative; overflow: hidden; }
.tna-hero-media { position: relative; }
.tna-hero-media img {
  border-radius: 26px; box-shadow: var(--tna-shadow);
  width: 100%; height: 100%; max-height: 560px; object-fit: cover;
}
.tna-disc {
  position: absolute; top: -18px; right: -10px; z-index: 5;
  width: 116px; height: 116px; border-radius: 50%;
  background: var(--wp--preset--color--accent); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; font-weight: 800; line-height: 1.05; transform: rotate(8deg);
  box-shadow: 0 16px 30px -10px rgba(0,0,0,.4); font-size: 1.6rem;
}
.tna-disc small { display: block; font-size: .62rem; letter-spacing: .12em; margin-top: 4px; }
html[lang="vi"] .tna-disc p { font-size: 1.05rem !important; }
@media (max-width: 781px){ .tna-disc { width: 86px; height: 86px; font-size: 1.15rem; top: -10px; right: 6px; } }

/* ---------- Trust ribbon ---------- */
.tna-ribbon { border-top: 1px solid rgba(255,255,255,.12); }
.tna-ribbon p { margin: 0; font-weight: 600; font-size: .92rem; }
.tna-ribbon .wp-block-column { display: flex; align-items: center; justify-content: center; gap: .5rem; }

/* ---------- Cards (rounded, lift) ---------- */
.tna-card {
  border-radius: 22px; overflow: hidden; height: 100%;
  border: 1px solid rgba(34,50,31,.08); transition: transform .25s ease, box-shadow .25s ease;
}
.tna-card:hover { transform: translateY(-6px); box-shadow: var(--tna-shadow); }
.tna-card img { display: block; width: 100%; height: 220px; object-fit: cover; }
.tna-ph {
  height: 220px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--wp--preset--color--surface), var(--wp--preset--color--sage));
}
.tna-ph p { margin: 0; }
.tna-bulk-hint { font-size: .82rem; color: var(--wp--preset--color--accent); font-weight: 600; }

.tna-ribbon-tag {
  display: inline-block; background: var(--wp--preset--color--accent); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 30px;
}

/* Equal cards */
.equal-cards > .wp-block-column { display: flex; flex-direction: column; flex-grow: 0; }
.equal-cards > .wp-block-column > .wp-block-group { display: flex; flex-direction: column; flex-grow: 1; height: 100%; }
.equal-cards .cta-bottom { margin-top: auto; }

/* ---------- BSF bento ---------- */
.tna-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 18px;
  margin-top: 1rem;
}
.tna-bento > * { margin: 0; }
.tna-bento-feature {
  grid-column: span 2;
  grid-row: span 2;
  border-radius: 26px;
  padding: 2.6rem;
  background:
    radial-gradient(circle at 85% 12%, rgba(138,160,78,.35), transparent 45%),
    linear-gradient(155deg, var(--wp--preset--color--forest), var(--wp--preset--color--forest-deep));
  color: var(--wp--preset--color--light);
  display: flex; flex-direction: column; justify-content: space-between; gap: 1.75rem;
  position: relative; overflow: hidden;
}
.tna-bento-feature h3 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.12; }
.tna-bento-stat { gap: 2.5rem !important; }
.tna-stat-num {
  font-family: var(--wp--preset--font-family--heading);
  font-size: 2.6rem; font-weight: 600; line-height: 1;
  color: var(--wp--preset--color--honey); margin: 0;
}
.tna-stat-label { font-size: .82rem; color: #cfd8c2; margin: .35rem 0 0; max-width: 18ch; }

.tna-bento-cell {
  border-radius: 26px;
  padding: 2rem 1.8rem;
  background: var(--wp--preset--color--light);
  border: 1px solid rgba(34,50,31,.07);
}
.tna-bento-cell--accent { background: var(--wp--preset--color--sage); }
.tna-bento-cell--accent .tna-chip { background: rgba(255,255,255,.45); }
.tna-bento-cell--accent h3, .tna-bento-cell--accent p { color: var(--wp--preset--color--forest-deep); }

@media (max-width: 900px) {
  .tna-bento { grid-template-columns: 1fr 1fr; }
  .tna-bento-feature { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 560px) {
  .tna-bento { grid-template-columns: 1fr; }
  .tna-bento-feature { grid-column: span 1; }
  .tna-bento-stat { gap: 1.5rem !important; }
}

/* Benefit icon chips */
.tna-chip {
  width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; background: var(--wp--preset--color--surface);
}
.tna-chip.on-forest { background: rgba(255,255,255,.12); }

/* ---------- Accordion (fan-out details) ---------- */
.tna-accordion .wp-block-details {
  border-top: 1px solid rgba(34,50,31,.18);
  padding: 0;
}
.tna-accordion .wp-block-details:last-child { border-bottom: 1px solid rgba(34,50,31,.18); }
.tna-accordion .wp-block-details summary {
  list-style: none; cursor: pointer; position: relative;
  font-family: var(--wp--preset--font-family--heading);
  font-size: 1.3rem; color: var(--wp--preset--color--forest);
  padding: 1.15rem 2.5rem 1.15rem 0;
  transition: color .2s ease;
}
.tna-accordion .wp-block-details summary:hover { color: var(--wp--preset--color--accent); }
.tna-accordion .wp-block-details summary::-webkit-details-marker { display: none; }
.tna-accordion .wp-block-details summary::after {
  content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; font-weight: 400; color: var(--wp--preset--color--accent); line-height: 1;
  transition: transform .2s ease;
}
.tna-accordion .wp-block-details[open] summary::after { content: "\2013"; }
.tna-accordion .wp-block-details p {
  margin: 0 0 1.25rem; color: #5d6448; font-size: .96rem; max-width: 52ch;
}

/* ---------- BSF illustration + stat strip ---------- */
.tna-illus img { width: 100%; height: auto; display: block; }
.tna-statstrip .wp-block-column { display: flex; }
.tna-statcard {
  width: 100%; background: var(--wp--preset--color--light);
  border: 1px solid rgba(34,50,31,.08); border-radius: 20px; padding: 1.6rem 1.5rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.tna-statcard:hover { transform: translateY(-4px); box-shadow: var(--tna-shadow); }
.tna-statcard-num {
  font-family: var(--wp--preset--font-family--heading);
  font-size: 2.4rem; font-weight: 600; line-height: 1; margin: 0;
  color: var(--wp--preset--color--accent);
}
.tna-statcard-label { font-size: .85rem; color: #5d6448; margin: .5rem 0 0; }

/* ---------- Nutrient donut ---------- */
.tna-donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.tna-donut {
  width: min(330px, 78vw); aspect-ratio: 1; border-radius: 50%; position: relative;
  box-shadow: var(--tna-shadow);
  background: conic-gradient(
    var(--wp--preset--color--forest) 0 50%,
    var(--wp--preset--color--sage) 50% 80%,
    var(--wp--preset--color--honey) 80% 92%,
    var(--wp--preset--color--accent) 92% 100%);
}
.tna-donut-center {
  position: absolute; inset: 25%; border-radius: 50%;
  background: var(--wp--preset--color--light);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.tna-donut-num {
  font-family: var(--wp--preset--font-family--heading);
  font-size: 2.1rem; font-weight: 600; color: var(--wp--preset--color--forest); margin: 0; line-height: 1;
}
.tna-donut-cap { font-size: .72rem; color: #5d6448; margin: .35rem 0 0; max-width: 11ch; }
.tna-legend { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem 1.5rem; }
.tna-legend p { margin: 0; }
.tna-leg { display: flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 600; color: var(--wp--preset--color--forest); }
.tna-leg::before { content: ""; width: 13px; height: 13px; border-radius: 4px; flex: 0 0 auto; }
.tna-leg--forest::before { background: var(--wp--preset--color--forest); }
.tna-leg--sage::before { background: var(--wp--preset--color--sage); }
.tna-leg--honey::before { background: var(--wp--preset--color--honey); }
.tna-leg--accent::before { background: var(--wp--preset--color--accent); }

/* ---------- Feeding calculator ---------- */
.tna-calc {
  background: var(--wp--preset--color--light); border-radius: 26px; padding: 2.5rem;
  box-shadow: var(--tna-shadow); max-width: 720px; margin: 0 auto;
}
.tna-calc label { display: block; font-weight: 700; color: var(--wp--preset--color--forest); margin-bottom: .6rem; font-family: var(--wp--preset--font-family--body); }
.tna-calc .tna-weight-row { display: flex; align-items: center; gap: 1rem; }
.tna-calc input[type=range] { flex: 1; accent-color: var(--wp--preset--color--accent); height: 6px; }
.tna-calc .tna-weight-val {
  min-width: 92px; text-align: center; font-weight: 800; color: #fff;
  background: var(--wp--preset--color--forest); border-radius: 12px; padding: .5rem .4rem; font-size: 1.1rem;
}
.tna-calc-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.75rem; }
.tna-calc-results .cell { background: var(--wp--preset--color--background); border-radius: 16px; padding: 1.1rem; text-align: center; }
.tna-calc-results .n { font-family: var(--wp--preset--font-family--heading); font-size: 1.9rem; font-weight: 600; color: var(--wp--preset--color--forest); line-height: 1; }
.tna-calc-results .l { font-size: .8rem; color: #5d6553; margin-top: .4rem; }
@media (max-width: 600px){ .tna-calc-results { grid-template-columns: 1fr; } .tna-calc { padding: 1.6rem; } }

/* ---------- Before / after ---------- */
.tna-baframe { border-radius: 20px; overflow: hidden; box-shadow: var(--tna-shadow); }
.tna-baframe img { display: block; width: 100%; height: auto; }

/* ---------- Research checklist + certificate ---------- */
.tna-check { list-style: none; padding-left: 0; display: grid; gap: .75rem; margin: 1.5rem 0 0; }
.tna-check li {
  position: relative; padding-left: 2.1rem; font-weight: 600;
  color: var(--wp--preset--color--forest); font-size: 1rem;
}
.tna-check li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 1.45rem; height: 1.45rem; border-radius: 50%;
  background: var(--wp--preset--color--forest); color: var(--wp--preset--color--light);
  display: grid; place-items: center; font-size: .8rem; font-weight: 700;
}
.tna-certframe img { border-radius: 16px; box-shadow: var(--tna-shadow); border: 1px solid rgba(34,50,31,.1); }

/* ---------- Quote / testimonials ---------- */
.tna-quote { border-radius: 22px; height: 100%; border: 1px solid rgba(34,50,31,.08); }
.tna-quote .stars { color: var(--wp--preset--color--accent); letter-spacing: 3px; font-weight: 700; }
.tna-quote p.q { font-family: var(--wp--preset--font-family--heading); font-style: italic; font-size: 1.12rem; line-height: 1.45; }
.tna-avatar img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }

/* ---------- Founder ---------- */
.tna-founder-img img { border-radius: 24px; box-shadow: var(--tna-shadow); width: 100%; height: 100%; object-fit: cover; }
.tna-sign { font-family: var(--wp--preset--font-family--heading); font-size: 1.4rem; color: var(--wp--preset--color--forest); margin-bottom: 0; }
.tna-story-list { padding-left: 0; list-style: none; }
.tna-story-list li {
  position: relative; padding-left: 1.6rem; margin-bottom: .5rem; color: var(--wp--preset--color--ink);
}
.tna-story-list li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--wp--preset--color--accent);
}
@media (min-width: 782px) {
  .tna-founder-img { align-self: flex-start !important; position: sticky; top: 92px; }
}

/* ---------- Sample request form ---------- */
.tna-form { max-width: 560px; margin: 1.5rem auto 0; text-align: left; }
.tna-field { margin: 0 0 1.1rem; display: flex; flex-direction: column; }
.tna-field label {
  font-family: var(--wp--preset--font-family--body); font-weight: 600;
  color: var(--wp--preset--color--forest); font-size: .9rem; margin-bottom: .4rem;
}
.tna-form input, .tna-form textarea {
  font-family: var(--wp--preset--font-family--body); font-size: 1rem;
  padding: .75rem .95rem; border-radius: 12px;
  border: 1.5px solid rgba(34,50,31,.2); background: var(--wp--preset--color--light);
  color: var(--wp--preset--color--ink); width: 100%; transition: border-color .15s ease;
}
.tna-form input:focus, .tna-form textarea:focus { outline: none; border-color: var(--wp--preset--color--accent); }
.tna-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tna-form-btn {
  margin-top: .5rem; width: 100%; cursor: pointer; border: none;
  background: var(--wp--preset--color--accent); color: var(--wp--preset--color--light);
  font-family: var(--wp--preset--font-family--body); font-weight: 700; font-size: 1rem;
  padding: .95rem 1.8rem; border-radius: 40px; transition: transform .2s ease, background-color .2s ease;
}
.tna-form-btn:hover { background: var(--wp--preset--color--forest-deep); transform: translateY(-2px); }
.tna-form-error { color: var(--wp--preset--color--accent); font-weight: 600; margin-bottom: 1rem; }
.tna-form-note { font-size: .88rem; color: #5d6448; text-align: center; margin: .25rem 0 .75rem; }
.tna-form-success {
  max-width: 560px; margin: 1.5rem auto 0; background: var(--wp--preset--color--light);
  border: 1px solid rgba(34,50,31,.08); border-radius: 20px; padding: 2rem; text-align: center;
}
.tna-form-success h3 { color: var(--wp--preset--color--forest); }

/* Two-up fields on wider screens */
@media (min-width: 600px) {
  .tna-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.1rem; }
  .tna-field--address, .tna-form-error, .tna-form > .tna-hp, .tna-form-btn { grid-column: 1 / -1; }
}

/* ---------- Footer ---------- */
.tna-footer a { text-decoration: none; }
.tna-footer a:hover { color: var(--wp--preset--color--honey); }

/* Rounded section corners for the hero band */
.tna-round-bottom { border-radius: 0 0 36px 36px; }

/* ---------- Animations ---------- */
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity .6s ease, transform .6s ease; }
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
.fade-up { opacity: 0; transform: translateY(28px); animation: tnaFadeUp .7s ease forwards; }
@keyframes tnaFadeUp { to { opacity: 1; transform: translateY(0); } }
.hover-lift { transition: transform .2s ease, box-shadow .2s ease; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: var(--tna-shadow); }
.float { animation: tnaFloat 4s ease-in-out infinite; }
@keyframes tnaFloat { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-8px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .animate-on-scroll, .fade-up { opacity: 1 !important; transform: none !important; }
}

/* Editor visibility */
.editor-styles-wrapper .animate-on-scroll,
.editor-styles-wrapper .fade-up {
  opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important;
}
