/*
Theme Name: AI SmartFarm
Theme URI: https://aismartfarm.smartfarmas.com
Author: SMARTFARM
Description: AI스마트팜창업 공식 웹사이트 커스텀 테마
Version: 1.0.0
Text Domain: aismartfarm
*/

/* ---------- tokens (deep green tech + ivory, premium/eco, not a plain farm-green look) ---------- */
:root {
    --asf-bg: #FAF9F4;
    --asf-bg-sub: #EFEDE3;
    --asf-ink: #10231C;
    --asf-accent: #0E3B2E;
    --asf-accent-2: #2E7D5B;
    --asf-data: #1E7A73;
    --asf-text: #1C231F;
    --asf-radius: 14px;
    --asf-gap: 24px;
    --asf-section-gap: 48px;
    --asf-header-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
    background: var(--asf-bg);
    color: var(--asf-text);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 { font-weight: 700; margin: 0; line-height: 1.32; letter-spacing: -.01em; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }

.asf-container { max-width: 1140px; margin: 0 auto; padding: 0 var(--asf-gap); }
.asf-section { padding: var(--asf-section-gap) 0; }
.asf-section-sub { background: var(--asf-bg-sub); }
.asf-eyebrow { display: block; font-size: 12px; letter-spacing: .12em; color: var(--asf-data); font-weight: 700; text-transform: uppercase; margin-bottom: 10px; }
.asf-section-head { text-align: center; margin-bottom: 32px; }
.asf-section-head h2 { margin-bottom: 12px; }
.asf-section-head .asf-subtitle { font-weight: 400; color: var(--asf-text); opacity: .72; }

.asf-icon { width: 24px; height: 24px; flex: none; color: var(--asf-accent); }

/* ---------- lead answer paragraph (AEO: H1 바로 아래 직접 답) ---------- */
.asf-lead { font-size: 17px; opacity: .92; max-width: 640px; }

/* ---------- data chip (AI/tech accent, distinguishes from plain farm look) ---------- */
.asf-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(30,122,115,.12); color: var(--asf-data);
    border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 700;
    margin: 0 8px 8px 0;
}

/* ---------- buttons ---------- */
.asf-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 0 22px; border-radius: 10px;
    font-weight: 700; font-size: 16px; border: 2px solid transparent; white-space: nowrap;
}
.asf-btn .asf-icon { width: 20px; height: 20px; color: currentColor; }
.asf-btn-primary { background: var(--asf-accent); color: #fff; }
.asf-btn-outline { background: transparent; color: var(--asf-accent); border-color: var(--asf-accent); }
.asf-cta-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- header ---------- */
.asf-header { position: sticky; top: 0; z-index: 100; background: rgba(250,249,244,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--asf-bg-sub); height: var(--asf-header-h); }
.asf-header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.asf-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; color: var(--asf-accent); }
.asf-logo img { width: 30px; height: 30px; }
.asf-nav-pc { display: none; }
.asf-nav-pc ul { display: flex; align-items: center; gap: 26px; }
.asf-nav-pc a { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; }
.asf-nav-pc .asf-btn { margin-left: 8px; }

.asf-hamburger { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: none; border: none; }
.asf-hamburger span { display: block; width: 22px; height: 2px; background: var(--asf-ink); position: relative; }
.asf-hamburger span::before, .asf-hamburger span::after { content: ''; position: absolute; left: 0; width: 22px; height: 2px; background: var(--asf-ink); transition: transform .2s ease; }
.asf-hamburger span::before { top: -7px; }
.asf-hamburger span::after { top: 7px; }

.asf-mobile-menu { max-height: 0; overflow: hidden; background: var(--asf-bg); border-bottom: 1px solid var(--asf-bg-sub); transition: max-height .3s ease; }
.asf-mobile-menu.is-open { max-height: 420px; }
.asf-mobile-menu ul { padding: 8px var(--asf-gap) 16px; }
.asf-mobile-menu li { border-top: 1px solid var(--asf-bg-sub); }
.asf-mobile-menu a { display: flex; align-items: center; gap: 12px; min-height: 46px; font-weight: 600; }

/* ---------- hero ---------- */
.asf-hero { position: relative; overflow: hidden; }
.asf-hero-bg { position: relative; height: 42vh; min-height: 280px; }
.asf-hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,59,46,.08) 0%, rgba(10,30,24,.2) 100%); }
.asf-hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 2.2s ease; }
.asf-hero-bg img.is-active { opacity: 1; }
.asf-hero-copy { position: relative; text-align: center; max-width: 640px; margin: 0 auto; padding: 36px var(--asf-gap); color: var(--asf-text); }
.asf-hero-copy h1 { color: var(--asf-accent); font-size: 32px; margin-bottom: 14px; }
.asf-hero-copy .asf-lead { color: var(--asf-text); opacity: .85; margin: 0 auto 20px; }
.asf-hero-rotator { position: relative; height: 34px; margin-bottom: 20px; }
.asf-hero-rotator span { position: absolute; inset: 0; opacity: 0; transition: opacity 2.8s ease; font-size: 17px; font-weight: 600; color: var(--asf-data); }
.asf-hero-rotator span.is-active { opacity: 1; }
.asf-hero-copy .asf-cta-buttons { justify-content: center; }

@media (min-width: 900px) {
    .asf-hero-bg { height: 64vh; min-height: 480px; }
    .asf-hero-copy { max-width: 800px; padding: 48px var(--asf-gap); }
    .asf-hero-copy h1 { font-size: 56px; }
    .asf-hero-rotator span { font-size: 22px; }
}

/* ---------- swipe rows ---------- */
.asf-swipe-row { display: flex; gap: var(--asf-gap); overflow-x: auto; scroll-snap-type: x mandatory; -ms-overflow-style: none; scrollbar-width: none; padding-bottom: 4px; }
.asf-swipe-row::-webkit-scrollbar { display: none; }
.asf-swipe-row > * { flex: 0 0 100%; scroll-snap-align: start; }
.asf-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.asf-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--asf-bg-sub); }
.asf-dots span.is-active { background: var(--asf-accent); }

@media (min-width: 768px) {
    .asf-swipe-row { overflow: visible; }
    .asf-swipe-row > * { flex: 1 1 0; }
    .asf-dots { display: none; }
}

/* ---------- solution / about cards ---------- */
.asf-solution-card, .asf-about-card {
    background: #fff; border-radius: var(--asf-radius); padding: 28px 20px; border: 1px solid var(--asf-bg-sub);
}
.asf-solution-card .asf-icon, .asf-about-card .asf-icon {
    width: 24px; height: 24px; padding: 12px; box-sizing: content-box;
    background: var(--asf-bg-sub); border-radius: var(--asf-radius); margin-bottom: 16px;
}
.asf-solution-card h3, .asf-about-card h3 { margin-bottom: 16px; }

/* ---------- grid / card ---------- */
.asf-grid { display: grid; grid-template-columns: 1fr; gap: var(--asf-gap); }
@media (min-width: 640px) { .asf-grid { grid-template-columns: repeat(3, 1fr); } }

.asf-card { display: block; border-radius: var(--asf-radius); overflow: hidden; background: #fff; border: 1px solid var(--asf-bg-sub); transition: transform .25s ease; }
a.asf-card:hover { transform: translateY(-4px); }
.asf-card-media { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.asf-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
a.asf-card:hover .asf-card-media img { transform: scale(1.06); }
.asf-card-link-indicator { position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; background: var(--asf-accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.asf-card-link-indicator .asf-icon { color: #fff; }
.asf-card-body { padding: 20px; }
.asf-card-body h3 { margin-bottom: 8px; }
.asf-card-body p { font-size: 15px; opacity: .78; }

/* ---------- faq ---------- */
.asf-faq-item { border-bottom: 1px solid var(--asf-bg-sub); }
.asf-faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: none; border: none; text-align: left; padding: 20px 0; font-size: 16px; font-weight: 700; color: var(--asf-text); min-height: 44px; }
.asf-faq-q .asf-icon { transition: transform .2s ease; flex: none; }
.asf-faq-item.is-open .asf-faq-q .asf-icon { transform: rotate(180deg); }
.asf-faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.asf-faq-item.is-open .asf-faq-a { max-height: 420px; }
.asf-faq-a p { padding-bottom: 20px; opacity: .85; }

/* ---------- CTA section ---------- */
.asf-cta-section { background: var(--asf-accent); color: #fff; text-align: center; }
.asf-cta-section h2 { color: #fff; margin-bottom: 12px; }
.asf-cta-section .asf-subtitle { opacity: .85; margin-bottom: 24px; }
.asf-cta-section .asf-cta-buttons { justify-content: center; }
.asf-cta-section .asf-btn-primary { background: #fff; color: var(--asf-accent); }
.asf-cta-section .asf-btn-outline { border-color: #fff; color: #fff; }

/* ---------- footer ---------- */
.asf-footer { background: var(--asf-ink); color: rgba(255,255,255,.8); font-size: 14px; padding: 40px 0; }
.asf-footer-top { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; margin-bottom: 24px; }
.asf-footer-info p { margin: 0 0 4px; }
.asf-footer-sites { border-top: 1px solid rgba(255,255,255,.15); padding-top: 16px; margin-bottom: 16px; }
.asf-footer-sites-label { font-size: 13px; opacity: .6; margin: 0 0 10px; }
.asf-footer-sites ul { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.asf-footer-sites a { font-size: 13px; color: rgba(255,255,255,.8); text-decoration: underline; }
.asf-footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 16px; font-size: 13px; opacity: .6; }

/* ---------- detail hero ---------- */
.asf-detail-hero { padding: 0; }
.asf-detail-hero .asf-hero-bg { height: 44vh; min-height: 300px; }
.asf-detail-hero .asf-hero-copy { align-items: center; text-align: center; }
.asf-detail-hero .asf-lead { text-align: center; margin: 0 auto; }
.asf-text-center { text-align: center; }

/* ---------- article typography ---------- */
.asf-page-hero { background: var(--asf-bg-sub); padding: var(--asf-section-gap) 0; text-align: center; }
.asf-page-hero .asf-eyebrow { color: var(--asf-accent); }
.asf-page-hero .asf-lead { margin: 0 auto; }
.asf-article { max-width: 760px; margin: 0 auto; padding: var(--asf-section-gap) var(--asf-gap); }
.asf-article h2 { margin-top: 40px; margin-bottom: 16px; color: var(--asf-accent); }
.asf-article h2:first-child { margin-top: 0; }
.asf-article p { font-size: 16px; }
.asf-check-list { margin: 20px 0; display: grid; gap: 12px; }
.asf-check-list li { display: flex; align-items: flex-start; gap: 12px; background: var(--asf-bg-sub); border-radius: var(--asf-radius); padding: 14px 16px; font-size: 15px; }
table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 14px; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--asf-bg-sub); white-space: nowrap; }
th { background: var(--asf-bg-sub); color: var(--asf-accent); font-weight: 700; }
.asf-check-list li::before {
    content: ''; flex: none; width: 20px; height: 20px; margin-top: 1px;
    background: var(--asf-accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolygon points='10,15.5 6.5,12 8,10.5 10,12.5 16,7 17.5,8.5' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolygon points='10,15.5 6.5,12 8,10.5 10,12.5 16,7 17.5,8.5' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}
.asf-article-cta { max-width: 760px; margin: 0 auto; padding: 0 var(--asf-gap) var(--asf-section-gap); }

/* ---------- case detail section components ---------- */
.asf-section-head { margin-top: 40px; margin-bottom: 16px; }
.asf-section-head:first-child { margin-top: 0; }
.asf-section-head h2 { margin: 0 0 6px; font-weight: 700; color: var(--asf-accent); }
.asf-section-sub { margin: 0; font-weight: 400; font-size: 15px; opacity: .72; }

.asf-info-cards { margin: 20px 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.asf-info-cards .asf-info-card { position: relative; padding: 16px 16px 16px 40px; font-size: 15px; background: var(--asf-bg-sub); border-radius: var(--asf-radius); }
.asf-info-cards .asf-info-card::before { content: ''; position: absolute; left: 16px; top: 19px; width: 9px; height: 9px; border-radius: 50%; background: var(--asf-accent); }
.asf-info-cards .asf-info-card strong { display: block; margin-bottom: 4px; }

.asf-quote-box { margin: 24px 0; padding: 20px 22px; border-left: 3px solid var(--asf-data); background: var(--asf-bg-sub); border-radius: 0 var(--asf-radius) var(--asf-radius) 0; font-size: 15px; }
.asf-quote-box p { margin: 0; font-size: 15px; }

.asf-pill-nav { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; max-width: 340px; }
.asf-pill-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 12px 20px; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--asf-text); border: 1.5px solid #fff; font-weight: 700; font-size: 15px; }

/* ---------- cost donut chart ---------- */
.asf-donut-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin: 20px 0; }
.asf-donut { position: relative; width: 180px; height: 180px; border-radius: 50%; flex: none; }
.asf-donut::after { content: ''; position: absolute; inset: 22%; background: var(--asf-bg); border-radius: 50%; }
.asf-donut-legend { display: grid; gap: 8px; font-size: 14px; flex: 1 1 220px; }
.asf-donut-legend li { display: flex; align-items: center; gap: 8px; }
.asf-donut-legend .asf-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }

/* ---------- contact page ---------- */
.asf-contact-card { max-width: 560px; margin: -32px auto 0; position: relative; z-index: 2; background: #fff; border-radius: var(--asf-radius); border: 1px solid var(--asf-bg-sub); padding: 28px 20px; text-align: center; }
.asf-contact-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--asf-bg-sub); text-align: left; }
.asf-contact-row:first-child { border-top: none; }
.asf-contact-row .asf-icon { background: var(--asf-bg-sub); padding: 10px; border-radius: 50%; box-sizing: content-box; }
.asf-contact-card .asf-cta-buttons { margin-top: 20px; justify-content: center; }
.asf-contact-card .asf-btn { width: 100%; }

/* ---------- simple inquiry form ---------- */
.asf-form { display: grid; gap: 14px; text-align: left; margin-top: 8px; }
.asf-form label { font-size: 14px; font-weight: 700; display: block; margin-bottom: 6px; }
.asf-form input, .asf-form select, .asf-form textarea {
    width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 10px;
    border: 1px solid var(--asf-bg-sub); background: var(--asf-bg); font-family: inherit; font-size: 15px;
}
.asf-form textarea { min-height: 100px; resize: vertical; }

/* ---------- fade-in ---------- */
.asf-fade { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.asf-fade.is-visible { opacity: 1; transform: none; }

/* ---------- desktop breakpoint ---------- */
@media (min-width: 900px) {
    .asf-nav-pc { display: block; }
    .asf-hamburger, .asf-mobile-menu { display: none; }
    h1 { font-size: 44px; }
    h2 { font-size: 32px; }
    h3 { font-size: 20px; }
    .asf-grid { grid-template-columns: repeat(3, 1fr); }
    .asf-footer-top { align-items: center; }
    .asf-mobile-break { display: none; }
}
