/* ============================================
   KANNUR TECHNOLODGE — Sequoia-style Design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* === RESET & BASE === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --cream: #fbf7f0;
  --dark: #1b1917;
  --dark-card: #1b1916;
  --green: #007354;
  --green-light: #00986e;
  --text: #1b1917;
  --text-muted: #6b6560;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 12px;
  --radius-lg: 16px;
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--sans);
  background-color: var(--cream);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* === LAYOUT === */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
}

/* === NAVIGATION === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--cream);
  border-bottom: 1px solid rgba(27, 25, 23, 0.08);
  backdrop-filter: blur(20px);
  transition: all var(--transition);
}

.nav.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--dark);
  letter-spacing: -0.02em;
}

.nav-logo span {
  color: var(--green);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--green);
}

.nav-cta {
  background: var(--green);
  color: white !important;
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  font-size: 0.8rem !important;
  transition: background var(--transition), transform var(--transition) !important;
}

.nav-cta:hover {
  background: var(--green-light);
  transform: translateY(-1px);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* === HERO SECTION === */
.hero {
  padding: 10rem 0 6rem;
  text-align: center;
}

.hero h1 {
  max-width: 900px;
  margin: 0 auto 1.5rem;
  letter-spacing: -0.03em;
}

.hero p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.15rem;
}

.hero-accent {
  color: var(--green);
  position: relative;
}

.hero-accent::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--green);
  opacity: 0.3;
  border-radius: 2px;
}

/* Animated gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--green), #00b386, var(--green));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* === BENTO GRID === */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.bento-grid .card:nth-child(1) { grid-column: span 2; }
.bento-grid .card:nth-child(4) { grid-column: span 2; }
.bento-grid .card:nth-child(7) { grid-column: span 2; }

/* === CARDS === */
.card {
  background: var(--dark-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  color: white;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.card-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green);
  margin-bottom: 1rem;
  font-family: var(--sans);
}

.card-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: white;
}

.card-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.2rem;
}

.card-arrow {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}

.card:hover .card-arrow {
  background: var(--green);
  transform: translateX(3px);
}

.card-arrow svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: white;
  stroke-width: 2;
}

/* Light card variant */
.card-light {
  background: white;
  color: var(--dark);
  border: 1px solid rgba(27,25,23,0.08);
}

.card-light .card-title { color: var(--dark); }
.card-light .card-desc { color: var(--text-muted); }

/* === STATS SECTION === */
.stats-section {
  background: var(--dark);
  border-radius: var(--radius-lg);
  padding: 4rem 3rem;
  margin: 4rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item h3 {
  font-family: var(--serif);
  font-size: 3rem;
  color: white;
  margin-bottom: 0.5rem;
}

.stat-item p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === TEAM GRID === */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.team-card {
  background: var(--dark-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  border: 2px solid transparent;
}

.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  border-color: var(--green);
}

.team-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: transform var(--transition);
}

.team-card:hover img {
  transform: scale(1.03);
}

.team-card-info {
  padding: 1.5rem;
}

.team-card-info h4 {
  font-family: var(--serif);
  color: white;
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.team-card-info p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

/* === COMPANIES GRID === */
.companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.company-card {
  background: var(--dark-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid rgba(255,255,255,0.05);
}

.company-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
}

.company-card h4 {
  font-family: var(--serif);
  color: white;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.company-card .company-desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.company-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.company-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  background: rgba(0, 115, 84, 0.15);
  color: var(--green-light);
}

/* === CONTACT FORM === */
.contact-section {
  max-width: 700px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(27,25,23,0.15);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 1rem;
  background: white;
  color: var(--dark);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 115, 84, 0.1);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--green);
  color: white;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn:hover {
  background: var(--green-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 115, 84, 0.25);
}

.btn-lg {
  padding: 1.2rem 2.5rem;
  font-size: 1rem;
}

/* === MAILING LIST === */
.mailing-section {
  text-align: center;
  padding: 5rem 0;
}

.mailing-section h2 {
  margin-bottom: 1rem;
}

.mailing-section p {
  margin-bottom: 2rem;
}

.mailing-form {
  display: flex;
  gap: 0.75rem;
  max-width: 500px;
  margin: 0 auto;
}

.mailing-form input {
  flex: 1;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(27,25,23,0.15);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 1rem;
  background: white;
}

.mailing-form input:focus {
  outline: none;
  border-color: var(--green);
}

/* === OFFICES === */
.offices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.office-card {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid rgba(27,25,23,0.08);
  text-align: center;
}

.office-card h4 {
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.office-card p {
  font-size: 0.9rem;
}

.office-card .office-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
  margin-bottom: 0.75rem;
}

/* === ABOUT PAGE === */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content p {
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.value-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1px solid rgba(27,25,23,0.08);
  transition: transform var(--transition), box-shadow var(--transition);
}

.value-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}

.value-card h4 {
  font-family: var(--serif);
  color: var(--dark);
  margin-bottom: 0.75rem;
}

.value-card p {
  font-size: 0.95rem;
}

/* === FOOTER === */
.footer {
  background: var(--green);
  color: var(--cream);
  padding: 5rem 0 3rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-brand h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--cream);
  margin-bottom: 1rem;
}

.footer-brand p {
  color: rgba(251, 247, 240, 0.7);
  font-size: 0.95rem;
  max-width: 300px;
}

.footer-col h5 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.2rem;
  color: rgba(251, 247, 240, 0.5);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: rgba(251, 247, 240, 0.8);
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--cream);
}

.footer-bottom {
  border-top: 1px solid rgba(251, 247, 240, 0.15);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: rgba(251, 247, 240, 0.5);
}

/* === REVEAL ANIMATIONS === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === PAGE HERO (non-home) === */
.page-hero {
  padding: 10rem 0 4rem;
  text-align: center;
}

.page-hero h1 {
  margin-bottom: 1rem;
}

.page-hero p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.15rem;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-grid .card:nth-child(1),
  .bento-grid .card:nth-child(4),
  .bento-grid .card:nth-child(7) {
    grid-column: span 1;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .offices-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid rgba(27,25,23,0.08);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  }
  .nav-links.open {
    display: flex;
  }
  .nav-toggle {
    display: flex;
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-grid .card:nth-child(1),
  .bento-grid .card:nth-child(4),
  .bento-grid .card:nth-child(7) {
    grid-column: span 1;
  }
  .hero { padding: 8rem 0 4rem; }
  .page-hero { padding: 8rem 0 3rem; }
  section { padding: 4rem 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item h3 { font-size: 2.2rem; }
  .values-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .mailing-form { flex-direction: column; }
  .team-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .companies-grid { grid-template-columns: 1fr; }
}
