/*
Theme Name: KharaApps
Theme URI: https://kharaapps.com/
Author: KharaApps
Description: Custom theme for KharaApps. Fast, private utilities for Mac and iPhone. Reproduces the KharaApps design system exactly, no page builder, minimal JS.
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: kharaapps
*/

/* ================= KharaApps design system ================= */
:root {
  --bg: #faf9f5;
  --bg-deep: #f2efe6;
  --fg: #17181a;
  --muted: #63666d;
  --accent: #14532d;
  --accent-bright: #1a7a40;
  --accent-soft: #e7f0e9;
  --gold: #b98a2f;
  --line: rgba(23, 24, 26, .09);
  --card: #ffffff;
  --shadow-sm: 0 1px 2px rgba(23,24,26,.05), 0 2px 8px rgba(23,24,26,.04);
  --shadow-md: 0 2px 6px rgba(23,24,26,.05), 0 14px 34px rgba(20,83,45,.10);
  --shadow-lg: 0 4px 10px rgba(23,24,26,.06), 0 26px 60px rgba(20,83,45,.16);
  --radius: 20px;
  --ease: cubic-bezier(.2,.7,.3,1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); }
img { max-width: 100%; }
::selection { background: var(--accent); color: #fff; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

h1, h2, h3 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif; }

/* ---------------- Header ---------------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 245, .82);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand {
  font-weight: 800; font-size: 20px; letter-spacing: -0.4px;
  text-decoration: none; color: var(--fg);
  display: inline-flex; align-items: center;
}
.brand::before {
  content: ""; width: 26px; height: 26px; border-radius: 8px; flex: none;
  margin-right: 9px;
  background: url('assets/kharaapps-icon.png') center / cover no-repeat;
  box-shadow: 0 2px 6px rgba(20,83,45,.35);
}
.brand span { color: var(--accent); }
nav.main { display: flex; align-items: center; gap: 4px; }
nav.main a {
  text-decoration: none; color: var(--muted); font-size: 14.5px; font-weight: 550;
  padding: 7px 13px; border-radius: 999px;
  transition: color .18s var(--ease), background .18s var(--ease);
}
nav.main a:hover { color: var(--accent); background: var(--accent-soft); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  padding: 92px 0 72px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(52rem 30rem at 50% -12rem, rgba(26,122,64,.11), transparent 68%),
    radial-gradient(38rem 24rem at 88% 8rem, rgba(185,138,47,.08), transparent 70%),
    var(--bg);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
  background: var(--line);
}
.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 22px;
}
.hero p.lead {
  font-size: clamp(17.5px, 2vw, 20px);
  line-height: 1.6;
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto 34px;
}
.hero .app-icon {
  width: 148px; height: 148px; border-radius: 33px; margin-bottom: 30px;
  box-shadow: var(--shadow-lg);
}
.accent-word {
  background: linear-gradient(100deg, var(--accent-bright), var(--accent) 55%, #0b3018);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* icon shelf on the home hero */
.icon-shelf { display: flex; justify-content: center; align-items: flex-end; gap: 0; margin: 0 0 38px; }
.icon-shelf img {
  width: 78px; height: 78px; border-radius: 19px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255,255,255,.7);
  margin: 0 -7px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.icon-shelf img:nth-child(odd)  { transform: rotate(-4deg) translateY(6px); }
.icon-shelf img:nth-child(even) { transform: rotate(3.5deg); }
.icon-shelf img:nth-child(1), .icon-shelf img:nth-child(6) { width: 62px; height: 62px; border-radius: 15px; opacity: .92; }
.icon-shelf img:nth-child(2), .icon-shelf img:nth-child(5) { width: 70px; height: 70px; border-radius: 17px; }
.icon-shelf img:hover { transform: translateY(-10px) rotate(0deg) scale(1.06); box-shadow: var(--shadow-lg); z-index: 2; position: relative; }

.hero-stats { display: flex; justify-content: center; gap: 58px; margin-top: 52px; }
.hero-stats .stat { text-align: center; }
.hero-stats strong {
  display: block; font-size: 40px; font-weight: 800; letter-spacing: -0.03em;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.hero-stats span { font-size: 13.5px; color: var(--muted); letter-spacing: .02em; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 30px; border-radius: 14px;
  text-decoration: none; font-weight: 650; font-size: 16px;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.btn.primary {
  background: linear-gradient(180deg, #1c6b3a, var(--accent) 80%);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 8px 22px rgba(20,83,45,.32);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 14px 30px rgba(20,83,45,.4); }
.btn.ghost { border: 1.5px solid rgba(20,83,45,.4); color: var(--accent); background: rgba(255,255,255,.5); }
.btn.ghost:hover { border-color: var(--accent); background: #fff; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.note { font-size: 13.5px; color: var(--muted); margin-top: 14px; letter-spacing: .01em; }

/* Apple-style store badge */
.store-badge {
  display: inline-flex; align-items: center; gap: 11px;
  background: #000; color: #fff;
  border: 1px solid #000; border-radius: 13px;
  padding: 10px 22px 10px 18px;
  text-decoration: none; text-align: left;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
  box-shadow: 0 6px 18px rgba(0,0,0,.22);
}
.store-badge:hover { transform: translateY(-2px); background: #111; box-shadow: 0 12px 28px rgba(0,0,0,.3); }
.store-badge svg { width: 26px; height: 31px; flex: none; }
.store-badge .txt { display: flex; flex-direction: column; line-height: 1.16; }
.store-badge .txt small { font-size: 11px; font-weight: 500; letter-spacing: .02em; opacity: .85; }
.store-badge .txt b { font-size: 18.5px; font-weight: 600; letter-spacing: -0.01em; }

/* ---------------- Sections ---------------- */
section { padding: 84px 0; }
section.alt {
  background: linear-gradient(180deg, var(--bg-deep), #f6f4ec);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
h2.section-title {
  font-size: clamp(28px, 3.6vw, 38px);
  letter-spacing: -0.028em; font-weight: 800;
  margin: 0 0 10px; text-align: center;
}
p.section-sub { text-align: center; color: var(--muted); margin: 0 auto 46px; max-width: 560px; font-size: 17px; }

/* ---------------- App cards ---------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px 26px;
  display: flex; flex-direction: column; align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: rgba(20,83,45,.22); }
.card img.icon {
  width: 76px; height: 76px; border-radius: 18px; margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease);
}
.card:hover img.icon { transform: scale(1.07) rotate(-2deg); }
.card h3 { margin: 0 0 8px; font-size: 21px; font-weight: 750; letter-spacing: -0.015em; }
.card p { margin: 0 0 18px; color: var(--muted); font-size: 15.5px; line-height: 1.6; flex: 1; }
.card a.more {
  font-weight: 650; text-decoration: none; font-size: 15px;
  display: inline-flex; align-items: center; gap: 5px;
}
.card a.more::after { content: "→"; transition: transform .2s var(--ease); }
.card a.more:hover::after { transform: translateX(4px); }
/* stretch the card link over the whole card */
.card a.more::before { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }

.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; }
.tag {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: 5px 12px;
}
.tag.soft { background: var(--bg-deep); color: var(--muted); }
.tag.coming { background: #fdf3e0; color: #8a5a12; }
.card.hidden { display: none; }

/* ---------------- Platform filter ---------------- */
.filter { display: flex; justify-content: center; gap: 8px; margin-bottom: 40px; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 9px 22px; font-size: 14.5px; font-weight: 620;
  cursor: pointer; font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: all .2s var(--ease);
}
.chip:hover { border-color: rgba(20,83,45,.35); color: var(--accent); transform: translateY(-1px); }
.chip.active {
  background: linear-gradient(180deg, #1c6b3a, var(--accent));
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 16px rgba(20,83,45,.3);
}

/* ---------------- Feature grid ---------------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 20px; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
section.alt .feature { background: rgba(255,255,255,.75); }
.feature h3 { margin: 0 0 8px; font-size: 17.5px; font-weight: 720; letter-spacing: -0.01em; }
.feature p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.62; }

/* ---------------- Free vs Pro table ---------------- */
.table-scroll { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table.plans {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
table.plans th, table.plans td { padding: 14px 20px; border-bottom: 1px solid var(--line); text-align: left; font-size: 15.5px; }
table.plans tr:last-child td { border-bottom: 0; }
table.plans th {
  background: linear-gradient(180deg, var(--accent-soft), #ddebe1);
  font-size: 13.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--accent);
}
table.plans td.yes { color: var(--accent-bright); font-weight: 700; }
table.plans td.no { color: rgba(99,102,109,.55); }
table.plans tbody tr { transition: background .15s var(--ease); }
table.plans tr:hover td { background: rgba(20,83,45,.025); }

/* ---------------- FAQ ---------------- */
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 24px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s var(--ease);
}
.faq details[open] { box-shadow: var(--shadow-md); }
.faq summary { font-weight: 650; cursor: pointer; font-size: 16.5px; letter-spacing: -0.01em; }
.faq summary::marker { color: var(--accent); }
.faq p { color: var(--muted); margin: 12px 0 4px; font-size: 15.5px; line-height: 1.65; }

/* ---------------- Support form ---------------- */
.support-form {
  display: flex; flex-direction: column; gap: 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  padding: 40px 38px;
  box-shadow: var(--shadow-md);
}
.support-form label { display: flex; flex-direction: column; gap: 8px; font-weight: 650; font-size: 14.5px; letter-spacing: -0.005em; }
.support-form input, .support-form select, .support-form textarea {
  font: inherit; font-weight: 400; color: var(--fg);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px 15px; outline: none;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.support-form input:focus, .support-form select:focus, .support-form textarea:focus {
  border-color: var(--accent-bright); background: #fff;
  box-shadow: 0 0 0 4px rgba(26,122,64,.12);
}
.support-form textarea { resize: vertical; min-height: 140px; }
.support-form button { cursor: pointer; border: 0; font-family: inherit; }
.support-form button:disabled { opacity: .55; cursor: default; transform: none; }

/* ---------------- Prose (legal) ---------------- */
main.prose { max-width: 720px; margin: 0 auto; padding: 56px 24px 80px; }
main.prose h1 { font-size: 32px; letter-spacing: -0.02em; margin: 0 0 6px; }
main.prose h2 { font-size: 19px; margin: 34px 0 6px; }
main.prose .updated { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
main.prose p { margin: 8px 0; }

/* ---------------- Blog ---------------- */
.article {
  max-width: 720px; margin: 0 auto; padding: 30px 24px 72px;
}
.article .crumbs { font-size: 13.5px; color: var(--muted); margin: 0 0 22px; }
.article .crumbs a { color: var(--muted); text-decoration: none; }
.article .crumbs a:hover { color: var(--accent); }
.article .eyebrow {
  font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .09em;
  color: var(--accent); margin: 0 0 12px;
}
.article h1 {
  font-size: clamp(30px, 4.6vw, 42px); line-height: 1.12; letter-spacing: -0.03em;
  font-weight: 800; margin: 0 0 16px;
}
.article .meta { font-size: 14px; color: var(--muted); margin: 0 0 8px; display: flex; gap: 14px; flex-wrap: wrap; }
.article .standfirst { font-size: 19px; line-height: 1.6; color: #34363a; margin: 20px 0 30px; }
.article h2 {
  font-size: 25px; letter-spacing: -0.02em; font-weight: 780;
  margin: 44px 0 14px; scroll-margin-top: 80px;
}
.article h3 { font-size: 19px; font-weight: 720; margin: 30px 0 10px; }
.article p { margin: 0 0 18px; font-size: 17.5px; line-height: 1.72; }
.article ul, .article ol { margin: 0 0 20px; padding-left: 24px; }
.article li { margin: 0 0 9px; line-height: 1.7; }
.article a { color: var(--accent-bright); text-underline-offset: 2px; }
.article figure { margin: 28px 0; }
.article figure img {
  width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.article figure.phone img { max-width: 300px; display: block; margin: 0 auto; }
.article figcaption { font-size: 13.5px; color: var(--muted); text-align: center; margin-top: 10px; }

.toc {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px 24px; margin: 0 0 34px; box-shadow: var(--shadow-sm);
}
.toc strong { display: block; font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 0 0 6px; font-size: 15.5px; }
.toc a { color: var(--accent); text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.callout {
  background: var(--accent-soft); border: 1px solid rgba(20,83,45,.18);
  border-radius: 14px; padding: 18px 22px; margin: 24px 0;
}
.callout p { margin: 0; font-size: 16px; }
.callout p + p { margin-top: 10px; }

.article-cta {
  background: linear-gradient(180deg, #ffffff, var(--bg-deep));
  border: 1px solid var(--line); border-radius: 20px;
  padding: 32px 30px; margin: 40px 0; text-align: center;
  box-shadow: var(--shadow-sm);
}
.article-cta img { width: 66px; height: 66px; border-radius: 16px; box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.article .store-badge, .article .store-badge:hover { color: #fff; }
.article-cta h3 { margin: 0 0 8px; font-size: 22px; font-weight: 780; }
.article-cta p { margin: 0 auto 20px; max-width: 440px; color: var(--muted); font-size: 16px; }

.article .faq-block { margin-top: 40px; }
.article .faq-block details {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 22px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.article .faq-block summary { font-weight: 650; cursor: pointer; font-size: 17px; }
.article .faq-block summary::marker { color: var(--accent); }
.article .faq-block details p { margin: 12px 0 4px; font-size: 16px; color: #34363a; }

.article-foot { margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--line); }
.article-foot .related { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; }
.article-foot a { display: inline-block; margin-right: 20px; font-weight: 600; text-decoration: none; color: var(--accent); }

/* Blog index */
.blog-list { max-width: 760px; margin: 0 auto; padding: 8px 24px 40px; display: grid; gap: 20px; }
.post-card {
  display: flex; gap: 22px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 24px 26px; text-decoration: none; color: inherit;
  box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(20,83,45,.2); }
.post-card .pc-tag { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 4px 11px; display: inline-block; margin-bottom: 10px; }
.post-card h2 { margin: 0 0 8px; font-size: 20px; font-weight: 750; letter-spacing: -0.015em; }
.post-card p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.post-card .pc-date { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); }

@media (max-width: 640px) {
  .article .standfirst { font-size: 17.5px; }
  .article p { font-size: 17px; }
}

/* ---------------- Legal footnote ---------------- */
.legal-footnote {
  border-top: 1px solid var(--line);
  padding: 16px 0;
  font-size: 13.5px; color: var(--muted); text-align: center;
}
.legal-footnote a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.legal-footnote a:hover { color: var(--accent); }

/* ---------------- Footer ---------------- */
footer.site {
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
  color: var(--muted); font-size: 14.5px;
}
footer.site a { color: var(--muted); text-decoration: none; transition: color .15s var(--ease); }
footer.site a:hover { color: var(--accent); }
.foot-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px;
  padding: 56px 0 44px;
}
.foot-brand .brand { margin-bottom: 14px; }
.foot-brand p { margin: 0; font-size: 14.5px; line-height: 1.65; max-width: 300px; }
.foot-col h4 {
  margin: 4px 0 16px; font-size: 11.5px; font-weight: 750;
  text-transform: uppercase; letter-spacing: .1em; color: rgba(99,102,109,.75);
}
.foot-col a { display: block; padding: 5px 0; font-size: 14.5px; }
.foot-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 0 22px; font-size: 13px; color: rgba(99,102,109,.85);
}
.foot-bottom .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
@media (max-width: 720px) {
  .foot-grid { grid-template-columns: 1fr; gap: 30px; padding: 44px 0 34px; }
}

/* ---------------- Motion ---------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .feature, .btn, .store-badge, .icon-shelf img { transition: none; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  nav.main a { padding: 6px 9px; font-size: 13.5px; }
  .hero { padding: 60px 0 52px; }
  .hero-stats { gap: 30px; }
  .hero-stats strong { font-size: 30px; }
  section { padding: 60px 0; }
  .support-form { padding: 28px 22px; }
  .icon-shelf img { width: 58px !important; height: 58px !important; border-radius: 14px !important; }
  .btn.ghost { margin-left: 0; margin-top: 10px; }
}
