/*
Theme Name: PROPDFHUB
Theme URI: https://propdfhub.com
Author: AMIT CHAUDHARY
Author URI: https://propdfhub.com
Description: A clean, modern tool-grid landing theme inspired by document-utility sites like iLovePDF. Features a sticky glass header, gradient hero, colorful tool cards, feature section, and footer. Fully responsive.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pdftools
Tags: custom-colors, custom-menu, featured-images, full-width-template, grid-layout
*/

:root {
  --brand: #e5322d;
  --brand-dark: #c41f1a;
  --brand-soft: #fff1ef;
  --ink: #1f2233;
  --muted: #6e7191;
  --bg: #f7f8fc;
  --card: #ffffff;
  --border: #e9ebf3;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(31, 34, 51, 0.05);
  --shadow: 0 6px 24px rgba(31, 34, 51, 0.07);
  --shadow-hover: 0 16px 40px rgba(31, 34, 51, 0.16);
  --max: 1180px;
  --header-h: 70px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.4px;
  flex-shrink: 0;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #ff7a59);
  display: grid; place-items: center;
  color: #fff; font-size: 14px; font-weight: 800;
  box-shadow: 0 4px 12px rgba(229, 50, 45, 0.35);
}
.site-brand span { color: var(--brand); }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0; padding: 0;
}
.main-nav a {
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; border-radius: 2px;
  background: var(--brand);
  transition: width .2s ease;
}
.main-nav a:hover { color: var(--brand); }
.main-nav a:hover::after { width: 100%; }

.header-cta {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand); color: #fff;
  box-shadow: 0 6px 16px rgba(229, 50, 45, 0.28);
}
.btn-primary:hover { background: var(--brand-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(229, 50, 45, 0.36); }
.btn-ghost { color: var(--ink); border-color: var(--border); background: #fff; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* Hamburger */
.nav-toggle {
  display: none;
  position: relative;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 11px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 18px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle span::before { transform: translate(-50%, -7px); }
.nav-toggle span::after  { transform: translate(-50%, 5px); }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: translate(-50%, 0) rotate(45deg); }
body.nav-open .nav-toggle span::after  { transform: translate(-50%, 0) rotate(-45deg); }

.nav-backdrop {
  position: fixed; inset: 0;
  background: rgba(20, 22, 38, 0.45);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  z-index: 150;
}
body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 80px 0 44px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -180px; left: 50%;
  width: 760px; height: 460px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(229,50,45,0.10), transparent 62%);
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
  letter-spacing: .2px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.1;
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: -1px;
}
.hero p {
  font-size: clamp(16px, 2.4vw, 20px);
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto;
}

/* ---------- Tool grid ---------- */
.tools { padding: 36px 0 76px; }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
  overflow: hidden;
  display: block;
}
.tool-card::after {
  content: "→";
  position: absolute;
  right: 20px; top: 26px;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .2s ease, transform .2s ease;
  font-size: 18px;
}
.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}
.tool-card:hover::after { opacity: 1; transform: translateX(0); color: var(--brand); }
.tool-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 26px;
  margin-bottom: 16px;
  transition: transform .18s ease;
}
.tool-card:hover .tool-icon { transform: scale(1.08) rotate(-4deg); }
.tool-card h3 { margin: 0 0 7px; font-size: 18px; color: var(--ink); font-weight: 700; }
.tool-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ---------- Features ---------- */
.features {
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 78px 0;
}
.section-title { text-align: center; margin: 0 0 52px; }
.section-title h2 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 12px; font-weight: 800; letter-spacing: -0.6px; }
.section-title p { color: var(--muted); font-size: clamp(15px, 2.2vw, 18px); margin: 0; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.feature {
  text-align: center;
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  transition: background .2s ease, transform .2s ease;
}
.feature:hover { background: var(--bg); transform: translateY(-3px); }
.feature .f-icon {
  width: 70px; height: 70px;
  margin: 0 auto 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff0ee, #ffe3dc);
  display: grid; place-items: center;
  font-size: 30px;
  box-shadow: 0 8px 20px rgba(229, 50, 45, 0.12);
}
.feature h3 { font-size: 20px; margin: 0 0 10px; font-weight: 700; }
.feature p { color: var(--muted); margin: 0; font-size: 15px; }

/* ---------- Page content ---------- */
.page-content {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 48px);
  margin: 50px auto;
  max-width: 820px;
  box-shadow: var(--shadow);
}
.page-content h1, .page-content h2 { color: var(--ink); }
.page-content img { border-radius: 12px; }

/* ---------- Footer ---------- */
.site-footer {
  background: #1f2233;
  color: #c9cce0;
  padding: 60px 0 30px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 34px;
  margin-bottom: 40px;
}
.footer-brand { color: #fff; font-weight: 800; font-size: 23px; margin-bottom: 12px; letter-spacing: -0.4px; }
.footer-brand span { color: var(--brand); }
.footer-col h4 { color: #fff; font-size: 14px; margin: 0 0 16px; text-transform: uppercase; letter-spacing: .6px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 11px; }
.footer-col a { color: #c9cce0; font-size: 14px; }
.footer-col a:hover { color: #fff; padding-left: 3px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 22px;
  text-align: center;
  font-size: 14px;
  color: #8a8eaa;
}

/* ---------- Reveal animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .tool-card, .feature { opacity: 0; transform: translateY(14px); animation: pdftools-rise .5s ease forwards; }
  .tool-card:nth-child(1){animation-delay:.02s}.tool-card:nth-child(2){animation-delay:.06s}
  .tool-card:nth-child(3){animation-delay:.10s}.tool-card:nth-child(4){animation-delay:.14s}
  .tool-card:nth-child(5){animation-delay:.18s}.tool-card:nth-child(6){animation-delay:.22s}
  .tool-card:nth-child(7){animation-delay:.26s}.tool-card:nth-child(8){animation-delay:.30s}
  @keyframes pdftools-rise { to { opacity: 1; transform: translateY(0); } }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 820px) {
  .main-nav {
    position: fixed;
    top: 0; right: -100%;
    width: min(80vw, 320px);
    height: 100%;
    background: #fff;
    box-shadow: -12px 0 40px rgba(20,22,38,.16);
    padding: calc(var(--header-h) + 20px) 26px 26px;
    transition: right .28s cubic-bezier(.4,0,.2,1);
    z-index: 180;
    overflow-y: auto;
  }
  body.nav-open .main-nav { right: 0; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav li { border-bottom: 1px solid var(--border); }
  .main-nav a { display: block; padding: 14px 4px; font-size: 17px; }
  .main-nav a::after { display: none; }
  .nav-toggle { display: block; }
  .header-cta .btn-ghost { display: none; }
}

@media (max-width: 680px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .tool-card { padding: 22px 18px; }
  .tool-card::after { display: none; }
  .hero { padding: 56px 0 32px; }
  .features { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; text-align: center; }
  .footer-col ul { display: inline-block; text-align: left; }
}

@media (max-width: 420px) {
  .tool-grid { grid-template-columns: 1fr; }
  .header-cta .btn-primary { padding: 9px 16px; font-size: 14px; }
  .site-brand { font-size: 19px; }
  .brand-mark { width: 32px; height: 32px; }
}

/* Larger tap targets on touch devices */
@media (hover: none) {
  .btn { padding-top: 12px; padding-bottom: 12px; }
}

/* ---------- Accessibility helpers ---------- */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px; width: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  position: absolute !important;
  word-wrap: normal !important;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--brand);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 10px 0;
  font-weight: 700;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}
