/* Thamizhar.mu - yellow page, heavy black type, cream cards. */

:root {
  --yellow: #f7cf28;
  --yellow-soft: #ffe47a;
  --ink: #191919;
  --muted: #605a44;
  --paper: #fffdf4;
  --line: rgba(25, 25, 25, 0.22);
  /* Noto Sans Tamil only downloads when a name contains Tamil letters. */
  --font-body: 'DM Sans', 'Noto Sans Tamil', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Outfit', 'Noto Sans Tamil', var(--font-body);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--yellow);
}

body {
  margin: 0;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
h4,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Outfit's tight letter-spacing pulls words together: give the gaps back. */
.cta h2,
.social-heading,
.social-name,
.card-name {
  word-spacing: 0.12em;
}

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 30px;
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  padding: 30px 0 64px;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 930px;
}

/* Concentric rings and a white star, top right. */
.hero-rings {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 330px;
  height: 330px;
  border: 2px solid rgba(25, 25, 25, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.hero-rings::before,
.hero-rings::after {
  content: '';
  position: absolute;
  inset: 22px;
  border: 2px solid rgba(25, 25, 25, 0.1);
  border-radius: 50%;
}

.hero-rings::after {
  inset: 54px;
}

.hero-star {
  position: absolute;
  top: 110px;
  right: -46px;
  font-family: Georgia, serif;
  font-size: 240px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.3);
  transform: rotate(-15deg);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2.1px;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  background: var(--ink);
}

.hero h1 {
  margin: 28px 0 13px;
  font: 900 clamp(64px, 12.4vw, 160px)/0.93 var(--font-display);
  letter-spacing: -0.07em;
}

.hero h1 .dot {
  color: #fff;
}

.hero h1 .mu {
  font-size: 0.56em;
  letter-spacing: -0.05em;
}

.hero-sub {
  max-width: 610px;
  margin-top: 24px;
  font-size: clamp(20px, 2.6vw, 27px);
  font-weight: 600;
  line-height: 1.42;
}

/* ------------------------------------------------------------- directory */

.directory {
  padding: 40px 0 95px;
  border-top: 1px solid var(--line);
}

/* Websites on the left, social networks in a sidebar on the right. */
.directory-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 24px;
}

/* Three websites per row (two on phones). */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

/* Website cards: the logo centred, the name centred along the bottom. */
.card {
  position: relative;
  height: 100%;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 22px 14px 18px;
  border: 1px solid rgba(25, 25, 25, 0.1);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 3px 4px 0 rgba(25, 25, 25, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 6px 10px 0 rgba(25, 25, 25, 0.09);
}

.card-head {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Logo tiles: an image, a short mark or a platform icon. */
.logo {
  flex: 0 0 55px;
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 15px;
  font: 900 24px/1 var(--font-display);
  letter-spacing: -2px;
}

.logo svg {
  width: 29px;
  height: 29px;
  fill: currentColor;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* No tile behind logos: images show as they are, marks and icons in colour. */
.logo--black { color: #191919; }
.logo--cream { color: #1e1e1e; }
.logo--pink { color: #c9493e; }
.logo--green { color: #207c48; }
.logo--blue { color: #2256aa; }
.logo--purple { color: #7041aa; }
.logo--facebook { color: #1666dc; }
.logo--tiktok { color: #191919; }
.logo--youtube { color: #d01919; }
.logo--instagram { color: #c2275e; }

/* Website cards: a large logo. */
.card .logo {
  flex-basis: 80px;
  width: 80px;
  height: 80px;
  border-radius: 20px;
  font-size: 34px;
}

.card .logo svg {
  width: 40px;
  height: 40px;
}

.logo--small {
  flex-basis: 44px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 19px;
  letter-spacing: -1px;
}

.logo--small svg {
  width: 23px;
  height: 23px;
}

.external {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #ddd9cd;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
}

.card-name {
  max-width: 100%;
  margin-top: 14px;
  overflow-wrap: anywhere;
  font: 800 clamp(19px, 1.9vw, 24px)/1.1 var(--font-display);
  letter-spacing: -0.8px;
}

/* ---------------------------------------------------------------- sidebar */

/* Straight on the yellow: a heading, then each platform with its own rule. */
.social {
  position: sticky;
  top: 20px;
}

.social-heading {
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
  font: 800 26px/1.1 var(--font-display);
  letter-spacing: -0.8px;
}

.social-group {
  margin-top: 20px;
}

.social-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink);
}

.social-title svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.social-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Rows styled like the website cards. */
.social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(25, 25, 25, 0.1);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 3px 4px 0 rgba(25, 25, 25, 0.08);
  color: var(--ink);
  transition: transform 0.2s, box-shadow 0.2s;
}

.social-link:hover {
  transform: translateY(-3px);
  box-shadow: 5px 8px 0 rgba(25, 25, 25, 0.09);
}

.social-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.social-name {
  font: 800 15px/1.2 var(--font-display);
  letter-spacing: -0.3px;
}

.social-link .external {
  width: 26px;
  height: 26px;
  font-size: 14px;
}

.empty {
  padding: 40px;
  border: 1px dashed currentColor;
  border-radius: 14px;
  text-align: center;
}

/* ---------------------------------------------------------------- kovils */

/* Kovils' Facebook pages: full width, three columns (two on tablets, one on
   phones), the same rows as the sidebar. */
.kovils {
  margin: -40px 0 65px;
}

.kovils-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.kovils-heading svg {
  flex: none;
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.kovils-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

/* -------------------------------------------------------------- call out */

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 65px;
  padding: 37px 41px;
  border-radius: 22px;
  background: #171717;
  color: #fff;
}

.cta h2 {
  margin-bottom: 8px;
  font: 800 31px/1.1 var(--font-display);
  letter-spacing: -1px;
}

.cta p {
  max-width: 570px;
  font-size: 14px;
  line-height: 1.6;
  color: #cbc8bf;
}

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 22px;
  border-radius: 99px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.cta-link:hover {
  background: var(--yellow-soft);
}

/* ---------------------------------------------------------------- footer */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 27px 0 33px;
  border-top: 1px solid rgba(25, 25, 25, 0.25);
  font-size: 12px;
  font-weight: 600;
  color: #4f482f;
}

.footer strong {
  color: var(--ink);
}

.footer-motto {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.card:focus-visible,
.social-link:focus-visible,
.cta-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ------------------------------------------------------------ narrower */

@media (max-width: 960px) {
  .directory-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .social {
    position: static;
  }

  .kovils-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-star {
    opacity: 0.35;
  }
}

@media (max-width: 620px) {
  .page {
    padding: 0 18px;
  }

  .hero h1 {
    margin-top: 22px;
    font-size: clamp(52px, 15vw, 96px);
  }

  .hero-sub {
    font-size: 19px;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .card {
    min-height: 160px;
  }

  .kovils-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .card .logo {
    flex-basis: 68px;
    width: 68px;
    height: 68px;
    border-radius: 17px;
    font-size: 28px;
  }

  .hero-rings {
    right: -90px;
    width: 180px;
    height: 180px;
  }

  .cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 29px;
  }

  .cta h2 {
    font-size: 27px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
