/*
Theme Name: Royal Foreign Trade
Theme URI: https://royalltd.net
Author: Royal Foreign Trade Ltd.
Author URI: https://royalltd.net
Description: Corporate theme for Royal Foreign Trade Ltd., a fourth-generation Turkish exporter of pine nuts, nuts, dried fruits, legumes, spices and olive oil. Includes Home, Pine Nuts, Products, About and Contact templates. On activation it creates the pages, sets the static front page and builds the menu.
Version: 1.0.0
Requires at least: 5.8
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: royal-foreign-trade
*/

:root {
  --green: #1f3b2d;
  --green-2: #2b5140;
  --green-3: #14271d;
  --cream: #f6f1e7;
  --paper: #fbf8f2;
  --gold: #b98a3e;
  --gold-soft: #e3c58a;
  --ink: #1b2a22;
  --muted: #5c6b62;
  --line: rgba(31, 59, 45, .14);
  --radius: 14px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; color: var(--green); }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -.01em; }
h3 { font-size: 1.5rem; }
h1 em, h2 em { font-style: italic; color: var(--gold); font-weight: 500; }
p { margin: 0 0 1.1em; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--cream { background: var(--cream); }
.section--green { background: var(--green); color: #e9efe9; }
.section--green h2, .section--green h3 { color: #fff; }
.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head--row { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px;
  font: 600 .95rem/1 var(--sans);
  border: 1.5px solid transparent; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--gold { background: var(--gold); color: #fff; }
.btn--gold:hover { background: #a37832; }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { background: var(--green-2); }
.btn--ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--outline { border-color: var(--green); color: var(--green); }
.btn--outline:hover { background: var(--green); color: #fff; }
.btn--sm { padding: 11px 20px; font-size: .88rem; }
.link-arrow { font-weight: 600; color: var(--green); border-bottom: 1.5px solid var(--gold); padding-bottom: 2px; }
.link-arrow:hover { color: var(--gold); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251,248,242,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 78px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green); color: var(--gold-soft);
  font: 700 1.5rem/1 var(--serif);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font: 700 1.25rem/1 var(--serif); letter-spacing: .22em; color: var(--green); }
.brand-sub { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.main-nav .nav-list { display: flex; gap: 6px; align-items: center; }
.main-nav a { display: block; padding: 10px 14px; font-size: .95rem; font-weight: 500; color: var(--ink); border-radius: 999px; }
.main-nav a:hover { color: var(--gold); }
.main-nav .current-menu-item > a, .main-nav .current_page_item > a, .main-nav a.is-current { color: var(--green); background: rgba(31,59,45,.08); }
.header-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: transparent; cursor: pointer; padding: 0; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--green); margin: 5px auto; transition: transform .2s, opacity .2s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { position: relative; color: #fff; background: var(--green-3); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(20,39,29,.92) 0%, rgba(20,39,29,.72) 45%, rgba(20,39,29,.25) 100%); }
.hero-inner { position: relative; padding: clamp(80px, 12vw, 150px) 0 clamp(70px, 9vw, 110px); max-width: 760px; }
.hero h1 { color: #fff; }
.hero h1 em { color: var(--gold-soft); }
.hero p.lead { color: rgba(255,255,255,.86); font-size: 1.2rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero-badges { display: flex; gap: 12px 28px; flex-wrap: wrap; margin-top: 44px; font-size: .9rem; color: rgba(255,255,255,.8); }
.hero-badges li::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: 10px; vertical-align: middle; }
.hero--page .hero-inner { padding: clamp(64px, 9vw, 110px) 0; }
.hero--page h1 { font-size: clamp(2.4rem, 5vw, 4rem); }

/* Stats */
.stats { background: var(--green); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 38px 20px; text-align: center; border-right: 1px solid rgba(255,255,255,.12); }
.stat:last-child { border-right: 0; }
.stat-num { font: 600 3rem/1 var(--serif); color: var(--gold-soft); }
.stat-label { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.75); margin-top: 8px; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split-media { position: relative; }
.split-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.split-media--wide img { aspect-ratio: 4 / 3; }
.year-badge { position: absolute; right: -14px; bottom: 28px; background: var(--green); color: #fff; padding: 18px 24px; border-radius: 12px; max-width: 230px; box-shadow: 0 18px 40px rgba(20,39,29,.25); }
.year-badge strong { display: block; font: 600 2.4rem/1 var(--serif); color: var(--gold-soft); }
.year-badge span { font-size: .85rem; line-height: 1.4; display: block; margin-top: 6px; }
.split-body p { color: var(--muted); }

/* Timeline */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 18px; height: 1px; background: var(--line); }
.tl-item { position: relative; padding-top: 52px; }
.tl-item::before { content: ""; position: absolute; top: 12px; left: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 6px var(--paper); }
.section--cream .tl-item::before { box-shadow: 0 0 0 6px var(--cream); }
.tl-year { font: 600 2.2rem/1 var(--serif); color: var(--gold); display: block; margin-bottom: 8px; }
.tl-item h3 { font-size: 1.35rem; }
.tl-item p { color: var(--muted); font-size: .97rem; margin: 0; }

/* Cards */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
a.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(31,59,45,.12); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .98rem; }
.card-meta { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: .78rem; }
.card-meta dt { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; }
.card-meta dd { margin: 2px 0 0; font-weight: 600; color: var(--green); }

.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; transition: border-color .2s, transform .2s; }
.cat:hover { border-color: var(--gold); transform: translateY(-3px); }
.cat h3 { font-size: 1.3rem; }
.cat p { font-size: .9rem; color: var(--muted); margin: 0; }

/* Export band */
.band { position: relative; color: #fff; background: var(--green-3); overflow: hidden; }
.band-bg { position: absolute; inset: 0; }
.band-bg img { width: 100%; height: 100%; object-fit: cover; }
.band-bg::after { content: ""; position: absolute; inset: 0; background: rgba(20,39,29,.82); }
.band .wrap { position: relative; }
.band h2 { color: #fff; }
.band .lead { color: rgba(255,255,255,.82); }
.features-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.feature { border-top: 2px solid var(--gold); padding-top: 18px; }
.feature h3 { color: #fff; font-size: 1.4rem; }
.feature p { color: rgba(255,255,255,.78); font-size: .97rem; margin: 0; }
.feature--light { border-top-color: var(--gold); }
.feature--light h3 { color: var(--green); }
.feature--light p { color: var(--muted); }

/* CTA */
.cta { background: var(--green); color: #fff; text-align: center; padding: clamp(64px, 8vw, 100px) 0; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.82); max-width: 580px; margin: 0 auto 30px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Pine nuts page */
.gallery-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.gallery-2 img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.info-list { display: grid; gap: 22px; margin-top: 28px; }
.info-list li { padding-left: 22px; border-left: 2px solid var(--gold); }
.info-list h3 { font-size: 1.3rem; margin-bottom: 4px; }
.info-list p { margin: 0; color: var(--muted); font-size: .98rem; }
.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* About */
.quote { margin: 32px 0 0; padding: 26px 30px; border-left: 3px solid var(--gold); background: var(--cream); border-radius: 0 var(--radius) var(--radius) 0; }
.quote p { font: italic 500 1.55rem/1.35 var(--serif); color: var(--green); margin: 0 0 10px; }
.quote cite { font-style: normal; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Products page */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 48px; }
.chip { padding: 10px 20px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 500; font-size: .93rem; background: #fff; transition: all .2s; }
.chip:hover { border-color: var(--green); }
.chip.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.cat-block { display: grid; grid-template-columns: 340px 1fr; gap: clamp(28px, 5vw, 64px); padding: 48px 0; border-top: 1px solid var(--line); scroll-margin-top: 100px; }
.cat-block:first-of-type { border-top: 0; padding-top: 0; }
.cat-block img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.cat-block-head p { color: var(--muted); }
.product-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; margin-top: 18px; }
.product-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.product-list h3 { font: 600 1.3rem/1.2 var(--serif); margin: 0; }
.product-list span { font-size: .88rem; color: var(--muted); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-list { display: grid; gap: 26px; margin-top: 34px; }
.contact-list li { display: flex; gap: 16px; }
.ci-icon { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: var(--gold-soft); display: grid; place-items: center; }
.ci-icon svg { width: 20px; height: 20px; }
.contact-list small { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contact-list a:hover { color: var(--gold); }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(26px, 4vw, 44px); }
.form-card h2 { font-size: 2.2rem; }
.form-card > p { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .82rem; font-weight: 600; color: var(--green); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .98rem; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); background: #fff; }
.field textarea { min-height: 120px; resize: vertical; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.btn--wa { background: #1f9d55; color: #fff; }
.btn--wa:hover { background: #188046; }

/* Footer */
.site-footer { background: var(--green-3); color: rgba(255,255,255,.78); padding-top: 72px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.4fr; gap: 48px; padding-bottom: 56px; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-sub { color: rgba(255,255,255,.55); }
.site-footer .brand-mark { background: var(--gold); color: var(--green-3); }
.site-footer h4 { font: 600 .8rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 20px; }
.footer-about { margin-top: 20px; max-width: 360px; }
.footer-links li { margin-bottom: 10px; }
.site-footer a:hover { color: var(--gold-soft); }
.footer-contact li { margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 22px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: rgba(255,255,255,.55); }

/* Generic content */
.entry { max-width: 780px; margin: 0 auto; }
.entry :where(h2, h3) { margin-top: 1.4em; }
.entry a { color: var(--green); text-decoration: underline; text-decoration-color: var(--gold); }
.not-found { text-align: center; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Responsive */
@media (max-width: 1020px) {
  .cats { grid-template-columns: repeat(3, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .timeline::before { display: none; }
  .cat-block { grid-template-columns: 1fr; }
  .cat-block img { max-width: 480px; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .header-cta .btn { display: none; }
  .main-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); display: none; padding: 12px 24px 20px; }
  .nav-open .main-nav { display: block; }
  .main-nav .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .split, .contact-grid, .cards-2 { grid-template-columns: 1fr; }
  .year-badge { right: 12px; }
  .cards-3, .features-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.12); }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .cats, .timeline, .product-list, .form-grid, .gallery-2 { grid-template-columns: 1fr; }
  .hero-actions .btn, .cta-actions .btn, .form-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
