/* =========================================================
   Alfalend – Kontakt | frontend  v2
   Scope: .afc  –  kõik alla parent-selektori, et ei leki teemasse
   ========================================================= */

.afc {
	--afc-primary:  #3D1A00;
	--afc-accent:   #7DC242;
	--afc-bg:       #FBF7F2;
	--afc-ink:      #2A1608;
	--afc-muted:    #7a6a5c;
	--afc-line:     #ecdfd2;
	--afc-card:     #ffffff;
	--afc-maxw:     1720px;
	--afc-radius:   18px;
	--afc-shadow:   0 20px 44px -28px rgba(61, 26, 0, 0.40);
	--afc-shadow-hover: 0 24px 52px -24px rgba(61, 26, 0, 0.52);

	box-sizing: border-box;
	/* full-bleed */
	width: 100vw;
	max-width: 100vw;
	margin-left:  calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: clamp(2.5rem, 5vw, 5rem) clamp(1.2rem, 6vw, 5rem);
	background: var(--afc-bg);
	color: var(--afc-ink);
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	line-height: 1.6;
	position: relative;
	overflow: hidden;
}

.afc *, .afc *::before, .afc *::after { box-sizing: border-box; }

/* dekoratiivne taustalaik */
.afc::before {
	content: "";
	position: absolute;
	top: -140px; right: -140px;
	width: 360px; height: 360px;
	background: radial-gradient(circle, rgba(125,194,66,.12) 0%, transparent 68%);
	pointer-events: none;
}

.afc__inner {
	max-width: var(--afc-maxw);
	margin: 0 auto;
	position: relative;
	z-index: 1;
}

/* nullime teema kirja-vaikeväärtused */
.afc a { text-decoration: none; color: inherit; }
.afc h2, .afc h3, .afc h4 {
	font-family: "Poppins", "Inter", sans-serif;
	color: var(--afc-primary);
	margin: 0;
	line-height: 1.15;
}

/* ---------- HERO ---------- */
.afc__hero { max-width: 740px; }

.afc__eyebrow {
	display: inline-block;
	font-family: "Poppins", sans-serif;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--afc-primary);
	background: rgba(125,194,66,.18);
	padding: .4rem .9rem;
	border-radius: 999px;
	margin-bottom: 1rem;
}

.afc__title {
	font-size: clamp(2.2rem, 6vw, 3.4rem);
	font-weight: 700;
}
.afc__title::after {
	content: "";
	display: block;
	width: 56px; height: 5px;
	border-radius: 4px;
	background: var(--afc-accent);
	margin-top: .85rem;
}

.afc__subtitle {
	color: var(--afc-muted);
	font-size: 1.05rem;
	max-width: 560px;
	margin: 1.1rem 0 0;
}

/* ---------- BLOKID ---------- */
.afc__block { margin: clamp(2.4rem, 5.5vw, 3.8rem) 0; }

.afc__block-title {
	font-size: clamp(1.4rem, 3vw, 1.85rem);
	font-weight: 700;
	margin-bottom: 0.5rem;
}
.afc__block-title::after {
	content: "";
	display: block;
	width: 42px; height: 4px;
	border-radius: 4px;
	background: var(--afc-accent);
	margin-top: .65rem;
	margin-bottom: 1.4rem;
}

.afc__block-intro {
	color: var(--afc-muted);
	max-width: 640px;
	margin: -.6rem 0 1.6rem;   /* kompenseerib ::after margin-bottom */
}

/* ---------- KAUPLUSED ---------- */
.afc__stores {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.3rem;
}

.afc__store {
	background: var(--afc-card);
	border: 1px solid var(--afc-line);
	border-radius: var(--afc-radius);
	box-shadow: var(--afc-shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .25s ease, box-shadow .25s ease;
}
.afc__store:hover {
	transform: translateY(-4px);
	box-shadow: var(--afc-shadow-hover);
}

/* Tumepruun päis nimega */
.afc__store-hd {
	background: var(--af-surface-strong, var(--afc-primary));
	padding: 1.1rem 1.4rem;
}
.afc__store-name {
	font-size: 1.12rem;
	font-weight: 600;
	color: var(--af-on-surface-strong, #fff) !important;   /* ülimuslikkus – teema h4 reeglite vastu */
	letter-spacing: -.005em;
}
.afc__store-hours {
	display: flex;
	align-items: center;
	gap: .38rem;
	margin-top: .45rem;
	font-size: .82rem;
	color: rgba(255,255,255,.72);
}
.afc__store-hours .afc-i { width: 15px; height: 15px; stroke: var(--afc-accent); }

/* Keha */
.afc__store-bd {
	padding: 1.2rem 1.4rem 1.3rem;
	display: flex;
	flex-direction: column;
	gap: .75rem;
	flex: 1;
}

/* ---------- INFOREAD ---------- */
.afc-i { width: 18px; height: 18px; display: block; flex: 0 0 auto; }

.afc__row {
	display: flex;
	align-items: flex-start;
	gap: .6rem;
	font-size: .96rem;
	color: var(--afc-ink);
}
.afc__row--sm { font-size: .9rem; }

.afc__row-ic { flex: 0 0 auto; color: var(--afc-accent); margin-top: 1px; }

.afc__row-txt { display: flex; flex-direction: column; line-height: 1.4; }
.afc__row-sub { font-size: .83rem; color: var(--afc-muted); margin-top: .1rem; }

.afc__row a:hover { color: var(--afc-accent); }

/* Telefoniread */
.afc-lines {
	list-style: none;
	margin: 0; padding: 0;
	display: flex; flex-direction: column;
	gap: .5rem;
}
.afc-line {
	display: flex;
	align-items: flex-start;
	gap: .6rem;
	font-size: .96rem;
}
.afc-line-ic { flex: 0 0 auto; color: var(--afc-accent); margin-top: 1px; }
.afc-line-txt { display: flex; flex-direction: column; line-height: 1.3; }
.afc-line-label {
	font-size: .68rem;
	font-weight: 600;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--afc-muted);
}
.afc-line a { color: var(--afc-ink); }
.afc-line a:hover { color: var(--afc-accent); }

/* Kaardil-nupp – pill-nupuna */
.afc__maplink {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	align-self: flex-start;
	margin-top: .3rem;
	padding: .45rem 1rem;
	border: 1.5px solid var(--afc-line);
	border-radius: 999px;
	font-family: "Poppins", sans-serif;
	font-size: .82rem;
	font-weight: 600;
	color: var(--afc-primary);
	transition: border-color .2s, background .2s, color .2s;
}
.afc__maplink .afc-i { color: var(--afc-accent); width: 16px; height: 16px; }
.afc__maplink:hover {
	border-color: var(--afc-accent);
	background: rgba(125,194,66,.09);
	color: var(--afc-primary);
}

/* ---------- PROJEKTIMÜÜK ---------- */
.afc__people {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 1.2rem;
}

.afc__person {
	background: var(--afc-card);
	border: 1px solid var(--afc-line);
	border-radius: var(--afc-radius);
	box-shadow: var(--afc-shadow);
	overflow: hidden;
	transition: transform .25s ease, box-shadow .25s ease;
}
.afc__person:hover {
	transform: translateY(-3px);
	box-shadow: var(--afc-shadow-hover);
}

/* Inimese kaardi päis */
.afc__person-hd {
	display: flex;
	align-items: center;
	gap: .85rem;
	padding: 1.1rem 1.3rem;
	background: linear-gradient(135deg, rgba(61,26,0,.04) 0%, rgba(125,194,66,.07) 100%);
	border-bottom: 1px solid var(--afc-line);
}

.afc__person-avatar {
	flex: 0 0 auto;
	width: 50px; height: 50px;
	border-radius: 50%;
	background: var(--af-surface-strong, var(--afc-primary));
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: "Poppins", sans-serif;
	font-weight: 700;
	font-size: 1.05rem;
	color: var(--af-on-surface-strong, #fff);
	letter-spacing: .02em;
}

.afc__person-id { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }

.afc__person-name {
	font-family: "Poppins", sans-serif;
	font-weight: 600;
	font-size: 1rem;
	color: var(--afc-primary);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.afc__person-region {
	display: inline-block;
	align-self: flex-start;
	font-size: .68rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #4c7d1f;
	background: rgba(125,194,66,.18);
	padding: .2rem .55rem;
	border-radius: 999px;
}

/* Inimese kaardi keha */
.afc__person-bd {
	padding: 1rem 1.3rem 1.2rem;
	display: flex;
	flex-direction: column;
	gap: .55rem;
}
.afc__person .afc-lines { gap: .4rem; }
.afc__person .afc-line  { font-size: .9rem; }
.afc__person .afc__row  { font-size: .9rem; }
.afc__person a:hover { color: var(--afc-accent); }

/* ---------- KONTAKTIVORM ---------- */
.afc__formwrap {
	margin-top: clamp(2.4rem, 5vw, 3.8rem);
	background: var(--af-surface-strong, var(--afc-primary));
	border-left: 4px solid var(--af-accent-border, transparent);
	border-radius: calc(var(--afc-radius) + 4px);
	padding: clamp(1.8rem, 4vw, 3rem) clamp(1.4rem, 4vw, 3rem);
	box-shadow: var(--afc-shadow);
	position: relative;
	overflow: hidden;
}
/* taustadekoratsioon */
.afc__formwrap::before {
	content: "";
	position: absolute;
	right: -100px; bottom: -100px;
	width: 300px; height: 300px;
	background: radial-gradient(circle, rgba(125,194,66,.22) 0%, transparent 68%);
	pointer-events: none;
}
.afc__formwrap::after {
	content: "";
	position: absolute;
	left: -60px; top: -60px;
	width: 200px; height: 200px;
	background: radial-gradient(circle, rgba(255,255,255,.04) 0%, transparent 68%);
	pointer-events: none;
}

.afc__formhead { position: relative; z-index: 1; max-width: 640px; margin-bottom: 1.8rem; }

/* Vormi pealkiri – .afc .afc__form-title (0,2,0) > .afc h3 (0,1,1) */
.afc .afc__form-title {
	font-family: "Poppins", sans-serif;
	font-size: clamp(1.35rem, 3vw, 1.8rem);
	font-weight: 700;
	color: var(--af-on-surface-strong, #fff);
	margin: 0 0 .5rem;
	letter-spacing: -.01em;
}
.afc .afc__form-title::after {
	content: "";
	display: block;
	width: 42px; height: 4px;
	border-radius: 4px;
	background: var(--afc-accent);
	margin-top: .65rem;
}

.afc__form-intro {
	color: var(--af-on-surface-strong-soft, rgba(246,237,228,.78));
	font-size: .98rem;
	margin: 0;
}

.afc__form { position: relative; z-index: 1; }

.afc__form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: .9rem;
}
.afc__f--wide { grid-column: 1 / -1; }

.afc__f { display: flex; flex-direction: column; gap: .32rem; }

.afc__f-label {
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--af-on-surface-strong-soft, rgba(246,237,228,.85));
}
.afc__f-req { color: var(--afc-accent); font-style: normal; }

.afc__f input,
.afc__f textarea {
	width: 100%;
	background: rgba(255,255,255,.95);
	border: 1.5px solid transparent;
	border-radius: 10px;
	padding: .7rem .9rem;
	font-family: "Inter", sans-serif;
	font-size: .97rem;
	color: var(--afc-ink);
	transition: border-color .18s, box-shadow .18s;
}
.afc__f textarea { resize: vertical; }
.afc__f input::placeholder,
.afc__f textarea::placeholder { color: #b0a497; }

.afc__f input:focus,
.afc__f textarea:focus {
	outline: none;
	border-color: var(--afc-accent);
	box-shadow: 0 0 0 3px rgba(125,194,66,.22);
}

/* honeypot */
.afc__hp {
	position: absolute;
	left: -9999px; width: 1px; height: 1px; overflow: hidden;
}

.afc__form-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 1.3rem;
	flex-wrap: wrap;
}
.afc__f-note {
	font-size: .78rem;
	color: var(--af-on-surface-strong-faint, rgba(246,237,228,.55));
}

.afc__submit {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	border: 0;
	cursor: pointer;
	font-family: "Poppins", sans-serif;
	font-weight: 600;
	font-size: 1rem;
	color: #163a05;
	background: var(--afc-accent);
	padding: .8rem 1.8rem;
	border-radius: 999px;
	transition: transform .2s ease, background .2s ease, box-shadow .2s;
}
.afc__submit .afc-i { width: 19px; height: 19px; }
.afc__submit:hover {
	transform: translateY(-2px);
	background: #8fd155;
	box-shadow: 0 8px 20px -8px rgba(125,194,66,.5);
}

/* Teated */
.afc__notice {
	position: relative; z-index: 1;
	margin-bottom: 1.4rem;
	padding: .9rem 1.1rem;
	border-radius: 10px;
	font-weight: 500;
	font-size: .97rem;
}
.afc__notice--ok  { background: rgba(125,194,66,.2); color: #e0f5c8; border: 1px solid rgba(125,194,66,.45); }
.afc__notice--err { background: rgba(220,70,50,.2);  color: #ffe6de; border: 1px solid rgba(220,70,50,.4); }

/* ---------- FOOKUS / KÄSITSITAVUS ---------- */
.afc a:focus-visible,
.afc__submit:focus-visible,
.afc__maplink:focus-visible {
	outline: 3px solid var(--afc-accent);
	outline-offset: 3px;
	border-radius: 4px;
}

/* ---------- RESPONSIIVSUS ---------- */
@media (max-width: 700px) {
	.afc__form-grid { grid-template-columns: 1fr; }
	.afc__f--wide   { grid-column: 1; }
	.afc__form-footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 500px) {
	.afc__person-hd { flex-direction: column; align-items: flex-start; gap: .65rem; }
	.afc__person-name { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
	.afc__store, .afc__person, .afc__submit { transition: none; }
}
