/* =============================================================
   EHEELAB — main stylesheet
   Mobile first: base styles are for phones, then wider screens
   are adjusted with @media rules near the end of each section.
   ============================================================= */


/* ===== 1. Colours, fonts and sizes (edit these to restyle the whole site) ===== */
:root {
  /* Lagoon palette */
  --sand:        #FAF9F6;  /* page background */
  --white:       #FFFFFF;  /* cards */
  --ink:         #0F2A33;  /* main text: deep sea */
  --muted:       #4D6870;  /* softer text */
  --line:        #E3ECEC;  /* borders */
  --lagoon:      #0E8F9B;  /* main brand colour: buttons, links */
  --lagoon-dark: #0A6F79;  /* button hover */
  --lagoon-soft: #E4F5F6;  /* light teal backgrounds */
  --aqua:        #7FD6DC;  /* glows */
  --coral:       #F2836B;  /* small accents only */

  /* Fonts */
  --font-main:   "Google Sans Flex", "Noto Sans Thaana", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-code:   "Google Sans Code", ui-monospace, Consolas, monospace;
  --font-thaana: "Noto Sans Thaana", "MV Faseyha", "Faruma", sans-serif;

  /* Shape and spacing */
  --radius:      14px;
  --radius-lg:   22px;
  --shadow:      0 1px 2px rgba(15, 42, 51, .04), 0 6px 20px rgba(15, 42, 51, .06);
  --container:   1120px;
}


/* ===== 2. Basic reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, p, ol, blockquote { margin: 0; }
img, svg { display: block; max-width: 100%; }


/* ===== 3. Text ===== */
body {
  font-family: var(--font-main);
  font-size: 1.0625rem;        /* about 17px: easy to read on phones */
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.02em;      /* slightly tighter, like the labnol title */
  line-height: 1.15;
}
h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }

p + p { margin-top: 1em; }

a { color: var(--lagoon); text-underline-offset: 3px; }
a:hover { color: var(--lagoon-dark); }

code, pre { font-family: var(--font-code); }

.thaana { font-family: var(--font-thaana); }

/* Keyboard focus outline (helps people who don't use a mouse) */
:focus-visible { outline: 3px solid var(--aqua); outline-offset: 3px; border-radius: 6px; }


/* ===== 4. Layout helpers ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 56px 0; }
.section-sub { color: var(--muted); margin-top: 8px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.link-arrow { font-weight: 500; text-decoration: none; white-space: nowrap; }


/* ===== 5. Logo (two weights: bold "Ehee" + light "lab") ===== */
.logo {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}
.logo:hover { color: var(--ink); }
.logo-ehee { font-weight: 750; }
.logo-lab  { font-weight: 300; color: var(--lagoon); }
.logo-small { font-size: 1.25rem; }


/* ===== 6. Header and menu ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 246, .85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* Phone menu button (three lines) */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
/* Turn the three lines into an X when the menu is open */
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Phone menu: hidden until the button is tapped */
.site-nav {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  flex-direction: column;
  padding: 8px 20px 20px;
  background: var(--sand);
  border-bottom: 1px solid var(--line);
}
.menu-open .site-nav { display: flex; }
.site-nav a {
  padding: 12px 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.site-nav a:last-child { border-bottom: 0; }
.site-nav a:hover { color: var(--lagoon); }

/* Wider screens: show the menu in a row, hide the button */
@media (min-width: 760px) {
  .menu-toggle { display: none; }
  .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 28px;
    padding: 0;
    background: none;
    border: 0;
  }
  .site-nav a { padding: 0; font-size: 1rem; border: 0; }
}


/* ===== 7. Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;              /* big enough to tap on phones */
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--lagoon); color: var(--white); }
.btn-primary:hover { background: var(--lagoon-dark); color: var(--white); }
.btn-ghost { border: 1.5px solid var(--line); color: var(--ink); background: var(--white); }
.btn-ghost:hover { border-color: var(--lagoon); color: var(--lagoon); }


/* ===== 8. Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 48px;
}

/* Soft blurred colour circles behind the hero */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  pointer-events: none;
}
.glow-1 { width: 380px; height: 380px; background: var(--aqua);  top: -140px; left: -100px; }
.glow-2 { width: 320px; height: 320px; background: #BFE9F0;      top: -60px;  right: -120px; }

.hero-inner { position: relative; display: grid; gap: 36px; }

.kicker {
  display: inline-block;
  padding: 4px 14px;
  margin-bottom: 18px;
  font-size: .9rem;
  color: var(--lagoon-dark);
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.kicker .thaana { font-size: 1rem; }

.hero-title {
  font-size: clamp(3rem, 12vw, 5.5rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

.hero-lead {
  max-width: 34ch;
  margin-top: 18px;
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  color: var(--muted);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-quote {
  padding-left: 20px;
  border-left: 2px solid var(--line);
  font-size: 1.15rem;
  line-height: 1.55;
  font-weight: 350;
}
.hero-quote footer { margin-top: 12px; font-size: .95rem; color: var(--muted); }

@media (min-width: 900px) {
  .hero { padding: 96px 0 72px; }
  .hero-inner { grid-template-columns: 1.4fr 1fr; align-items: end; gap: 64px; }
  .hero-quote { padding-left: 32px; }
}


/* ===== 9. Intro (about me) ===== */
.intro { padding-top: 24px; }
.intro-inner {
  display: grid;
  gap: 20px;
  max-width: 760px;
  color: var(--muted);
}
.intro-inner a { font-weight: 500; }

.avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--lagoon-soft);
  color: var(--lagoon-dark);
  font-weight: 600;
  font-size: 1.2rem;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 640px) {
  .intro-inner { grid-template-columns: 64px 1fr; gap: 24px; }
}


/* ===== 10. Tool cards ===== */
.card-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 640px)  { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.tool-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform .2s, border-color .2s;
}
.tool-card:hover { transform: translateY(-2px); border-color: #CFE5E6; }

.tool-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--lagoon-soft);
}
.tool-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--lagoon);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-card p { margin-top: 8px; color: var(--muted); font-size: 1rem; flex-grow: 1; }

.tool-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
}
.tag {
  padding: 3px 10px;
  font-size: .8rem;
  color: var(--muted);
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.badge {
  margin-left: auto;
  padding: 3px 10px;
  font-size: .8rem;
  font-weight: 500;
  color: #B4533E;
  background: #FDEDE8;           /* light coral */
  border-radius: 999px;
}


/* ===== 11. How it works ===== */
.how { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.steps {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.steps li {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--sand);
}
.step-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--lagoon);
  color: var(--white);
  font-weight: 600;
}
.steps p { margin-top: 6px; color: var(--muted); font-size: 1rem; }


/* ===== 12. Call to action ===== */
.cta-box {
  padding: 40px 24px;
  text-align: center;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--lagoon-soft), #F1FAF9 60%, #FFF4F0);
  border: 1px solid var(--line);
}
.cta-box p { max-width: 46ch; margin: 12px auto 24px; color: var(--muted); }


/* ===== 13. Footer ===== */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: grid;
  gap: 16px;
  justify-items: start;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--lagoon); }
.footer-note { font-size: .9rem; color: var(--muted); }

@media (min-width: 760px) {
  .footer-inner { grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; }
}
