NSamson1's picture
Update style.css
0085559 verified
Raw History Blame Contribute Delete
13.7 kB
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800&family=DM+Sans:wght@300;400;500;600&display=swap');
:root {
--green-dark: #1a3d2b;
--green-mid: #2d6a4f;
--green-bright: #40916c;
--green-light: #74c69d;
--green-pale: #d8f3dc;
--amber: #f4a261;
--soil: #8b5e3c;
--sky: #48cae4;
--cream: #fefae0;
--text: #1a1a2e;
--text-light: #4a5568;
--white: #ffffff;
--shadow: 0 4px 24px rgba(26,61,43,0.12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: 'DM Sans', sans-serif;
background: #f0f7f4;
color: var(--text);
scroll-behavior: smooth;
}
/* NAV */
header {
background: var(--green-dark);
position: sticky; top: 0; z-index: 100;
box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}
.nav-inner {
max-width: 1200px; margin: 0 auto;
padding: 0 1.5rem;
display: flex; align-items: center; justify-content: space-between;
height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon { width: 38px; height: 38px; background: var(--green-bright); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; }
.logo-text { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: #fff; font-weight: 700; }
.logo-text span { color: var(--green-light); }
nav { display: flex; gap: 0.25rem; }
nav a {
color: rgba(255,255,255,0.8); text-decoration: none; padding: 0.5rem 0.9rem;
border-radius: 6px; font-size: 0.9rem; font-weight: 500;
transition: all 0.2s;
}
nav a:hover, nav a.active { background: var(--green-bright); color: #fff; }
.hamburger { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }
#mobile-nav {
display: none; background: var(--green-mid); padding: 0.5rem 1rem 1rem;
}
#mobile-nav a { display: block; color: #fff; padding: 0.6rem 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); text-decoration: none; }
#mobile-nav a:last-child { border: none; }
/* HERO */
.hero {
background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 50%, var(--green-bright) 100%);
padding: 5rem 1.5rem 4rem;
text-align: center; color: #fff;
position: relative; overflow: hidden;
}
.hero::before {
content: '';
position: absolute; inset: 0;
background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; max-width: 750px; margin: 0 auto; }
.hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; margin-bottom: 1rem; line-height: 1.15; }
.hero p { font-size: 1.2rem; opacity: 0.9; margin-bottom: 2rem; }
.hero-btn {
display: inline-flex; align-items: center; gap: 8px;
background: #fff; color: var(--green-dark); font-weight: 700; font-size: 1rem;
padding: 0.875rem 2rem; border-radius: 50px; text-decoration: none;
transition: transform 0.2s, box-shadow 0.2s;
box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.hero-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.25); }
/* FEATURES */
.features { background: #fff; padding: 4rem 1.5rem; }
.section-title { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--green-dark); text-align: center; margin-bottom: 2.5rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; max-width: 1200px; margin: 0 auto; }
.feature-card {
padding: 1.75rem; border-radius: 14px; border: 1.5px solid var(--green-pale);
background: var(--cream); transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon { font-size: 2rem; color: var(--green-bright); margin-bottom: 1rem; }
.feature-card h3 { font-weight: 600; color: var(--green-dark); margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.9rem; color: var(--text-light); line-height: 1.6; }
/* SECTION WRAPPER */
.section-wrap { max-width: 1200px; margin: 0 auto; padding: 4rem 1.5rem; }
/* CROP ADVISOR */
#crop-advisor { background: #f0f7f4; }
.card { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 2rem; margin-bottom: 1.5rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
label { display: block; font-weight: 600; font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.04em; }
select, input[type=text], input[type=number] {
width: 100%; padding: 0.75rem 1rem; border: 1.5px solid #d1e8db;
border-radius: 10px; font-family: inherit; font-size: 0.95rem;
background: #f8fdfb; color: var(--text); transition: border-color 0.2s;
appearance: none;
}
select:focus, input:focus { outline: none; border-color: var(--green-bright); }
.btn-primary {
display: inline-flex; align-items: center; gap: 8px;
background: var(--green-mid); color: #fff; font-weight: 600; font-size: 1rem;
padding: 0.875rem 2rem; border-radius: 10px; border: none; cursor: pointer;
transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
/* AGENT THINKING */
.agent-box { border-left: 4px solid var(--green-bright); }
.step { display: flex; align-items: center; gap: 10px; padding: 0.5rem 0; color: var(--text-light); font-size: 0.95rem; }
.step .dot { width: 10px; height: 10px; border-radius: 50%; background: #ddd; flex-shrink: 0; }
.step.active .dot { background: var(--green-bright); animation: pulse 1s infinite; }
.step.done .dot { background: var(--green-bright); animation: none; }
.step.done { color: var(--green-mid); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
/* RECOMMENDATION */
.rec-card { border-left: 5px solid var(--green-mid); }
.rec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin: 1rem 0; }
.rec-item { background: var(--green-pale); border-radius: 10px; padding: 1rem; text-align: center; }
.rec-item .val { font-family: 'Playfair Display', serif; font-size: 1.8rem; font-weight: 700; color: var(--green-dark); }
.rec-item .lbl { font-size: 0.8rem; color: var(--text-light); margin-top: 2px; }
.rec-section { margin: 1.25rem 0; }
.rec-section h4 { font-weight: 700; color: var(--green-dark); margin-bottom: 0.5rem; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; }
.tip-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 1rem 1.25rem; font-size: 0.9rem; color: #78350f; }
/* CHAT */
#chatMessages {
height: 260px; overflow-y: auto; padding: 1rem;
background: #f8fdfb; border-radius: 10px; margin-bottom: 1rem;
display: flex; flex-direction: column; gap: 0.75rem;
}
.msg-bot, .msg-user { max-width: 80%; padding: 0.7rem 1rem; border-radius: 14px; font-size: 0.9rem; line-height: 1.5; }
.msg-bot { background: var(--green-pale); color: var(--green-dark); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-user { background: var(--green-mid); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-typing { opacity: 0.6; font-style: italic; }
.chat-input-row { display: flex; gap: 0.75rem; }
.chat-input-row input { flex: 1; }
.chat-input-row button { background: var(--green-mid); color: #fff; border: none; padding: 0.75rem 1.5rem; border-radius: 10px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.chat-input-row button:hover { background: var(--green-dark); }
/* CLIMATE */
#climate { background: #fff; }
.climate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.climate-card { background: linear-gradient(135deg, var(--green-mid), var(--green-bright)); color: #fff; border-radius: 16px; padding: 1.75rem; }
.climate-card h3 { font-size: 0.85rem; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.75rem; }
.climate-val { font-family: 'Playfair Display', serif; font-size: 2.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.climate-sub { font-size: 0.9rem; opacity: 0.85; }
.season-timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.season-block { border-radius: 12px; padding: 1.25rem; text-align: center; }
.season-a { background: #d1fae5; border: 2px solid #6ee7b7; }
.season-b { background: #dbeafe; border: 2px solid #93c5fd; }
.season-c { background: #fef9c3; border: 2px solid #fde047; }
.season-block strong { display: block; font-size: 1.1rem; color: var(--green-dark); }
.season-block span { font-size: 0.82rem; color: var(--text-light); }
/* MARKET */
#market { background: #f0f7f4; }
.market-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.price-card { background: #fff; border-radius: 14px; padding: 1.5rem; box-shadow: 0 2px 12px rgba(26,61,43,0.08); border-top: 4px solid var(--green-bright); }
.price-card .crop-name { font-weight: 700; font-size: 1rem; color: var(--green-dark); margin-bottom: 0.5rem; }
.price-card .price { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--green-mid); }
.price-card .unit { font-size: 0.8rem; color: var(--text-light); }
.price-card .trend { font-size: 0.8rem; margin-top: 0.5rem; padding: 2px 8px; border-radius: 20px; display: inline-block; }
.trend-up { background: #dcfce7; color: #166534; }
.trend-down { background: #fee2e2; color: #991b1b; }
.trend-stable { background: #fef9c3; color: #854d0e; }
.market-advice { background: #fff; border-radius: 14px; padding: 1.75rem; margin-top: 1rem; }
.market-advice h3 { font-weight: 700; color: var(--green-dark); margin-bottom: 1rem; }
.advice-row { display: flex; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid #f0f7f4; align-items: flex-start; }
.advice-row:last-child { border: none; }
.advice-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: 2px; }
.advice-text strong { display: block; font-weight: 600; color: var(--green-dark); font-size: 0.95rem; }
.advice-text span { font-size: 0.88rem; color: var(--text-light); }
/* SOIL & WATER */
#soil-water { background: #fff; }
.sw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 700px) { .sw-grid { grid-template-columns: 1fr; } }
.soil-form-card { background: #f0f7f4; border-radius: 14px; padding: 1.75rem; }
.soil-result { background: #fff; border-radius: 14px; padding: 1.75rem; border: 1.5px solid var(--green-pale); min-height: 200px; }
.ph-bar { height: 20px; border-radius: 20px; background: linear-gradient(to right, #dc2626, #f97316, #facc15, #4ade80, #22c55e, #86efac); position: relative; margin: 0.75rem 0; }
.ph-marker { position: absolute; top: -6px; width: 14px; height: 32px; border-radius: 4px; background: var(--green-dark); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.3); transform: translateX(-50%); transition: left 0.5s; }
.water-tips { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.water-tip { background: #e0f2fe; border-radius: 10px; padding: 1.1rem; }
.water-tip .wt-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.water-tip strong { display: block; color: #0369a1; font-size: 0.9rem; }
.water-tip span { font-size: 0.83rem; color: var(--text-light); }
.npk-bar-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.npk-label { width: 30px; font-weight: 700; font-size: 0.85rem; color: var(--green-dark); }
.npk-track { flex: 1; height: 14px; background: #e8f5e9; border-radius: 20px; overflow: hidden; }
.npk-fill { height: 100%; border-radius: 20px; transition: width 0.6s; }
.npk-n { background: #40916c; }
.npk-p { background: #f4a261; }
.npk-k { background: #48cae4; }
.npk-val { font-size: 0.82rem; color: var(--text-light); width: 60px; text-align: right; }
/* ABOUT */
#about { background: var(--green-dark); color: #fff; }
.about-inner { max-width: 900px; margin: 0 auto; padding: 4rem 1.5rem; }
.about-inner .section-title { color: var(--green-light); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 2rem; }
@media (max-width: 640px) { .about-grid { grid-template-columns: 1fr; } }
.about-col h3 { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--green-light); margin-bottom: 1rem; }
.about-col p { font-size: 0.95rem; line-height: 1.8; color: rgba(255,255,255,0.8); margin-bottom: 0.75rem; }
.data-sources { margin-top: 1rem; }
.data-sources li { padding: 0.4rem 0; font-size: 0.9rem; color: rgba(255,255,255,0.75); display: flex; align-items: center; gap: 8px; }
.data-sources li::before { content: '✓'; color: var(--green-light); font-weight: 700; }
.about-stat { background: rgba(255,255,255,0.08); border-radius: 12px; padding: 1.5rem; text-align: center; margin-bottom: 1rem; }
.about-stat .big { font-family: 'Playfair Display', serif; font-size: 2.5rem; color: var(--green-light); }
.about-stat .lbl { font-size: 0.85rem; color: rgba(255,255,255,0.7); }
/* FOOTER */
footer { background: #0d2218; color: rgba(255,255,255,0.6); text-align: center; padding: 1.5rem; font-size: 0.85rem; }
footer strong { color: var(--green-light); }
/* HIDDEN */
.hidden { display: none !important; }
@media (max-width: 768px) {
nav { display: none; }
.hamburger { display: block; }
.season-timeline { grid-template-columns: 1fr; }
.water-tips { grid-template-columns: 1fr; }
}